From b3186a9c27fb7fc203051748d7524c5701af081c Mon Sep 17 00:00:00 2001 From: Daniela Valero Date: Wed, 13 Sep 2017 10:37:18 +0200 Subject: [PATCH 01/24] chore: Use prettier (#173) * build: Add webpack lint settings and style code with eslint --fix We now use the webpack eslint settings that make sense in the cli. Also use the new --fix of eslint to automatically beautify the code * Add additional .eslintrc to /bin to remove unrelated eslint errors * build: Add jest-cli as dev dependency * style: fix lintin errors and coding style according to webpack settings * build: update dependencies and add package-lock to repo * feat: Require quotes only in property names that require it * chore: Add again removed settings by merge conflict solving * tests: Fix failing test * chore: Use husky instead of pre-commit pre-commit package stopped working. See https://github.com/observing/pre-commit/issues/113 husky also requires less boilerplate in the package.json --- .eslintrc.js | 73 + .eslintrc.json | 55 - .jsbeautifyrc | 25 - __mocks__/creator/validate-options.mock.js | 10 +- __mocks__/inquirer/resolve.mock.js | 27 +- bin/.eslintrc.json | 5 + bin/config-yargs.js | 317 +- bin/convert-argv.js | 539 +- bin/process-options.js | 162 +- bin/webpack.js | 359 +- lib/creator/index.js | 35 +- lib/creator/index.test.js | 14 +- .../__snapshots__/context.test.js.snap | 2 +- .../transformations/context/context.js | 18 +- .../transformations/context/context.test.js | 10 +- .../transformations/devtool/devtool.js | 19 +- .../transformations/devtool/devtool.test.js | 12 +- lib/creator/transformations/entry/entry.js | 31 +- .../transformations/entry/entry.test.js | 33 +- .../transformations/externals/externals.js | 42 +- .../externals/externals.test.js | 86 +- lib/creator/transformations/index.js | 105 +- lib/creator/transformations/module/module.js | 21 +- .../transformations/module/module.test.js | 155 +- lib/creator/transformations/node/node.js | 14 +- lib/creator/transformations/node/node.test.js | 10 +- lib/creator/transformations/other/amd.js | 14 +- lib/creator/transformations/other/bail.js | 19 +- lib/creator/transformations/other/cache.js | 19 +- lib/creator/transformations/other/merge.js | 30 +- .../transformations/other/other.test.js | 20 +- lib/creator/transformations/other/profile.js | 18 +- lib/creator/transformations/output/output.js | 15 +- .../transformations/output/output.test.js | 18 +- .../performance/performance.js | 15 +- .../performance/performance.test.js | 13 +- .../transformations/plugins/plugins.js | 18 +- .../transformations/plugins/plugins.test.js | 15 +- .../transformations/resolve/resolve.js | 18 +- .../transformations/resolve/resolve.test.js | 36 +- lib/creator/transformations/stats/stats.js | 31 +- .../transformations/stats/stats.test.js | 18 +- lib/creator/transformations/target/target.js | 20 +- .../transformations/target/target.test.js | 8 +- .../transformations/top-scope/top-scope.js | 5 +- .../top-scope/top-scope.test.js | 8 +- lib/creator/transformations/watch/watch.js | 19 +- .../transformations/watch/watch.test.js | 12 +- .../transformations/watch/watchOptions.js | 15 +- .../watch/watchOptions.test.js | 16 +- lib/creator/utils/run-prettier.js | 25 +- lib/creator/utils/validate-options.js | 10 +- lib/creator/utils/validate-options.spec.js | 24 +- lib/creator/yeoman/utils/entry.js | 65 +- lib/creator/yeoman/utils/module.js | 8 +- lib/creator/yeoman/utils/plugins.js | 4 +- lib/creator/yeoman/utils/tooltip.js | 18 +- lib/creator/yeoman/utils/validate.js | 8 +- lib/creator/yeoman/webpack-adapter.js | 6 +- lib/creator/yeoman/webpack-generator.js | 431 +- lib/initialize.js | 8 +- lib/migrate.js | 129 +- .../bannerPlugin/bannerPlugin.js | 20 +- .../bannerPlugin/bannerPlugin.test.js | 10 +- lib/transformations/defineTest.js | 82 +- .../extractTextPlugin/extractTextPlugin.js | 38 +- .../extractTextPlugin.test.js | 6 +- lib/transformations/index.js | 39 +- lib/transformations/index.test.js | 20 +- .../loaderOptionsPlugin.js | 24 +- .../loaderOptionsPlugin.test.js | 12 +- lib/transformations/loaders/loaders.js | 341 +- lib/transformations/loaders/loaders.test.js | 22 +- lib/transformations/outputPath/outputPath.js | 58 +- .../outputPath/outputPath.test.js | 10 +- .../removeDeprecatedPlugins.js | 39 +- .../removeDeprecatedPlugins.test.js | 14 +- .../removeJsonLoader/removeJsonLoader.js | 70 +- .../removeJsonLoader/removeJsonLoader.test.js | 12 +- lib/transformations/resolve/resolve.js | 33 +- lib/transformations/resolve/resolve.test.js | 6 +- .../uglifyJsPlugin/uglifyJsPlugin.js | 37 +- .../uglifyJsPlugin/uglifyJsPlugin.test.js | 10 +- lib/transformations/utils.js | 213 +- lib/transformations/utils.test.js | 301 +- lib/utils/WebpackOptionsValidationError.js | 288 +- lib/utils/npm-exists.js | 20 +- lib/utils/npm-exists.spec.js | 15 +- lib/utils/npm-packages-exists.js | 40 +- lib/utils/resolve-packages.js | 64 +- lib/utils/resolve-packages.spec.js | 29 +- lib/utils/validateSchema.js | 18 +- package-lock.json | 8394 +++++++++++++++++ package.json | 98 +- 94 files changed, 11357 insertions(+), 2361 deletions(-) create mode 100644 .eslintrc.js delete mode 100644 .eslintrc.json delete mode 100644 .jsbeautifyrc create mode 100644 bin/.eslintrc.json create mode 100644 package-lock.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..4c2f4e927bd --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,73 @@ +module.exports = { + "root": true, + "plugins": ["node"], + "extends": ["eslint:recommended", "plugin:node/recommended"], + "env": { + "node": true, + "es6": true, + "jest": true + }, + "parserOptions": { "ecmaVersion": 2017 }, + "rules": { + "quote-props": ["error", "as-needed"], + "no-dupe-keys": "error", + "quotes": ["error", "double"], + "no-undef": "error", + "no-extra-semi": "error", + "semi": "error", + "no-template-curly-in-string": "error", + "no-caller": "error", + "yoda": "error", + "eqeqeq": "error", + "global-require": "off", + "brace-style": "error", + "key-spacing": "error", + "space-in-parens": ["error", "never"], + "space-infix-ops": "error", + "indent": ["error", "tab", { "SwitchCase": 1 }], + "no-extra-bind": "warn", + "no-empty": "off", + "no-multiple-empty-lines": "error", + "no-multi-spaces": "error", + "no-process-exit": "off", + "no-trailing-spaces": "error", + "no-use-before-define": "off", + "no-unused-vars": ["error", { "args": "none" }], + "no-unsafe-negation": "error", + "no-loop-func": "warn", + "space-before-function-paren": ["error", "never"], + "space-before-blocks": "error", + "object-curly-spacing": ["error", "always"], + "object-curly-newline": ["error", { "consistent": true }], + "keyword-spacing": ["error", { + "after": true, + "overrides": { + "const": { "after": true }, + "try": { "after": true }, + "throw": { "after": true }, + "case": { "after": true }, + "return": { "after": true }, + "finally": { "after": true }, + "do": { "after": true } + } + }], + "no-console": "off", + "valid-jsdoc": "error", + "node/no-unsupported-features": ["error", { "version": 4 }], + "node/no-deprecated-api": "error", + "node/no-missing-import": "error", + "node/no-missing-require": [ + "error", + { + "allowModules": [ + "webpack" + ] + } + ], + "node/no-unpublished-bin": "error", + "node/no-unpublished-require": "error", + "eol-last": ["error", "always"], + "newline-per-chained-call": "off", + "node/process-exit-as-throw": "error" + } +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 0f9922f37e8..00000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "parser": "babel-eslint", - "env": { - "node": true, - "commonjs": true, - "es6": true, - "jest": true - }, - "extends": "eslint:recommended", - "plugins": [ - "node" - ], - "rules": { - "indent": [ - "error", - "tab" - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ], - "no-unused-vars": 1, - "no-console": 0, - "node/exports-style": [ - "error", - "module.exports" - ], - "node/no-unsupported-features": "error", - "node/no-deprecated-api": "error", - "node/no-missing-import": "error", - "node/no-missing-require": [ - "error", - { - "allowModules": [ - "webpack" - ] - } - ], - "node/no-unpublished-bin": "error", - "node/no-unpublished-require": "error", - "node/process-exit-as-throw": "error" - } -} diff --git a/.jsbeautifyrc b/.jsbeautifyrc deleted file mode 100644 index 79b04984674..00000000000 --- a/.jsbeautifyrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "js": { - "allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"], - "brace_style": "collapse", - "break_chained_methods": false, - "e4x": true, - "eval_code": false, - "end_with_newline": true, - "indent_char": "\t", - "indent_level": 0, - "indent_size": 1, - "indent_with_tabs": true, - "jslint_happy": false, - "jslint_happy_align_switch_case": true, - "space_after_anon_function": false, - "keep_array_indentation": false, - "keep_function_indentation": false, - "max_preserve_newlines": 2, - "preserve_newlines": true, - "space_before_conditional": false, - "space_in_paren": false, - "unescape_strings": false, - "wrap_line_length": 0 - } -} \ No newline at end of file diff --git a/__mocks__/creator/validate-options.mock.js b/__mocks__/creator/validate-options.mock.js index 593f51f2f6f..e1db92d7382 100644 --- a/__mocks__/creator/validate-options.mock.js +++ b/__mocks__/creator/validate-options.mock.js @@ -1,17 +1,19 @@ -const fs = require('fs'); -const path = require('path'); +"use strict"; + +const fs = require("fs"); +const path = require("path"); function getPath(part) { return path.join(process.cwd(), part); } function validateOptions(opts) { - return Object.keys(opts).forEach( (location) => { + return Object.keys(opts).forEach(location => { let part = getPath(opts[location]); try { fs.readFileSync(part); } catch (err) { - throw new Error('Did not find the file'); + throw new Error("Did not find the file"); } }); } diff --git a/__mocks__/inquirer/resolve.mock.js b/__mocks__/inquirer/resolve.mock.js index ac47b722773..dfd5b164117 100644 --- a/__mocks__/inquirer/resolve.mock.js +++ b/__mocks__/inquirer/resolve.mock.js @@ -1,12 +1,16 @@ -'use strict'; -const path = require('path'); +"use strict"; + +const path = require("path"); function mockPromise(value) { - return (value || {}).then ? value : { - then: function (callback) { + const isValueAPromise = (value || {}).then; + const mockedPromise = { + then: function(callback) { return mockPromise(callback(value)); } }; + + return isValueAPromise ? value : mockedPromise; } function spawnChild(pkg) { return pkg; @@ -14,14 +18,17 @@ function spawnChild(pkg) { function getLoc(option) { let packageModule = []; - option.filter( (pkg) => { - mockPromise(spawnChild(pkg)).then( () => { + option.filter(pkg => { + mockPromise(spawnChild(pkg)).then(() => { try { - let loc = path.join('..', '..', 'node_modules', pkg); + let loc = path.join("..", "..", "node_modules", pkg); packageModule.push(loc); - } catch(err) { - throw new Error('Package wasn\'t validated correctly..' + - 'Submit an issue for', pkg, 'if this persists'); + } catch (err) { + throw new Error( + "Package wasn't validated correctly.." + "Submit an issue for", + pkg, + "if this persists" + ); } }); return packageModule; diff --git a/bin/.eslintrc.json b/bin/.eslintrc.json new file mode 100644 index 00000000000..8a7d65b183a --- /dev/null +++ b/bin/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "node/no-missing-require": 0 + } +} diff --git a/bin/config-yargs.js b/bin/config-yargs.js index e75d9b7b5f3..c7ca20a2b67 100644 --- a/bin/config-yargs.js +++ b/bin/config-yargs.js @@ -1,278 +1,291 @@ -var CONFIG_GROUP = 'Config options:'; -var BASIC_GROUP = 'Basic options:'; -var MODULE_GROUP = 'Module options:'; -var OUTPUT_GROUP = 'Output options:'; -var ADVANCED_GROUP = 'Advanced options:'; -var RESOLVE_GROUP = 'Resolving options:'; -var OPTIMIZE_GROUP = 'Optimizing options:'; -var INIT_GROUP = 'Initialization:'; +var CONFIG_GROUP = "Config options:"; +var BASIC_GROUP = "Basic options:"; +var MODULE_GROUP = "Module options:"; +var OUTPUT_GROUP = "Output options:"; +var ADVANCED_GROUP = "Advanced options:"; +var RESOLVE_GROUP = "Resolving options:"; +var OPTIMIZE_GROUP = "Optimizing options:"; +var INIT_GROUP = "Initialization:"; module.exports = function(yargs) { yargs - .help('help') - .alias('help', 'h', '?') + .help("help") + .alias("help", "h", "?") .version() - .alias('version', 'v') + .alias("version", "v") .options({ - 'init': { - type: 'boolean', - describe: 'Initializes a new webpack configuration or loads a' + '\n' + - 'plugin if specified', + init: { + type: "boolean", + describe: + "Initializes a new webpack configuration or loads a" + + "\n" + + "plugin if specified", group: INIT_GROUP }, - 'migrate': { - type: 'boolean', - describe: 'Migrate your webpack configuration from webpack 1 to webpack 2', + migrate: { + type: "boolean", + describe: + "Migrate your webpack configuration from webpack 1 to webpack 2", group: INIT_GROUP }, - 'config': { - type: 'string', - describe: 'Path to the config file', + config: { + type: "string", + describe: "Path to the config file", group: CONFIG_GROUP, - defaultDescription: 'webpack.config.js or webpackfile.js', + defaultDescription: "webpack.config.js or webpackfile.js", requiresArg: true }, - 'env': { - describe: 'Environment passed to the config, when it is a function', + env: { + describe: "Environment passed to the config, when it is a function", group: CONFIG_GROUP }, - 'context': { - type: 'string', - describe: 'The root directory for resolving entry point and stats', + context: { + type: "string", + describe: "The root directory for resolving entry point and stats", group: BASIC_GROUP, - defaultDescription: 'The current directory', + defaultDescription: "The current directory", requiresArg: true }, - 'entry': { - type: 'string', - describe: 'The entry point', + entry: { + type: "string", + describe: "The entry point", group: BASIC_GROUP, requiresArg: true }, - 'module-bind': { - type: 'string', - describe: 'Bind an extension to a loader', + "module-bind": { + type: "string", + describe: "Bind an extension to a loader", group: MODULE_GROUP, requiresArg: true }, - 'module-bind-post': { - type: 'string', - describe: '', + "module-bind-post": { + type: "string", + describe: "", group: MODULE_GROUP, requiresArg: true }, - 'module-bind-pre': { - type: 'string', - describe: '', + "module-bind-pre": { + type: "string", + describe: "", group: MODULE_GROUP, requiresArg: true }, - 'output-path': { - type: 'string', - describe: 'The output path for compilation assets', + "output-path": { + type: "string", + describe: "The output path for compilation assets", group: OUTPUT_GROUP, - defaultDescription: 'The current directory', + defaultDescription: "The current directory", requiresArg: true }, - 'output-filename': { - type: 'string', - describe: 'The output filename of the bundle', + "output-filename": { + type: "string", + describe: "The output filename of the bundle", group: OUTPUT_GROUP, - defaultDescription: '[name].js', + defaultDescription: "[name].js", requiresArg: true }, - 'output-chunk-filename': { - type: 'string', - describe: 'The output filename for additional chunks', + "output-chunk-filename": { + type: "string", + describe: "The output filename for additional chunks", group: OUTPUT_GROUP, - defaultDescription: 'filename with [id] instead of [name] or [id] prefixed', + defaultDescription: + "filename with [id] instead of [name] or [id] prefixed", requiresArg: true }, - 'output-source-map-filename': { - type: 'string', - describe: 'The output filename for the SourceMap', + "output-source-map-filename": { + type: "string", + describe: "The output filename for the SourceMap", group: OUTPUT_GROUP, requiresArg: true }, - 'output-public-path': { - type: 'string', - describe: 'The public path for the assets', + "output-public-path": { + type: "string", + describe: "The public path for the assets", group: OUTPUT_GROUP, requiresArg: true }, - 'output-jsonp-function': { - type: 'string', - describe: 'The name of the jsonp function used for chunk loading', + "output-jsonp-function": { + type: "string", + describe: "The name of the jsonp function used for chunk loading", group: OUTPUT_GROUP, requiresArg: true }, - 'output-pathinfo': { - type: 'boolean', - describe: 'Include a comment with the request for every dependency (require, import, etc.)', + "output-pathinfo": { + type: "boolean", + describe: + "Include a comment with the request for every dependency (require, import, etc.)", group: OUTPUT_GROUP }, - 'output-library': { - type: 'string', - describe: 'Expose the exports of the entry point as library', + "output-library": { + type: "string", + describe: "Expose the exports of the entry point as library", group: OUTPUT_GROUP, requiresArg: true }, - 'output-library-target': { - type: 'string', - describe: 'The type for exposing the exports of the entry point as library', + "output-library-target": { + type: "string", + describe: + "The type for exposing the exports of the entry point as library", group: OUTPUT_GROUP, requiresArg: true }, - 'records-input-path': { - type: 'string', - describe: 'Path to the records file (reading)', + "records-input-path": { + type: "string", + describe: "Path to the records file (reading)", group: ADVANCED_GROUP, requiresArg: true }, - 'records-output-path': { - type: 'string', - describe: 'Path to the records file (writing)', + "records-output-path": { + type: "string", + describe: "Path to the records file (writing)", group: ADVANCED_GROUP, requiresArg: true }, - 'records-path': { - type: 'string', - describe: 'Path to the records file', + "records-path": { + type: "string", + describe: "Path to the records file", group: ADVANCED_GROUP, requiresArg: true }, - 'define': { - type: 'string', - describe: 'Define any free var in the bundle', + define: { + type: "string", + describe: "Define any free var in the bundle", group: ADVANCED_GROUP, requiresArg: true }, - 'target': { - type: 'string', - describe: 'The targeted execution environment', + target: { + type: "string", + describe: "The targeted execution environment", group: ADVANCED_GROUP, requiresArg: true }, - 'cache': { - type: 'boolean', - describe: 'Enable in memory caching', + cache: { + type: "boolean", + describe: "Enable in memory caching", default: null, group: ADVANCED_GROUP, - defaultDescription: 'It\'s enabled by default when watching' + defaultDescription: "It's enabled by default when watching" }, - 'watch': { - type: 'boolean', - alias: 'w', - describe: 'Watch the filesystem for changes', + watch: { + type: "boolean", + alias: "w", + describe: "Watch the filesystem for changes", group: BASIC_GROUP }, - 'watch-stdin': { - type: 'boolean', - alias: 'stdin', - describe: 'Exit the process when stdin is closed', + "watch-stdin": { + type: "boolean", + alias: "stdin", + describe: "Exit the process when stdin is closed", group: ADVANCED_GROUP }, - 'watch-aggregate-timeout': { - describe: 'Timeout for gathering changes while watching', + "watch-aggregate-timeout": { + describe: "Timeout for gathering changes while watching", group: ADVANCED_GROUP, requiresArg: true }, - 'watch-poll': { - type: 'boolean', - describe: 'The polling interval for watching (also enable polling)', + "watch-poll": { + type: "boolean", + describe: "The polling interval for watching (also enable polling)", group: ADVANCED_GROUP }, - 'hot': { - type: 'boolean', - describe: 'Enables Hot Module Replacement', + hot: { + type: "boolean", + describe: "Enables Hot Module Replacement", group: ADVANCED_GROUP }, - 'debug': { - type: 'boolean', - describe: 'Switch loaders to debug mode', + debug: { + type: "boolean", + describe: "Switch loaders to debug mode", group: BASIC_GROUP }, - 'devtool': { - type: 'string', - describe: 'Enable devtool for better debugging experience (Example: --devtool eval-cheap-module-source-map)', + devtool: { + type: "string", + describe: + "Enable devtool for better debugging experience (Example: --devtool eval-cheap-module-source-map)", group: BASIC_GROUP, requiresArg: true }, - 'resolve-alias': { - type: 'string', - describe: 'Setup a module alias for resolving (Example: jquery-plugin=jquery.plugin)', + "resolve-alias": { + type: "string", + describe: + "Setup a module alias for resolving (Example: jquery-plugin=jquery.plugin)", group: RESOLVE_GROUP, requiresArg: true }, - 'resolve-extensions': { - 'type': 'array', - describe: 'Setup extensions that should be used to resolve modules (Example: --resolve-extensions .es6 .js)', + "resolve-extensions": { + type: "array", + describe: + "Setup extensions that should be used to resolve modules (Example: --resolve-extensions .es6 .js)", group: RESOLVE_GROUP, requiresArg: true }, - 'resolve-loader-alias': { - type: 'string', - describe: 'Setup a loader alias for resolving', + "resolve-loader-alias": { + type: "string", + describe: "Setup a loader alias for resolving", group: RESOLVE_GROUP, requiresArg: true }, - 'optimize-max-chunks': { - describe: 'Try to keep the chunk count below a limit', + "optimize-max-chunks": { + describe: "Try to keep the chunk count below a limit", group: OPTIMIZE_GROUP, requiresArg: true }, - 'optimize-min-chunk-size': { - describe: 'Try to keep the chunk size above a limit', + "optimize-min-chunk-size": { + describe: "Try to keep the chunk size above a limit", group: OPTIMIZE_GROUP, requiresArg: true }, - 'optimize-minimize': { - type: 'boolean', - describe: 'Minimize javascript and switches loaders to minimizing', + "optimize-minimize": { + type: "boolean", + describe: "Minimize javascript and switches loaders to minimizing", group: OPTIMIZE_GROUP }, - 'prefetch': { - type: 'string', - describe: 'Prefetch this request (Example: --prefetch ./file.js)', + prefetch: { + type: "string", + describe: "Prefetch this request (Example: --prefetch ./file.js)", group: ADVANCED_GROUP, requiresArg: true }, - 'provide': { - type: 'string', - describe: 'Provide these modules as free vars in all modules (Example: --provide jQuery=jquery)', + provide: { + type: "string", + describe: + "Provide these modules as free vars in all modules (Example: --provide jQuery=jquery)", group: ADVANCED_GROUP, requiresArg: true }, - 'labeled-modules': { - type: 'boolean', - describe: 'Enables labeled modules', + "labeled-modules": { + type: "boolean", + describe: "Enables labeled modules", group: ADVANCED_GROUP }, - 'plugin': { - type: 'string', - describe: 'Load this plugin', + plugin: { + type: "string", + describe: "Load this plugin", group: ADVANCED_GROUP, requiresArg: true }, - 'bail': { - type: 'boolean', - describe: 'Abort the compilation on first error', + bail: { + type: "boolean", + describe: "Abort the compilation on first error", group: ADVANCED_GROUP }, - 'profile': { - type: 'boolean', - describe: 'Profile the compilation and include information in stats', + profile: { + type: "boolean", + describe: "Profile the compilation and include information in stats", group: ADVANCED_GROUP }, - 'd': { - type: 'boolean', - describe: 'shortcut for --debug --devtool eval-cheap-module-source-map --output-pathinfo', + d: { + type: "boolean", + describe: + "shortcut for --debug --devtool eval-cheap-module-source-map --output-pathinfo", group: BASIC_GROUP }, - 'p': { - type: 'boolean', - describe: 'shortcut for --optimize-minimize --define process.env.NODE_ENV=\'production\'', + p: { + type: "boolean", + describe: + "shortcut for --optimize-minimize --define process.env.NODE_ENV='production'", group: BASIC_GROUP } - }).strict(); + }) + .strict(); }; diff --git a/bin/convert-argv.js b/bin/convert-argv.js index cd16639191f..29dc5062918 100644 --- a/bin/convert-argv.js +++ b/bin/convert-argv.js @@ -1,47 +1,54 @@ -var path = require('path'); -var fs = require('fs'); +"use strict"; + +var path = require("path"); +var fs = require("fs"); fs.existsSync = fs.existsSync || path.existsSync; -var interpret = require('interpret'); +var interpret = require("interpret"); module.exports = function(yargs, argv, convertOptions) { - var options = []; // Shortcuts - if(argv.d) { + if (argv.d) { argv.debug = true; - argv['output-pathinfo'] = true; - if(!argv.devtool) { - argv.devtool = 'eval-cheap-module-source-map'; + argv["output-pathinfo"] = true; + if (!argv.devtool) { + argv.devtool = "eval-cheap-module-source-map"; } } - if(argv.p) { - argv['optimize-minimize'] = true; - argv['define'] = [].concat(argv['define'] || []).concat('process.env.NODE_ENV=\'production\''); + if (argv.p) { + argv["optimize-minimize"] = true; + argv["define"] = [] + .concat(argv["define"] || []) + .concat("process.env.NODE_ENV='production'"); } var configFileLoaded = false; var configFiles = []; var extensions = Object.keys(interpret.extensions).sort(function(a, b) { - return a === '.js' ? -1 : b === '.js' ? 1 : a.length - b.length; + return a === ".js" ? -1 : b === ".js" ? 1 : a.length - b.length; }); - var defaultConfigFiles = ['webpack.config', 'webpackfile'].map(function(filename) { - return extensions.map(function(ext) { - return { - path: path.resolve(filename + ext), - ext: ext - }; - }); - }).reduce(function(a, i) { - return a.concat(i); - }, []); + var defaultConfigFiles = ["webpack.config", "webpackfile"] + .map(function(filename) { + return extensions.map(function(ext) { + return { + path: path.resolve(filename + ext), + ext: ext + }; + }); + }) + .reduce(function(a, i) { + return a.concat(i); + }, []); var i; - if(argv.config) { + if (argv.config) { var getConfigExtension = function getConfigExtension(configPath) { - for(i = extensions.length - 1; i >= 0; i--) { + for (i = extensions.length - 1; i >= 0; i--) { var tmpExt = extensions[i]; - if(configPath.indexOf(tmpExt, configPath.length - tmpExt.length) > -1) { + if ( + configPath.indexOf(tmpExt, configPath.length - tmpExt.length) > -1 + ) { return tmpExt; } } @@ -57,12 +64,14 @@ module.exports = function(yargs, argv, convertOptions) { }; }; - var configArgList = Array.isArray(argv.config) ? argv.config : [argv.config]; + var configArgList = Array.isArray(argv.config) + ? argv.config + : [argv.config]; configFiles = configArgList.map(mapConfigArg); } else { - for(i = 0; i < defaultConfigFiles.length; i++) { + for (i = 0; i < defaultConfigFiles.length; i++) { var webpackConfig = defaultConfigFiles[i].path; - if(fs.existsSync(webpackConfig)) { + if (fs.existsSync(webpackConfig)) { configFiles.push({ path: webpackConfig, ext: defaultConfigFiles[i].ext @@ -72,19 +81,19 @@ module.exports = function(yargs, argv, convertOptions) { } } - if(configFiles.length > 0) { + if (configFiles.length > 0) { var registerCompiler = function registerCompiler(moduleDescriptor) { - if(moduleDescriptor) { - if(typeof moduleDescriptor === 'string') { + if (moduleDescriptor) { + if (typeof moduleDescriptor === "string") { require(moduleDescriptor); - } else if(!Array.isArray(moduleDescriptor)) { + } else if (!Array.isArray(moduleDescriptor)) { moduleDescriptor.register(require(moduleDescriptor.module)); } else { - for(var i = 0; i < moduleDescriptor.length; i++) { + for (var i = 0; i < moduleDescriptor.length; i++) { try { registerCompiler(moduleDescriptor[i]); break; - } catch(e) { + } catch (e) { // do nothing } } @@ -94,10 +103,11 @@ module.exports = function(yargs, argv, convertOptions) { var requireConfig = function requireConfig(configPath) { var options = require(configPath); - var isES6DefaultExportedFunc = ( - typeof options === 'object' && options !== null && typeof options.default === 'function' - ); - if(typeof options === 'function' || isES6DefaultExportedFunc) { + var isES6DefaultExportedFunc = + typeof options === "object" && + options !== null && + typeof options.default === "function"; + if (typeof options === "function" || isES6DefaultExportedFunc) { options = isES6DefaultExportedFunc ? options.default : options; options = options(argv.env, argv); } @@ -111,61 +121,62 @@ module.exports = function(yargs, argv, convertOptions) { configFileLoaded = true; } - if(!configFileLoaded) { + if (!configFileLoaded) { return processConfiguredOptions({}); - } else if(options.length === 1) { + } else if (options.length === 1) { return processConfiguredOptions(options[0]); } else { return processConfiguredOptions(options); } function processConfiguredOptions(options) { - if(options === null || typeof options !== 'object') { - console.error('Config did not export an object or a function returning an object.'); - process.exitCode = -1; + if (options === null || typeof options !== "object") { + console.error( + "Config did not export an object or a function returning an object." + ); + process.exit(-1); } // process Promise - if(typeof options.then === 'function') { + if (typeof options.then === "function") { return options.then(processConfiguredOptions); } // process ES6 default - if(typeof options === 'object' && typeof options.default === 'object') { + if (typeof options === "object" && typeof options.default === "object") { return processConfiguredOptions(options.default); } - if(Array.isArray(options)) { + if (Array.isArray(options)) { options.forEach(processOptions); } else { processOptions(options); } - if(argv.context) { + if (argv.context) { options.context = path.resolve(argv.context); } - if(!options.context) { + if (!options.context) { options.context = process.cwd(); } - if(argv.watch) { + if (argv.watch) { options.watch = true; } - if(argv['watch-aggregate-timeout']) { + if (argv["watch-aggregate-timeout"]) { options.watchOptions = options.watchOptions || {}; - options.watchOptions.aggregateTimeout = +argv['watch-aggregate-timeout']; + options.watchOptions.aggregateTimeout = +argv["watch-aggregate-timeout"]; } - if(argv['watch-poll']) { + if (argv["watch-poll"]) { options.watchOptions = options.watchOptions || {}; - if(typeof argv['watch-poll'] !== 'boolean') - options.watchOptions.poll = +argv['watch-poll']; - else - options.watchOptions.poll = true; + if (typeof argv["watch-poll"] !== "boolean") + options.watchOptions.poll = +argv["watch-poll"]; + else options.watchOptions.poll = true; } - if(argv['watch-stdin']) { + if (argv["watch-stdin"]) { options.watchOptions = options.watchOptions || {}; options.watchOptions.stdin = true; options.watch = true; @@ -178,39 +189,44 @@ module.exports = function(yargs, argv, convertOptions) { var noOutputFilenameDefined = !options.output || !options.output.filename; function ifArg(name, fn, init, finalize) { - if(Array.isArray(argv[name])) { - if(init) { + if (Array.isArray(argv[name])) { + if (init) { init(); } argv[name].forEach(fn); - if(finalize) { + if (finalize) { finalize(); } - } else if(typeof argv[name] !== 'undefined' && argv[name] !== null) { - if(init) { + } else if (typeof argv[name] !== "undefined" && argv[name] !== null) { + if (init) { init(); } fn(argv[name], -1); - if(finalize) { + if (finalize) { finalize(); } } } function ifArgPair(name, fn, init, finalize) { - ifArg(name, function(content, idx) { - var i = content.indexOf('='); - if(i < 0) { - return fn(null, content, idx); - } else { - return fn(content.substr(0, i), content.substr(i + 1), idx); - } - }, init, finalize); + ifArg( + name, + function(content, idx) { + var i = content.indexOf("="); + if (i < 0) { + return fn(null, content, idx); + } else { + return fn(content.substr(0, i), content.substr(i + 1), idx); + } + }, + init, + finalize + ); } function ifBooleanArg(name, fn) { ifArg(name, function(bool) { - if(bool) { + if (bool) { fn(); } }); @@ -218,298 +234,343 @@ module.exports = function(yargs, argv, convertOptions) { function mapArgToBoolean(name, optionName) { ifArg(name, function(bool) { - if(bool === true) - options[optionName || name] = true; - else if(bool === false) - options[optionName || name] = false; + if (bool === true) options[optionName || name] = true; + else if (bool === false) options[optionName || name] = false; + }); + } + //eslint-disable-next-line + function mapArgToPath(name, optionName) { + ifArg(name, function(str) { + options[optionName || name] = path.resolve(str); }); } function loadPlugin(name) { - var loadUtils = require('loader-utils'); - var args; + var loadUtils = require("loader-utils"); + var args = null; try { - var p = name && name.indexOf('?'); - if(p > -1) { + var p = name && name.indexOf("?"); + if (p > -1) { args = loadUtils.parseQuery(name.substring(p)); name = name.substring(0, p); } - } catch(e) { - console.log('Invalid plugin arguments ' + name + ' (' + e + ').'); - process.exitCode = -1; + } catch (e) { + console.log("Invalid plugin arguments " + name + " (" + e + ")."); + process.exit(-1); } var path; try { - var resolve = require('enhanced-resolve'); + var resolve = require("enhanced-resolve"); path = resolve.sync(process.cwd(), name); - } catch(e) { - console.log('Cannot resolve plugin ' + name + '.'); - process.exitCode = -1; + } catch (e) { + console.log("Cannot resolve plugin " + name + "."); + process.exit(-1); } var Plugin; try { Plugin = require(path); - } catch(e) { - console.log('Cannot load plugin ' + name + '. (' + path + ')'); + } catch (e) { + console.log("Cannot load plugin " + name + ". (" + path + ")"); throw e; } try { return new Plugin(args); - } catch(e) { - console.log('Cannot instantiate plugin ' + name + '. (' + path + ')'); + } catch (e) { + console.log("Cannot instantiate plugin " + name + ". (" + path + ")"); throw e; } } function ensureObject(parent, name) { - if(typeof parent[name] !== 'object' || parent[name] === null) { + if (typeof parent[name] !== "object" || parent[name] === null) { parent[name] = {}; } } function ensureArray(parent, name) { - if(!Array.isArray(parent[name])) { + if (!Array.isArray(parent[name])) { parent[name] = []; } } - ifArgPair('entry', function(name, entry) { - if(typeof options.entry[name] !== 'undefined' && options.entry[name] !== null) { - options.entry[name] = [].concat(options.entry[name]).concat(entry); - } else { + ifArgPair( + "entry", + function(name, entry) { options.entry[name] = entry; + }, + function() { + ensureObject(options, "entry"); } - }, function() { - ensureObject(options, 'entry'); - }); + ); function bindLoaders(arg, collection) { - ifArgPair(arg, function(name, binding) { - if(name === null) { - name = binding; - binding += '-loader'; + ifArgPair( + arg, + function(name, binding) { + if (name === null) { + name = binding; + binding += "-loader"; + } + options.module[collection].push({ + test: new RegExp( + "\\." + + // eslint thinks that the escapes are useless, + // however, when testing them, the special regex chars + // mess up with the regex we want to use to check. + // eslint-disable-next-line + name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + + "$" + ), + loader: binding + }); + }, + function() { + ensureObject(options, "module"); + ensureArray(options.module, collection); } - options.module[collection].push({ - test: new RegExp('\\.' + name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&') + '$'), - loader: binding - }); - }, function() { - ensureObject(options, 'module'); - ensureArray(options.module, collection); - }); + ); } - bindLoaders('module-bind', 'loaders'); - bindLoaders('module-bind-pre', 'preLoaders'); - bindLoaders('module-bind-post', 'postLoaders'); + bindLoaders("module-bind", "loaders"); + bindLoaders("module-bind-pre", "preLoaders"); + bindLoaders("module-bind-post", "postLoaders"); var defineObject; - ifArgPair('define', function(name, value) { - if(name === null) { - name = value; - value = true; + ifArgPair( + "define", + function(name, value) { + if (name === null) { + name = value; + value = true; + } + defineObject[name] = value; + }, + function() { + defineObject = {}; + }, + function() { + ensureArray(options, "plugins"); + var DefinePlugin = require("webpack/lib/DefinePlugin"); + options.plugins.push(new DefinePlugin(defineObject)); } - defineObject[name] = value; - }, function() { - defineObject = {}; - }, function() { - ensureArray(options, 'plugins'); - var DefinePlugin = require('webpack/lib/DefinePlugin'); - options.plugins.push(new DefinePlugin(defineObject)); - }); + ); - ifArg('output-path', function(value) { - ensureObject(options, 'output'); - options.output.path = path.resolve(value); + ifArg("output-path", function(value) { + ensureObject(options, "output"); + options.output.path = value; }); - ifArg('output-filename', function(value) { - ensureObject(options, 'output'); + ifArg("output-filename", function(value) { + ensureObject(options, "output"); options.output.filename = value; noOutputFilenameDefined = false; }); - ifArg('output-chunk-filename', function(value) { - ensureObject(options, 'output'); + ifArg("output-chunk-filename", function(value) { + ensureObject(options, "output"); options.output.chunkFilename = value; }); - ifArg('output-source-map-filename', function(value) { - ensureObject(options, 'output'); + ifArg("output-source-map-filename", function(value) { + ensureObject(options, "output"); options.output.sourceMapFilename = value; }); - ifArg('output-public-path', function(value) { - ensureObject(options, 'output'); + ifArg("output-public-path", function(value) { + ensureObject(options, "output"); options.output.publicPath = value; }); - ifArg('output-jsonp-function', function(value) { - ensureObject(options, 'output'); + ifArg("output-jsonp-function", function(value) { + ensureObject(options, "output"); options.output.jsonpFunction = value; }); - ifBooleanArg('output-pathinfo', function() { - ensureObject(options, 'output'); + ifBooleanArg("output-pathinfo", function() { + ensureObject(options, "output"); options.output.pathinfo = true; }); - ifArg('output-library', function(value) { - ensureObject(options, 'output'); + ifArg("output-library", function(value) { + ensureObject(options, "output"); options.output.library = value; }); - ifArg('output-library-target', function(value) { - ensureObject(options, 'output'); + ifArg("output-library-target", function(value) { + ensureObject(options, "output"); options.output.libraryTarget = value; }); - ifArg('records-input-path', function(value) { + ifArg("records-input-path", function(value) { options.recordsInputPath = path.resolve(value); }); - ifArg('records-output-path', function(value) { + ifArg("records-output-path", function(value) { options.recordsOutputPath = path.resolve(value); }); - ifArg('records-path', function(value) { + ifArg("records-path", function(value) { options.recordsPath = path.resolve(value); }); - ifArg('target', function(value) { + ifArg("target", function(value) { options.target = value; }); - mapArgToBoolean('cache'); + mapArgToBoolean("cache"); - ifBooleanArg('hot', function() { - ensureArray(options, 'plugins'); - var HotModuleReplacementPlugin = require('webpack/lib/HotModuleReplacementPlugin'); + ifBooleanArg("hot", function() { + ensureArray(options, "plugins"); + var HotModuleReplacementPlugin = require("webpack/lib/HotModuleReplacementPlugin"); options.plugins.push(new HotModuleReplacementPlugin()); }); - ifBooleanArg('debug', function() { - ensureArray(options, 'plugins'); - var LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin'); - options.plugins.push(new LoaderOptionsPlugin({ - debug: true - })); + ifBooleanArg("debug", function() { + ensureArray(options, "plugins"); + var LoaderOptionsPlugin = require("webpack/lib/LoaderOptionsPlugin"); + options.plugins.push( + new LoaderOptionsPlugin({ + debug: true + }) + ); }); - ifArg('devtool', function(value) { + ifArg("devtool", function(value) { options.devtool = value; }); function processResolveAlias(arg, key) { ifArgPair(arg, function(name, value) { - if(!name) { - throw new Error('--' + arg + ' ='); + if (!name) { + throw new Error("--" + arg + " ="); } ensureObject(options, key); - ensureObject(options[key], 'alias'); + ensureObject(options[key], "alias"); options[key].alias[name] = value; }); } - processResolveAlias('resolve-alias', 'resolve'); - processResolveAlias('resolve-loader-alias', 'resolveLoader'); + processResolveAlias("resolve-alias", "resolve"); + processResolveAlias("resolve-loader-alias", "resolveLoader"); - ifArg('resolve-extensions', function(value) { - ensureObject(options, 'resolve'); - if(Array.isArray(value)) { + ifArg("resolve-extensions", function(value) { + ensureObject(options, "resolve"); + if (Array.isArray(value)) { options.resolve.extensions = value; } else { options.resolve.extensions = value.split(/,\s*/); } }); - ifArg('optimize-max-chunks', function(value) { - ensureArray(options, 'plugins'); - var LimitChunkCountPlugin = require('webpack/lib/optimize/LimitChunkCountPlugin'); - options.plugins.push(new LimitChunkCountPlugin({ - maxChunks: parseInt(value, 10) - })); + ifArg("optimize-max-chunks", function(value) { + ensureArray(options, "plugins"); + var LimitChunkCountPlugin = require("webpack/lib/optimize/LimitChunkCountPlugin"); + options.plugins.push( + new LimitChunkCountPlugin({ + maxChunks: parseInt(value, 10) + }) + ); }); - ifArg('optimize-min-chunk-size', function(value) { - ensureArray(options, 'plugins'); - var MinChunkSizePlugin = require('webpack/lib/optimize/MinChunkSizePlugin'); - options.plugins.push(new MinChunkSizePlugin({ - minChunkSize: parseInt(value, 10) - })); + ifArg("optimize-min-chunk-size", function(value) { + ensureArray(options, "plugins"); + var MinChunkSizePlugin = require("webpack/lib/optimize/MinChunkSizePlugin"); + options.plugins.push( + new MinChunkSizePlugin({ + minChunkSize: parseInt(value, 10) + }) + ); }); - ifBooleanArg('optimize-minimize', function() { - ensureArray(options, 'plugins'); - var UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin'); - var LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin'); - options.plugins.push(new UglifyJsPlugin({ - sourceMap: options.devtool && (options.devtool.indexOf('sourcemap') >= 0 || options.devtool.indexOf('source-map') >= 0) - })); - options.plugins.push(new LoaderOptionsPlugin({ - minimize: true - })); + ifBooleanArg("optimize-minimize", function() { + ensureArray(options, "plugins"); + var UglifyJsPlugin = require("webpack/lib/optimize/UglifyJsPlugin"); + var LoaderOptionsPlugin = require("webpack/lib/LoaderOptionsPlugin"); + options.plugins.push( + new UglifyJsPlugin({ + sourceMap: + options.devtool && + (options.devtool.indexOf("sourcemap") >= 0 || + options.devtool.indexOf("source-map") >= 0) + }) + ); + options.plugins.push( + new LoaderOptionsPlugin({ + minimize: true + }) + ); }); - ifArg('prefetch', function(request) { - ensureArray(options, 'plugins'); - var PrefetchPlugin = require('webpack/lib/PrefetchPlugin'); + ifArg("prefetch", function(request) { + ensureArray(options, "plugins"); + var PrefetchPlugin = require("webpack/PrefetchPlugin"); options.plugins.push(new PrefetchPlugin(request)); }); - ifArg('provide', function(value) { - ensureArray(options, 'plugins'); - var idx = value.indexOf('='); + ifArg("provide", function(value) { + ensureArray(options, "plugins"); + var idx = value.indexOf("="); var name; - if(idx >= 0) { + if (idx >= 0) { name = value.substr(0, idx); value = value.substr(idx + 1); } else { name = value; } - var ProvidePlugin = require('webpack/lib/ProvidePlugin'); + var ProvidePlugin = require("webpack/ProvidePlugin"); options.plugins.push(new ProvidePlugin(name, value)); }); - ifArg('plugin', function(value) { - ensureArray(options, 'plugins'); + ifBooleanArg("labeled-modules", function() { + ensureArray(options, "plugins"); + var LabeledModulesPlugin = require("webpack/lib/dependencies/LabeledModulesPlugin"); + options.plugins.push(new LabeledModulesPlugin()); + }); + + ifArg("plugin", function(value) { + ensureArray(options, "plugins"); options.plugins.push(loadPlugin(value)); }); - mapArgToBoolean('bail'); + mapArgToBoolean("bail"); - mapArgToBoolean('profile'); + mapArgToBoolean("profile"); - if(noOutputFilenameDefined) { - ensureObject(options, 'output'); - if(convertOptions && convertOptions.outputFilename) { - options.output.path = path.resolve(path.dirname(convertOptions.outputFilename)); + if (noOutputFilenameDefined) { + ensureObject(options, "output"); + if (convertOptions && convertOptions.outputFilename) { + options.output.path = path.dirname(convertOptions.outputFilename); options.output.filename = path.basename(convertOptions.outputFilename); - } else if(argv._.length > 0) { + } else if (argv._.length > 0) { options.output.filename = argv._.pop(); - options.output.path = path.resolve(path.dirname(options.output.filename)); + options.output.path = path.dirname(options.output.filename); options.output.filename = path.basename(options.output.filename); - } else if(configFileLoaded) { - throw new Error('\'output.filename\' is required, either in config file or as --output-filename'); - } - else { - console.error('No configuration file found and no output filename configured via CLI option.'); - console.error('A configuration file could be named \'webpack.config.js\' in the current directory.'); - console.error('Use --help to display the CLI options.'); - process.exitCode = -1; + } else if (configFileLoaded) { + throw new Error( + "'output.filename' is required, either in config file or as --output-filename" + ); + } else { + console.error( + "No configuration file found and no output filename configured via CLI option." + ); + console.error( + "A configuration file could be named 'webpack.config.js' in the current directory." + ); + console.error("Use --help to display the CLI options."); + process.exit(-1); } } - if(argv._.length > 0) { - if(Array.isArray(options.entry) || typeof options.entry === 'string') { + if (argv._.length > 0) { + if (Array.isArray(options.entry) || typeof options.entry === "string") { options.entry = { main: options.entry }; } - ensureObject(options, 'entry'); + ensureObject(options, "entry"); var addTo = function addTo(name, entry) { - if(options.entry[name]) { - if(!Array.isArray(options.entry[name])) { + if (options.entry[name]) { + if (!Array.isArray(options.entry[name])) { options.entry[name] = [options.entry[name]]; } options.entry[name].push(entry); @@ -518,14 +579,14 @@ module.exports = function(yargs, argv, convertOptions) { } }; argv._.forEach(function(content) { - var i = content.indexOf('='); - var j = content.indexOf('?'); - if(i < 0 || (j >= 0 && j < i)) { + var i = content.indexOf("="); + var j = content.indexOf("?"); + if (i < 0 || (j >= 0 && j < i)) { var resolved = path.resolve(content); - if(fs.existsSync(resolved)) { - addTo('main', resolved); + if (fs.existsSync(resolved)) { + addTo("main", resolved); } else { - addTo('main', content); + addTo("main", content); } } else { addTo(content.substr(0, i), content.substr(i + 1)); @@ -533,16 +594,22 @@ module.exports = function(yargs, argv, convertOptions) { }); } - if(!options.entry) { - if(configFileLoaded) { - console.error('Configuration file found but no entry configured.'); + if (!options.entry) { + if (configFileLoaded) { + console.error("Configuration file found but no entry configured."); } else { - console.error('No configuration file found and no entry configured via CLI option.'); - console.error('When using the CLI you need to provide at least two arguments: entry and output.'); - console.error('A configuration file could be named \'webpack.config.js\' in the current directory.'); + console.error( + "No configuration file found and no entry configured via CLI option." + ); + console.error( + "When using the CLI you need to provide at least two arguments: entry and output." + ); + console.error( + "A configuration file could be named 'webpack.config.js' in the current directory." + ); } - console.error('Use --help to display the CLI options.'); - process.exitCode = -1; + console.error("Use --help to display the CLI options."); + process.exit(-1); } } }; diff --git a/bin/process-options.js b/bin/process-options.js index e97bb5af4c6..92e4355ba85 100644 --- a/bin/process-options.js +++ b/bin/process-options.js @@ -1,17 +1,17 @@ module.exports = function processOptions(yargs, argv) { // process Promise function ifArg(name, fn, init) { - if(Array.isArray(argv[name])) { - if(init) init(); + if (Array.isArray(argv[name])) { + if (init) init(); argv[name].forEach(fn); - } else if(typeof argv[name] !== 'undefined') { - if(init) init(); + } else if (typeof argv[name] !== "undefined") { + if (init) init(); fn(argv[name], -1); } } - var options = require('./convert-argv')(yargs, argv); + var options = require("./convert-argv")(yargs, argv); - if(typeof options.then === 'function') { + if (typeof options.then === "function") { options.then(processOptions).catch(function(err) { console.error(err.stack || err); process.exit(); @@ -19,175 +19,181 @@ module.exports = function processOptions(yargs, argv) { return; } - var firstOptions = Array.isArray(options) ? (options[0] || {}) : options; + var firstOptions = Array.isArray(options) ? options[0] || {} : options; - if(typeof options.stats === 'boolean' || typeof options.stats === 'string') { - var statsPresetToOptions = require('webpack/lib/Stats.js').presetToOptions; + if (typeof options.stats === "boolean" || typeof options.stats === "string") { + var statsPresetToOptions = require("webpack/lib/Stats.js").presetToOptions; options.stats = statsPresetToOptions(options.stats); } var outputOptions = Object.create(options.stats || firstOptions.stats || {}); - if(typeof outputOptions.context === 'undefined') + if (typeof outputOptions.context === "undefined") outputOptions.context = firstOptions.context; - ifArg('json', function(bool) { - if(bool) - outputOptions.json = bool; + ifArg("json", function(bool) { + if (bool) outputOptions.json = bool; }); - if(typeof outputOptions.colors === 'undefined') - outputOptions.colors = require('supports-color'); + if (typeof outputOptions.colors === "undefined") + outputOptions.colors = require("supports-color"); - ifArg('sort-modules-by', function(value) { + ifArg("sort-modules-by", function(value) { outputOptions.modulesSort = value; }); - ifArg('sort-chunks-by', function(value) { + ifArg("sort-chunks-by", function(value) { outputOptions.chunksSort = value; }); - ifArg('sort-assets-by', function(value) { + ifArg("sort-assets-by", function(value) { outputOptions.assetsSort = value; }); - ifArg('display-exclude', function(value) { + ifArg("display-exclude", function(value) { outputOptions.exclude = value; }); - if(!outputOptions.json) { - if(typeof outputOptions.cached === 'undefined') + if (!outputOptions.json) { + if (typeof outputOptions.cached === "undefined") outputOptions.cached = false; - if(typeof outputOptions.cachedAssets === 'undefined') + if (typeof outputOptions.cachedAssets === "undefined") outputOptions.cachedAssets = false; - ifArg('display-chunks', function(bool) { + ifArg("display-chunks", function(bool) { outputOptions.modules = !bool; outputOptions.chunks = bool; }); - ifArg('display-entrypoints', function(bool) { + ifArg("display-entrypoints", function(bool) { outputOptions.entrypoints = bool; }); - ifArg('display-reasons', function(bool) { + ifArg("display-reasons", function(bool) { outputOptions.reasons = bool; }); - ifArg('display-used-exports', function(bool) { + ifArg("display-used-exports", function(bool) { outputOptions.usedExports = bool; }); - ifArg('display-provided-exports', function(bool) { + ifArg("display-provided-exports", function(bool) { outputOptions.providedExports = bool; }); - ifArg('display-error-details', function(bool) { + ifArg("display-error-details", function(bool) { outputOptions.errorDetails = bool; }); - ifArg('display-origins', function(bool) { + ifArg("display-origins", function(bool) { outputOptions.chunkOrigins = bool; }); - ifArg('display-cached', function(bool) { - if(bool) - outputOptions.cached = true; + ifArg("display-cached", function(bool) { + if (bool) outputOptions.cached = true; }); - ifArg('display-cached-assets', function(bool) { - if(bool) - outputOptions.cachedAssets = true; + ifArg("display-cached-assets", function(bool) { + if (bool) outputOptions.cachedAssets = true; }); - if(!outputOptions.exclude && !argv['display-modules']) - outputOptions.exclude = ['node_modules', 'bower_components', 'jam', 'components']; + if (!outputOptions.exclude && !argv["display-modules"]) + outputOptions.exclude = [ + "node_modules", + "bower_components", + "jam", + "components" + ]; } else { - if(typeof outputOptions.chunks === 'undefined') + if (typeof outputOptions.chunks === "undefined") outputOptions.chunks = true; - if(typeof outputOptions.entrypoints === 'undefined') + if (typeof outputOptions.entrypoints === "undefined") outputOptions.entrypoints = true; - if(typeof outputOptions.modules === 'undefined') + if (typeof outputOptions.modules === "undefined") outputOptions.modules = true; - if(typeof outputOptions.chunkModules === 'undefined') + if (typeof outputOptions.chunkModules === "undefined") outputOptions.chunkModules = true; - if(typeof outputOptions.reasons === 'undefined') + if (typeof outputOptions.reasons === "undefined") outputOptions.reasons = true; - if(typeof outputOptions.cached === 'undefined') + if (typeof outputOptions.cached === "undefined") outputOptions.cached = true; - if(typeof outputOptions.cachedAssets === 'undefined') + if (typeof outputOptions.cachedAssets === "undefined") outputOptions.cachedAssets = true; } - ifArg('hide-modules', function(bool) { - if(bool) { + ifArg("hide-modules", function(bool) { + if (bool) { outputOptions.modules = false; outputOptions.chunkModules = false; } }); - var webpack = require('webpack/lib/webpack.js'); + var webpack = require("webpack/lib/webpack.js"); Error.stackTraceLimit = 30; var lastHash = null; var compiler; try { compiler = webpack(options); - } catch(e) { - var WebpackOptionsValidationError = require('webpack/lib/WebpackOptionsValidationError'); - if(e instanceof WebpackOptionsValidationError) { - if(argv.color) - console.error('\u001b[1m\u001b[31m' + e.message + '\u001b[39m\u001b[22m'); - else - console.error(e.message); + } catch (e) { + var WebpackOptionsValidationError = require("webpack/lib/WebpackOptionsValidationError"); + if (e instanceof WebpackOptionsValidationError) { + if (argv.color) + console.error( + "\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m" + ); + else console.error(e.message); process.exitCode = 1; } throw e; } - if(argv.progress) { - var ProgressPlugin = require('webpack/lib/ProgressPlugin'); - compiler.apply(new ProgressPlugin({ - profile: argv.profile - })); + if (argv.progress) { + var ProgressPlugin = require("webpack/lib/ProgressPlugin"); + compiler.apply( + new ProgressPlugin({ + profile: argv.profile + }) + ); } function compilerCallback(err, stats) { - if(!options.watch || err) { + if (!options.watch || err) { // Do not keep cache anymore compiler.purgeInputFileSystem(); } - if(err) { + if (err) { lastHash = null; console.error(err.stack || err); - if(err.details) console.error(err.details); + if (err.details) console.error(err.details); process.exitCode = 1; } - if(outputOptions.json) { - process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + '\n'); - } else if(stats.hash !== lastHash) { + if (outputOptions.json) { + process.stdout.write( + JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n" + ); + } else if (stats.hash !== lastHash) { lastHash = stats.hash; - process.stdout.write( '\n' + new Date() + '\n' + '\n'); - process.stdout.write(stats.toString(outputOptions) + '\n'); - if(argv.s) lastHash = null; + process.stdout.write("\n" + new Date() + "\n" + "\n"); + process.stdout.write(stats.toString(outputOptions) + "\n"); + if (argv.s) lastHash = null; } - if(!options.watch && stats.hasErrors()) { - process.on('exit', function() { + if (!options.watch && stats.hasErrors()) { + process.on("exit", function() { process.exitCode = 2; }); } } - if(options.watch) { + if (options.watch) { var primaryOptions = !Array.isArray(options) ? options : options[0]; - var watchOptions = primaryOptions.watchOptions || primaryOptions.watch || {}; - if(watchOptions.stdin) { - process.stdin.on('end', function() { + var watchOptions = + primaryOptions.watchOptions || primaryOptions.watch || {}; + if (watchOptions.stdin) { + process.stdin.on("end", function() { process.exitCode = 0; }); process.stdin.resume(); } compiler.watch(watchOptions, compilerCallback); - console.log('\nWebpack is watching the files…\n'); - } else - compiler.run(compilerCallback); - + console.log("\nWebpack is watching the files…\n"); + } else compiler.run(compilerCallback); }; diff --git a/bin/webpack.js b/bin/webpack.js index 280744cb2cf..19e31709f9a 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -3,189 +3,193 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ -var path = require('path'); -var resolveCwd = require('resolve-cwd'); +"use strict"; -var localCLI = resolveCwd.silent('webpack-cli/bin/webpack'); +var path = require("path"); +var resolveCwd = require("resolve-cwd"); -if (localCLI && path.relative(localCLI, __filename) !== '') { +var localCLI = resolveCwd.silent("webpack-cli/bin/webpack"); + +if (localCLI && path.relative(localCLI, __filename) !== "") { require(localCLI); } else { try { - require('./webpack'); + require("./webpack"); } catch (err) { console.error(`\n ${err.message}`); process.exitCode = 1; } } -var yargs = require('yargs') - .usage('webpack ' + require('../package.json').version + '\n' + - 'Usage: https://webpack.js.org/api/cli/\n' + - 'Usage without config file: webpack [] \n' + - 'Usage with config file: webpack'); -require('./config-yargs')(yargs); - +var yargs = require("yargs").usage( + "webpack " + + require("../package.json").version + + "\n" + + "Usage: https://webpack.js.org/api/cli/\n" + + "Usage without config file: webpack [] \n" + + "Usage with config file: webpack" +); +require("./config-yargs")(yargs); -var DISPLAY_GROUP = 'Stats options:'; -var BASIC_GROUP = 'Basic options:'; +var DISPLAY_GROUP = "Stats options:"; +var BASIC_GROUP = "Basic options:"; yargs.options({ - 'json': { - type: 'boolean', - alias: 'j', - describe: 'Prints the result as JSON.' + json: { + type: "boolean", + alias: "j", + describe: "Prints the result as JSON." }, - 'progress': { - type: 'boolean', - describe: 'Print compilation progress in percentage', + progress: { + type: "boolean", + describe: "Print compilation progress in percentage", group: BASIC_GROUP }, - 'color': { - type: 'boolean', - alias: 'colors', + color: { + type: "boolean", + alias: "colors", default: function supportsColor() { - return require('supports-color'); + return require("supports-color"); }, group: DISPLAY_GROUP, - describe: 'Enables/Disables colors on the console' + describe: "Enables/Disables colors on the console" }, - 'sort-modules-by': { - type: 'string', + "sort-modules-by": { + type: "string", group: DISPLAY_GROUP, - describe: 'Sorts the modules list by property in module' + describe: "Sorts the modules list by property in module" }, - 'sort-chunks-by': { - type: 'string', + "sort-chunks-by": { + type: "string", group: DISPLAY_GROUP, - describe: 'Sorts the chunks list by property in chunk' + describe: "Sorts the chunks list by property in chunk" }, - 'sort-assets-by': { - type: 'string', + "sort-assets-by": { + type: "string", group: DISPLAY_GROUP, - describe: 'Sorts the assets list by property in asset' + describe: "Sorts the assets list by property in asset" }, - 'hide-modules': { - type: 'boolean', + "hide-modules": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Hides info about modules' + describe: "Hides info about modules" }, - 'display-exclude': { - type: 'string', + "display-exclude": { + type: "string", group: DISPLAY_GROUP, - describe: 'Exclude modules in the output' + describe: "Exclude modules in the output" }, - 'display-modules': { - type: 'boolean', + "display-modules": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display even excluded modules in the output' + describe: "Display even excluded modules in the output" }, - 'display-max-modules': { - type: 'number', + "display-max-modules": { + type: "number", group: DISPLAY_GROUP, - describe: 'Sets the maximum number of visible modules in output' + describe: "Sets the maximum number of visible modules in output" }, - 'display-chunks': { - type: 'boolean', + "display-chunks": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display chunks in the output' + describe: "Display chunks in the output" }, - 'display-entrypoints': { - type: 'boolean', + "display-entrypoints": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display entry points in the output' + describe: "Display entry points in the output" }, - 'display-origins': { - type: 'boolean', + "display-origins": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display origins of chunks in the output' + describe: "Display origins of chunks in the output" }, - 'display-cached': { - type: 'boolean', + "display-cached": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display also cached modules in the output' + describe: "Display also cached modules in the output" }, - 'display-cached-assets': { - type: 'boolean', + "display-cached-assets": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display also cached assets in the output' + describe: "Display also cached assets in the output" }, - 'display-reasons': { - type: 'boolean', + "display-reasons": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display reasons about module inclusion in the output' + describe: "Display reasons about module inclusion in the output" }, - 'display-depth': { - type: 'boolean', + "display-depth": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display distance from entry point for each module' + describe: "Display distance from entry point for each module" }, - 'display-used-exports': { - type: 'boolean', + "display-used-exports": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display information about used exports in modules (Tree Shaking)' + describe: "Display information about used exports in modules (Tree Shaking)" }, - 'display-provided-exports': { - type: 'boolean', + "display-provided-exports": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display information about exports provided from modules' + describe: "Display information about exports provided from modules" }, - 'display-error-details': { - type: 'boolean', + "display-error-details": { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Display details about errors' + describe: "Display details about errors" }, - 'verbose': { - type: 'boolean', + verbose: { + type: "boolean", group: DISPLAY_GROUP, - describe: 'Show more details' + describe: "Show more details" } }); var argv = yargs.argv; -if(argv.verbose) { - argv['display-reasons'] = true; - argv['display-depth'] = true; - argv['display-entrypoints'] = true; - argv['display-used-exports'] = true; - argv['display-provided-exports'] = true; - argv['display-error-details'] = true; - argv['display-modules'] = true; - argv['display-cached'] = true; - argv['display-cached-assets'] = true; +if (argv.verbose) { + argv["display-reasons"] = true; + argv["display-depth"] = true; + argv["display-entrypoints"] = true; + argv["display-used-exports"] = true; + argv["display-provided-exports"] = true; + argv["display-error-details"] = true; + argv["display-modules"] = true; + argv["display-cached"] = true; + argv["display-cached-assets"] = true; } -if(argv._.includes('init')) { +if (argv._.includes("init")) { const initPkgs = argv._.length === 1 ? [] : [argv._.pop()]; - return require('../lib/initialize')(initPkgs); -} else if(argv._.includes('migrate')) { + return require("../lib/initialize")(initPkgs); +} else if (argv._.includes("migrate")) { const filePaths = argv._.length === 1 ? [] : [argv._.pop()]; if (!filePaths.length) { - throw new Error('Please specify a path to your webpack config'); + throw new Error("Please specify a path to your webpack config"); } const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); - return require('../lib/migrate.js')(inputConfigPath, inputConfigPath); + return require("../lib/migrate.js")(inputConfigPath, inputConfigPath); } else { - var options = require('./convert-argv')(yargs, argv); + var options = require("./convert-argv")(yargs, argv); return processOptions(options); } function ifArg(name, fn, init) { - if(Array.isArray(argv[name])) { - if(init) init(); + if (Array.isArray(argv[name])) { + if (init) init(); argv[name].forEach(fn); - } else if(typeof argv[name] !== 'undefined') { - if(init) init(); + } else if (typeof argv[name] !== "undefined") { + if (init) init(); fn(argv[name], -1); } } //eslint-disable-next-line function processOptions(options) { // process Promise - if(typeof options.then === 'function') { + if (typeof options.then === "function") { options.then(processOptions).catch(function(err) { console.error(err.stack || err); process.exitCode = -1; @@ -194,189 +198,194 @@ function processOptions(options) { } var firstOptions = [].concat(options)[0]; - var statsPresetToOptions = require('webpack/lib/Stats.js').presetToOptions; + var statsPresetToOptions = require("webpack/lib/Stats.js").presetToOptions; var outputOptions = options.stats; - if(typeof outputOptions === 'boolean' || typeof outputOptions === 'string') { + if (typeof outputOptions === "boolean" || typeof outputOptions === "string") { outputOptions = statsPresetToOptions(outputOptions); - } else if(!outputOptions) { + } else if (!outputOptions) { outputOptions = {}; } outputOptions = Object.create(outputOptions); - if(Array.isArray(options) && !outputOptions.children) { + if (Array.isArray(options) && !outputOptions.children) { outputOptions.children = options.map(o => o.stats); } - if(typeof outputOptions.context === 'undefined') + if (typeof outputOptions.context === "undefined") outputOptions.context = firstOptions.context; - ifArg('json', function(bool) { - if(bool) - outputOptions.json = bool; + ifArg("json", function(bool) { + if (bool) outputOptions.json = bool; }); - if(typeof outputOptions.colors === 'undefined') - outputOptions.colors = require('supports-color'); + if (typeof outputOptions.colors === "undefined") + outputOptions.colors = require("supports-color"); - ifArg('sort-modules-by', function(value) { + ifArg("sort-modules-by", function(value) { outputOptions.modulesSort = value; }); - ifArg('sort-chunks-by', function(value) { + ifArg("sort-chunks-by", function(value) { outputOptions.chunksSort = value; }); - ifArg('sort-assets-by', function(value) { + ifArg("sort-assets-by", function(value) { outputOptions.assetsSort = value; }); - ifArg('display-exclude', function(value) { + ifArg("display-exclude", function(value) { outputOptions.exclude = value; }); - if(!outputOptions.json) { - if(typeof outputOptions.cached === 'undefined') + if (!outputOptions.json) { + if (typeof outputOptions.cached === "undefined") outputOptions.cached = false; - if(typeof outputOptions.cachedAssets === 'undefined') + if (typeof outputOptions.cachedAssets === "undefined") outputOptions.cachedAssets = false; - ifArg('display-chunks', function(bool) { + ifArg("display-chunks", function(bool) { outputOptions.modules = !bool; outputOptions.chunks = bool; }); - ifArg('display-entrypoints', function(bool) { + ifArg("display-entrypoints", function(bool) { outputOptions.entrypoints = bool; }); - ifArg('display-reasons', function(bool) { + ifArg("display-reasons", function(bool) { outputOptions.reasons = bool; }); - ifArg('display-depth', function(bool) { + ifArg("display-depth", function(bool) { outputOptions.depth = bool; }); - ifArg('display-used-exports', function(bool) { + ifArg("display-used-exports", function(bool) { outputOptions.usedExports = bool; }); - ifArg('display-provided-exports', function(bool) { + ifArg("display-provided-exports", function(bool) { outputOptions.providedExports = bool; }); - ifArg('display-error-details', function(bool) { + ifArg("display-error-details", function(bool) { outputOptions.errorDetails = bool; }); - ifArg('display-origins', function(bool) { + ifArg("display-origins", function(bool) { outputOptions.chunkOrigins = bool; }); - ifArg('display-max-modules', function(value) { + ifArg("display-max-modules", function(value) { outputOptions.maxModules = value; }); - ifArg('display-cached', function(bool) { - if(bool) - outputOptions.cached = true; + ifArg("display-cached", function(bool) { + if (bool) outputOptions.cached = true; }); - ifArg('display-cached-assets', function(bool) { - if(bool) - outputOptions.cachedAssets = true; + ifArg("display-cached-assets", function(bool) { + if (bool) outputOptions.cachedAssets = true; }); - if(!outputOptions.exclude) - outputOptions.exclude = ['node_modules', 'bower_components', 'components']; + if (!outputOptions.exclude) + outputOptions.exclude = [ + "node_modules", + "bower_components", + "components" + ]; - if(argv['display-modules']) { + if (argv["display-modules"]) { outputOptions.maxModules = Infinity; outputOptions.exclude = undefined; } } else { - if(typeof outputOptions.chunks === 'undefined') + if (typeof outputOptions.chunks === "undefined") outputOptions.chunks = true; - if(typeof outputOptions.entrypoints === 'undefined') + if (typeof outputOptions.entrypoints === "undefined") outputOptions.entrypoints = true; - if(typeof outputOptions.modules === 'undefined') + if (typeof outputOptions.modules === "undefined") outputOptions.modules = true; - if(typeof outputOptions.chunkModules === 'undefined') + if (typeof outputOptions.chunkModules === "undefined") outputOptions.chunkModules = true; - if(typeof outputOptions.reasons === 'undefined') + if (typeof outputOptions.reasons === "undefined") outputOptions.reasons = true; - if(typeof outputOptions.cached === 'undefined') + if (typeof outputOptions.cached === "undefined") outputOptions.cached = true; - if(typeof outputOptions.cachedAssets === 'undefined') + if (typeof outputOptions.cachedAssets === "undefined") outputOptions.cachedAssets = true; } - ifArg('hide-modules', function(bool) { - if(bool) { + ifArg("hide-modules", function(bool) { + if (bool) { outputOptions.modules = false; outputOptions.chunkModules = false; } }); - var webpack = require('webpack/lib/webpack.js'); + var webpack = require("webpack/lib/webpack.js"); Error.stackTraceLimit = 30; var lastHash = null; var compiler; try { compiler = webpack(options); - } catch(e) { - var WebpackOptionsValidationError = require('webpack/lib/WebpackOptionsValidationError'); - if(e instanceof WebpackOptionsValidationError) { - if(argv.color) - console.error('\u001b[1m\u001b[31m' + e.message + '\u001b[39m\u001b[22m'); - else - console.error(e.message); + } catch (e) { + var WebpackOptionsValidationError = require("webpack/lib/WebpackOptionsValidationError"); + if (e instanceof WebpackOptionsValidationError) { + if (argv.color) + console.error( + "\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m" + ); + else console.error(e.message); process.exitCode = 1; } throw e; } - if(argv.progress) { - var ProgressPlugin = require('webpack/lib/ProgressPlugin'); - compiler.apply(new ProgressPlugin({ - profile: argv.profile - })); + if (argv.progress) { + var ProgressPlugin = require("webpack/lib/ProgressPlugin"); + compiler.apply( + new ProgressPlugin({ + profile: argv.profile + }) + ); } function compilerCallback(err, stats) { - if(!options.watch || err) { + if (!options.watch || err) { // Do not keep cache anymore compiler.purgeInputFileSystem(); } - if(err) { + if (err) { lastHash = null; console.error(err.stack || err); - if(err.details) console.error(err.details); + if (err.details) console.error(err.details); process.exitCode = 1; } - if(outputOptions.json) { - process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + '\n'); - } else if(stats.hash !== lastHash) { + if (outputOptions.json) { + process.stdout.write( + JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n" + ); + } else if (stats.hash !== lastHash) { lastHash = stats.hash; - process.stdout.write(stats.toString(outputOptions) + '\n'); + process.stdout.write(stats.toString(outputOptions) + "\n"); } - if(!options.watch && stats.hasErrors()) { - process.on('exit', function() { + if (!options.watch && stats.hasErrors()) { + process.on("exit", function() { process.exitCode = 2; }); } } - if(firstOptions.watch || options.watch) { - var watchOptions = firstOptions.watchOptions || firstOptions.watch || options.watch || {}; - if(watchOptions.stdin) { - process.stdin.on('end', function() { + if (firstOptions.watch || options.watch) { + var watchOptions = + firstOptions.watchOptions || firstOptions.watch || options.watch || {}; + if (watchOptions.stdin) { + process.stdin.on("end", function() { process.exitCode = 0; }); process.stdin.resume(); } compiler.watch(watchOptions, compilerCallback); - console.log('\nWebpack is watching the files…\n'); - } else - compiler.run(compilerCallback); - + console.log("\nWebpack is watching the files…\n"); + } else compiler.run(compilerCallback); } diff --git a/lib/creator/index.js b/lib/creator/index.js index 12ec46c8fc8..e68049c963a 100644 --- a/lib/creator/index.js +++ b/lib/creator/index.js @@ -1,9 +1,11 @@ -const yeoman = require('yeoman-environment'); -const Generator = require('yeoman-generator'); -const path = require('path'); -const defaultGenerator = require('./yeoman/webpack-generator'); -const WebpackAdapter = require('./yeoman/webpack-adapter'); -const runTransform = require('./transformations/index'); +"use strict"; + +const yeoman = require("yeoman-environment"); +const Generator = require("yeoman-generator"); +const path = require("path"); +const defaultGenerator = require("./yeoman/webpack-generator"); +const WebpackAdapter = require("./yeoman/webpack-adapter"); +const runTransform = require("./transformations/index"); /* * @function creator @@ -16,28 +18,30 @@ const runTransform = require('./transformations/index'); */ function creator(options) { - let env = yeoman.createEnv('webpack', null, new WebpackAdapter()); - const generatorName = options ? replaceGeneratorName(path.basename(options[0])) : 'webpack-default-generator'; - if(options) { + let env = yeoman.createEnv("webpack", null, new WebpackAdapter()); + const generatorName = options + ? replaceGeneratorName(path.basename(options[0])) + : "webpack-default-generator"; + if (options) { const WebpackGenerator = class extends Generator { initializing() { - options.forEach( (path) => { + options.forEach(path => { return this.composeWith(require.resolve(path)); }); } }; env.registerStub(WebpackGenerator, generatorName); } else { - env.registerStub(defaultGenerator, 'webpack-default-generator'); + env.registerStub(defaultGenerator, "webpack-default-generator"); } - env.run(generatorName).on('end', () => { - if(generatorName !== 'webpack-default-generator') { + env.run(generatorName).on("end", () => { + if (generatorName !== "webpack-default-generator") { //HACK / FIXME env = env.options.env; return runTransform(env.configuration); } else { - return runTransform(env.getArgument('configuration')); + return runTransform(env.getArgument("configuration")); } }); } @@ -53,8 +57,7 @@ function creator(options) { */ function replaceGeneratorName(name) { - return name.replace( - /(webpack-addons)?([^:]+)(:.*)?/g, 'generator$2'); + return name.replace(/(webpack-addons)?([^:]+)(:.*)?/g, "generator$2"); } module.exports = { diff --git a/lib/creator/index.test.js b/lib/creator/index.test.js index cbe6ad75cf4..a02620e312a 100644 --- a/lib/creator/index.test.js +++ b/lib/creator/index.test.js @@ -1,12 +1,10 @@ -'use strict'; +"use strict"; -const replaceGeneratorName = require('./index').replaceGeneratorName; +const replaceGeneratorName = require("./index").replaceGeneratorName; -describe('replaceGeneratorName', () => { - - it('should replace a pattern of an addon', () => { - const generatorName = replaceGeneratorName('webpack-addons-thefox'); - expect(generatorName).toEqual('generator-thefox'); +describe("replaceGeneratorName", () => { + it("should replace a pattern of an addon", () => { + const generatorName = replaceGeneratorName("webpack-addons-thefox"); + expect(generatorName).toEqual("generator-thefox"); }); - }); diff --git a/lib/creator/transformations/context/__snapshots__/context.test.js.snap b/lib/creator/transformations/context/__snapshots__/context.test.js.snap index 5cef7f9b165..a6f0276751a 100644 --- a/lib/creator/transformations/context/__snapshots__/context.test.js.snap +++ b/lib/creator/transformations/context/__snapshots__/context.test.js.snap @@ -8,7 +8,7 @@ exports[`context transforms correctly using "context-0" data 1`] = ` filename: 'bundle.js' }, - context: path.resolve(__dirname, \\"app\\") + context: path.resolve(__dirname, 'app') } " `; diff --git a/lib/creator/transformations/context/context.js b/lib/creator/transformations/context/context.js index 98fb0710b99..15926ce0aef 100644 --- a/lib/creator/transformations/context/context.js +++ b/lib/creator/transformations/context/context.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,9 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'context', webpackProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "context", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/context/context.test.js b/lib/creator/transformations/context/context.test.js index 0258c5528de..d21b1d8dec5 100644 --- a/lib/creator/transformations/context/context.test.js +++ b/lib/creator/transformations/context/context.test.js @@ -1,5 +1,7 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'context', 'context-0', 'path.resolve(__dirname, "app")'); -defineTest(__dirname, 'context', 'context-1', '\'./some/fake/path\''); -defineTest(__dirname, 'context', 'context-2', 'contextVariable'); +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "context", "context-0", "path.resolve(__dirname, 'app')"); +defineTest(__dirname, "context", "context-1", "'./some/fake/path'"); +defineTest(__dirname, "context", "context-2", "contextVariable"); diff --git a/lib/creator/transformations/devtool/devtool.js b/lib/creator/transformations/devtool/devtool.js index ac3930ad366..87cf628dc41 100644 --- a/lib/creator/transformations/devtool/devtool.js +++ b/lib/creator/transformations/devtool/devtool.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,10 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'devtool', webpackProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "devtool", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/devtool/devtool.test.js b/lib/creator/transformations/devtool/devtool.test.js index 01f574301a5..8702e338922 100644 --- a/lib/creator/transformations/devtool/devtool.test.js +++ b/lib/creator/transformations/devtool/devtool.test.js @@ -1,6 +1,8 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'devtool', 'devtool-0', '\'source-map\''); -defineTest(__dirname, 'devtool', 'devtool-0', 'myVariable'); -defineTest(__dirname, 'devtool', 'devtool-1', '\'cheap-module-source-map\''); -defineTest(__dirname, 'devtool', 'devtool-1', 'false'); +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "devtool", "devtool-0", "'source-map'"); +defineTest(__dirname, "devtool", "devtool-0", "myVariable"); +defineTest(__dirname, "devtool", "devtool-1", "'cheap-module-source-map'"); +defineTest(__dirname, "devtool", "devtool-1", "false"); diff --git a/lib/creator/transformations/entry/entry.js b/lib/creator/transformations/entry/entry.js index 5f142907561..8b0970f0eef 100644 --- a/lib/creator/transformations/entry/entry.js +++ b/lib/creator/transformations/entry/entry.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -12,28 +13,28 @@ const utils = require('../../../transformations/utils'); * @returns ast - jscodeshift API */ - module.exports = function(j, ast, webpackProperties) { - function createEntryProperty(p) { - - if(typeof(webpackProperties) === 'string') { - return utils.pushCreateProperty(j, p, 'entry', webpackProperties); + if (typeof webpackProperties === "string") { + return utils.pushCreateProperty(j, p, "entry", webpackProperties); } - if(Array.isArray(webpackProperties)) { + if (Array.isArray(webpackProperties)) { const externalArray = utils.createArrayWithChildren( - j, 'entry', webpackProperties, true + j, + "entry", + webpackProperties, + true ); return p.value.properties.push(externalArray); - } - else { - utils.pushCreateProperty(j, p, 'entry', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'entry'); + } else { + utils.pushCreateProperty(j, p, "entry", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "entry"); } } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createEntryProperty)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createEntryProperty)); } else { return ast; } diff --git a/lib/creator/transformations/entry/entry.test.js b/lib/creator/transformations/entry/entry.test.js index 27047eb84ee..1124378369a 100644 --- a/lib/creator/transformations/entry/entry.test.js +++ b/lib/creator/transformations/entry/entry.test.js @@ -1,17 +1,24 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'entry', 'entry-0', '\'index.js\''); -defineTest(__dirname, 'entry', 'entry-0', ['\'index.js\'', '\'app.js\'']); -defineTest(__dirname, 'entry', 'entry-0', { - index: '\'index.js\'', - app: '\'app.js\'' +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "entry", "entry-0", "'index.js'"); +defineTest(__dirname, "entry", "entry-0", ["'index.js'", "'app.js'"]); +defineTest(__dirname, "entry", "entry-0", { + index: "'index.js'", + app: "'app.js'" }); -defineTest(__dirname, 'entry', 'entry-0', { - inject: 'something', - app: '\'app.js\'', - inject_1: 'else' +defineTest(__dirname, "entry", "entry-0", { + inject: "something", + app: "'app.js'", + inject_1: "else" }); -defineTest(__dirname, 'entry', 'entry-0', '() => \'index.js\''); -defineTest(__dirname, 'entry', 'entry-0', '() => new Promise((resolve) => resolve([\'./app\', \'./router\']))'); -defineTest(__dirname, 'entry', 'entry-0', 'entryStringVariable'); +defineTest(__dirname, "entry", "entry-0", "() => 'index.js'"); +defineTest( + __dirname, + "entry", + "entry-0", + "() => new Promise((resolve) => resolve(['./app', './router']))" +); +defineTest(__dirname, "entry", "entry-0", "entryStringVariable"); diff --git a/lib/creator/transformations/externals/externals.js b/lib/creator/transformations/externals/externals.js index 9f20dc2d801..29b394a1e37 100644 --- a/lib/creator/transformations/externals/externals.js +++ b/lib/creator/transformations/externals/externals.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -14,24 +15,39 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createExternalProperty(p) { - if(webpackProperties instanceof RegExp || typeof(webpackProperties) === 'string') { - return utils.pushCreateProperty(j, p, 'externals', webpackProperties); + if ( + webpackProperties instanceof RegExp || + typeof webpackProperties === "string" + ) { + return utils.pushCreateProperty(j, p, "externals", webpackProperties); } - if(Array.isArray(webpackProperties)) { + if (Array.isArray(webpackProperties)) { const externalArray = utils.createArrayWithChildren( - j, 'externals', webpackProperties, true + j, + "externals", + webpackProperties, + true ); return p.value.properties.push(externalArray); - } - else { - utils.pushCreateProperty(j, p, 'externals', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'externals'); + } else { + utils.pushCreateProperty(j, p, "externals", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "externals"); } } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.safeTraverse(p , ['parent', 'value', 'left', 'property', 'name']) === 'exports') - .forEach(createExternalProperty); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter( + p => + utils.safeTraverse(p, [ + "parent", + "value", + "left", + "property", + "name" + ]) === "exports" + ) + .forEach(createExternalProperty); } else { return ast; } diff --git a/lib/creator/transformations/externals/externals.test.js b/lib/creator/transformations/externals/externals.test.js index 07331dda65a..a64bceaef78 100644 --- a/lib/creator/transformations/externals/externals.test.js +++ b/lib/creator/transformations/externals/externals.test.js @@ -1,61 +1,61 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'externals', 'externals-0', /react/); -defineTest(__dirname, 'externals', 'externals-1', { - jquery: '\'jQuery\'', - react: '\'react\'' +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "externals", "externals-0", /react/); +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: "'react'" }); -defineTest(__dirname, 'externals', 'externals-1', 'myObj'); +defineTest(__dirname, "externals", "externals-1", "myObj"); -defineTest(__dirname, 'externals', 'externals-1', { - jquery: '\'jQuery\'', - react: 'reactObj' +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: "reactObj" }); -defineTest(__dirname, 'externals', 'externals-1', { - jquery: '\'jQuery\'', - react: ['reactObj', 'path.join(__dirname, \'app\')', '\'jquery\''] +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: ["reactObj", "path.join(__dirname, 'app')", "'jquery'"] }); -defineTest(__dirname, 'externals', 'externals-1', { +defineTest(__dirname, "externals", "externals-1", { lodash: { - commonjs: '\'lodash\'', - amd: '\'lodash\'', - root: '\'_\'' + commonjs: "'lodash'", + amd: "'lodash'", + root: "'_'" } }); -defineTest(__dirname, 'externals', 'externals-1', { +defineTest(__dirname, "externals", "externals-1", { lodash: { - commonjs: 'lodash', - amd: 'hidash', - root: '_' + commonjs: "lodash", + amd: "hidash", + root: "_" } }); -defineTest(__dirname, 'externals', 'externals-1', [ +defineTest(__dirname, "externals", "externals-1", [ { - a: 'false', - b: 'true', - '\'./ext\'': './hey' + a: "false", + b: "true", + "'./ext'": "./hey" }, - 'function(context, request, callback) {' + - 'if (/^yourregex$/.test(request)){' + - 'return callback(null, \'commonjs \' + request);' + - '}' + - 'callback();' + - '}' -] -); - -defineTest(__dirname, 'externals', 'externals-1', [ - 'myObj', - 'function(context, request, callback) {' + - 'if (/^yourregex$/.test(request)){' + - 'return callback(null, \'commonjs \' + request);' + - '}' + - 'callback();' + - '}' -] -); + "function(context, request, callback) {" + + "if (/^yourregex$/.test(request)){" + + "return callback(null, 'commonjs ' + request);" + + "}" + + "callback();" + + "}" +]); + +defineTest(__dirname, "externals", "externals-1", [ + "myObj", + "function(context, request, callback) {" + + "if (/^yourregex$/.test(request)){" + + "return callback(null, 'commonjs ' + request);" + + "}" + + "callback();" + + "}" +]); diff --git a/lib/creator/transformations/index.js b/lib/creator/transformations/index.js index 779bede11c6..73610e7f74f 100644 --- a/lib/creator/transformations/index.js +++ b/lib/creator/transformations/index.js @@ -1,30 +1,32 @@ -const path = require('path'); -const j = require('jscodeshift'); -const chalk = require('chalk'); -const pEachSeries = require('p-each-series'); +"use strict"; -const runPrettier = require('../utils/run-prettier'); +const path = require("path"); +const j = require("jscodeshift"); +const chalk = require("chalk"); +const pEachSeries = require("p-each-series"); -const entryTransform = require('./entry/entry'); -const outputTransform = require('./output/output'); -const contextTransform = require('./context/context'); -const resolveTransform = require('./resolve/resolve'); -const devtoolTransform = require('./devtool/devtool'); -const targetTransform = require('./target/target'); -const watchTransform = require('./watch/watch'); -const watchOptionsTransform = require('./watch/watchOptions'); -const externalsTransform = require('./externals/externals'); -const nodeTransform = require('./node/node'); -const performanceTransform = require('./performance/performance'); -const statsTransform = require('./stats/stats'); -const amdTransform = require('./other/amd'); -const bailTransform = require('./other/bail'); -const cacheTransform = require('./other/cache'); -const profileTransform = require('./other/profile'); -const mergeTransform = require('./other/merge'); -const moduleTransform = require('./module/module'); -const pluginsTransform = require('./plugins/plugins'); -const topScopeTransform = require('./top-scope/top-scope'); +const runPrettier = require("../utils/run-prettier"); + +const entryTransform = require("./entry/entry"); +const outputTransform = require("./output/output"); +const contextTransform = require("./context/context"); +const resolveTransform = require("./resolve/resolve"); +const devtoolTransform = require("./devtool/devtool"); +const targetTransform = require("./target/target"); +const watchTransform = require("./watch/watch"); +const watchOptionsTransform = require("./watch/watchOptions"); +const externalsTransform = require("./externals/externals"); +const nodeTransform = require("./node/node"); +const performanceTransform = require("./performance/performance"); +const statsTransform = require("./stats/stats"); +const amdTransform = require("./other/amd"); +const bailTransform = require("./other/bail"); +const cacheTransform = require("./other/cache"); +const profileTransform = require("./other/profile"); +const mergeTransform = require("./other/merge"); +const moduleTransform = require("./module/module"); +const pluginsTransform = require("./plugins/plugins"); +const topScopeTransform = require("./top-scope/top-scope"); /* * @function runTransform @@ -60,15 +62,14 @@ const transformsObject = { }; module.exports = function runTransform(webpackProperties) { - // webpackOptions.name sent to nameTransform if match - Object.keys(webpackProperties).forEach( (scaffoldPiece) => { + Object.keys(webpackProperties).forEach(scaffoldPiece => { const config = webpackProperties[scaffoldPiece]; const transformations = Object.keys(transformsObject).map(k => { - const stringVal = k.substr(0, k.indexOf('Transform')); - if(config.webpackOptions) { - if(config.webpackOptions[stringVal]) { + const stringVal = k.substr(0, k.indexOf("Transform")); + if (config.webpackOptions) { + if (config.webpackOptions[stringVal]) { return [transformsObject[k], config.webpackOptions[stringVal]]; } else { return [transformsObject[k], config[stringVal]]; @@ -78,34 +79,38 @@ module.exports = function runTransform(webpackProperties) { } }); - const ast = j('module.exports = {}'); + const ast = j("module.exports = {}"); return pEachSeries(transformations, f => { - if(!f[1]) { + if (!f[1]) { return f[0](j, ast); } else { return f[0](j, ast, f[1]); } }) - .then(() => { - let configurationName; - if(!config.configName) { - configurationName = 'webpack.config.js'; - } else { - configurationName = 'webpack.' + config.configName + '.js'; - } + .then(() => { + let configurationName; + if (!config.configName) { + configurationName = "webpack.config.js"; + } else { + configurationName = "webpack." + config.configName + ".js"; + } - const outputPath = path.join(process.cwd(), configurationName); - const source = ast.toSource({ - quote: 'single' - }); + const outputPath = path.join(process.cwd(), configurationName); + const source = ast.toSource({ + quote: "single" + }); - runPrettier(outputPath, source); - }).catch(err => { - console.error(err.message ? err.message : err); - }); + runPrettier(outputPath, source); + }) + .catch(err => { + console.error(err.message ? err.message : err); + }); }); - process.stdout.write('\n' + chalk.green( - 'Congratulations! Your new webpack configuration file has been created!\n' - )); + process.stdout.write( + "\n" + + chalk.green( + "Congratulations! Your new webpack configuration file has been created!\n" + ) + ); }; diff --git a/lib/creator/transformations/module/module.js b/lib/creator/transformations/module/module.js index 66c1371dccb..991a7497e8a 100644 --- a/lib/creator/transformations/module/module.js +++ b/lib/creator/transformations/module/module.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,21 +14,19 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - function createModuleProperties(p) { - utils.pushCreateProperty(j, p, 'module', j.objectExpression([])); - return utils.safeTraverse(p, ['key', 'name'] === 'module'); + utils.pushCreateProperty(j, p, "module", j.objectExpression([])); + return utils.safeTraverse(p, ["key", "name"] === "module"); } function createRules(p) { - return utils.pushObjectKeys( - j, p, webpackProperties, 'module' - ); + return utils.pushObjectKeys(j, p, webpackProperties, "module"); } - if(!webpackProperties) { + if (!webpackProperties) { return ast; } else { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createModuleProperties)) - .forEach(p => createRules(p)); + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createModuleProperties)) + .forEach(p => createRules(p)); } }; diff --git a/lib/creator/transformations/module/module.test.js b/lib/creator/transformations/module/module.test.js index 710060d9c5e..278f246c28f 100644 --- a/lib/creator/transformations/module/module.test.js +++ b/lib/creator/transformations/module/module.test.js @@ -1,93 +1,108 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'module', 'module-0', { - rules: [{ - test: new RegExp(/\.(js|vue)$/), - loader: '\'eslint-loader\'', - enforce: '\'pre\'', - include: ['customObj', '\'Stringy\''], - options: { - formatter: '\'someOption\'' - } - }, { - test: new RegExp(/\.vue$/), - loader: '\'vue-loader\'', - options: 'vueObject' - }, { - test: new RegExp(/\.js$/), - loader: '\'babel-loader\'', - include: ['resolve(\'src\')', 'resolve(\'test\')'] - }, { - test: new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/), - loader: '\'url-loader\'', - options: { - limit: 10000, - name: 'utils.assetsPath(\'img/[name].[hash:7].[ext]\')' - } - }, { - test: new RegExp(/\.(woff2?|eot|ttf|otf)(\?.*)?$/), - loader: '\'url-loader\'', - options: { - limit: '10000', - name: 'utils.assetsPath(\'fonts/[name].[hash:7].[ext]\')', - someArr: ['Hey'] +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "module", "module-0", { + rules: [ + { + test: new RegExp(/\.(js|vue)$/), + loader: "'eslint-loader'", + enforce: "'pre'", + include: ["customObj", "'Stringy'"], + options: { + formatter: "'someOption'" + } + }, + { + test: new RegExp(/\.vue$/), + loader: "'vue-loader'", + options: "vueObject" + }, + { + test: new RegExp(/\.js$/), + loader: "'babel-loader'", + include: ["resolve('src')", "resolve('test')"] + }, + { + test: new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/), + loader: "'url-loader'", + options: { + limit: 10000, + name: "utils.assetsPath('img/[name].[hash:7].[ext]')" + } + }, + { + test: new RegExp(/\.(woff2?|eot|ttf|otf)(\?.*)?$/), + loader: "'url-loader'", + options: { + limit: "10000", + name: "utils.assetsPath('fonts/[name].[hash:7].[ext]')", + someArr: ["Hey"] + } } - }] + ] }); -defineTest(__dirname, 'module', 'module-1', { +defineTest(__dirname, "module", "module-1", { noParse: /jquery|lodash/, - rules: [{ - test: new RegExp(/\.js$/), - parser: { - amd: false - }, - use: [ - '\'htmllint-loader\'', - { - loader: '\'html-loader\'', - options: { - hello: '\'world\'' + rules: [ + { + test: new RegExp(/\.js$/), + parser: { + amd: false + }, + use: [ + "'htmllint-loader'", + { + loader: "'html-loader'", + options: { + hello: "'world'" + } } - } - ] - }] + ] + } + ] }); -defineTest(__dirname, 'module', 'module-0', { +defineTest(__dirname, "module", "module-0", { rules: [ - '{{#if_eq build \'standalone\'}}', + "{{#if_eq build 'standalone'}}", { test: new RegExp(/\.(js|vue)$/), - loader: '\'eslint-loader\'', - enforce: '\'pre\'', - include: ['customObj', '\'Stringy\''], + loader: "'eslint-loader'", + enforce: "'pre'", + include: ["customObj", "'Stringy'"], options: { - formatter: '\'someOption\'' + formatter: "'someOption'" } - }, { + }, + { test: new RegExp(/\.vue$/), - loader: '\'vue-loader\'', - options: 'vueObject' - }, { + loader: "'vue-loader'", + options: "vueObject" + }, + { test: new RegExp(/\.js$/), - loader: '\'babel-loader\'', - include: ['resolve(\'src\')', 'resolve(\'test\')'] - }, { + loader: "'babel-loader'", + include: ["resolve('src')", "resolve('test')"] + }, + { test: new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/), - loader: '\'url-loader\'', + loader: "'url-loader'", options: { limit: 10000, - name: 'utils.assetsPath(\'img/[name].[hash:7].[ext]\')', - inject: '{{#if_eq build \'standalone\'}}' + name: "utils.assetsPath('img/[name].[hash:7].[ext]')", + inject: "{{#if_eq build 'standalone'}}" } - }, { + }, + { test: new RegExp(/\.(woff2?|eot|ttf|otf)(\?.*)?$/), - loader: '\'url-loader\'', - inject: '{{#if_eq build \'standalone\'}}', + loader: "'url-loader'", + inject: "{{#if_eq build 'standalone'}}", options: { - limit: '10000', - name: 'utils.assetsPath(\'fonts/[name].[hash:7].[ext]\')' + limit: "10000", + name: "utils.assetsPath('fonts/[name].[hash:7].[ext]')" } - }] + } + ] }); diff --git a/lib/creator/transformations/node/node.js b/lib/creator/transformations/node/node.js index 26a9a13ffe4..92a3d31a271 100644 --- a/lib/creator/transformations/node/node.js +++ b/lib/creator/transformations/node/node.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -14,12 +15,13 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createNodeProperty(p) { - utils.pushCreateProperty(j, p, 'node', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'node'); + utils.pushCreateProperty(j, p, "node", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "node"); } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createNodeProperty)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createNodeProperty)); } else { return ast; } diff --git a/lib/creator/transformations/node/node.test.js b/lib/creator/transformations/node/node.test.js index 53cf24e541a..bfa478d9e19 100644 --- a/lib/creator/transformations/node/node.test.js +++ b/lib/creator/transformations/node/node.test.js @@ -1,11 +1,13 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'node', 'node-0', { +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "node", "node-0", { console: false, global: true, process: true, Buffer: true, - __filename: 'mock', - __dirname: 'mock', + __filename: "mock", + __dirname: "mock", setImmediate: true }); diff --git a/lib/creator/transformations/other/amd.js b/lib/creator/transformations/other/amd.js index 8453e6105c1..24d0aa9a24e 100644 --- a/lib/creator/transformations/other/amd.js +++ b/lib/creator/transformations/other/amd.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -14,12 +15,13 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createAMDProperty(p) { - utils.pushCreateProperty(j, p, 'amd', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'amd'); + utils.pushCreateProperty(j, p, "amd", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "amd"); } - if(webpackProperties && typeof(webpackProperties) === 'object') { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createAMDProperty)); + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createAMDProperty)); } else { return ast; } diff --git a/lib/creator/transformations/other/bail.js b/lib/creator/transformations/other/bail.js index b61d793f30a..1fe4f3bed37 100644 --- a/lib/creator/transformations/other/bail.js +++ b/lib/creator/transformations/other/bail.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,10 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'bail', webpackProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "bail", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/other/cache.js b/lib/creator/transformations/other/cache.js index ad0ee5d5e0c..ecb9eae8d72 100644 --- a/lib/creator/transformations/other/cache.js +++ b/lib/creator/transformations/other/cache.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,10 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'cache', webpackProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "cache", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/other/merge.js b/lib/creator/transformations/other/merge.js index b93d2f4bde8..5a80331de5d 100644 --- a/lib/creator/transformations/other/merge.js +++ b/lib/creator/transformations/other/merge.js @@ -1,3 +1,5 @@ +"use strict"; + /* * * Transform for merge. Finds the merge property from yeoman and creates a way @@ -12,32 +14,32 @@ module.exports = function(j, ast, webpackProperties) { function createMergeProperty(p) { // FIXME Use j.callExp() - let exportsDecl = p.value.body.map( (n) => { - if(n.expression) { + let exportsDecl = p.value.body.map(n => { + if (n.expression) { return n.expression.right; } }); const bodyLength = exportsDecl.length; let newVal = {}; - newVal.type = 'ExpressionStatement'; + newVal.type = "ExpressionStatement"; newVal.expression = { - type: 'AssignmentExpression', - operator: '=', + type: "AssignmentExpression", + operator: "=", left: { - type: 'MemberExpression', + type: "MemberExpression", computed: false, - object: j.identifier('module'), - property: j.identifier('exports') + object: j.identifier("module"), + property: j.identifier("exports") }, - right: j.callExpression( - j.identifier('merge'), - [j.identifier(webpackProperties), exportsDecl.pop()]) + right: j.callExpression(j.identifier("merge"), [ + j.identifier(webpackProperties), + exportsDecl.pop() + ]) }; p.value.body[bodyLength - 1] = newVal; } - if(webpackProperties) { - return ast.find(j.Program) - .filter(p => createMergeProperty(p)); + if (webpackProperties) { + return ast.find(j.Program).filter(p => createMergeProperty(p)); } else { return ast; } diff --git a/lib/creator/transformations/other/other.test.js b/lib/creator/transformations/other/other.test.js index ba9d0c66ac9..a976a9ba25f 100644 --- a/lib/creator/transformations/other/other.test.js +++ b/lib/creator/transformations/other/other.test.js @@ -1,11 +1,13 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'amd', 'other-0', { +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "amd", "other-0", { jQuery: true, - kQuery: false} -); -defineTest(__dirname, 'bail', 'other-0', true); -defineTest(__dirname, 'cache', 'other-0', true); -defineTest(__dirname, 'cache', 'other-0', 'cacheVal'); -defineTest(__dirname, 'profile', 'other-0', true); -defineTest(__dirname, 'merge', 'other-0', 'myConfig'); + kQuery: false +}); +defineTest(__dirname, "bail", "other-0", true); +defineTest(__dirname, "cache", "other-0", true); +defineTest(__dirname, "cache", "other-0", "cacheVal"); +defineTest(__dirname, "profile", "other-0", true); +defineTest(__dirname, "merge", "other-0", "myConfig"); diff --git a/lib/creator/transformations/other/profile.js b/lib/creator/transformations/other/profile.js index bdb146dc9d4..07f08bea4f7 100644 --- a/lib/creator/transformations/other/profile.js +++ b/lib/creator/transformations/other/profile.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,9 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'profile', webpackProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "profile", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/output/output.js b/lib/creator/transformations/output/output.js index ea69aaab02a..1c19f70d095 100644 --- a/lib/creator/transformations/output/output.js +++ b/lib/creator/transformations/output/output.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -11,15 +12,15 @@ const utils = require('../../../transformations/utils'); * @param { Object } webpackProperties - Object containing transformation rules * @returns ast - jscodeshift API */ - module.exports = function(j, ast, webpackProperties) { function createOutputProperties(p) { - utils.pushCreateProperty(j, p, 'output', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'output'); + utils.pushCreateProperty(j, p, "output", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "output"); } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createOutputProperties)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createOutputProperties)); } else { return ast; } diff --git a/lib/creator/transformations/output/output.test.js b/lib/creator/transformations/output/output.test.js index 413ead9c291..9b7544604b8 100644 --- a/lib/creator/transformations/output/output.test.js +++ b/lib/creator/transformations/output/output.test.js @@ -1,13 +1,15 @@ -const defineTest = require('../../../transformations/defineTest'); -const jscodeshift = require('jscodeshift'); +"use strict"; -defineTest(__dirname, 'output', 'output-0', { - filename: '\'bundle\'', - path: '\'dist/assets\'', +const defineTest = require("../../../transformations/defineTest"); +const jscodeshift = require("jscodeshift"); + +defineTest(__dirname, "output", "output-0", { + filename: "'bundle'", + path: "'dist/assets'", pathinfo: true, - publicPath: '\'https://google.com\'', - sourceMapFilename: '\'[name].map\'', - sourcePrefix: jscodeshift('\'\t\''), + publicPath: "'https://google.com'", + sourceMapFilename: "'[name].map'", + sourcePrefix: jscodeshift("'\t'"), umdNamedDefine: true, strictModuleExceptionHandling: true }); diff --git a/lib/creator/transformations/performance/performance.js b/lib/creator/transformations/performance/performance.js index 7450f12df62..f00c1e21572 100644 --- a/lib/creator/transformations/performance/performance.js +++ b/lib/creator/transformations/performance/performance.js @@ -1,5 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; +const utils = require("../../../transformations/utils"); /* * @@ -13,14 +14,14 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - function createPerformanceProperty(p) { - utils.pushCreateProperty(j, p, 'performance', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'performance'); + utils.pushCreateProperty(j, p, "performance", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "performance"); } - if(webpackProperties && typeof(webpackProperties) === 'object') { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createPerformanceProperty)); + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createPerformanceProperty)); } else { return ast; } diff --git a/lib/creator/transformations/performance/performance.test.js b/lib/creator/transformations/performance/performance.test.js index 0e078cb5d24..61840ca16ff 100644 --- a/lib/creator/transformations/performance/performance.test.js +++ b/lib/creator/transformations/performance/performance.test.js @@ -1,10 +1,11 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'performance', 'performance-0', { - hints: '\'warning\'', +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "performance", "performance-0", { + hints: "'warning'", maxEntrypointSize: 400000, maxAssetSize: 100000, - assetFilter: 'function(assetFilename) {' + - 'return assetFilename.endsWith(\'.js\');' + - '}' + assetFilter: + "function(assetFilename) {" + "return assetFilename.endsWith('.js');" + "}" }); diff --git a/lib/creator/transformations/plugins/plugins.js b/lib/creator/transformations/plugins/plugins.js index 33167582f29..45c382501f1 100644 --- a/lib/creator/transformations/plugins/plugins.js +++ b/lib/creator/transformations/plugins/plugins.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -13,12 +15,18 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createPluginsProperty(p) { - const pluginArray = utils.createArrayWithChildren(j, 'plugins', webpackProperties, true); + const pluginArray = utils.createArrayWithChildren( + j, + "plugins", + webpackProperties, + true + ); return p.value.properties.push(pluginArray); } - if(webpackProperties && Array.isArray(webpackProperties)) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createPluginsProperty)); + if (webpackProperties && Array.isArray(webpackProperties)) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createPluginsProperty)); } else { return ast; } diff --git a/lib/creator/transformations/plugins/plugins.test.js b/lib/creator/transformations/plugins/plugins.test.js index dde8d0ae2d5..7412024992f 100644 --- a/lib/creator/transformations/plugins/plugins.test.js +++ b/lib/creator/transformations/plugins/plugins.test.js @@ -1,5 +1,14 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'plugins', 'plugins-0', [ - 'new webpack.optimize.CommonsChunkPlugin({name:' + '\'' + 'vendor' + '\'' + ',filename:' + '\'' + 'vendor' + '-[hash].min.js\'})' +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "plugins", "plugins-0", [ + "new webpack.optimize.CommonsChunkPlugin({name:" + + "'" + + "vendor" + + "'" + + ",filename:" + + "'" + + "vendor" + + "-[hash].min.js'})" ]); diff --git a/lib/creator/transformations/resolve/resolve.js b/lib/creator/transformations/resolve/resolve.js index 66d572edb84..01bba7000e3 100644 --- a/lib/creator/transformations/resolve/resolve.js +++ b/lib/creator/transformations/resolve/resolve.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -13,14 +15,14 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createResolveProperties(p) { - utils.pushCreateProperty(j, p, 'resolve', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'resolve'); - } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createResolveProperties)); + utils.pushCreateProperty(j, p, "resolve", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "resolve"); } - else { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createResolveProperties)); + } else { return ast; } }; diff --git a/lib/creator/transformations/resolve/resolve.test.js b/lib/creator/transformations/resolve/resolve.test.js index 53218c2a4f3..89ecd087957 100644 --- a/lib/creator/transformations/resolve/resolve.test.js +++ b/lib/creator/transformations/resolve/resolve.test.js @@ -1,27 +1,29 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'resolve', 'resolve-0', { +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "resolve", "resolve-0", { alias: { - inject: '{{#if_eq build \'standalone\'}}', - hello: '\'world\'', - inject_1: '{{/if_eq}}', - world: 'hello', + inject: "{{#if_eq build 'standalone'}}", + hello: "'world'", + inject_1: "{{/if_eq}}", + world: "hello" }, - aliasFields: ['\'browser\'', 'wars'], - descriptionFiles: ['\'a\'', 'b'], + aliasFields: ["'browser'", "wars"], + descriptionFiles: ["'a'", "b"], enforceExtension: false, enforceModuleExtension: false, - extensions: ['hey', '\'ho\''], - mainFields: ['main', '\'story\''], - mainFiles: ['\'noMainFileHere\'', 'iGuess'], - modules: ['one', '\'two\''], + extensions: ["hey", "'ho'"], + mainFields: ["main", "'story'"], + mainFiles: ["'noMainFileHere'", "iGuess"], + modules: ["one", "'two'"], unsafeCache: false, resolveLoader: { - modules: ['\'node_modules\'', 'mode_nodules'], - extensions: ['jsVal', '\'.json\''], - mainFields: ['loader', '\'main\''], - moduleExtensions: ['\'-loader\'', 'value'] + modules: ["'node_modules'", "mode_nodules"], + extensions: ["jsVal", "'.json'"], + mainFields: ["loader", "'main'"], + moduleExtensions: ["'-loader'", "value"] }, - plugins: ['somePlugin', '\'stringVal\''], + plugins: ["somePlugin", "'stringVal'"], symlinks: true }); diff --git a/lib/creator/transformations/stats/stats.js b/lib/creator/transformations/stats/stats.js index 46a0e0ad5e3..d843caf04ee 100644 --- a/lib/creator/transformations/stats/stats.js +++ b/lib/creator/transformations/stats/stats.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -13,16 +15,25 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createStatsProperty(p) { - utils.pushCreateProperty(j, p, 'stats', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'stats'); - } - if(webpackProperties && typeof(webpackProperties) === 'object') { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createStatsProperty)); + utils.pushCreateProperty(j, p, "stats", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "stats"); } - else if(webpackProperties && webpackProperties.length) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'stats', webpackProperties)); + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createStatsProperty)); + } else if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "stats", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/stats/stats.test.js b/lib/creator/transformations/stats/stats.test.js index 432eac37522..c830ddb38e2 100644 --- a/lib/creator/transformations/stats/stats.test.js +++ b/lib/creator/transformations/stats/stats.test.js @@ -1,26 +1,28 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'stats', 'stats-0', { +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "stats", "stats-0", { assets: true, - assetsSort: '\'field\'', + assetsSort: "'field'", cached: true, cachedAssets: true, children: true, chunks: true, chunkModules: true, chunkOrigins: true, - chunksSort: '\'field\'', - context: '\'../src/\'', + chunksSort: "'field'", + context: "'../src/'", colors: true, depth: false, - entrypoints: 'customVal', + entrypoints: "customVal", errors: true, errorDetails: true, exclude: [], hash: true, maxModules: 15, modules: true, - modulesSort: '\'field\'', + modulesSort: "'field'", performance: true, providedExports: false, publicPath: true, @@ -31,4 +33,4 @@ defineTest(__dirname, 'stats', 'stats-0', { version: true, warnings: true }); -defineTest(__dirname, 'stats', 'stats-0', '\'errors-only\''); +defineTest(__dirname, "stats", "stats-0", "'errors-only'"); diff --git a/lib/creator/transformations/target/target.js b/lib/creator/transformations/target/target.js index 01501315d1d..7b5dca6bed1 100644 --- a/lib/creator/transformations/target/target.js +++ b/lib/creator/transformations/target/target.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -12,10 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - - if(webpackProperties && webpackProperties.length) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'target', webpackProperties)); + if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "target", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/target/target.test.js b/lib/creator/transformations/target/target.test.js index e42a7347a91..e29d6ab1853 100644 --- a/lib/creator/transformations/target/target.test.js +++ b/lib/creator/transformations/target/target.test.js @@ -1,4 +1,6 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'target', 'target-0', '\'async-node\''); -defineTest(__dirname, 'target', 'target-1', 'node'); +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "target", "target-0", "'async-node'"); +defineTest(__dirname, "target", "target-1", "node"); diff --git a/lib/creator/transformations/top-scope/top-scope.js b/lib/creator/transformations/top-scope/top-scope.js index 06e681d4577..daa92a75642 100644 --- a/lib/creator/transformations/top-scope/top-scope.js +++ b/lib/creator/transformations/top-scope/top-scope.js @@ -1,4 +1,3 @@ - /* * * Get an property named topScope from yeoman and inject it to the top scope of @@ -12,11 +11,11 @@ module.exports = function(j, ast, webpackProperties) { function createTopScopeProperty(p) { - webpackProperties.forEach( (n) => { + webpackProperties.forEach(n => { p.value.body.splice(-1, 0, n); }); } - if(webpackProperties) { + if (webpackProperties) { return ast.find(j.Program).filter(p => createTopScopeProperty(p)); } }; diff --git a/lib/creator/transformations/top-scope/top-scope.test.js b/lib/creator/transformations/top-scope/top-scope.test.js index da1398e55f9..728b777c5d3 100644 --- a/lib/creator/transformations/top-scope/top-scope.test.js +++ b/lib/creator/transformations/top-scope/top-scope.test.js @@ -1,5 +1,5 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'top-scope', 'top-scope-0', [ - 'var test = \'me\';' -]); +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "top-scope", "top-scope-0", ["var test = 'me';"]); diff --git a/lib/creator/transformations/watch/watch.js b/lib/creator/transformations/watch/watch.js index 650ddd22805..ed92c572672 100644 --- a/lib/creator/transformations/watch/watch.js +++ b/lib/creator/transformations/watch/watch.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -12,9 +14,18 @@ const utils = require('../../../transformations/utils'); */ module.exports = function(j, ast, webpackProperties) { - if(typeof(webpackProperties) === 'boolean') { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(j, p, utils.pushCreateProperty, 'watch', webpackProperties)); + if (typeof webpackProperties === "boolean") { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "watch", + webpackProperties + ) + ); } else { return ast; } diff --git a/lib/creator/transformations/watch/watch.test.js b/lib/creator/transformations/watch/watch.test.js index c564fcba4ec..ddaec086374 100644 --- a/lib/creator/transformations/watch/watch.test.js +++ b/lib/creator/transformations/watch/watch.test.js @@ -1,6 +1,8 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'watch', 'watch-0', true); -defineTest(__dirname, 'watch', 'watch-0', false); -defineTest(__dirname, 'watch', 'watch-1', true); -defineTest(__dirname, 'watch', 'watch-1', false); +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "watch", "watch-0", true); +defineTest(__dirname, "watch", "watch-0", false); +defineTest(__dirname, "watch", "watch-1", true); +defineTest(__dirname, "watch", "watch-1", false); diff --git a/lib/creator/transformations/watch/watchOptions.js b/lib/creator/transformations/watch/watchOptions.js index b08c8218a5c..c7f88cb48ab 100644 --- a/lib/creator/transformations/watch/watchOptions.js +++ b/lib/creator/transformations/watch/watchOptions.js @@ -1,4 +1,6 @@ -const utils = require('../../../transformations/utils'); +"use strict"; + +const utils = require("../../../transformations/utils"); /* * @@ -13,12 +15,13 @@ const utils = require('../../../transformations/utils'); module.exports = function(j, ast, webpackProperties) { function createWatchOptionsProperty(p) { - utils.pushCreateProperty(j, p, 'watchOptions', j.objectExpression([])); - return utils.pushObjectKeys(j, p, webpackProperties, 'watchOptions'); + utils.pushCreateProperty(j, p, "watchOptions", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "watchOptions"); } - if(webpackProperties) { - return ast.find(j.ObjectExpression) - .filter(p => utils.isAssignment(null, p, createWatchOptionsProperty)); + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createWatchOptionsProperty)); } else { return ast; } diff --git a/lib/creator/transformations/watch/watchOptions.test.js b/lib/creator/transformations/watch/watchOptions.test.js index 33eb8811e08..33a7d369fc3 100644 --- a/lib/creator/transformations/watch/watchOptions.test.js +++ b/lib/creator/transformations/watch/watchOptions.test.js @@ -1,19 +1,21 @@ -const defineTest = require('../../../transformations/defineTest'); +"use strict"; -defineTest(__dirname, 'watchOptions', 'watch-0', { +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "watchOptions", "watch-0", { aggregateTimeout: 300, poll: 1000, - ignored: '/node_modules/' + ignored: "/node_modules/" }); -defineTest(__dirname, 'watchOptions', 'watch-1', { +defineTest(__dirname, "watchOptions", "watch-1", { aggregateTimeout: 300, poll: 1000, - ignored: '/node_modules/' + ignored: "/node_modules/" }); -defineTest(__dirname, 'watchOptions', 'watch-2', { +defineTest(__dirname, "watchOptions", "watch-2", { aggregateTimeout: 300, poll: 1000, - ignored: '/node_modules/' + ignored: "/node_modules/" }); diff --git a/lib/creator/utils/run-prettier.js b/lib/creator/utils/run-prettier.js index 59f60b0e161..5d503eedde0 100644 --- a/lib/creator/utils/run-prettier.js +++ b/lib/creator/utils/run-prettier.js @@ -1,6 +1,8 @@ -const prettier = require('prettier'); -const fs = require('fs'); -const chalk = require('chalk'); +"use strict"; + +const prettier = require("prettier"); +const fs = require("fs"); +const chalk = require("chalk"); /* * @@ -18,16 +20,19 @@ module.exports = function runPrettier(outputPath, source) { prettySource = prettier.format(source, { singleQuote: true, useTabs: true, - tabWidth: 1, + tabWidth: 1 }); - } catch(err) { - process.stdout.write('\n' + - chalk.yellow(`WARNING: Could not apply prettier to ${outputPath}` + - ' due validation error, but the file has been created\n') + } catch (err) { + process.stdout.write( + "\n" + + chalk.yellow( + `WARNING: Could not apply prettier to ${outputPath}` + + " due validation error, but the file has been created\n" + ) ); prettySource = source; } - return fs.writeFileSync(outputPath, prettySource, 'utf8'); + return fs.writeFileSync(outputPath, prettySource, "utf8"); } - return fs.writeFile(outputPath, source, 'utf8', validateConfig); + return fs.writeFile(outputPath, source, "utf8", validateConfig); }; diff --git a/lib/creator/utils/validate-options.js b/lib/creator/utils/validate-options.js index 111bebd428b..143e623f63e 100644 --- a/lib/creator/utils/validate-options.js +++ b/lib/creator/utils/validate-options.js @@ -1,5 +1,7 @@ -const fs = require('fs'); -const path = require('path'); +"use strict"; + +const fs = require("fs"); +const path = require("path"); /* * @function getPath @@ -25,12 +27,12 @@ function getPath(part) { */ module.exports = function validateOptions(opts) { - return Object.keys(opts).forEach( (location) => { + return Object.keys(opts).forEach(location => { let part = getPath(opts[location]); try { fs.readFileSync(part); } catch (err) { - console.error('Found no file at:', part); + console.error("Found no file at:", part); process.exitCode = 1; } }); diff --git a/lib/creator/utils/validate-options.spec.js b/lib/creator/utils/validate-options.spec.js index aae91533562..fe342e78fa1 100644 --- a/lib/creator/utils/validate-options.spec.js +++ b/lib/creator/utils/validate-options.spec.js @@ -1,19 +1,25 @@ -'use strict'; +"use strict"; -const validateOptions = require('../../../__mocks__/creator/validate-options.mock').validateOptions; +"use strict"; -describe('validate-options', () => { +const validateOptions = require("../../../__mocks__/creator/validate-options.mock") + .validateOptions; - it('should throw on fake paths', () => { +describe("validate-options", () => { + it("should throw on fake paths", () => { expect(() => { - validateOptions({entry: 'noop', output: 'noopsi'}); - }).toThrowError('Did not find the file'); + validateOptions({ + entry: "noop", + output: "noopsi" + }); + }).toThrowError("Did not find the file"); }); - it('should find the real files', () => { + it("should find the real files", () => { expect(() => { - validateOptions({entry: 'package.json'}); + validateOptions({ + entry: "package.json" + }); }).not.toThrowError(/'Did not find the file'/); }); - }); diff --git a/lib/creator/yeoman/utils/entry.js b/lib/creator/yeoman/utils/entry.js index ebd587b050e..a21ae95eabc 100644 --- a/lib/creator/yeoman/utils/entry.js +++ b/lib/creator/yeoman/utils/entry.js @@ -1,33 +1,35 @@ -const InputValidate = require('webpack-addons').InputValidate; -const validate = require('./validate'); +"use strict"; + +const InputValidate = require("webpack-addons").InputValidate; +const validate = require("./validate"); module.exports = (self, answer) => { let entryIdentifiers; let result; - if(answer['entryType'] === true) { + if (answer["entryType"] === true) { result = self.prompt([ InputValidate( - 'multipleEntries', - 'Type the names you want for your modules (entry files), separated by comma [example: \'app,vendor\']', + "multipleEntries", + "Type the names you want for your modules (entry files), separated by comma [example: 'app,vendor']", validate ) - ]).then( (multipleEntriesAnswer) => { + ]).then(multipleEntriesAnswer => { let webpackEntryPoint = {}; - entryIdentifiers = multipleEntriesAnswer['multipleEntries'].split(','); + entryIdentifiers = multipleEntriesAnswer["multipleEntries"].split(","); function forEachPromise(obj, fn) { - return obj.reduce(function (promise, prop) { + return obj.reduce(function(promise, prop) { const trimmedProp = prop.trim(); - return promise.then(function (n) { - if(n) { - Object.keys(n).forEach( (val) => { - if( - n[val].charAt(0) !== '(' - && n[val].charAt(0) !== '[' - && n[val].indexOf('function') < 0 - && n[val].indexOf('path') < 0 - && n[val].indexOf('process') < 0 + return promise.then(n => { + if (n) { + Object.keys(n).forEach((val) => { + if ( + n[val].charAt(0) !== "(" + && n[val].charAt(0) !== "[" + && n[val].indexOf("function") < 0 + && n[val].indexOf("path") < 0 + && n[val].indexOf("process") < 0 ) { - n[val] = `'${n[val]}.js'`; + n[val] = `"${n[val]}.js"`; } webpackEntryPoint[val] = n[val]; }); @@ -41,34 +43,33 @@ module.exports = (self, answer) => { return forEachPromise(entryIdentifiers, (entryProp) => self.prompt([ InputValidate( `${entryProp}`, - `What is the location of '${entryProp}'? [example: './src/${entryProp}']`, + `What is the location of "${entryProp}"? [example: "./src/${entryProp}"]`, validate ) ])).then(propAns => { - Object.keys(propAns).forEach( (val) => { - if( - propAns[val].charAt(0) !== '(' - && propAns[val].charAt(0) !== '[' - && propAns[val].indexOf('function') < 0 - && propAns[val].indexOf('path') < 0 - && propAns[val].indexOf('process') < 0 + Object.keys(propAns).forEach((val) => { + if ( + propAns[val].charAt(0) !== "(" + && propAns[val].charAt(0) !== "[" + && propAns[val].indexOf("function") < 0 + && propAns[val].indexOf("path") < 0 + && propAns[val].indexOf("process") < 0 ) { - propAns[val] = `'${propAns[val]}.js'`; + propAns[val] = `"${propAns[val]}.js"`; } webpackEntryPoint[val] = propAns[val]; }); return webpackEntryPoint; }); }); - } - else { + } else { result = self.prompt([ InputValidate( - 'singularEntry', - 'Which module will be the first to enter the application? [example: \'./src/index\']', + "singularEntry", + "Which module will be the first to enter the application? [example: './src/index']", validate ) - ]).then( (singularAnswer) => `'${singularAnswer['singularEntry']}'`); + ]).then((singularAnswer) => `"${singularAnswer["singularEntry"]}"`); } return result; }; diff --git a/lib/creator/yeoman/utils/module.js b/lib/creator/yeoman/utils/module.js index 161ec111962..b9b8660f606 100644 --- a/lib/creator/yeoman/utils/module.js +++ b/lib/creator/yeoman/utils/module.js @@ -1,12 +1,10 @@ module.exports = () => { return { test: new RegExp(/\.js$/), - exclude: '/node_modules/', - loader: '\'babel-loader\'', + exclude: "/node_modules/", + loader: "'babel-loader'", options: { - presets: [ - '\'es2015\'' - ] + presets: ["'es2015'"] } }; }; diff --git a/lib/creator/yeoman/utils/plugins.js b/lib/creator/yeoman/utils/plugins.js index 90b39179d41..bcd523ad462 100644 --- a/lib/creator/yeoman/utils/plugins.js +++ b/lib/creator/yeoman/utils/plugins.js @@ -1,5 +1,3 @@ module.exports = () => { - return [ - 'new UglifyJSPlugin()' - ]; + return ["new UglifyJSPlugin()"]; }; diff --git a/lib/creator/yeoman/utils/tooltip.js b/lib/creator/yeoman/utils/tooltip.js index 16a5e840276..97bf748a009 100644 --- a/lib/creator/yeoman/utils/tooltip.js +++ b/lib/creator/yeoman/utils/tooltip.js @@ -1,37 +1,35 @@ module.exports = { uglify: () => { - return (`/* + return `/* * We've enabled UglifyJSPlugin for you! This minifies your app * in order to load faster and run less javascript. * * https://github.com/webpack-contrib/uglifyjs-webpack-plugin * - */`); + */`; }, commonsChunk: () => { - return (`/* + return `/* * We've enabled commonsChunkPlugin for you. This allows your app to * load faster and it splits the modules you provided as entries across * different bundles! * * https://webpack.js.org/plugins/commons-chunk-plugin/ * - */`); + */`; }, cssPlugin: () => { - return( - `/* + return `/* * We've enabled ExtractTextPlugin for you. This allows your app to * use css modules that will be moved into a separate CSS file instead of inside * one of your module entries! * * https://github.com/webpack-contrib/extract-text-webpack-plugin * - */`); + */`; }, postcss: () => { - return( - `/* + return `/* * We've enabled Postcss, autoprefixer and precss for you. This allows your app * to lint CSS, support variables and mixins, transpile future CSS syntax, * inline images, and more! @@ -44,6 +42,6 @@ module.exports = { * * https://github.com/jonathantneal/precss * - */`); + */`; } }; diff --git a/lib/creator/yeoman/utils/validate.js b/lib/creator/yeoman/utils/validate.js index bf981fd454f..9f8f932f7e8 100644 --- a/lib/creator/yeoman/utils/validate.js +++ b/lib/creator/yeoman/utils/validate.js @@ -1,7 +1,9 @@ -module.exports = (value) => { +"use strict"; + +module.exports = value => { const pass = value.length; - if(pass) { + if (pass) { return true; } - return 'Please specify an answer!'; + return "Please specify an answer!"; }; diff --git a/lib/creator/yeoman/webpack-adapter.js b/lib/creator/yeoman/webpack-adapter.js index 00cf84195c1..4a9262ea848 100644 --- a/lib/creator/yeoman/webpack-adapter.js +++ b/lib/creator/yeoman/webpack-adapter.js @@ -1,4 +1,6 @@ -const inquirer = require('inquirer'); +"use strict"; + +const inquirer = require("inquirer"); /* * @class - WebpackAdapter @@ -10,7 +12,7 @@ const inquirer = require('inquirer'); module.exports = class WebpackAdapter { prompt(questions, callback) { const promise = inquirer.prompt(questions); - promise.then(callback || function(){}); + promise.then(callback || function() {}); return promise; } }; diff --git a/lib/creator/yeoman/webpack-generator.js b/lib/creator/yeoman/webpack-generator.js index 5bc4574edf0..08b5018f45c 100644 --- a/lib/creator/yeoman/webpack-generator.js +++ b/lib/creator/yeoman/webpack-generator.js @@ -1,22 +1,24 @@ -const Generator = require('yeoman-generator'); -const chalk = require('chalk'); +"use strict"; -const createCommonsChunkPlugin = require('webpack-addons').createCommonsChunkPlugin; +const Generator = require("yeoman-generator"); +const chalk = require("chalk"); -const Input = require('webpack-addons').Input; -const Confirm = require('webpack-addons').Confirm; -const RawList = require('webpack-addons').RawList; +const createCommonsChunkPlugin = require("webpack-addons").createCommonsChunkPlugin; -const entryQuestions = require('./utils/entry'); -const getBabelPlugin = require('./utils/module'); -const getDefaultPlugins = require('./utils/plugins'); -const tooltip = require('./utils/tooltip'); +const Input = require("webpack-addons").Input; +const Confirm = require("webpack-addons").Confirm; +const RawList = require("webpack-addons").RawList; + +const entryQuestions = require("./utils/entry"); +const getBabelPlugin = require("./utils/module"); +const getDefaultPlugins = require("./utils/plugins"); +const tooltip = require("./utils/tooltip"); module.exports = class WebpackGenerator extends Generator { constructor(args, opts) { super(args, opts); this.isProd = false; - this.npmInstalls = ['webpack', 'uglifyjs-webpack-plugin']; + this.npmInstalls = ["webpack", "uglifyjs-webpack-plugin"]; this.configuration = { config: { webpackOptions: {}, @@ -25,256 +27,255 @@ module.exports = class WebpackGenerator extends Generator { }; } prompting() { - let done = this.async(); let self = this; let oneOrMoreEntries; let regExpForStyles; let ExtractUseProps; - let outputPath = 'dist'; + let outputPath = "dist"; process.stdout.write( - '\n' + chalk.bold('Insecure about some of the questions?') + '\n' + `\n${chalk.bold("Insecure about some of the questions?")}\n` ); process.stdout.write( - `\n${chalk.bold.green('https://github.com/webpack/webpack-cli/blob/master/INIT.md')}\n\n` + `\n${chalk.bold.green("https://github.com/webpack/webpack-cli/blob/master/INIT.md")}\n\n` ); this.configuration.config.webpackOptions.module = { rules: [] }; this.configuration.config.webpackOptions.plugins = getDefaultPlugins(); this.configuration.config.topScope.push( - 'const webpack = require(\'webpack\')', - 'const path = require(\'path\')', + "const webpack = require('webpack')", + "const path = require('path')", tooltip.uglify(), - 'const UglifyJSPlugin = require(\'uglifyjs-webpack-plugin\');', - '\n' + "const UglifyJSPlugin = require('uglifyjs-webpack-plugin');", + "\n" ); this.prompt([ - Confirm('entryType', 'Will your application have multiple bundles?') - ]).then( (entryTypeAnswer) => { + Confirm("entryType", "Will your application have multiple bundles?") + ]).then(entryTypeAnswer => { // Ask different questions for entry points entryQuestions(self, entryTypeAnswer).then(entryOptions => { this.configuration.config.webpackOptions.entry = entryOptions; oneOrMoreEntries = Object.keys(entryOptions); - }).then( () => { - + }).then(() => { this.prompt([ Input( - 'outputType', - 'Which folder will your generated bundles be in? [default: dist]:' + "outputType", + "Which folder will your generated bundles be in? [default: dist]:" ) - ]).then( (outputTypeAnswer) => { - if(!this.configuration.config.webpackOptions.entry.length) { + ]).then(outputTypeAnswer => { + if (!this.configuration.config.webpackOptions.entry.length) { this.configuration.config.topScope.push(tooltip.commonsChunk()); this.configuration.config.webpackOptions.output = { - filename: '\'[name].[chunkhash].js\'', - chunkFilename: '\'[name].[chunkhash].js\'' + filename: "'[name].[chunkhash].js'", + chunkFilename: "'[name].[chunkhash].js'" }; } else { this.configuration.config.webpackOptions.output = { - filename: '\'[name].bundle.js\'', + filename: "'[name].bundle.js'", }; } - if(outputTypeAnswer['outputType'].length) { - outputPath = outputTypeAnswer['outputType']; + if (outputTypeAnswer["outputType"].length) { + outputPath = outputTypeAnswer["outputType"]; } this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`; - }).then( () => { + }).then(() => { this.prompt([ - Confirm('prodConfirm', 'Are you going to use this in production?') - ]).then( (prodAnswer) => { - if(prodAnswer['prodConfirm'] === true) { + Confirm("prodConfirm", "Are you going to use this in production?") + ]).then(prodAnswer => { + if (prodAnswer["prodConfirm"] === true) { this.isProd = true; } else { this.isProd = false; } - }).then( () => { + }).then(() => { this.prompt([ - Confirm('babelConfirm', 'Will you be using ES2015?') - ]).then( (ans) => { - if(ans['babelConfirm'] === true) { + Confirm("babelConfirm", "Will you be using ES2015?") + ]).then(ans => { + if (ans["babelConfirm"] === true) { this.configuration.config.webpackOptions.module.rules.push(getBabelPlugin()); - this.npmInstalls.push('babel-loader', 'babel-core', 'babel-preset-es2015'); + this.npmInstalls.push("babel-loader", "babel-core", "babel-preset-es2015"); } - }).then( () => { + }).then(() => { this.prompt([ RawList( - 'stylingType', - 'Will you use one of the below CSS solutions?', - ['SASS', 'LESS', 'CSS', 'PostCSS', 'No'] + "stylingType", + "Will you use one of the below CSS solutions?", + ["SASS", "LESS", "CSS", "PostCSS", "No"] ) - ]).then( (stylingAnswer) => { - if(!this.isProd) { + ]).then(stylingAnswer => { + if (!this.isProd) { ExtractUseProps = []; } - if(stylingAnswer['stylingType'] === 'SASS') { - this.npmInstalls.push( - 'sass-loader', 'node-sass', - 'style-loader', 'css-loader' - ); - regExpForStyles = new RegExp(/\.(scss|css)$/); - if(this.isProd) { - ExtractUseProps = `use: [{ - loader: 'css-loader', - options: { - sourceMap: true - } - }, { - loader: 'sass-loader', - options: { - sourceMap: true - } - }], - fallback: 'style-loader'`; - } else { - ExtractUseProps.push({ - loader: '\'style-loader\'' - }, { - loader: '\'css-loader\'' - }, { - loader: '\'sass-loader\'' - }); - } - } - else if(stylingAnswer['stylingType'] === 'LESS') { - regExpForStyles = new RegExp(/\.(less|css)$/); - this.npmInstalls.push( - 'less-loader', 'less', - 'style-loader', 'css-loader' - ); - if(this.isProd) { - ExtractUseProps = ` - use: [{ - loader: 'css-loader', - options: { - sourceMap: true - } - }, { - loader: 'less-loader', - options: { - sourceMap: true - } - }], - fallback: 'style-loader'`; - } else { - ExtractUseProps.push({ - loader: '\'css-loader\'', - options: { - sourceMap: true - } - }, { - loader: '\'less-loader\'', - options: { - sourceMap: true - } - }); - } - } - else if(stylingAnswer['stylingType'] === 'PostCSS') { - this.configuration.config.topScope.push( - tooltip.postcss(), - 'const autoprefixer = require(\'autoprefixer\');', - 'const precss = require(\'precss\');', - '\n' - ); - this.npmInstalls.push( - 'style-loader', 'css-loader', - 'postcss-loader', 'precss', - 'autoprefixer' - ); - regExpForStyles = new RegExp(/\.css$/); - if(this.isProd) { - ExtractUseProps = ` - use: [{ - loader: 'style-loader' - },{ - loader: 'css-loader', - options: { - sourceMap: true, - importLoaders: 1 - } - }, { - loader: 'postcss-loader', - options: { - plugins: function () { - return [ - precss, - autoprefixer - ]; + switch (stylingAnswer["stylingType"]) { + case "SASS": + this.npmInstalls.push( + "sass-loader", "node-sass", + "style-loader", "css-loader" + ); + regExpForStyles = new RegExp(/\.(scss|css)$/); + if (this.isProd) { + ExtractUseProps = `use: [{ + loader: "css-loader", + options: { + sourceMap: true } - } - }], - fallback: 'style-loader'`; - } else { - ExtractUseProps.push({ - loader: '\'style-loader\'' - },{ - loader: '\'css-loader\'', - options: { - sourceMap: true, - importLoaders: 1 - } - }, { - loader: '\'postcss-loader\'', - options: { - plugins: `function () { - return [ - precss, - autoprefixer - ]; - }` - } - }); - } - } - else if(stylingAnswer['stylingType'] === 'CSS') { - this.npmInstalls.push('style-loader', 'css-loader'); - regExpForStyles = new RegExp(/\.css$/); - if(this.isProd) { - ExtractUseProps = `use: [{ - loader: 'css-loader', - options: { - sourceMap: true - } - }], - fallback: 'style-loader'`; - } else { - ExtractUseProps.push({ - loader: '\'style-loader\'', - options: { - sourceMap: true - } - }, { - loader: '\'css-loader\'', - }); - } - } - else { - regExpForStyles = null; + }, { + loader: "sass-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push({ + loader: "'style-loader'" + }, { + loader: "'css-loader'" + }, { + loader: "'sass-loader'" + }); + } + break; + case "LESS": + regExpForStyles = new RegExp(/\.(less|css)$/); + this.npmInstalls.push( + "less-loader", "less", + "style-loader", "css-loader" + ); + if (this.isProd) { + ExtractUseProps = ` + use: [{ + loader: "css-loader", + options: { + sourceMap: true + } + }, { + loader: "less-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push({ + loader: "'css-loader'", + options: { + sourceMap: true + } + }, { + loader: "'less-loader'", + options: { + sourceMap: true + } + }); + } + break; + case "PostCSS": + this.configuration.config.topScope.push( + tooltip.postcss(), + "const autoprefixer = require('autoprefixer');", + "const precss = require('precss');", + "\n" + ); + this.npmInstalls.push( + "style-loader", "css-loader", + "postcss-loader", "precss", + "autoprefixer" + ); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = ` + use: [{ + loader: "style-loader" + },{ + loader: "css-loader", + options: { + sourceMap: true, + importLoaders: 1 + } + }, { + loader: "postcss-loader", + options: { + plugins: function () { + return [ + precss, + autoprefixer + ]; + } + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push({ + loader: "'style-loader'" + },{ + loader: "'css-loader'", + options: { + sourceMap: true, + importLoaders: 1 + } + }, { + loader: "'postcss-loader'", + options: { + plugins: `function () { + return [ + precss, + autoprefixer + ]; + }` + } + }); + } + break; + case "CSS": + this.npmInstalls.push("style-loader", "css-loader"); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = `use: [{ + loader: "css-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push({ + loader: "'style-loader'", + options: { + sourceMap: true + } + }, { + loader: "'css-loader'", + }); + } + break; + default: + regExpForStyles = null; } - }).then( () => { + }).then(() => { // Ask if the user wants to use extractPlugin this.prompt([ Input( - 'extractPlugin', - 'If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)' + "extractPlugin", + "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)" ) - ]).then( (extractAnswer) => { - if(regExpForStyles) { - if(this.isProd) { + ]).then(extractAnswer => { + if (regExpForStyles) { + if (this.isProd) { this.configuration.config.topScope.push(tooltip.cssPlugin()); - this.npmInstalls.push('extract-text-webpack-plugin'); - if(extractAnswer['extractPlugin'].length !== 0) { + this.npmInstalls.push("extract-text-webpack-plugin"); + if (extractAnswer["extractPlugin"].length !== 0) { this.configuration.config.webpackOptions.plugins.push( - 'new ExtractTextPlugin(\'' + - extractAnswer['extractPlugin'] + - '.[contentHash].css\')' + "new ExtractTextPlugin('" + + extractAnswer["extractPlugin"] + + ".[contentHash].css')" ); } else { this.configuration.config.webpackOptions.plugins.push( - 'new ExtractTextPlugin(\'' + - 'style.css\')' + "new ExtractTextPlugin('" + + "style.css')" ); } const moduleRulesObj = { @@ -287,8 +288,8 @@ module.exports = class WebpackGenerator extends Generator { moduleRulesObj ); this.configuration.config.topScope.push( - 'const ExtractTextPlugin = require(\'extract-text-webpack-plugin\');', - '\n' + "const ExtractTextPlugin = require('extract-text-webpack-plugin');", + "\n" ); } else { const moduleRulesObj = { @@ -300,9 +301,9 @@ module.exports = class WebpackGenerator extends Generator { ); } } - }).then( () => { - if(!this.configuration.config.webpackOptions.entry.length) { - oneOrMoreEntries.forEach( (prop) => { + }).then(() => { + if (!this.configuration.config.webpackOptions.entry.length) { + oneOrMoreEntries.forEach(prop => { this.configuration.config.webpackOptions.plugins.push( createCommonsChunkPlugin(prop) ); @@ -319,18 +320,18 @@ module.exports = class WebpackGenerator extends Generator { } installPlugins() { let asyncNamePrompt = this.async(); - let defaultName = this.isProd ? 'prod' : 'config'; + let defaultName = this.isProd ? "prod" : "config"; this.prompt([ - Input('nameType', `Name your \'webpack.[name].js?\' [default: \'${defaultName}\']:`) - ]).then( (nameAnswer) => { - if(nameAnswer['nameType'].length) { - this.configuration.config.configName = nameAnswer['nameType']; + Input("nameType", `Name your 'webpack.[name].js?' [default: '${defaultName}']:`) + ]).then(nameAnswer => { + if (nameAnswer["nameType"].length) { + this.configuration.config.configName = nameAnswer["nameType"]; } else { this.configuration.config.configName = defaultName; } - }).then( () => { + }).then(() => { asyncNamePrompt(); - this.npmInstall(this.npmInstalls, { 'save-dev': true }); + this.npmInstall(this.npmInstalls, { "save-dev": true }); }); } diff --git a/lib/initialize.js b/lib/initialize.js index 0988943e89d..732d36ac525 100644 --- a/lib/initialize.js +++ b/lib/initialize.js @@ -1,5 +1,7 @@ -const npmPackagesExists = require('./utils/npm-packages-exists'); -const creator = require('./creator/index').creator; +"use strict"; + +const npmPackagesExists = require("./utils/npm-packages-exists"); +const creator = require("./creator/index").creator; /* * @function initializeInquirer @@ -13,7 +15,7 @@ const creator = require('./creator/index').creator; */ module.exports = function initializeInquirer(pkg) { - if(pkg.length == 0) { + if (pkg.length === 0) { return creator(); } return npmPackagesExists(pkg); diff --git a/lib/migrate.js b/lib/migrate.js index cff1904a329..218ce0f2c62 100644 --- a/lib/migrate.js +++ b/lib/migrate.js @@ -1,53 +1,66 @@ -const fs = require('fs'); -const chalk = require('chalk'); -const diff = require('diff'); -const inquirer = require('inquirer'); -const PLazy = require('p-lazy'); -const Listr = require('listr'); -const validateSchema = require('./utils/validateSchema.js'); -const webpackOptionsSchema = require('./utils/webpackOptionsSchema.json'); -const WebpackOptionsValidationError = require('./utils/WebpackOptionsValidationError'); +"use strict"; -module.exports = function transformFile(currentConfigPath, outputConfigPath, options) { - const recastOptions = Object.assign({ - quote: 'single' - }, options); +const fs = require("fs"); +const chalk = require("chalk"); +const diff = require("diff"); +const inquirer = require("inquirer"); +const PLazy = require("p-lazy"); +const Listr = require("listr"); +const validateSchema = require("./utils/validateSchema.js"); +const webpackOptionsSchema = require("./utils/webpackOptionsSchema.json"); +const WebpackOptionsValidationError = require("./utils/WebpackOptionsValidationError"); + +module.exports = function transformFile( + currentConfigPath, + outputConfigPath, + options +) { + const recastOptions = Object.assign( + { + quote: "single" + }, + options + ); const tasks = new Listr([ { - title: 'Reading webpack config', - task: (ctx) => new PLazy((resolve, reject) => { - fs.readFile(currentConfigPath, 'utf8', (err, content) => { - if (err) { - reject(err); - } - try { - const jscodeshift = require('jscodeshift'); - ctx.source = content; - ctx.ast = jscodeshift(content); - resolve(); - } catch (err) { - reject('Error generating AST', err); - } - }); - }) + title: "Reading webpack config", + task: ctx => + new PLazy((resolve, reject) => { + fs.readFile(currentConfigPath, "utf8", (err, content) => { + if (err) { + reject(err); + } + try { + const jscodeshift = require("jscodeshift"); + ctx.source = content; + ctx.ast = jscodeshift(content); + resolve(); + } catch (err) { + reject("Error generating AST", err); + } + }); + }) }, { - title: 'Migrating config from v1 to v2', - task: (ctx) => { - const transformations = require('./transformations').transformations; - return new Listr(Object.keys(transformations).map(key => { - const transform = transformations[key]; - return { - title: key, - task: () => transform(ctx.ast, ctx.source) - }; - })); + title: "Migrating config from v1 to v2", + task: ctx => { + const transformations = require("./transformations").transformations; + return new Listr( + Object.keys(transformations).map(key => { + const transform = transformations[key]; + return { + title: key, + task: () => transform(ctx.ast, ctx.source) + }; + }) + ); } } ]); - tasks.run() - .then((ctx) => { + tasks + .run() + .then(ctx => { const result = ctx.ast.toSource(recastOptions); const diffOutput = diff.diffLines(ctx.source, result); diffOutput.forEach(diffLine => { @@ -60,33 +73,41 @@ module.exports = function transformFile(currentConfigPath, outputConfigPath, opt inquirer .prompt([ { - type: 'confirm', - name: 'confirmMigration', - message: 'Are you sure these changes are fine?', - default: 'Y' + type: "confirm", + name: "confirmMigration", + message: "Are you sure these changes are fine?", + default: "Y" } ]) .then(answers => { - if (answers['confirmMigration']) { - fs.writeFile(outputConfigPath, result, 'utf8', (err) => { - const webpackOptionsValidationErrors = validateSchema(webpackOptionsSchema, require(outputConfigPath)); + if (answers["confirmMigration"]) { + fs.writeFile(outputConfigPath, result, "utf8", err => { + const webpackOptionsValidationErrors = validateSchema( + webpackOptionsSchema, + require(outputConfigPath) + ); if (err) { throw err; - } - else if (webpackOptionsValidationErrors.length) { - const validationMsg = new WebpackOptionsValidationError(webpackOptionsValidationErrors); + } else if (webpackOptionsValidationErrors.length) { + const validationMsg = new WebpackOptionsValidationError( + webpackOptionsValidationErrors + ); throw validationMsg.message; } else { - console.log(chalk.green(`\n ✔︎ New webpack v2 config file is at ${outputConfigPath}`)); + console.log( + chalk.green( + `\n ✔︎ New webpack v2 config file is at ${outputConfigPath}` + ) + ); } }); } else { - console.log(chalk.red('✖ Migration aborted')); + console.log(chalk.red("✖ Migration aborted")); } }); }) .catch(err => { - console.log(chalk.red('✖ ︎Migration aborted due to some errors')); + console.log(chalk.red("✖ ︎Migration aborted due to some errors")); console.error(err); process.exitCode = 1; }); diff --git a/lib/transformations/bannerPlugin/bannerPlugin.js b/lib/transformations/bannerPlugin/bannerPlugin.js index 9f40d172f7d..0d78942fa34 100644 --- a/lib/transformations/bannerPlugin/bannerPlugin.js +++ b/lib/transformations/bannerPlugin/bannerPlugin.js @@ -1,7 +1,10 @@ -const utils = require('../utils'); +"use strict"; + +const utils = require("../utils"); module.exports = function(j, ast) { - return utils.findPluginsByName(j, ast, ['webpack.BannerPlugin']) + return utils + .findPluginsByName(j, ast, ["webpack.BannerPlugin"]) .forEach(path => { const args = path.value.arguments; // If the first argument is a literal replace it with object notation @@ -9,11 +12,14 @@ module.exports = function(j, ast) { if (args && args.length > 1 && args[0].type === j.Literal.name) { // and remove the first argument path.value.arguments = [path.value.arguments[1]]; - utils.createOrUpdatePluginByName(j, path.parent, 'webpack.BannerPlugin', { - banner: args[0].value - }); + utils.createOrUpdatePluginByName( + j, + path.parent, + "webpack.BannerPlugin", + { + banner: args[0].value + } + ); } }); - - }; diff --git a/lib/transformations/bannerPlugin/bannerPlugin.test.js b/lib/transformations/bannerPlugin/bannerPlugin.test.js index fee919e427e..004d08b6635 100644 --- a/lib/transformations/bannerPlugin/bannerPlugin.test.js +++ b/lib/transformations/bannerPlugin/bannerPlugin.test.js @@ -1,5 +1,7 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'bannerPlugin', 'bannerPlugin-0'); -defineTest(__dirname, 'bannerPlugin', 'bannerPlugin-1'); -defineTest(__dirname, 'bannerPlugin', 'bannerPlugin-2'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "bannerPlugin", "bannerPlugin-0"); +defineTest(__dirname, "bannerPlugin", "bannerPlugin-1"); +defineTest(__dirname, "bannerPlugin", "bannerPlugin-2"); diff --git a/lib/transformations/defineTest.js b/lib/transformations/defineTest.js index 2824337e41e..b2417c2213e 100644 --- a/lib/transformations/defineTest.js +++ b/lib/transformations/defineTest.js @@ -1,63 +1,93 @@ -'use strict'; +"use strict"; -const fs = require('fs'); -const path = require('path'); +const fs = require("fs"); +const path = require("path"); /** - * Utility function to run a jscodeshift script within a unit test. This makes - * several assumptions about the environment: + * Utility function to run a jscodeshift script within a unit test. + * This makes several assumptions about the environment. * - * - `dirName` contains the name of the directory the test is located in. This - * should normally be passed via __dirname. + * Notes: * - The test should be located in a subdirectory next to the transform itself. * Commonly tests are located in a directory called __tests__. - * - `transformName` contains the filename of the transform being tested, - * excluding the .js extension. - * - `testFilePrefix` optionally contains the name of the file with the test - * data. If not specified, it defaults to the same value as `transformName`. - * This will be suffixed with ".input.js" for the input file and ".output.js" - * for the expected output. For example, if set to "foo", we will read the - * "foo.input.js" file, pass this to the transform, and expect its output to - * be equal to the contents of "foo.output.js". + * * - Test data should be located in a directory called __testfixtures__ * alongside the transform and __tests__ directory. + * @param {String} dirName contains the name of the directory the test is located in. This + * should normally be passed via __dirname. + * @param {String} transformName contains the filename of the transform being tested, + * excluding the .js extension. + * @param {String} [testFilePrefix] Optionally contains the name of the file with the test + * data. If not specified, it defaults to the same value as `transformName`. + * This will be suffixed with ".input.js" for the input file and ".output.js" + * for the expected output. For example, if set to "foo", we will read the + * "foo.input.js" file, pass this to the transform, and expect its output to + * be equal to the contents of "foo.output.js". + * @param {Object|Boolean|String} initOptions TBD + * @return {TBD} TBD */ -function runSingleTansform(dirName, transformName, testFilePrefix, initOptions) { +function runSingleTansform( + dirName, + transformName, + testFilePrefix, + initOptions +) { if (!testFilePrefix) { testFilePrefix = transformName; } - const fixtureDir = path.join(dirName, '__testfixtures__'); - const inputPath = path.join(fixtureDir, testFilePrefix + '.input.js'); - const source = fs.readFileSync(inputPath, 'utf8'); + const fixtureDir = path.join(dirName, "__testfixtures__"); + const inputPath = path.join(fixtureDir, testFilePrefix + ".input.js"); + const source = fs.readFileSync(inputPath, "utf8"); // Assumes transform and test are on the same level - const module = require(path.join(dirName, transformName + '.js')); + const module = require(path.join(dirName, transformName + ".js")); // Handle ES6 modules using default export for the transform const transform = module.default ? module.default : module; // Jest resets the module registry after each test, so we need to always get // a fresh copy of jscodeshift on every test run. - let jscodeshift = require('jscodeshift/dist/core'); + let jscodeshift = require("jscodeshift/dist/core"); if (module.parser) { jscodeshift = jscodeshift.withParser(module.parser); } const ast = jscodeshift(source); - if (initOptions || typeof(initOptions) === 'boolean') { - return transform(jscodeshift, ast, initOptions).toSource({ quote: 'single' }); + if (initOptions || typeof initOptions === "boolean") { + return transform(jscodeshift, ast, initOptions).toSource({ + quote: "single" + }); } - return transform(jscodeshift, ast, source).toSource({ quote: 'single' }); + return transform(jscodeshift, ast, source).toSource({ + quote: "single" + }); } /** * Handles some boilerplate around defining a simple jest/Jasmine test for a * jscodeshift transform. + * @param {String} dirName contains the name of the directory the test is located in. This + * should normally be passed via __dirname. + * @param {String} transformName contains the filename of the transform being tested, + * excluding the .js extension. + * @param {String} [testFilePrefix] Optionally contains the name of the file with the test + * data. If not specified, it defaults to the same value as `transformName`. + * This will be suffixed with ".input.js" for the input file and ".output.js" + * for the expected output. For example, if set to "foo", we will read the + * "foo.input.js" file, pass this to the transform, and expect its output to + * be equal to the contents of "foo.output.js". + * @param {TBD} type TBD + * @return {TBD} TBD */ function defineTest(dirName, transformName, testFilePrefix, type) { const testName = testFilePrefix ? `transforms correctly using "${testFilePrefix}" data` - : 'transforms correctly'; + : "transforms correctly"; describe(transformName, () => { it(testName, () => { - const output = runSingleTansform(dirName, transformName, testFilePrefix, type); + const output = runSingleTansform( + dirName, + transformName, + testFilePrefix, + type + ); expect(output).toMatchSnapshot(); }); }); diff --git a/lib/transformations/extractTextPlugin/extractTextPlugin.js b/lib/transformations/extractTextPlugin/extractTextPlugin.js index 3d60fedffdb..67df2f5e65b 100644 --- a/lib/transformations/extractTextPlugin/extractTextPlugin.js +++ b/lib/transformations/extractTextPlugin/extractTextPlugin.js @@ -1,9 +1,14 @@ -const utils = require('../utils'); +"use strict"; + +const utils = require("../utils"); function findInvocation(j, node, pluginName) { - return j(node) - .find(j.MemberExpression) - .filter(p => p.get('object').value.name === pluginName).size() > 0; + const invocation = + j(node) + .find(j.MemberExpression) + .filter(p => p.get("object").value.name === pluginName) + .size() > 0; + return invocation; } module.exports = function(j, ast) { @@ -12,21 +17,26 @@ module.exports = function(j, ast) { // if(args.length === 1) { // return p; // } else - const literalArgs = args.filter(p => utils.isType(p, 'Literal')); + const literalArgs = args.filter(p => utils.isType(p, "Literal")); if (literalArgs && literalArgs.length > 1) { - const newArgs = j.objectExpression(literalArgs.map((p, index) => - utils.createProperty(j, index === 0 ? 'fallback': 'use', p.value) - )); + const newArgs = j.objectExpression( + literalArgs.map((p, index) => + utils.createProperty(j, index === 0 ? "fallback" : "use", p.value) + ) + ); p.value.arguments = [newArgs]; } return p; }; - const name = utils.findVariableToPlugin(j, ast, 'extract-text-webpack-plugin'); - if(!name) return ast; + const name = utils.findVariableToPlugin( + j, + ast, + "extract-text-webpack-plugin" + ); + if (!name) return ast; - return ast.find(j.CallExpression) + return ast + .find(j.CallExpression) .filter(p => findInvocation(j, p, name)) - .forEach(changeArguments); + .forEach(changeArguments); }; - - diff --git a/lib/transformations/extractTextPlugin/extractTextPlugin.test.js b/lib/transformations/extractTextPlugin/extractTextPlugin.test.js index 66d74802356..199067becf3 100644 --- a/lib/transformations/extractTextPlugin/extractTextPlugin.test.js +++ b/lib/transformations/extractTextPlugin/extractTextPlugin.test.js @@ -1,3 +1,5 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'extractTextPlugin'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "extractTextPlugin"); diff --git a/lib/transformations/index.js b/lib/transformations/index.js index 721b66612f5..53d1d38c301 100644 --- a/lib/transformations/index.js +++ b/lib/transformations/index.js @@ -1,15 +1,17 @@ -const jscodeshift = require('jscodeshift'); -const pEachSeries = require('p-each-series'); -const PLazy = require('p-lazy'); +"use strict"; -const loadersTransform = require('./loaders/loaders'); -const resolveTransform = require('./resolve/resolve'); -const removeJsonLoaderTransform = require('./removeJsonLoader/removeJsonLoader'); -const uglifyJsPluginTransform = require('./uglifyJsPlugin/uglifyJsPlugin'); -const loaderOptionsPluginTransform = require('./loaderOptionsPlugin/loaderOptionsPlugin'); -const bannerPluginTransform = require('./bannerPlugin/bannerPlugin'); -const extractTextPluginTransform = require('./extractTextPlugin/extractTextPlugin'); -const removeDeprecatedPluginsTransform = require('./removeDeprecatedPlugins/removeDeprecatedPlugins'); +const jscodeshift = require("jscodeshift"); +const pEachSeries = require("p-each-series"); +const PLazy = require("p-lazy"); + +const loadersTransform = require("./loaders/loaders"); +const resolveTransform = require("./resolve/resolve"); +const removeJsonLoaderTransform = require("./removeJsonLoader/removeJsonLoader"); +const uglifyJsPluginTransform = require("./uglifyJsPlugin/uglifyJsPlugin"); +const loaderOptionsPluginTransform = require("./loaderOptionsPlugin/loaderOptionsPlugin"); +const bannerPluginTransform = require("./bannerPlugin/bannerPlugin"); +const extractTextPluginTransform = require("./extractTextPlugin/extractTextPlugin"); +const removeDeprecatedPluginsTransform = require("./removeDeprecatedPlugins/removeDeprecatedPlugins"); const transformsObject = { loadersTransform, @@ -23,7 +25,8 @@ const transformsObject = { }; const transformations = Object.keys(transformsObject).reduce((res, key) => { - res[key] = (ast, source) => transformSingleAST(ast, source, transformsObject[key]); + res[key] = (ast, source) => + transformSingleAST(ast, source, transformsObject[key]); return res; }, {}); @@ -52,10 +55,14 @@ function transformSingleAST(ast, source, transformFunction) { * */ function transform(source, transforms, options) { const ast = jscodeshift(source); - const recastOptions = Object.assign({ - quote: 'single' - }, options); - transforms = transforms || Object.keys(transformations).map(k => transformations[k]); + const recastOptions = Object.assign( + { + quote: "single" + }, + options + ); + transforms = + transforms || Object.keys(transformations).map(k => transformations[k]); return pEachSeries(transforms, f => f(ast, source)) .then(() => { return ast.toSource(recastOptions); diff --git a/lib/transformations/index.test.js b/lib/transformations/index.test.js index 4953beb8640..d1a47393a81 100644 --- a/lib/transformations/index.test.js +++ b/lib/transformations/index.test.js @@ -1,5 +1,7 @@ -const transform = require('./index').transform; -const transformations = require('./index').transformations; +"use strict"; + +const transform = require("./index").transform; +const transformations = require("./index").transformations; const input = ` module.exports = { @@ -13,7 +15,7 @@ module.exports = { }, module: { loaders: [{ - test: /\.js$/, + test: /.js$/, loaders: ['babel'], include: path.join(__dirname, 'src') }] @@ -30,31 +32,31 @@ module.exports = { }; `; -describe('transform', () => { - it('should not transform if no transformations defined', (done) => { +describe("transform", () => { + it("should not transform if no transformations defined", done => { transform(input, []).then(output => { expect(output).toEqual(input); done(); }); }); - it('should transform using all transformations', (done) => { + it("should transform using all transformations", done => { transform(input).then(output => { expect(output).toMatchSnapshot(); done(); }); }); - it('should transform only using specified transformations', (done) => { + it("should transform only using specified transformations", done => { transform(input, [transformations.loadersTransform]).then(output => { expect(output).toMatchSnapshot(); done(); }); }); - it('should respect recast options', (done) => { + it("should respect recast options", done => { transform(input, undefined, { - quote: 'double', + quote: "double", trailingComma: true }).then(output => { expect(output).toMatchSnapshot(); diff --git a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js index df514e0fe07..fdefc80cedd 100644 --- a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js +++ b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js @@ -1,28 +1,34 @@ -const isEmpty = require('lodash/isEmpty'); -const findPluginsByName = require('../utils').findPluginsByName; -const createOrUpdatePluginByName = require('../utils').createOrUpdatePluginByName; -const safeTraverse = require('../utils').safeTraverse; +"use strict"; + +const isEmpty = require("lodash/isEmpty"); +const findPluginsByName = require("../utils").findPluginsByName; +const createOrUpdatePluginByName = require("../utils") + .createOrUpdatePluginByName; +const safeTraverse = require("../utils").safeTraverse; module.exports = function(j, ast) { const loaderOptions = {}; // If there is debug: true, set debug: true in the plugin // TODO: remove global debug setting - // TODO: I can't figure out how to find the topmost `debug: true`. help! - if (ast.find(j.Identifier, { name: 'debug' }).size()) { + // TODO: I can"t figure out how to find the topmost `debug: true`. help! + if (ast.find(j.Identifier, { name: "debug" }).size()) { loaderOptions.debug = true; } // If there is UglifyJsPlugin, set minimize: true - if (findPluginsByName(j, ast, ['webpack.optimize.UglifyJsPlugin']).size()) { + if (findPluginsByName(j, ast, ["webpack.optimize.UglifyJsPlugin"]).size()) { loaderOptions.minimize = true; } return ast .find(j.ArrayExpression) - .filter(path => safeTraverse(path, ['parent', 'value', 'key', 'name']) === 'plugins') + .filter( + path => + safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins" + ) .forEach(path => { !isEmpty(loaderOptions) && - createOrUpdatePluginByName(j, path, 'webpack.LoaderOptionsPlugin', loaderOptions); + createOrUpdatePluginByName(j, path, "webpack.LoaderOptionsPlugin", loaderOptions); }); }; diff --git a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js index 1339fc4bf35..bb3c78de07c 100644 --- a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js +++ b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js @@ -1,6 +1,8 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'loaderOptionsPlugin', 'loaderOptionsPlugin-0'); -defineTest(__dirname, 'loaderOptionsPlugin', 'loaderOptionsPlugin-1'); -defineTest(__dirname, 'loaderOptionsPlugin', 'loaderOptionsPlugin-2'); -defineTest(__dirname, 'loaderOptionsPlugin', 'loaderOptionsPlugin-3'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-0"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-1"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-2"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-3"); diff --git a/lib/transformations/loaders/loaders.js b/lib/transformations/loaders/loaders.js index 9178b4b3d06..17254c5643f 100644 --- a/lib/transformations/loaders/loaders.js +++ b/lib/transformations/loaders/loaders.js @@ -1,51 +1,52 @@ -const utils = require('../utils'); +"use strict"; + +const utils = require("../utils"); module.exports = function(j, ast) { /** - * Creates an Array expression out of loaders string - * - * For syntaxes like - * - * { - * loader: 'style!css` - * } - * - * or - * - * { - * loaders: ['style', 'css'] - * } - * - * or - * - * loaders: [{ - * loader: 'style' - * }, - * { - * loader: 'css', - * }] - * - * it should generate - * - * { - * use: [{ - * loader: 'style' - * }, - * { - * loader: 'css' - * }] - * } - * - * @param path {Node} - Must be an ObjectExpression - * @returns {*} - */ + * Creates an Array expression out of loaders string for syntaxes like + * + * { + * loader: 'style!css` + * } + * + * or + * + * { + * loaders: ['style', 'css'] + * } + * + * or + * + * loaders: [{ + * loader: 'style' + * }, + * { + * loader: 'css', + * }] + * + * it should generate + * + * { + * use: [{ + * loader: 'style' + * }, + * { + * loader: 'css' + * }] + * } + * @param {NodeObject} path Must be an ObjectExpression + * @returns {NodeObject} The created array expression + */ const createArrayExpressionFromArray = function(path) { // Find paths with `loaders` keys in the given Object - const paths = path.value.properties.filter(prop => prop.key.name.startsWith('loader')); + const paths = path.value.properties.filter(prop => + prop.key.name.startsWith("loader") + ); // For each pair of key and value paths.forEach(pair => { // Replace 'loaders' Identifier with 'use' - pair.key.name = 'use'; + pair.key.name = "use"; // If the value is an Array if (pair.value.type === j.ArrayExpression.name) { // replace its elements @@ -55,24 +56,22 @@ module.exports = function(j, ast) { if (arrElement.type === j.Literal.name) { // Replace with `{ loader: LOADER }` Object return j.objectExpression([ - utils.createProperty(j, 'loader', arrElement.value) + utils.createProperty(j, "loader", arrElement.value) ]); } // otherwise keep the existing element return arrElement; }) ); - // If the value is String of loaders like 'style!css' + // If the value is String of loaders like 'style!css' } else if (pair.value.type === j.Literal.name) { // Replace it with Array expression of loaders pair.value = j.arrayExpression( - pair.value.value - .split('!') - .map(loader => { - return j.objectExpression([ - utils.createProperty(j, 'loader', loader) - ]); - }) + pair.value.value.split("!").map(loader => { + return j.objectExpression([ + utils.createProperty(j, "loader", loader) + ]); + }) ); } }); @@ -81,155 +80,193 @@ module.exports = function(j, ast) { const createLoaderWithQuery = p => { let properties = p.value.properties; - let loaderValue = properties - .reduce((val, prop) => prop.key.name === 'loader' ? prop.value.value : val, ''); - let loader = loaderValue.split('?')[0]; - let query = loaderValue.split('?')[1]; - let options = query.split('&').map(option => { - const param = option.split('='); + let loaderValue = properties.reduce( + (val, prop) => (prop.key.name === "loader" ? prop.value.value : val), + "" + ); + let loader = loaderValue.split("?")[0]; + let query = loaderValue.split("?")[1]; + let options = query.split("&").map(option => { + const param = option.split("="); const key = param[0]; const val = param[1] || true; // No value in query string means it is truthy value return j.objectProperty(j.identifier(key), utils.createLiteral(j, val)); }); - let loaderProp = utils.createProperty(j, 'loader', loader); - let queryProp = j.property('init', j.identifier('options'), j.objectExpression(options)); + let loaderProp = utils.createProperty(j, "loader", loader); + let queryProp = j.property( + "init", + j.identifier("options"), + j.objectExpression(options) + ); return j.objectExpression([loaderProp, queryProp]); }; const findLoaderWithQueryString = p => { - return p.value.properties - .reduce((predicate, prop) => { - return utils.safeTraverse(prop, ['value', 'value', 'indexOf']) - && prop.value.value.indexOf('?') > -1 - || predicate; - }, false); + return p.value.properties.reduce((predicate, prop) => { + return ( + (utils.safeTraverse(prop, ["value", "value", "indexOf"]) && + prop.value.value.indexOf("?") > -1) || + predicate + ); + }, false); }; /** - * If the path value is `loaders` and it's located in `module` object - * we assume it's the loader's section - * - * @param path - */ - const checkForLoader = path => path.value.name === 'loaders' && - utils.safeTraverse(path, ['parent', 'parent', 'parent', 'node', 'key', 'name']) === 'module'; + * If the path value is `loaders` and it's located in `module` object + * we assume it's the loader's section + * + * @param {NodeObject} path Must be an ObjectExpression + * @return {tbd} tbd + */ + const checkForLoader = path => + path.value.name === "loaders" && + utils.safeTraverse(path, [ + "parent", + "parent", + "parent", + "node", + "key", + "name" + ]) === "module"; /** - * Puts node path that is pre- or postLoader into `enforce` key - * @param p {Node} - * @returns {*} - */ + * Puts node path that is pre- or postLoader into `enforce` key + * @param {object} p tbd + * @returns {object} A new object that contains the pre/post loaders in the enforce key of the loader + */ const fitIntoLoaders = p => { let loaders; p.value.properties.map(prop => { const keyName = prop.key.name; - if (keyName === 'loaders') { + if (keyName === "loaders") { loaders = prop.value; } }); p.value.properties.map(prop => { const keyName = prop.key.name; - if (keyName !== 'loaders') { - const enforceVal = keyName === 'preLoaders' ? 'pre' : 'post'; + if (keyName !== "loaders") { + const enforceVal = keyName === "preLoaders" ? "pre" : "post"; prop.value.elements.map(elem => { - elem.properties.push(utils.createProperty(j, 'enforce', enforceVal)); - if (loaders && loaders.type === 'ArrayExpression') { + elem.properties.push(utils.createProperty(j, "enforce", enforceVal)); + if (loaders && loaders.type === "ArrayExpression") { loaders.elements.push(elem); } else { - prop.key.name = 'loaders'; + prop.key.name = "loaders"; } }); } }); if (loaders) { - p.value.properties = p.value.properties.filter(prop => prop.key.name === 'loaders'); + p.value.properties = p.value.properties.filter( + prop => prop.key.name === "loaders" + ); } return p; }; /** - * Find pre and postLoaders - */ - const prepostLoaders = () => ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, ['preLoaders', 'postLoaders'])) - .forEach(fitIntoLoaders); + * Find pre and postLoaders + * @returns {*} All the pre and post loaders + */ + const prepostLoaders = () => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) + .forEach(fitIntoLoaders); /** - * Convert top level `loaders` to `rules` - * See https://webpack.js.org/configuration/module/#module-rules - */ - const loadersToRules = () => ast - .find(j.Identifier) - .filter(checkForLoader) - .forEach(p => p.value.name = 'rules'); + * Convert top level `loaders` to `rules` + * See https://webpack.js.org/configuration/module/#module-rules + * @returns {Array} An array of object of all the rules + */ + const loadersToRules = () => + ast + .find(j.Identifier) + .filter(checkForLoader) + .forEach(p => (p.value.name = "rules")); /** - * Converts 'loader' and 'loaders' to Array of {Rule.Use} - */ - const loadersToArrayExpression = () => ast - .find(j.ObjectExpression) - .filter(path => utils.findObjWithOneOfKeys(path, ['loader', 'loaders'])) - .filter(path => utils.safeTraverse( - path, ['parent', 'parent', 'node', 'key', 'name']) === 'rules') - .forEach(createArrayExpressionFromArray); + * Converts 'loader' and 'loaders' to Array of {Rule.Use} + * @returns {Array} An array of objects of all the rules + */ + const loadersToArrayExpression = () => + ast + .find(j.ObjectExpression) + .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) + .filter( + path => + utils.safeTraverse(path, [ + "parent", + "parent", + "node", + "key", + "name" + ]) === "rules" + ) + .forEach(createArrayExpressionFromArray); /** - * Finds loaders with options encoded as query string and replaces it with options obejct - * - * i.e. for loader like - * - * { - * loader: 'css?modules&importLoaders=1&string=test123' - * } - * - * it should generate - * { - * loader: 'css-loader', - * options: { - * modules: true, - * importLoaders: 1, - * string: 'test123' - * } - * } - */ - const loaderWithQueryParam = () => ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, 'loader')) - .filter(findLoaderWithQueryString) - .replaceWith(createLoaderWithQuery); + * Finds loaders with options encoded as query string and replaces it with options obejct + * + * i.e. for loader like + * + * { + * loader: 'css?modules&importLoaders=1&string=test123' + * } + * + * it should generate + * { + * loader: 'css-loader', + * options: { + * modules: true, + * importLoaders: 1, + * string: 'test123' + * } + * } + * @returns {Object} An object of the generated loader settings + */ + const loaderWithQueryParam = () => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, "loader")) + .filter(findLoaderWithQueryString) + .replaceWith(createLoaderWithQuery); /** - * Finds nodes with `query` key and replaces it with `options` - * - * i.e. for - * { - * query: { ... } - * } - * - * it should generate - * - * { - * options: { ... } - * } - */ - const loaderWithQueryProp = () => ast - .find(j.Identifier) - .filter(p => p.value.name === 'query') - .replaceWith(j.identifier('options')); + * Finds nodes with `query` key and replaces it with `options` + * + * i.e. for + * { + * query: { ... } + * } + * + * it should generate + * + * { + * options: { ... } + * } + * @returns {Object} An object with the replaced query into options + */ + const loaderWithQueryProp = () => + ast + .find(j.Identifier) + .filter(p => p.value.name === "query") + .replaceWith(j.identifier("options")); /** - * Adds required `-loader` suffix to loader with missing suffix - * i.e. for `babel` it should generate `babel-loader` - */ - const addLoaderSuffix = () => ast - .find(j.ObjectExpression) - .forEach(path => { + * Adds required `-loader` suffix to loader with missing suffix + * i.e. for `babel` it should generate `babel-loader` + * @returns {object} The new object that has all the `-loader` sufixes + */ + const addLoaderSuffix = () => + ast.find(j.ObjectExpression).forEach(path => { path.value.properties.forEach(prop => { - if (prop.key.name === 'loader' - && utils.safeTraverse(prop, ['value', 'value']) - && !prop.value.value.endsWith('-loader')) { - prop.value = j.literal(prop.value.value + '-loader'); + if ( + prop.key.name === "loader" && + utils.safeTraverse(prop, ["value", "value"]) && + !prop.value.value.endsWith("-loader") + ) { + prop.value = j.literal(prop.value.value + "-loader"); } }); }); diff --git a/lib/transformations/loaders/loaders.test.js b/lib/transformations/loaders/loaders.test.js index 4d23d086585..90d36acda2a 100644 --- a/lib/transformations/loaders/loaders.test.js +++ b/lib/transformations/loaders/loaders.test.js @@ -1,11 +1,13 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'loaders', 'loaders-0'); -defineTest(__dirname, 'loaders', 'loaders-1'); -defineTest(__dirname, 'loaders', 'loaders-2'); -defineTest(__dirname, 'loaders', 'loaders-3'); -defineTest(__dirname, 'loaders', 'loaders-4'); -defineTest(__dirname, 'loaders', 'loaders-5'); -defineTest(__dirname, 'loaders', 'loaders-6'); -defineTest(__dirname, 'loaders', 'loaders-7'); -defineTest(__dirname, 'loaders', 'loaders-8'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "loaders", "loaders-0"); +defineTest(__dirname, "loaders", "loaders-1"); +defineTest(__dirname, "loaders", "loaders-2"); +defineTest(__dirname, "loaders", "loaders-3"); +defineTest(__dirname, "loaders", "loaders-4"); +defineTest(__dirname, "loaders", "loaders-5"); +defineTest(__dirname, "loaders", "loaders-6"); +defineTest(__dirname, "loaders", "loaders-7"); +defineTest(__dirname, "loaders", "loaders-8"); diff --git a/lib/transformations/outputPath/outputPath.js b/lib/transformations/outputPath/outputPath.js index 78226dc345f..39e28ef4ea9 100644 --- a/lib/transformations/outputPath/outputPath.js +++ b/lib/transformations/outputPath/outputPath.js @@ -1,28 +1,44 @@ -const utils = require('../utils'); +"use strict"; + +const utils = require("../utils"); module.exports = function(j, ast) { const literalOutputPath = ast .find(j.ObjectExpression) - .filter(p => utils.safeTraverse(p, ['parentPath', 'value', 'key', 'name']) === 'output') + .filter( + p => + utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === + "output" + ) .find(j.Property) - .filter(p => utils.safeTraverse(p, ['value', 'key', 'name']) === 'path' - && utils.safeTraverse(p, ['value', 'value', 'type']) === 'Literal'); + .filter( + p => + utils.safeTraverse(p, ["value", "key", "name"]) === "path" && + utils.safeTraverse(p, ["value", "value", "type"]) === "Literal" + ); if (literalOutputPath) { - let pathVarName = 'path'; + let pathVarName = "path"; let isPathPresent = false; const pathDecalaration = ast .find(j.VariableDeclarator) - .filter(p => utils.safeTraverse(p, ['value', 'init', 'callee', 'name']) === 'require') - .filter(p => utils.safeTraverse(p, ['value', 'init', 'arguments']) - && p.value.init.arguments.reduce((isPresent, a) => { - return a.type === 'Literal' && a.value === 'path' || isPresent; - }, false)); + .filter( + p => + utils.safeTraverse(p, ["value", "init", "callee", "name"]) === + "require" + ) + .filter( + p => + utils.safeTraverse(p, ["value", "init", "arguments"]) && + p.value.init.arguments.reduce((isPresent, a) => { + return (a.type === "Literal" && a.value === "path") || isPresent; + }, false) + ); if (pathDecalaration) { isPathPresent = true; pathDecalaration.forEach(p => { - pathVarName = utils.safeTraverse(p, ['value', 'id', 'name']); + pathVarName = utils.safeTraverse(p, ["value", "id", "name"]); }); } @@ -30,10 +46,13 @@ module.exports = function(j, ast) { .find(j.Literal) .replaceWith(p => replaceWithPath(j, p, pathVarName)); - if(!isPathPresent){ - const pathRequire = utils.getRequire(j, 'path', 'path'); - return ast.find(j.Program) - .replaceWith(p => j.program([].concat(pathRequire).concat(p.value.body))); + if (!isPathPresent) { + const pathRequire = utils.getRequire(j, "path", "path"); + return ast + .find(j.Program) + .replaceWith(p => + j.program([].concat(pathRequire).concat(p.value.body)) + ); } } return ast; @@ -41,11 +60,8 @@ module.exports = function(j, ast) { function replaceWithPath(j, p, pathVarName) { const convertedPath = j.callExpression( - j.memberExpression( - j.identifier(pathVarName), - j.identifier('join'), - false), - [j.identifier('__dirname'), p.value]); + j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false), + [j.identifier("__dirname"), p.value] + ); return convertedPath; } - diff --git a/lib/transformations/outputPath/outputPath.test.js b/lib/transformations/outputPath/outputPath.test.js index d1041b30274..1312905c074 100644 --- a/lib/transformations/outputPath/outputPath.test.js +++ b/lib/transformations/outputPath/outputPath.test.js @@ -1,5 +1,7 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'outputPath', 'outputPath-0'); -defineTest(__dirname, 'outputPath', 'outputPath-1'); -defineTest(__dirname, 'outputPath', 'outputPath-2'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "outputPath", "outputPath-0"); +defineTest(__dirname, "outputPath", "outputPath-1"); +defineTest(__dirname, "outputPath", "outputPath-2"); diff --git a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js index a3d193800f3..89944b0e012 100644 --- a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js +++ b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js @@ -1,6 +1,8 @@ -const codeFrame = require('babel-code-frame'); -const chalk = require('chalk'); -const utils = require('../utils'); +"use strict"; + +const codeFrame = require("babel-code-frame"); +const chalk = require("chalk"); +const utils = require("../utils"); const example = `plugins: [ new webpack.optimize.OccurrenceOrderPlugin(), @@ -12,18 +14,19 @@ module.exports = function(j, ast, source) { // List of deprecated plugins to remove // each item refers to webpack.optimize.[NAME] construct const deprecatedPlugingsList = [ - 'webpack.optimize.OccurrenceOrderPlugin', - 'webpack.optimize.DedupePlugin' + "webpack.optimize.OccurrenceOrderPlugin", + "webpack.optimize.DedupePlugin" ]; - return utils.findPluginsByName(j, ast, deprecatedPlugingsList) + return utils + .findPluginsByName(j, ast, deprecatedPlugingsList) .forEach(path => { // For now we only support the case there plugins are defined in an Array - const arrayPath = utils.safeTraverse(path, ['parent','value']); - if (arrayPath && utils.isType(arrayPath, 'ArrayExpression')) { + const arrayPath = utils.safeTraverse(path, ["parent", "value"]); + if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) { // Check how many plugins are defined and // if there is only last plugin left remove `plugins: []` node - const arrayElementsPath = utils.safeTraverse(arrayPath, ['elements']); + const arrayElementsPath = utils.safeTraverse(arrayPath, ["elements"]); if (arrayElementsPath && arrayElementsPath.length === 1) { j(path.parent.parent).remove(); } else { @@ -31,17 +34,13 @@ module.exports = function(j, ast, source) { } } else { const startLoc = path.value.loc.start; - console.log(` -${ chalk.red('Only plugins instantiated in the array can be automatically removed i.e.:') } - -${ codeFrame(example, null, null, { highlightCode: true }) } - -${ chalk.red('but you use it like this:') } - -${ codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true }) } - -${ chalk.red('Please remove deprecated plugins manually. ') } -See ${ chalk.underline('https://webpack.js.org/guides/migrating/')} for more information.`); + const messageOutput = `${chalk.red("Only plugins instantiated in the array can be automatically removed i.e.:")} + ${codeFrame(example, null, null, { highlightCode: true })} +${chalk.red("but you use it like this:")} + ${codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true })} +${chalk.red("Please remove deprecated plugins manually. ")} +See ${chalk.underline("https://webpack.js.org/guides/migrating/")} for more information.`; + console.log(messageOutput); } }); }; diff --git a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js index 748a0c35ea1..e029dff487d 100644 --- a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js +++ b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js @@ -1,7 +1,9 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'removeDeprecatedPlugins', 'removeDeprecatedPlugins-0'); -defineTest(__dirname, 'removeDeprecatedPlugins', 'removeDeprecatedPlugins-1'); -defineTest(__dirname, 'removeDeprecatedPlugins', 'removeDeprecatedPlugins-2'); -defineTest(__dirname, 'removeDeprecatedPlugins', 'removeDeprecatedPlugins-3'); -defineTest(__dirname, 'removeDeprecatedPlugins', 'removeDeprecatedPlugins-4'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-0"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-1"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-2"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-3"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-4"); diff --git a/lib/transformations/removeJsonLoader/removeJsonLoader.js b/lib/transformations/removeJsonLoader/removeJsonLoader.js index df654e303be..a222b35bb1a 100644 --- a/lib/transformations/removeJsonLoader/removeJsonLoader.js +++ b/lib/transformations/removeJsonLoader/removeJsonLoader.js @@ -1,51 +1,59 @@ -const utils = require('../utils'); +"use strict"; + +const utils = require("../utils"); module.exports = function(j, ast) { function removeLoaderByName(path, name) { const loadersNode = path.value.value; switch (loadersNode.type) { - case j.ArrayExpression.name: { - let loaders = loadersNode.elements.map(p => { - return utils.safeTraverse(p, ['properties', '0', 'value', 'value']); - }); - const loaderIndex = loaders.indexOf(name); - if (loaders.length && loaderIndex > -1) { - // Remove loader from the array - loaders.splice(loaderIndex, 1); - // and from AST - loadersNode.elements.splice(loaderIndex, 1); - } + case j.ArrayExpression.name: { + let loaders = loadersNode.elements.map(p => { + return utils.safeTraverse(p, ["properties", "0", "value", "value"]); + }); + const loaderIndex = loaders.indexOf(name); + if (loaders.length && loaderIndex > -1) { + // Remove loader from the array + loaders.splice(loaderIndex, 1); + // and from AST + loadersNode.elements.splice(loaderIndex, 1); + } - // If there are no loaders left, remove the whole Rule object - if (loaders.length === 0) { - j(path.parent).remove(); + // If there are no loaders left, remove the whole Rule object + if (loaders.length === 0) { + j(path.parent).remove(); + } + break; } - break; - } - case j.Literal.name: { - // If only the loader with the matching name was used - // we can remove the whole Property node completely - if (loadersNode.value === name) { - j(path.parent).remove(); + case j.Literal.name: { + // If only the loader with the matching name was used + // we can remove the whole Property node completely + if (loadersNode.value === name) { + j(path.parent).remove(); + } + break; } - break; - } } } function removeLoaders(ast) { ast - .find(j.Property, { key: { name: 'use' } }) - .forEach(path => removeLoaderByName(path, 'json-loader')); + .find(j.Property, { + key: { + name: "use" + } + }) + .forEach(path => removeLoaderByName(path, "json-loader")); ast - .find(j.Property, { key: { name: 'loader' } }) - .forEach(path => removeLoaderByName(path, 'json-loader')); + .find(j.Property, { + key: { + name: "loader" + } + }) + .forEach(path => removeLoaderByName(path, "json-loader")); } - const transforms = [ - removeLoaders - ]; + const transforms = [removeLoaders]; transforms.forEach(t => t(ast)); diff --git a/lib/transformations/removeJsonLoader/removeJsonLoader.test.js b/lib/transformations/removeJsonLoader/removeJsonLoader.test.js index 164f0045ee1..a448e68bf02 100644 --- a/lib/transformations/removeJsonLoader/removeJsonLoader.test.js +++ b/lib/transformations/removeJsonLoader/removeJsonLoader.test.js @@ -1,6 +1,8 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'removeJsonLoader', 'removeJsonLoader-0'); -defineTest(__dirname, 'removeJsonLoader', 'removeJsonLoader-1'); -defineTest(__dirname, 'removeJsonLoader', 'removeJsonLoader-2'); -defineTest(__dirname, 'removeJsonLoader', 'removeJsonLoader-3'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-0"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-1"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-2"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-3"); diff --git a/lib/transformations/resolve/resolve.js b/lib/transformations/resolve/resolve.js index 3912703e9e0..6c91c54280a 100644 --- a/lib/transformations/resolve/resolve.js +++ b/lib/transformations/resolve/resolve.js @@ -1,25 +1,27 @@ -module.exports = function transformer(j, ast) { +"use strict"; +module.exports = function transformer(j, ast) { const getRootVal = p => { - return p.node.value.properties.filter(prop => prop.key.name === 'root')[0]; + return p.node.value.properties.filter(prop => prop.key.name === "root")[0]; }; const getRootIndex = p => { - return p.node.value.properties - .reduce((rootIndex, prop, index) => { - return prop.key.name === 'root' ? index : rootIndex; - }, -1); + return p.node.value.properties.reduce((rootIndex, prop, index) => { + return prop.key.name === "root" ? index : rootIndex; + }, -1); }; const isModulePresent = p => { - const modules = p.node.value.properties.filter(prop => prop.key.name === 'modules'); + const modules = p.node.value.properties.filter( + prop => prop.key.name === "modules" + ); return modules.length > 0 && modules[0]; }; const createModuleArray = p => { const rootVal = getRootVal(p); let modulesVal = null; - if (rootVal.value.type === 'ArrayExpression') { + if (rootVal.value.type === "ArrayExpression") { modulesVal = rootVal.value.elements; } else { modulesVal = [rootVal.value]; @@ -27,7 +29,11 @@ module.exports = function transformer(j, ast) { let module = isModulePresent(p); if (!module) { - module = j.property('init', j.identifier('modules'), j.arrayExpression(modulesVal)); + module = j.property( + "init", + j.identifier("modules"), + j.arrayExpression(modulesVal) + ); p.node.value.properties = p.node.value.properties.concat([module]); } else { module.value.elements = module.value.elements.concat(modulesVal); @@ -40,10 +46,11 @@ module.exports = function transformer(j, ast) { return ast .find(j.Property) .filter(p => { - return p.node.key.name === 'resolve' - && p.node.value.properties - .filter(prop => prop.key.name === 'root') - .length === 1; + return ( + p.node.key.name === "resolve" && + p.node.value.properties.filter(prop => prop.key.name === "root") + .length === 1 + ); }) .forEach(createModuleArray); }; diff --git a/lib/transformations/resolve/resolve.test.js b/lib/transformations/resolve/resolve.test.js index 30a26b5348b..9cbd9d22957 100644 --- a/lib/transformations/resolve/resolve.test.js +++ b/lib/transformations/resolve/resolve.test.js @@ -1,3 +1,5 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'resolve'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "resolve"); diff --git a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js index f5c4a12af3b..a4e71398126 100644 --- a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js +++ b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js @@ -1,25 +1,26 @@ -const findPluginsByName = require('../utils').findPluginsByName; +"use strict"; -module.exports = function(j, ast) { +const findPluginsByName = require("../utils").findPluginsByName; +module.exports = function(j, ast) { function createSourceMapsProperty() { - return j.property('init', j.identifier('sourceMap'), j.identifier('true')); + return j.property("init", j.identifier("sourceMap"), j.identifier("true")); } - return findPluginsByName(j, ast, ['webpack.optimize.UglifyJsPlugin']) - .forEach(path => { - const args = path.value.arguments; + return findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]).forEach(path => { + const args = path.value.arguments; - if (args.length) { - // Plugin is called with object as arguments - j(path) - .find(j.ObjectExpression) - .get('properties') - .value - .push(createSourceMapsProperty()); - } else { - // Plugin is called without arguments - args.push(j.objectExpression([createSourceMapsProperty()])); - } - }); + if (args.length) { + // Plugin is called with object as arguments + j(path) + .find(j.ObjectExpression) + .get("properties") + .value.push(createSourceMapsProperty()); + } else { + // Plugin is called without arguments + args.push(j.objectExpression([createSourceMapsProperty()])); + } + }); }; diff --git a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js index a0c309ccb1e..4b43262cbdc 100644 --- a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js +++ b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js @@ -1,5 +1,7 @@ -const defineTest = require('../defineTest'); +"use strict"; -defineTest(__dirname, 'uglifyJsPlugin', 'uglifyJsPlugin-0'); -defineTest(__dirname, 'uglifyJsPlugin', 'uglifyJsPlugin-1'); -defineTest(__dirname, 'uglifyJsPlugin', 'uglifyJsPlugin-2'); +const defineTest = require("../defineTest"); + +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-0"); +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-1"); +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-2"); diff --git a/lib/transformations/utils.js b/lib/transformations/utils.js index dcbb3bb0428..c0ce8b35c86 100644 --- a/lib/transformations/utils.js +++ b/lib/transformations/utils.js @@ -1,3 +1,5 @@ +"use strict"; + function safeTraverse(obj, paths) { let val = obj; let idx = 0; @@ -15,7 +17,9 @@ function safeTraverse(obj, paths) { // Convert nested MemberExpressions to strings like webpack.optimize.DedupePlugin function memberExpressionToPathString(path) { if (path && path.object) { - return [memberExpressionToPathString(path.object), path.property.name].join('.'); + return [memberExpressionToPathString(path.object), path.property.name].join( + "." + ); } return path.name; } @@ -47,13 +51,12 @@ function pathsToMemberExpression(j, paths) { * @returns Path * */ function findPluginsByName(j, node, pluginNamesArray) { - return node - .find(j.NewExpression) - .filter(path => { - return pluginNamesArray.some( - plugin => memberExpressionToPathString(path.get('callee').value) === plugin - ); - }); + return node.find(j.NewExpression).filter(path => { + return pluginNamesArray.some( + plugin => + memberExpressionToPathString(path.get("callee").value) === plugin + ); + }); } /* @@ -66,7 +69,11 @@ function findPluginsByName(j, node, pluginNamesArray) { * @returns Path * */ function findPluginsRootNodes(j, node) { - return node.find(j.Property, { key: { name: 'plugins' } }); + return node.find(j.Property, { + key: { + name: "plugins" + } + }); } /* @@ -81,7 +88,7 @@ function findPluginsRootNodes(j, node) { * */ function createProperty(j, key, value) { return j.property( - 'init', + "init", createIdentifierOrLiteral(j, key), createLiteral(j, value) ); @@ -100,11 +107,11 @@ function createProperty(j, key, value) { function createLiteral(j, val) { let literalVal = val; // We'll need String to native type conversions - if (typeof val === 'string') { + if (typeof val === "string") { // 'true' => true - if (val === 'true') literalVal = true; + if (val === "true") literalVal = true; // 'false' => false - if (val === 'false') literalVal = false; + if (val === "false") literalVal = false; // '1' => 1 if (!isNaN(Number(val))) literalVal = Number(val); } @@ -124,14 +131,14 @@ function createLiteral(j, val) { function createIdentifierOrLiteral(j, val) { let literalVal = val; // We'll need String to native type conversions - if (typeof val === 'string' || val.__paths) { + if (typeof val === "string" || val.__paths) { // 'true' => true - if (val === 'true') { + if (val === "true") { literalVal = true; return j.literal(literalVal); } // 'false' => false - if (val === 'false') { + if (val === "false") { literalVal = false; return j.literal(literalVal); } @@ -141,11 +148,10 @@ function createIdentifierOrLiteral(j, val) { return j.literal(literalVal); } - if(val.__paths) { + if (val.__paths) { return createExternalRegExp(j, val); - } - // Use identifier instead - else { + } else { + // Use identifier instead // TODO: Check if literalVal is a valid Identifier! return j.identifier(literalVal); } @@ -165,7 +171,9 @@ function createIdentifierOrLiteral(j, val) { * @returns void * */ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { - const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [pluginName]); + const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [ + pluginName + ]); let optionsProps; if (options) { optionsProps = Object.keys(options).map(key => { @@ -182,9 +190,7 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { if (args.length) { // Plugin is called with object as arguments // we will merge those objects - let currentProps = j(path) - .find(j.ObjectExpression) - .get('properties'); + let currentProps = j(path).find(j.ObjectExpression).get("properties"); optionsProps.forEach(opt => { // Search for same keys in the existing object @@ -202,12 +208,9 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { currentProps.value.push(opt); } }); - } else { // Plugin is called without arguments - args.push( - j.objectExpression(optionsProps) - ); + args.push(j.objectExpression(optionsProps)); } } }); @@ -217,7 +220,7 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { argumentsArray = [j.objectExpression(optionsProps)]; } const loaderPluginInstance = j.newExpression( - pathsToMemberExpression(j, pluginName.split('.').reverse()), + pathsToMemberExpression(j, pluginName.split(".").reverse()), argumentsArray ); rootNodePath.value.elements.push(loaderPluginInstance); @@ -235,8 +238,9 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { * @returns { string } variable name - ex. 'var s = require(s) gives "s"` * */ -function findVariableToPlugin(j, rootNode, pluginPackageName){ - const moduleVarNames = rootNode.find(j.VariableDeclarator) +function findVariableToPlugin(j, rootNode, pluginPackageName) { + const moduleVarNames = rootNode + .find(j.VariableDeclarator) .filter(j.filters.VariableDeclarator.requiresModule(pluginPackageName)) .nodes(); if (moduleVarNames.length === 0) return null; @@ -256,13 +260,11 @@ function isType(path, type) { return path.type === type; } -function findObjWithOneOfKeys (p, keyNames) { - return p.value.properties - .reduce((predicate, prop) => { - const name = prop.key.name; - return keyNames.indexOf(name) > -1 - || predicate; - }, false); +function findObjWithOneOfKeys(p, keyNames) { + return p.value.properties.reduce((predicate, prop) => { + const name = prop.key.name; + return keyNames.indexOf(name) > -1 || predicate; + }, false); } /* @@ -276,14 +278,11 @@ function findObjWithOneOfKeys (p, keyNames) { */ function getRequire(j, constName, packagePath) { - return j.variableDeclaration('const', [ + return j.variableDeclaration("const", [ j.variableDeclarator( - j.identifier(constName), - j.callExpression( - j.identifier('require'), - [j.literal(packagePath)] - ) - ) + j.identifier(constName), + j.callExpression(j.identifier("require"), [j.literal(packagePath)]) + ) ]); } @@ -299,13 +298,15 @@ function getRequire(j, constName, packagePath) { */ function checkIfExistsAndAddValue(j, node, key, value) { - const existingProp = node.value.properties.filter(prop => prop.key.name === key); + const existingProp = node.value.properties.filter( + prop => prop.key.name === key + ); let prop; - if (existingProp.length > 0){ + if (existingProp.length > 0) { prop = existingProp[0]; prop.value = value; } else { - prop = j.property('init', j.identifier(key), value); + prop = j.property("init", j.identifier(key), value); node.value.properties.push(prop); } } @@ -319,7 +320,7 @@ function checkIfExistsAndAddValue(j, node, key, value) { * @returns - { Array } arr - An empty array */ function createEmptyArrayProperty(j, key) { - return j.property('init', j.identifier(key), j.arrayExpression([])); + return j.property("init", j.identifier(key), j.arrayExpression([])); } /* @@ -334,19 +335,23 @@ function createEmptyArrayProperty(j, key) { function createArrayWithChildren(j, key, subProps, shouldDropKeys) { let arr = createEmptyArrayProperty(j, key); - if(shouldDropKeys) { - subProps.forEach( (subProperty) => { + if (shouldDropKeys) { + subProps.forEach(subProperty => { let objectOfArray = j.objectExpression([]); - if(typeof(subProperty) !== 'string') { + if (typeof subProperty !== "string") { loopThroughObjects(j, objectOfArray, subProperty); arr.value.elements.push(objectOfArray); } else { - return arr.value.elements.push(createIdentifierOrLiteral(j, subProperty)); + return arr.value.elements.push( + createIdentifierOrLiteral(j, subProperty) + ); } }); } else { - Object.keys(subProps[key]).forEach( (subProperty) => { - arr.value.elements.push(createIdentifierOrLiteral(j, subProps[key][subProperty])); + Object.keys(subProps[key]).forEach(subProperty => { + arr.value.elements.push( + createIdentifierOrLiteral(j, subProps[key][subProperty]) + ); }); } return arr; @@ -364,21 +369,29 @@ function createArrayWithChildren(j, key, subProps, shouldDropKeys) { */ function loopThroughObjects(j, p, obj) { - Object.keys(obj).forEach( (prop) => { - if(prop.indexOf('inject') >= 0) { + Object.keys(obj).forEach(prop => { + if (prop.indexOf("inject") >= 0) { return p.properties.push(createIdentifierOrLiteral(j, obj[prop])); } // eslint-disable-next-line no-irregular-whitespace - if(typeof(obj[prop]) !== 'object' || obj[prop] instanceof RegExp) { - p.properties.push(createObjectWithSuppliedProperty( - j, prop, createIdentifierOrLiteral(j, obj[prop]) - )); - } else if(Array.isArray(obj[prop])) { + if (typeof obj[prop] !== "object" || obj[prop] instanceof RegExp) { + p.properties.push( + createObjectWithSuppliedProperty( + j, + prop, + createIdentifierOrLiteral(j, obj[prop]) + ) + ); + } else if (Array.isArray(obj[prop])) { let arrayProp = createArrayWithChildren(j, prop, obj[prop], true); p.properties.push(arrayProp); } else { let objectBlock = j.objectExpression([]); - let propertyOfBlock = createObjectWithSuppliedProperty(j, prop, objectBlock); + let propertyOfBlock = createObjectWithSuppliedProperty( + j, + prop, + objectBlock + ); loopThroughObjects(j, objectBlock, obj[prop]); p.properties.push(propertyOfBlock); } @@ -396,7 +409,7 @@ function loopThroughObjects(j, p, obj) { */ function createObjectWithSuppliedProperty(j, key, prop) { - return j.property('init', j.identifier(key), prop); + return j.property("init", j.identifier(key), prop); } /* @@ -426,7 +439,7 @@ function createExternalRegExp(j, prop) { function pushCreateProperty(j, p, key, val) { let property; - if(val.hasOwnProperty('type')) { + if (val.hasOwnProperty("type")) { property = val; } else { property = createIdentifierOrLiteral(j, val); @@ -448,33 +461,44 @@ function pushCreateProperty(j, p, key, val) { */ function pushObjectKeys(j, p, webpackProperties, name) { - p.value.properties.filter(n => - (safeTraverse(n, ['key', 'name']) === name) - ).forEach( (prop) => { - Object.keys(webpackProperties).forEach( (webpackProp) => { - if(webpackProp.indexOf('inject') >= 0) { - return prop.value.properties.push(createIdentifierOrLiteral(j, webpackProperties[webpackProp])); - } - else if(Array.isArray(webpackProperties[webpackProp])) { - const propArray = createArrayWithChildren( - j, webpackProp, webpackProperties[webpackProp], true - ); - return prop.value.properties.push(propArray); - } - else if(typeof(webpackProperties[webpackProp]) !== 'object' || webpackProperties[webpackProp].__paths || webpackProperties[webpackProp] instanceof RegExp) { - return pushCreateProperty( - j, prop, webpackProp, webpackProperties[webpackProp] - ); - } else { - pushCreateProperty( - j, prop, webpackProp, j.objectExpression([]) - ); - return pushObjectKeys( - j, prop, webpackProperties[webpackProp], webpackProp - ); - } + p.value.properties + .filter(n => safeTraverse(n, ["key", "name"]) === name) + .forEach(prop => { + Object.keys(webpackProperties).forEach(webpackProp => { + if (webpackProp.indexOf("inject") >= 0) { + return prop.value.properties.push( + createIdentifierOrLiteral(j, webpackProperties[webpackProp]) + ); + } else if (Array.isArray(webpackProperties[webpackProp])) { + const propArray = createArrayWithChildren( + j, + webpackProp, + webpackProperties[webpackProp], + true + ); + return prop.value.properties.push(propArray); + } else if ( + typeof webpackProperties[webpackProp] !== "object" || + webpackProperties[webpackProp].__paths || + webpackProperties[webpackProp] instanceof RegExp + ) { + return pushCreateProperty( + j, + prop, + webpackProp, + webpackProperties[webpackProp] + ); + } else { + pushCreateProperty(j, prop, webpackProp, j.objectExpression([])); + return pushObjectKeys( + j, + prop, + webpackProperties[webpackProp], + webpackProp + ); + } + }); }); - }); } /* @@ -493,11 +517,10 @@ function pushObjectKeys(j, p, webpackProperties, name) { */ function isAssignment(j, p, cb, identifier, property) { - if(p.parent.value.type === 'AssignmentExpression') { - if(j) { + if (p.parent.value.type === "AssignmentExpression") { + if (j) { return cb(j, p, identifier, property); - } - else { + } else { return cb(p); } } diff --git a/lib/transformations/utils.test.js b/lib/transformations/utils.test.js index 7a7c9c0c454..a70091a40e2 100644 --- a/lib/transformations/utils.test.js +++ b/lib/transformations/utils.test.js @@ -1,68 +1,74 @@ -const j = require('jscodeshift/dist/core'); -const utils = require('./utils'); +"use strict"; -describe('utils', () => { - describe('createProperty', () => { - it('should create properties for Boolean', () => { - const res = utils.createProperty(j, 'foo', true); +const j = require("jscodeshift/dist/core"); +const utils = require("./utils"); + +describe("utils", () => { + describe("createProperty", () => { + it("should create properties for Boolean", () => { + const res = utils.createProperty(j, "foo", true); expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); }); - it('should create properties for Number', () => { - const res = utils.createProperty(j, 'foo', -1); + it("should create properties for Number", () => { + const res = utils.createProperty(j, "foo", -1); expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); }); - it('should create properties for String', () => { - const res = utils.createProperty(j, 'foo', 'bar'); + it("should create properties for String", () => { + const res = utils.createProperty(j, "foo", "bar"); expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); }); - xit('should create properties for complex keys', () => { - const res = utils.createProperty(j, 'foo-bar', 'bar'); + xit("should create properties for complex keys", () => { + const res = utils.createProperty(j, "foo-bar", "bar"); expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); }); - it('should create properties for non-literal keys', () => { - const res = utils.createProperty(j, 1, 'bar'); + it("should create properties for non-literal keys", () => { + const res = utils.createProperty(j, 1, "bar"); expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); }); }); - describe('findPluginsByName', () => { - it('should find plugins in AST', () => { + describe("findPluginsByName", () => { + it("should find plugins in AST", () => { const ast = j(` { foo: new webpack.optimize.UglifyJsPlugin() } `); - const res = utils.findPluginsByName(j, ast, - ['webpack.optimize.UglifyJsPlugin']); + const res = utils.findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]); expect(res.size()).toEqual(1); }); - it('should find all plugins in AST', () => { + it("should find all plugins in AST", () => { const ast = j(` [ new UglifyJsPlugin(), new TestPlugin() ] `); - const res = utils.findPluginsByName(j, ast, - ['UglifyJsPlugin', 'TestPlugin']); + const res = utils.findPluginsByName(j, ast, [ + "UglifyJsPlugin", + "TestPlugin" + ]); expect(res.size()).toEqual(2); }); - it('should not find false positives', () => { + it("should not find false positives", () => { const ast = j(` { foo: new UglifyJsPlugin() } `); - const res = utils.findPluginsByName(j, ast, - ['webpack.optimize.UglifyJsPlugin']); + const res = utils.findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]); expect(res.size()).toEqual(0); }); }); - describe('findPluginsRootNodes', () => { - it('should find plugins: [] nodes', () => { + describe("findPluginsRootNodes", () => { + it("should find plugins: [] nodes", () => { const ast = j(` var a = { plugins: [], foo: { plugins: [] } } `); @@ -70,7 +76,7 @@ var a = { plugins: [], foo: { plugins: [] } } expect(res.size()).toEqual(2); }); - it('should not find plugins: [] nodes', () => { + it("should not find plugins: [] nodes", () => { const ast = j(` var a = { plugs: [] } `); @@ -79,206 +85,235 @@ var a = { plugs: [] } }); }); - describe('createOrUpdatePluginByName', () => { - it('should create a new plugin without arguments', () => { - const ast = j('{ plugins: [] }'); - ast - .find(j.ArrayExpression) - .forEach(node => { - utils.createOrUpdatePluginByName(j, node, 'Plugin'); - }); + describe("createOrUpdatePluginByName", () => { + it("should create a new plugin without arguments", () => { + const ast = j("{ plugins: [] }"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin"); + }); expect(ast.toSource()).toMatchSnapshot(); }); - it('should create a new plugin with arguments', () => { - const ast = j('{ plugins: [] }'); - ast - .find(j.ArrayExpression) - .forEach(node => { - utils.createOrUpdatePluginByName(j, node, 'Plugin', { foo: 'bar' }); + it("should create a new plugin with arguments", () => { + const ast = j("{ plugins: [] }"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + foo: "bar" }); + }); expect(ast.toSource()).toMatchSnapshot(); }); - it('should add an object as an argument', () => { - const ast = j('[new Plugin()]'); - ast - .find(j.ArrayExpression) - .forEach(node => { - utils.createOrUpdatePluginByName(j, node, 'Plugin', { foo: true }); + it("should add an object as an argument", () => { + const ast = j("[new Plugin()]"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + foo: true }); + }); expect(ast.toSource()).toMatchSnapshot(); }); - it('should merge options objects', () => { - const ast = j('[new Plugin({ foo: true })]'); - ast - .find(j.ArrayExpression) - .forEach(node => { - utils.createOrUpdatePluginByName(j, node, 'Plugin', { bar: 'baz', foo: false }); - utils.createOrUpdatePluginByName(j, node, 'Plugin', { 'baz-long': true }); + it("should merge options objects", () => { + const ast = j("[new Plugin({ foo: true })]"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + bar: "baz", + foo: false + }); + utils.createOrUpdatePluginByName(j, node, "Plugin", { + "baz-long": true }); + }); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('findVariableToPlugin', () => { - it('should find the variable name of a plugin', () => { + describe("findVariableToPlugin", () => { + it("should find the variable name of a plugin", () => { const ast = j(` var packageName = require('package-name'); var someOtherVar = somethingElse; var otherPackage = require('other-package'); `); - const foundVar = utils.findVariableToPlugin(j, ast, 'other-package'); - expect(foundVar).toEqual('otherPackage'); + const foundVar = utils.findVariableToPlugin(j, ast, "other-package"); + expect(foundVar).toEqual("otherPackage"); }); }); - describe('createLiteral', () => { - it('should create basic literal', () => { - const literal = utils.createLiteral(j, 'stringLiteral'); + describe("createLiteral", () => { + it("should create basic literal", () => { + const literal = utils.createLiteral(j, "stringLiteral"); expect(j(literal).toSource()).toMatchSnapshot(); }); - it('should create boolean', () => { - const literal = utils.createLiteral(j, 'true'); + it("should create boolean", () => { + const literal = utils.createLiteral(j, "true"); expect(j(literal).toSource()).toMatchSnapshot(); }); - }); - describe('createIdentifierOrLiteral', () => { - it('should create basic literal', () => { - const literal = utils.createIdentifierOrLiteral(j, '\'stringLiteral\''); + describe("createIdentifierOrLiteral", () => { + it("should create basic literal", () => { + const literal = utils.createIdentifierOrLiteral(j, "'stringLiteral'"); expect(j(literal).toSource()).toMatchSnapshot(); }); - it('should create boolean', () => { - const literal = utils.createIdentifierOrLiteral(j, 'true'); + it("should create boolean", () => { + const literal = utils.createIdentifierOrLiteral(j, "true"); expect(j(literal).toSource()).toMatchSnapshot(); }); }); - describe('findObjWithOneOfKeys', () => { - it('should find keys', () => { + describe("findObjWithOneOfKeys", () => { + it("should find keys", () => { const ast = j(` var ab = { a: 1, b: 2 } `); - expect(ast.find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, ['a'])).size()).toEqual(1); + expect( + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["a"])) + .size() + ).toEqual(1); }); }); - describe('getRequire', () => { - it('should create a require statement', () => { - const require = utils.getRequire(j, 'filesys', 'fs'); + describe("getRequire", () => { + it("should create a require statement", () => { + const require = utils.getRequire(j, "filesys", "fs"); expect(j(require).toSource()).toMatchSnapshot(); }); }); - describe('checkIfExistsAndAddValue', () => { - it('should create new prop if none exist', () => { + describe("checkIfExistsAndAddValue", () => { + it("should create new prop if none exist", () => { const ast = j(` module.exports = { entry: 'index.js' } `); - ast.find(j.ObjectExpression).forEach(node => utils.checkIfExistsAndAddValue(j, node, 'externals', j.literal('React'))); + ast + .find(j.ObjectExpression) + .forEach(node => + utils.checkIfExistsAndAddValue( + j, + node, + "externals", + j.literal("React") + ) + ); expect(ast.toSource()).toMatchSnapshot(); }); - it('should override prop if it exists', () => { + it("should override prop if it exists", () => { const ast = j(` module.exports = { entry: 'index.js' } `); - ast.find(j.ObjectExpression).forEach(node => utils.checkIfExistsAndAddValue(j, node, 'entry', j.literal('app.js'))); + ast + .find(j.ObjectExpression) + .forEach(node => + utils.checkIfExistsAndAddValue(j, node, "entry", j.literal("app.js")) + ); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('createArrayWithChildren', () => { - it('should find an prop that matches key and create an array with it', () => { - const ast = j('{}'); - let key = 'react'; + describe("createArrayWithChildren", () => { + it("should find an prop that matches key and create an array with it", () => { + const ast = j("{}"); + let key = "react"; let reactArr = { - react: [ '\'bo\''] + react: ["'bo'"] }; const arr = utils.createArrayWithChildren(j, key, reactArr, false); ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); expect(ast.toSource()).toMatchSnapshot(); }); - it('should add all children of an array to a new one with a supplied key', () => { - const ast = j('{}'); - let key = 'myVeryOwnKey'; - let helloWorldArray = [ '\'hello\'', 'world']; + it("should add all children of an array to a new one with a supplied key", () => { + const ast = j("{}"); + let key = "myVeryOwnKey"; + let helloWorldArray = ["'hello'", "world"]; const arr = utils.createArrayWithChildren(j, key, helloWorldArray, true); ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('createEmptyArrayProperty', () => { - it('should create an array with no properties', () => { - const ast = j('{}'); - const arr = utils.createEmptyArrayProperty(j, 'its-lit'); + describe("createEmptyArrayProperty", () => { + it("should create an array with no properties", () => { + const ast = j("{}"); + const arr = utils.createEmptyArrayProperty(j, "its-lit"); ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('createObjectWithSuppliedProperty', () => { - it('should create an object with a property supplied by us', () => { - const ast = j('{}'); - const prop = utils.createObjectWithSuppliedProperty(j, 'its-lit', j.objectExpression([])); + describe("createObjectWithSuppliedProperty", () => { + it("should create an object with a property supplied by us", () => { + const ast = j("{}"); + const prop = utils.createObjectWithSuppliedProperty( + j, + "its-lit", + j.objectExpression([]) + ); ast.find(j.Program).forEach(node => j(node).replaceWith(prop)); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('createExternalRegExp', () => { - it('should create an regExp property that has been parsed by jscodeshift', () => { - const ast = j('{}'); - const reg = j('\'\t\''); + describe("createExternalRegExp", () => { + it("should create an regExp property that has been parsed by jscodeshift", () => { + const ast = j("{}"); + const reg = j("'\t'"); const prop = utils.createExternalRegExp(j, reg); ast.find(j.Program).forEach(node => j(node).replaceWith(prop)); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('pushCreateProperty', () => { - it('should create an object or property and push the value to a node', () => { + describe("pushCreateProperty", () => { + it("should create an object or property and push the value to a node", () => { const ast = j(`module.exports = { pushMe: {} }`); - ast.find(j.Identifier).filter(n => n.value.name === 'pushMe').forEach(node => { - const heavyNodeNoSafeTraverse = node.parentPath.value; - utils.pushCreateProperty(j, heavyNodeNoSafeTraverse, 'just', 'pushed'); - }); + ast + .find(j.Identifier) + .filter(n => n.value.name === "pushMe") + .forEach(node => { + const heavyNodeNoSafeTraverse = node.parentPath.value; + utils.pushCreateProperty( + j, + heavyNodeNoSafeTraverse, + "just", + "pushed" + ); + }); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('pushObjectKeys', () => { - it('should push object to an node using Object.keys', () => { + describe("pushObjectKeys", () => { + it("should push object to an node using Object.keys", () => { const ast = j(`module.exports = { pushMe: {} }`); const webpackProperties = { hello: { world: { - its: '\'great\'' + its: "'great'" } } }; ast.find(j.ObjectExpression).forEach(node => { - utils.pushObjectKeys(j, node, webpackProperties, 'pushMe'); + utils.pushObjectKeys(j, node, webpackProperties, "pushMe"); }); expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('loopThroughObjects', () => { - it('Use recursion and add elements to an node', () => { - const ast = j('module.exports = {}'); + describe("loopThroughObjects", () => { + it("Use recursion and add elements to an node", () => { + const ast = j("module.exports = {}"); const webpackProperties = { hello: { - webpack: 'cli' + webpack: "cli" } }; ast.find(j.ObjectExpression).forEach(node => { @@ -287,28 +322,36 @@ var a = { plugs: [] } expect(ast.toSource()).toMatchSnapshot(); }); }); - describe('isAssignment', () => { - it('should invoke a callback if parent type is AssignmentExpression', () => { - const ast = j('module.exports = {}'); - const myObj = 'Heyho'; - const myKey = 'context'; + describe("isAssignment", () => { + it("should invoke a callback if parent type is AssignmentExpression", () => { + const ast = j("module.exports = {}"); + const myObj = "Heyho"; + const myKey = "context"; - ast.find(j.ObjectExpression) - .filter(n => utils.isAssignment(j, n, utils.pushCreateProperty, myKey, myObj)); + ast + .find(j.ObjectExpression) + .filter(n => + utils.isAssignment(j, n, utils.pushCreateProperty, myKey, myObj) + ); expect(ast.toSource()).toMatchSnapshot(); }); - it('should allow custom transform functions instead of singularProperty', () => { - const ast = j('module.exports = {}'); + it("should allow custom transform functions instead of singularProperty", () => { + const ast = j("module.exports = {}"); function createPluginsProperty(p) { const webpackProperties = { - plugins: ['one', 'two', 'three'] + plugins: ["one", "two", "three"] }; - const pluginArray = utils.createArrayWithChildren(j, 'plugins', webpackProperties); + const pluginArray = utils.createArrayWithChildren( + j, + "plugins", + webpackProperties + ); return p.value.properties.push(pluginArray); } - ast.find(j.ObjectExpression) - .filter(n => utils.isAssignment(null, n, createPluginsProperty)); + ast + .find(j.ObjectExpression) + .filter(n => utils.isAssignment(null, n, createPluginsProperty)); expect(ast.toSource()).toMatchSnapshot(); }); }); diff --git a/lib/utils/WebpackOptionsValidationError.js b/lib/utils/WebpackOptionsValidationError.js index 4fb7693faf3..5af67962802 100644 --- a/lib/utils/WebpackOptionsValidationError.js +++ b/lib/utils/WebpackOptionsValidationError.js @@ -2,45 +2,42 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Gajus Kuizinas @gajus */ -'use strict'; +"use strict"; -const webpackOptionsSchema = require('./webpackOptionsSchema.json'); +const webpackOptionsSchema = require("./webpackOptionsSchema.json"); const getSchemaPart = (path, parents, additionalPath) => { parents = parents || 0; - path = path.split('/'); + path = path.split("/"); path = path.slice(0, path.length - parents); - if(additionalPath) { - additionalPath = additionalPath.split('/'); + if (additionalPath) { + additionalPath = additionalPath.split("/"); path = path.concat(additionalPath); } let schemaPart = webpackOptionsSchema; - for(let i = 1; i < path.length; i++) { + for (let i = 1; i < path.length; i++) { const inner = schemaPart[path[i]]; - if(inner) - schemaPart = inner; + if (inner) schemaPart = inner; } return schemaPart; }; const getSchemaPartText = (schemaPart, additionalPath) => { - if(additionalPath) { - for(let i = 0; i < additionalPath.length; i++) { + if (additionalPath) { + for (let i = 0; i < additionalPath.length; i++) { const inner = schemaPart[additionalPath[i]]; - if(inner) - schemaPart = inner; + if (inner) schemaPart = inner; } } - while(schemaPart.$ref) schemaPart = getSchemaPart(schemaPart.$ref); + while (schemaPart.$ref) schemaPart = getSchemaPart(schemaPart.$ref); let schemaText = WebpackOptionsValidationError.formatSchema(schemaPart); - if(schemaPart.description) - schemaText += `\n${schemaPart.description}`; + if (schemaPart.description) schemaText += `\n${schemaPart.description}`; return schemaText; }; const indent = (str, prefix, firstLine) => { - if(firstLine) { - return prefix + str.replace(/\n(?!$)/g, '\n' + prefix); + if (firstLine) { + return prefix + str.replace(/\n(?!$)/g, "\n" + prefix); } else { return str.replace(/\n(?!$)/g, `\n${prefix}`); } @@ -49,14 +46,25 @@ const indent = (str, prefix, firstLine) => { class WebpackOptionsValidationError extends Error { constructor(validationErrors) { super(); - if(Error.hasOwnProperty('captureStackTrace')) { + if (Error.hasOwnProperty("captureStackTrace")) { Error.captureStackTrace(this, this.constructor); } - this.name = 'WebpackOptionsValidationError'; + this.name = "WebpackOptionsValidationError"; - this.message = 'Invalid configuration object. ' + - 'Webpack has been initialised using a configuration object that does not match the API schema.\n' + - validationErrors.map(err => ' - ' + indent(WebpackOptionsValidationError.formatValidationError(err), ' ', false)).join('\n'); + this.message = + "Invalid configuration object. " + + "Webpack has been initialised using a configuration object that does not match the API schema.\n" + + validationErrors + .map( + err => + " - " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n"); this.validationErrors = validationErrors; } @@ -64,124 +72,176 @@ class WebpackOptionsValidationError extends Error { prevSchemas = prevSchemas || []; const formatInnerSchema = (innerSchema, addSelf) => { - if(!addSelf) return WebpackOptionsValidationError.formatSchema(innerSchema, prevSchemas); - if(prevSchemas.indexOf(innerSchema) >= 0) return '(recursive)'; - return WebpackOptionsValidationError.formatSchema(innerSchema, prevSchemas.concat(schema)); + if (!addSelf) + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas + ); + if (prevSchemas.indexOf(innerSchema) >= 0) return "(recursive)"; + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas.concat(schema) + ); }; - if(schema.type === 'string') { - if(schema.minLength === 1) - return 'non-empty string'; - else if(schema.minLength > 1) + if (schema.type === "string") { + if (schema.minLength === 1) return "non-empty string"; + else if (schema.minLength > 1) return `string (min length ${schema.minLength})`; - return 'string'; - } else if(schema.type === 'boolean') { - return 'boolean'; - } else if(schema.type === 'number') { - return 'number'; - } else if(schema.type === 'object') { - if(schema.properties) { + return "string"; + } else if (schema.type === "boolean") { + return "boolean"; + } else if (schema.type === "number") { + return "number"; + } else if (schema.type === "object") { + if (schema.properties) { const required = schema.required || []; - return `object { ${Object.keys(schema.properties).map(property => { - if(required.indexOf(property) < 0) return property + '?'; - return property; - }).concat(schema.additionalProperties ? ['...'] : []).join(', ')} }`; + return `object { ${Object.keys(schema.properties) + .map(property => { + if (required.indexOf(property) < 0) return property + "?"; + return property; + }) + .concat(schema.additionalProperties ? ["..."] : []) + .join(", ")} }`; } - if(schema.additionalProperties) { - return `object { : ${formatInnerSchema(schema.additionalProperties)} }`; + if (schema.additionalProperties) { + return `object { : ${formatInnerSchema( + schema.additionalProperties + )} }`; } - return 'object'; - } else if(schema.type === 'array') { + return "object"; + } else if (schema.type === "array") { return `[${formatInnerSchema(schema.items)}]`; } - switch(schema.instanceof) { - case 'Function': - return 'function'; - case 'RegExp': - return 'RegExp'; + switch (schema.instanceof) { + case "Function": + return "function"; + case "RegExp": + return "RegExp"; } - if(schema.$ref) return formatInnerSchema(getSchemaPart(schema.$ref), true); - if(schema.allOf) return schema.allOf.map(formatInnerSchema).join(' & '); - if(schema.oneOf) return schema.oneOf.map(formatInnerSchema).join(' | '); - if(schema.anyOf) return schema.anyOf.map(formatInnerSchema).join(' | '); - if(schema.enum) return schema.enum.map(item => JSON.stringify(item)).join(' | '); + if (schema.$ref) return formatInnerSchema(getSchemaPart(schema.$ref), true); + if (schema.allOf) return schema.allOf.map(formatInnerSchema).join(" & "); + if (schema.oneOf) return schema.oneOf.map(formatInnerSchema).join(" | "); + if (schema.anyOf) return schema.anyOf.map(formatInnerSchema).join(" | "); + if (schema.enum) + return schema.enum.map(item => JSON.stringify(item)).join(" | "); return JSON.stringify(schema, 0, 2); } static formatValidationError(err) { const dataPath = `configuration${err.dataPath}`; - if(err.keyword === 'additionalProperties') { - const baseMessage = `${dataPath} has an unknown property '${err.params.additionalProperty}'. These properties are valid:\n${getSchemaPartText(err.parentSchema)}`; - if(!err.dataPath) { - switch(err.params.additionalProperty) { - case 'debug': - return `${baseMessage}\n` + - 'The \'debug\' property was removed in webpack 2.\n' + - 'Loaders should be updated to allow passing this option via loader options in module.rules.\n' + - 'Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n' + - 'plugins: [\n' + - ' new webpack.LoaderOptionsPlugin({\n' + - ' debug: true\n' + - ' })\n' + - ']'; + if (err.keyword === "additionalProperties") { + const baseMessage = `${dataPath} has an unknown property '${err.params + .additionalProperty}'. These properties are valid:\n${getSchemaPartText( + err.parentSchema + )}`; + if (!err.dataPath) { + switch (err.params.additionalProperty) { + case "debug": + return ( + `${baseMessage}\n` + + "The 'debug' property was removed in webpack 2.\n" + + "Loaders should be updated to allow passing this option via loader options in module.rules.\n" + + "Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n" + + "plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " debug: true\n" + + " })\n" + + "]" + ); } - return baseMessage + '\n' + - 'For typos: please correct them.\n' + - 'For loader options: webpack 2 no longer allows custom properties in configuration.\n' + - ' Loaders should be updated to allow passing options via loader options in module.rules.\n' + - ' Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n' + - ' plugins: [\n' + - ' new webpack.LoaderOptionsPlugin({\n' + - ' // test: /\\.xxx$/, // may apply this only for some modules\n' + - ' options: {\n' + + return ( + baseMessage + + "\n" + + "For typos: please correct them.\n" + + "For loader options: webpack 2 no longer allows custom properties in configuration.\n" + + " Loaders should be updated to allow passing options via loader options in module.rules.\n" + + " Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n" + + " plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " // test: /\\.xxx$/, // may apply this only for some modules\n" + + " options: {\n" + ` ${err.params.additionalProperty}: ...\n` + - ' }\n' + - ' })\n' + - ' ]'; + " }\n" + + " })\n" + + " ]" + ); } return baseMessage; - } else if(err.keyword === 'oneOf' || err.keyword === 'anyOf') { - if(err.children && err.children.length > 0) { - return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}\n` + - `Details:\n${err.children.map(err => ' * ' + indent(WebpackOptionsValidationError.formatValidationError(err), ' ', false)).join('\n')}`; + } else if (err.keyword === "oneOf" || err.keyword === "anyOf") { + if (err.children && err.children.length > 0) { + return ( + `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}\n` + + `Details:\n${err.children + .map( + err => + " * " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n")}` + ); } - return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}`; - - } else if(err.keyword === 'enum') { - if(err.parentSchema && err.parentSchema.enum && err.parentSchema.enum.length === 1) { + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "enum") { + if ( + err.parentSchema && + err.parentSchema.enum && + err.parentSchema.enum.length === 1 + ) { return `${dataPath} should be ${getSchemaPartText(err.parentSchema)}`; } - return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}`; - } else if(err.keyword === 'allOf') { + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "allOf") { return `${dataPath} should be:\n${getSchemaPartText(err.parentSchema)}`; - } else if(err.keyword === 'type') { - switch(err.params.type) { - case 'object': - return `${dataPath} should be an object.`; - case 'string': - return `${dataPath} should be a string.`; - case 'boolean': - return `${dataPath} should be a boolean.`; - case 'number': - return `${dataPath} should be a number.`; - case 'array': - return `${dataPath} should be an array:\n${getSchemaPartText(err.parentSchema)}`; + } else if (err.keyword === "type") { + switch (err.params.type) { + case "object": + return `${dataPath} should be an object.`; + case "string": + return `${dataPath} should be a string.`; + case "boolean": + return `${dataPath} should be a boolean.`; + case "number": + return `${dataPath} should be a number.`; + case "array": + return `${dataPath} should be an array:\n${getSchemaPartText( + err.parentSchema + )}`; } - return `${dataPath} should be ${err.params.type}:\n${getSchemaPartText(err.parentSchema)}`; - } else if(err.keyword === 'instanceof') { - return `${dataPath} should be an instance of ${getSchemaPartText(err.parentSchema)}.`; - } else if(err.keyword === 'required') { - const missingProperty = err.params.missingProperty.replace(/^\./, ''); - return `${dataPath} misses the property '${missingProperty}'.\n${getSchemaPartText(err.parentSchema, ['properties', missingProperty])}`; - } else if(err.keyword === 'minLength' || err.keyword === 'minItems') { - if(err.params.limit === 1) - return `${dataPath} should not be empty.`; - else - return `${dataPath} ${err.message}`; + return `${dataPath} should be ${err.params.type}:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "instanceof") { + return `${dataPath} should be an instance of ${getSchemaPartText( + err.parentSchema + )}.`; + } else if (err.keyword === "required") { + const missingProperty = err.params.missingProperty.replace(/^\./, ""); + return `${dataPath} misses the property '${missingProperty}'.\n${getSchemaPartText( + err.parentSchema, + ["properties", missingProperty] + )}`; + } else if (err.keyword === "minLength" || err.keyword === "minItems") { + if (err.params.limit === 1) return `${dataPath} should not be empty.`; + else return `${dataPath} ${err.message}`; } else { // eslint-disable-line no-fallthrough - return `${dataPath} ${err.message} (${JSON.stringify(err, 0, 2)}).\n${getSchemaPartText(err.parentSchema)}`; + return `${dataPath} ${err.message} (${JSON.stringify( + err, + 0, + 2 + )}).\n${getSchemaPartText(err.parentSchema)}`; } } } diff --git a/lib/utils/npm-exists.js b/lib/utils/npm-exists.js index 85dbb1345dd..22c60bc3ae9 100644 --- a/lib/utils/npm-exists.js +++ b/lib/utils/npm-exists.js @@ -1,5 +1,7 @@ -const got = require('got'); -const chalk = require('chalk'); +"use strict"; + +const got = require("got"); +const chalk = require("chalk"); const constant = value => () => value; /* @@ -15,12 +17,18 @@ const constant = value => () => value; module.exports = function npmExists(moduleName) { //eslint-disable-next-line if (moduleName.length <= 14 || moduleName.slice(0,14) !== 'webpack-addons') { - throw new TypeError(chalk.bold(`${moduleName} isn\'t a valid name.\n`) + - chalk.red('\nIt should be prefixed with \'webpack-addons\', but have different suffix.\n')); + throw new TypeError( + chalk.bold(`${moduleName} isn't a valid name.\n`) + + chalk.red( + "\nIt should be prefixed with 'webpack-addons', but have different suffix.\n" + ) + ); } - const hostname = 'https://www.npmjs.org'; + const hostname = "https://www.npmjs.org"; const pkgUrl = `${hostname}/package/${moduleName}`; - return got(pkgUrl, {method: 'HEAD'}) + return got(pkgUrl, { + method: "HEAD" + }) .then(constant(true)) .catch(constant(false)); }; diff --git a/lib/utils/npm-exists.spec.js b/lib/utils/npm-exists.spec.js index be5ba3d7c96..1ee26346139 100644 --- a/lib/utils/npm-exists.spec.js +++ b/lib/utils/npm-exists.spec.js @@ -1,16 +1,15 @@ -'use strict'; -const exists = require('./npm-exists'); +"use strict"; +const exists = require("./npm-exists"); -describe('npm-exists', () => { - - it('should sucessfully existence of a published module', () => { - exists('webpack-addons-ylvis').then( (status) => { +describe("npm-exists", () => { + it("should sucessfully existence of a published module", () => { + exists("webpack-addons-ylvis").then(status => { expect(status).toBe(true); }); }); - it('should return false for the existence of a fake module', () => { - exists('webpack-addons-noop').then( (status) => { + it("should return false for the existence of a fake module", () => { + exists("webpack-addons-noop").then(status => { expect(status).toBe(false); }); }); diff --git a/lib/utils/npm-packages-exists.js b/lib/utils/npm-packages-exists.js index 020cf0bbd09..d8999771023 100644 --- a/lib/utils/npm-packages-exists.js +++ b/lib/utils/npm-packages-exists.js @@ -1,6 +1,7 @@ -const npmExists = require('./npm-exists'); -const resolvePackages = require('./resolve-packages'); +"use strict"; +const npmExists = require("./npm-exists"); +const resolvePackages = require("./resolve-packages"); /* * @function npmPackagesExists @@ -12,23 +13,26 @@ const resolvePackages = require('./resolve-packages'); * @returns { Array } resolvePackages - Returns an process to install the packages */ - module.exports = function npmPackagesExists(pkg) { let acceptedPackages = []; - pkg.forEach( addon => { - npmExists(addon).then( (moduleExists) => { - if(!moduleExists) { - Error.stackTraceLimit = 0; - throw new TypeError('Package isn\'t registered on npm.'); - } - if (moduleExists) { - acceptedPackages.push(addon); - } - }).catch(err => { - console.error(err.stack || err); - process.exit(0); - }).then( () => { - if(acceptedPackages.length === pkg.length) return resolvePackages(acceptedPackages); - }); + pkg.forEach(addon => { + npmExists(addon) + .then(moduleExists => { + if (!moduleExists) { + Error.stackTraceLimit = 0; + throw new TypeError("Package isn't registered on npm."); + } + if (moduleExists) { + acceptedPackages.push(addon); + } + }) + .catch(err => { + console.error(err.stack || err); + process.exit(0); + }) + .then(() => { + if (acceptedPackages.length === pkg.length) + return resolvePackages(acceptedPackages); + }); }); }; diff --git a/lib/utils/resolve-packages.js b/lib/utils/resolve-packages.js index eb960e2a4cc..016d6f107b8 100644 --- a/lib/utils/resolve-packages.js +++ b/lib/utils/resolve-packages.js @@ -1,9 +1,11 @@ -const path = require('path'); -const fs = require('fs'); -const chalk = require('chalk'); -const spawn = require('cross-spawn'); -const creator = require('../creator/index').creator; -const globalPath = require('global-modules'); +"use strict"; + +const path = require("path"); +const fs = require("fs"); +const chalk = require("chalk"); +const spawn = require("cross-spawn"); +const creator = require("../creator/index").creator; +const globalPath = require("global-modules"); /* * @function processPromise * @@ -15,7 +17,7 @@ const globalPath = require('global-modules'); function processPromise(child) { return new Promise(function(resolve, reject) { //eslint-disable-line - if(child.status !== 0) { + if (child.status !== 0) { reject(); } else { resolve(); @@ -35,12 +37,14 @@ function processPromise(child) { function spawnChild(pkg) { const pkgPath = path.resolve(globalPath, pkg); let installType; - if(fs.existsSync(pkgPath)) { - installType = 'update'; + if (fs.existsSync(pkgPath)) { + installType = "update"; } else { - installType = 'install'; + installType = "install"; } - return spawn.sync('npm', [installType, '-g', pkg], { stdio: 'inherit'}); + return spawn.sync("npm", [installType, "-g", pkg], { + stdio: "inherit" + }); } /* @@ -58,24 +62,28 @@ module.exports = function resolvePackages(pkg) { let packageLocations = []; - pkg.forEach( (addon) => { - processPromise(spawnChild(addon)).then( () => { - try { - packageLocations.push(path.resolve(globalPath, addon)); - } catch(err) { - console.log('Package wasn\'t validated correctly..'); - console.log('Submit an issue for', pkg, 'if this persists'); - console.log('\nReason: \n'); + pkg.forEach(addon => { + processPromise(spawnChild(addon)) + .then(() => { + try { + packageLocations.push(path.resolve(globalPath, addon)); + } catch (err) { + console.log("Package wasn't validated correctly.."); + console.log("Submit an issue for", pkg, "if this persists"); + console.log("\nReason: \n"); + console.error(chalk.bold.red(err)); + process.exitCode = 1; + } + }) + .catch(err => { + console.log("Package Coudln't be installed, aborting.."); + console.log("\nReason: \n"); console.error(chalk.bold.red(err)); process.exitCode = 1; - } - }).catch(err => { - console.log('Package Coudln\'t be installed, aborting..'); - console.log('\nReason: \n'); - console.error(chalk.bold.red(err)); - process.exitCode = 1; - }).then( () => { - if(packageLocations.length === pkg.length) return creator(packageLocations); - }); + }) + .then(() => { + if (packageLocations.length === pkg.length) + return creator(packageLocations); + }); }); }; diff --git a/lib/utils/resolve-packages.spec.js b/lib/utils/resolve-packages.spec.js index 8ee4d39bd50..6b5b1392770 100644 --- a/lib/utils/resolve-packages.spec.js +++ b/lib/utils/resolve-packages.spec.js @@ -1,33 +1,34 @@ -'use strict'; +"use strict"; -const getLoc = require('../../__mocks__/inquirer/resolve.mock'); +const getLoc = require("../../__mocks__/inquirer/resolve.mock"); -describe('resolve-packages', () => { +describe("resolve-packages", () => { let moduleLoc; afterEach(() => { moduleLoc = null; }); - it('should resolve a location of a published module', () => { - moduleLoc = getLoc(['webpack-addons-ylvis']); - expect(moduleLoc).toEqual(['../../node_modules/webpack-addons-ylvis']); + it("should resolve a location of a published module", () => { + moduleLoc = getLoc(["webpack-addons-ylvis"]); + expect(moduleLoc).toEqual(["../../node_modules/webpack-addons-ylvis"]); }); - it('should be empty if argument is blank', () => { + it("should be empty if argument is blank", () => { // normally caught before getting resolved - moduleLoc = getLoc([' ']); - expect(moduleLoc).toEqual(['../../node_modules/ ']); + moduleLoc = getLoc([" "]); + expect(moduleLoc).toEqual(["../../node_modules/ "]); }); - it('should resolve multiple locations of published modules', () => { + it("should resolve multiple locations of published modules", () => { /* we're testing multiple paths here. At Github this up for discussion, because if * we validate each package on each run, we can catch and build the questions in init gradually * while we get one filepath at the time. If not, this is a workaround. */ - moduleLoc = getLoc(['webpack-addons-ylvis', 'webpack-addons-noop']); - expect(moduleLoc).toEqual( - ['../../node_modules/webpack-addons-ylvis', '../../node_modules/webpack-addons-noop'] - ); + moduleLoc = getLoc(["webpack-addons-ylvis", "webpack-addons-noop"]); + expect(moduleLoc).toEqual([ + "../../node_modules/webpack-addons-ylvis", + "../../node_modules/webpack-addons-noop" + ]); }); }); diff --git a/lib/utils/validateSchema.js b/lib/utils/validateSchema.js index c6360de2367..2975d93cf19 100644 --- a/lib/utils/validateSchema.js +++ b/lib/utils/validateSchema.js @@ -2,7 +2,7 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Gajus Kuizinas @gajus */ -'use strict'; +"use strict"; /* eslint-disable */ const Ajv = require('ajv'); @@ -15,12 +15,12 @@ require('ajv-keywords')(ajv, ['instanceof']); /* eslint-enable */ function validateSchema(schema, options) { - if(Array.isArray(options)) { - const errors = options.map((options) => validateObject(schema, options)); + if (Array.isArray(options)) { + const errors = options.map(options => validateObject(schema, options)); errors.forEach((list, idx) => { list.forEach(function applyPrefix(err) { err.dataPath = `[${idx}]${err.dataPath}`; - if(err.children) { + if (err.children) { err.children.forEach(applyPrefix); } }); @@ -41,12 +41,12 @@ function validateObject(schema, options) { function filterErrors(errors) { let newErrors = []; - errors.forEach((err) => { + errors.forEach(err => { const dataPath = err.dataPath; let children = []; - newErrors = newErrors.filter((oldError) => { - if(oldError.dataPath.includes(dataPath)) { - if(oldError.children) { + newErrors = newErrors.filter(oldError => { + if (oldError.dataPath.includes(dataPath)) { + if (oldError.children) { children = children.concat(oldError.children.slice(0)); } oldError.children = undefined; @@ -55,7 +55,7 @@ function filterErrors(errors) { } return true; }); - if(children.length) { + if (children.length) { err.children = children; } newErrors.push(err); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000000..4716022286a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8394 @@ +{ + "name": "webpack-cli", + "version": "1.3.3", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abab": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz", + "integrity": "sha1-uB3l9ydOxOdW15fNg08wNkJyTl0=", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "requires": { + "acorn": "4.0.13" + } + }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", + "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", + "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=" + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "alter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz", + "integrity": "sha1-x1iICGF1cgNKrmJICvJrHU0cs80=", + "requires": { + "stable": "0.1.6" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11" + } + }, + "app-root-path": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.0.1.tgz", + "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=", + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.0.3" + } + }, + "arr-flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", + "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "asn1.js": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "ast-traverse": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz", + "integrity": "sha1-ac8rg4bxnc2hux4F1o/jWdiJfeY=" + }, + "ast-types": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.2.tgz", + "integrity": "sha1-LMGZedFcZVEIv1ZTI7jn7jh1H2s=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-cli": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz", + "integrity": "sha1-IHzXBbumFImy6kG1MSNBz2rKIoM=", + "dev": true, + "requires": { + "babel-core": "6.25.0", + "babel-polyfill": "6.23.0", + "babel-register": "6.24.1", + "babel-runtime": "6.23.0", + "chokidar": "1.7.0", + "commander": "2.10.0", + "convert-source-map": "1.5.0", + "fs-readdir-recursive": "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.6", + "v8flags": "2.1.1" + }, + "dependencies": { + "fs-readdir-recursive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz", + "integrity": "sha1-jNF0XItPiinIyuw5JHaSG6GV9WA=", + "dev": true + } + } + }, + "babel-code-frame": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "babel-core": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz", + "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=", + "requires": { + "babel-code-frame": "6.22.0", + "babel-generator": "6.25.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.17.4", + "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.6" + } + }, + "babel-eslint": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz", + "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", + "dev": true, + "requires": { + "babel-code-frame": "6.22.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.17.4" + } + }, + "babel-generator": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz", + "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=", + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.6", + "trim-right": "1.0.1" + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "requires": { + "babel-runtime": "6.23.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "requires": { + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.23.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-define-map": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz", + "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0", + "lodash": "4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "requires": { + "babel-runtime": "6.23.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "requires": { + "babel-helper-bindify-decorators": "6.24.1", + "babel-runtime": "6.23.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz", + "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0", + "lodash": "4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "requires": { + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-20.0.3.tgz", + "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", + "dev": true, + "requires": { + "babel-core": "6.25.0", + "babel-plugin-istanbul": "4.1.4", + "babel-preset-jest": "20.0.3" + }, + "dependencies": { + "babel-plugin-jest-hoist": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", + "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", + "dev": true + }, + "babel-preset-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", + "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "20.0.3" + } + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-constant-folding": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-constant-folding/-/babel-plugin-constant-folding-1.0.1.tgz", + "integrity": "sha1-g2HTZMmORJw2kr26Ue/whEKQqo4=" + }, + "babel-plugin-dead-code-elimination": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz", + "integrity": "sha1-X3xFEnTc18zNv7s+C4XdKBIfD2U=" + }, + "babel-plugin-eval": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz", + "integrity": "sha1-ovrtJc5r5preS/7CY/cBaRlZUNo=" + }, + "babel-plugin-inline-environment-variables": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-inline-environment-variables/-/babel-plugin-inline-environment-variables-1.0.1.tgz", + "integrity": "sha1-H1jOkSB61qgmqL9kX6/mj/X+P/4=" + }, + "babel-plugin-istanbul": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz", + "integrity": "sha1-GN3oS/POMp/d8/QQP66SFFbY5Yc=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "istanbul-lib-instrument": "1.7.3", + "test-exclude": "4.1.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, + "babel-plugin-jscript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz", + "integrity": "sha1-jzQsOCduh6R9X6CovT1etsytj8w=" + }, + "babel-plugin-member-expression-literals": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-member-expression-literals/-/babel-plugin-member-expression-literals-1.0.1.tgz", + "integrity": "sha1-zF7bD6qNyScXDnTW0cAkQAIWJNM=" + }, + "babel-plugin-property-literals": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-property-literals/-/babel-plugin-property-literals-1.0.1.tgz", + "integrity": "sha1-AlIwGQAZKYCxwRjv6kjOk6q4MzY=" + }, + "babel-plugin-proto-to-assign": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-proto-to-assign/-/babel-plugin-proto-to-assign-1.0.4.tgz", + "integrity": "sha1-xJ56/QL1d7xNoF6i3wAiUM980SM=", + "requires": { + "lodash": "3.10.1" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + } + } + }, + "babel-plugin-react-constant-elements": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-react-constant-elements/-/babel-plugin-react-constant-elements-1.0.3.tgz", + "integrity": "sha1-lGc26DeEKcvDSdz/YvUcFDs041o=" + }, + "babel-plugin-react-display-name": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-react-display-name/-/babel-plugin-react-display-name-1.0.3.tgz", + "integrity": "sha1-dU/jiSboQkpOexWrbqYTne4FFPw=" + }, + "babel-plugin-remove-console": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-console/-/babel-plugin-remove-console-1.0.1.tgz", + "integrity": "sha1-2PJFVsOgUAXUKqqv0neH9T/wE6c=" + }, + "babel-plugin-remove-debugger": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-debugger/-/babel-plugin-remove-debugger-1.0.1.tgz", + "integrity": "sha1-/S6jzWGkKK0fO5yJiC/0KT6MFMc=" + }, + "babel-plugin-runtime": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/babel-plugin-runtime/-/babel-plugin-runtime-1.0.7.tgz", + "integrity": "sha1-v3x9lm3Vbs1cF/ocslPJrLflSq8=" + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=" + }, + "babel-plugin-syntax-class-constructor-call": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", + "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=" + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=" + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=" + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=" + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" + }, + "babel-plugin-syntax-export-extensions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", + "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=" + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=" + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=" + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-generators": "6.13.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-class-constructor-call": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", + "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", + "requires": { + "babel-plugin-syntax-class-constructor-call": "6.18.0", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "requires": { + "babel-helper-explode-class": "6.24.1", + "babel-plugin-syntax-decorators": "6.13.0", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz", + "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=", + "requires": { + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "lodash": "4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "requires": { + "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.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "requires": { + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz", + "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=", + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "requires": { + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "requires": { + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.23.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "requires": { + "babel-helper-regex": "6.24.1", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "requires": { + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "requires": { + "babel-helper-regex": "6.24.1", + "babel-runtime": "6.23.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-export-extensions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", + "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", + "requires": { + "babel-plugin-syntax-export-extensions": "6.13.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "requires": { + "babel-plugin-syntax-flow": "6.18.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz", + "integrity": "sha1-h11ryb52HFiirj/u5dxIldjH+SE=", + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-runtime": "6.23.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz", + "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=", + "requires": { + "regenerator-transform": "0.9.11" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0" + } + }, + "babel-plugin-undeclared-variables-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-undeclared-variables-check/-/babel-plugin-undeclared-variables-check-1.0.2.tgz", + "integrity": "sha1-XPGqU52BP/ZOmWQSkK9iCWX2Xe4=", + "requires": { + "leven": "1.0.2" + } + }, + "babel-plugin-undefined-to-void": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz", + "integrity": "sha1-f1eO+LeN+uYAM4XYQXph7aBuL4E=" + }, + "babel-polyfill": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", + "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", + "dev": true, + "requires": { + "babel-runtime": "6.23.0", + "core-js": "2.4.1", + "regenerator-runtime": "0.10.5" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "requires": { + "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.24.1", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.24.1" + } + }, + "babel-preset-stage-1": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", + "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "requires": { + "babel-plugin-transform-class-constructor-call": "6.24.1", + "babel-plugin-transform-export-extensions": "6.22.0", + "babel-preset-stage-2": "6.24.1" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "requires": { + "babel-plugin-syntax-dynamic-import": "6.18.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-decorators": "6.24.1", + "babel-preset-stage-3": "6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "requires": { + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-generator-functions": "6.24.1", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-object-rest-spread": "6.23.0" + } + }, + "babel-register": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz", + "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=", + "requires": { + "babel-core": "6.25.0", + "babel-runtime": "6.23.0", + "core-js": "2.4.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.15" + } + }, + "babel-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", + "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", + "requires": { + "core-js": "2.4.1", + "regenerator-runtime": "0.10.5" + } + }, + "babel-template": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", + "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", + "requires": { + "babel-runtime": "6.23.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.17.4", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", + "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", + "requires": { + "babel-code-frame": "6.22.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.23.0", + "babel-types": "6.25.0", + "babylon": "6.17.4", + "debug": "2.6.8", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", + "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", + "requires": { + "babel-runtime": "6.23.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.17.4", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz", + "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "big.js": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz", + "integrity": "sha1-TK2iGTZS6zyp7I5VyQFWacmAaXg=" + }, + "binary-extensions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", + "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=" + }, + "binaryextensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.0.0.tgz", + "integrity": "sha1-5ZfRp6ajVYotHHJBoWyZll5qpA8=" + }, + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "breakable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz", + "integrity": "sha1-eEp5eRWjjq0nutRWtVcstLuqeME=" + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browserify-aes": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.8.tgz", + "integrity": "sha512-WYCMOT/PtGTlpOKFht0YJFYcPy6pLCR98CtWfzK13zoynLlBMvAdEMSRGmgnJCw2M2j/5qxBkinZQFobieM8dQ==", + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "requires": { + "browserify-aes": "1.0.8", + "browserify-des": "1.0.0", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.5" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "requires": { + "pako": "0.2.9" + } + }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8", + "isarray": "1.0.0" + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", + "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", + "requires": { + "ansi-styles": "3.1.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", + "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", + "requires": { + "color-convert": "1.9.0" + } + } + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.0", + "async-each": "1.0.1", + "fsevents": "1.1.2", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "ci-info": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.0.0.tgz", + "integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-spinners": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=" + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + } + } + }, + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "requires": { + "slice-ansi": "0.0.4", + "string-width": "1.0.2" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "cloneable-readable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "requires": { + "inherits": "2.0.3", + "process-nextick-args": "1.0.7", + "through2": "2.0.3" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "requires": { + "color-name": "1.1.2" + } + }, + "color-name": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.2.tgz", + "integrity": "sha1-XIq3K2S9IhXWF66VWeuxSEdc+Y0=" + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.10.0.tgz", + "integrity": "sha512-q/r9trjmuikWDRJNTBHAVnWhuU6w+z80KgBq7j9YDclik5E7X4xi0KnlZBNFA1zOQ+SH/vHMWd2mC9QTOz7GpA==", + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "commoner": { + "version": "0.10.8", + "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", + "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", + "requires": { + "commander": "2.10.0", + "detective": "4.5.0", + "glob": "5.0.15", + "graceful-fs": "4.1.11", + "iconv-lite": "0.4.18", + "mkdirp": "0.5.1", + "private": "0.1.7", + "q": "1.5.0", + "recast": "git://github.com/kalcifer/recast.git#b66a17eee9e072338744b947a406d3f134bc0b0d" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "content-type-parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-type-parser/-/content-type-parser-1.0.1.tgz", + "integrity": "sha1-w+VpiMU8ZRJ/tG1AMqOpACRv3JQ=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" + }, + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cosmiconfig": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-1.1.0.tgz", + "integrity": "sha1-DeoPmATv37kp+7GxiOJVU+oFPTc=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "js-yaml": "3.8.4", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "pinkie-promise": "2.0.1", + "require-from-string": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.8" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.8" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.2.14" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "crypto-browserify": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz", + "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", + "requires": { + "browserify-cipher": "1.0.0", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.0", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "diffie-hellman": "5.0.2", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.0", + "randombytes": "2.0.5" + } + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true, + "requires": { + "cssom": "0.3.2" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "0.10.30" + } + }, + "dargs": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", + "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "date-fns": { + "version": "1.28.5", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.28.5.tgz", + "integrity": "sha1-JXz8RdMi30XvVlhmWWfuhBzXP68=" + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "dateformat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", + "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "1.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "defs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/defs/-/defs-1.1.1.tgz", + "integrity": "sha1-siYJ8sehG6ej2xFoBcE5scr/qdI=", + "requires": { + "alter": "0.2.0", + "ast-traverse": "0.1.1", + "breakable": "1.0.0", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "simple-fmt": "0.1.0", + "simple-is": "0.2.0", + "stringmap": "0.2.2", + "stringset": "0.2.1", + "tryor": "0.1.2", + "yargs": "3.27.0" + }, + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" + }, + "yargs": { + "version": "3.27.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz", + "integrity": "sha1-ISBUaTFuk5Ex1Z8toMbX+YIh6kA=", + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.2.8" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "detect-conflict": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/detect-conflict/-/detect-conflict-1.0.1.tgz", + "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "2.0.1" + } + }, + "detective": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", + "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", + "requires": { + "acorn": "4.0.13", + "defined": "1.0.0" + } + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==" + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.0", + "randombytes": "2.0.5" + } + }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "editions": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.3.tgz", + "integrity": "sha1-CQcQG92iD6w8vjNMJ8vQaI3Jmls=" + }, + "ejs": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", + "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "enhanced-resolve": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz", + "integrity": "sha512-2qbxE7ek3YxPJ1ML6V+satHkzHpJQKWkRHmRx6mfAoW59yP8YH8BFplbegSP+u2hBd6B6KCOpvJQ3dZAP+hkpg==", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "object-assign": "4.1.1", + "tapable": "0.2.6" + } + }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "requires": { + "prr": "0.0.0" + } + }, + "error": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", + "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "requires": { + "string-template": "0.2.1", + "xtend": "4.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.30", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz", + "integrity": "sha1-cUGhaDZpfbq/qq7uQUlc4p9SyTk=", + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.6.1.tgz", + "integrity": "sha1-3cf8f9cL+TIFsLNEm7FqHp59SVA=", + "dev": true, + "requires": { + "ajv": "5.2.2", + "babel-code-frame": "6.22.0", + "chalk": "2.1.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "2.6.8", + "doctrine": "2.0.0", + "eslint-scope": "3.7.1", + "espree": "3.5.0", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.3", + "imurmurhash": "0.1.4", + "inquirer": "3.2.3", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "4.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.3.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.1", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.1.0.tgz", + "integrity": "sha512-MzAAnEfNOl6g871VgjKswHkyG+bqsXX2//SWXwNkyREvWAPUoU8X6ZvcrambHEGecUIbE0pAVPzzfKU/p9H5lg==", + "dev": true, + "requires": { + "ignore": "3.3.3", + "minimatch": "3.0.4", + "resolve": "1.3.3", + "semver": "5.3.0" + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "espree": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.0.tgz", + "integrity": "sha1-mDWGJb3QVYYeon4oZ+pyn69GPY0=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "acorn-jsx": "3.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", + "dev": true + } + } + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "exec-sh": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.0.tgz", + "integrity": "sha1-FPdd4/INKG75MwmbLOUKkDWc7xA=", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "1.0.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "external-editor": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", + "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", + "requires": { + "iconv-lite": "0.4.18", + "jschardet": "1.5.1", + "tmp": "0.0.31" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "2.0.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.2.2", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "requires": { + "readable-stream": "2.3.3" + } + }, + "flat-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", + "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "flow-parser": { + "version": "0.49.1", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.49.1.tgz", + "integrity": "sha1-amqTLNagyPUXSnYSR1tLcWT18NA=" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs-readdir-recursive": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz", + "integrity": "sha1-MVtPuMHKW4xH3v7zGdBz2tNWgFk=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "optional": true, + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.36" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "optional": true + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "optional": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "optional": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "optional": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "optional": true + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "optional": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "optional": true, + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", + "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==", + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "optional": true + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "optional": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "optional": true + }, + "rc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "optional": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "optional": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=", + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "optional": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", + "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", + "optional": true + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, + "get-own-enumerable-property-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-1.0.1.tgz", + "integrity": "sha1-8dTjrRQC4DmJjlbR6bmqkkwm5IQ=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "gh-got": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-6.0.0.tgz", + "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", + "requires": { + "got": "7.1.0", + "is-plain-obj": "1.1.0" + } + }, + "github-username": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/github-username/-/github-username-4.1.0.tgz", + "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", + "requires": { + "gh-got": "6.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "1.0.1", + "is-windows": "1.0.1", + "resolve-dir": "1.0.0" + } + }, + "global-prefix": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.1.tgz", + "integrity": "sha512-iPchqvFtW8olnZW+24RkCFpldmNC+dFTBlmsnIsWDGAL3U8K1k7p7EKHbKWWLGMk3vXJ+kz+ZAuD9sBkTGlOzg==", + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "1.0.1", + "resolve-dir": "1.0.0", + "which": "1.2.14" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-plain-obj": "1.1.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "1.2.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "1.0.0", + "url-to-options": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + }, + "grouped-queue": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz", + "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", + "requires": { + "lodash": "4.17.4" + } + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=" + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.3.0.tgz", + "integrity": "sha512-kLtS+N9qwz+Buc6TUfcW5iGb59hLLr5qfxTACi/0uGpH1u5NMNWsdU57KoYRBywvPykeRmu5qfB5x0chpDSWlg==" + }, + "has-to-string-tag-x": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.3.0.tgz", + "integrity": "sha512-Fu9Nwv8/VNJMvKjkldzXHO+yeX+TCelwUQ9dGW2LrAfHfHi6zVqQt+Qjilf0qGHvpl6Fap6o8aDhWhMt5hY/1g==", + "requires": { + "has-symbol-support-x": "1.3.0" + } + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "html-encoding-sniffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz", + "integrity": "sha1-eb96eF6klf5mFl5zQVPzY/9UN9o=", + "dev": true, + "requires": { + "whatwg-encoding": "1.0.1" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.1" + } + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=" + }, + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", + "dev": true, + "requires": { + "is-ci": "1.0.10", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", + "dev": true + } + } + }, + "iconv-lite": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "ignore": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz", + "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "2.0.1" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "inquirer": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.2.3.tgz", + "integrity": "sha512-Bc3KbimpDTOeQdDj18Ir/rlsGuhBSSNqdOnxaAuKhpkdnMMuKsEGbZD2v5KFF9oso2OU+BPh7+/u5obmFDRmWw==", + "requires": { + "ansi-escapes": "2.0.0", + "chalk": "2.0.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.0.4", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-escapes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", + "integrity": "sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=" + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "1.1.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.8.0" + } + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.0.0" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-integer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", + "integrity": "sha1-a96Bqs3feLZZtmKdYpytxRqIbVw=", + "requires": { + "is-finite": "1.0.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true, + "requires": { + "tryit": "1.0.3" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "requires": { + "scoped-regex": "1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-windows": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz", + "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-api": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.10.tgz", + "integrity": "sha1-8n5ecSXI3hP2qAZhr3j1EuVDmys=", + "dev": true, + "requires": { + "async": "2.5.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.0.7", + "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-report": "1.1.1", + "istanbul-lib-source-maps": "1.2.1", + "istanbul-reports": "1.1.1", + "js-yaml": "3.8.4", + "mkdirp": "0.5.1", + "once": "1.4.0" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "dev": true, + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz", + "integrity": "sha512-3U2HB9y1ZV9UmFlE12Fx+nPtFqIymzrqCksrXujm3NVbAZIJg/RfYgO1XiIa0mbmxTjWpVEVlkIZJ25xVIAfkQ==", + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz", + "integrity": "sha1-klsjkWPqvdaMxASPUsL6T4mez6c=", + "dev": true, + "requires": { + "babel-generator": "6.25.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.17.4", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", + "integrity": "sha512-tvF+YmCmH4thnez6JFX06ujIA19WPa9YUiwjc1uALF2cv5dmE3It8b5I8Ob7FHJ70H9Y5yF+TDkVa/mcADuw1Q==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz", + "integrity": "sha512-mukVvSXCn9JQvdJl8wP/iPhqig0MRtuWuD4ZNKo6vB2Ik//AmhAKe3QnPN02dmkRe3lTudFk3rzoHhwU4hb94w==", + "dev": true, + "requires": { + "debug": "2.6.8", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "source-map": "0.5.6" + }, + "dependencies": { + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true, + "requires": { + "glob": "7.1.2" + } + } + } + }, + "istanbul-reports": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.1.tgz", + "integrity": "sha512-P8G873A0kW24XRlxHVGhMJBhQ8gWAec+dae7ZxOBzxT4w+a9ATSPvRVK3LB1RAJ9S8bg2tOyWHAGW40Zd2dKfw==", + "dev": true, + "requires": { + "handlebars": "4.0.10" + } + }, + "istextorbinary": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.1.0.tgz", + "integrity": "sha1-2+0qb1G+L3R1to+JRlgRFBt1iHQ=", + "requires": { + "binaryextensions": "2.0.0", + "editions": "1.3.3", + "textextensions": "2.1.0" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "1.3.0", + "is-object": "1.0.1" + } + }, + "jest": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest/-/jest-20.0.4.tgz", + "integrity": "sha1-PdJgwpidba1nix6cxNkZRPbWAqw=", + "dev": true, + "requires": { + "jest-cli": "20.0.4" + } + }, + "jest-cli": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-20.0.4.tgz", + "integrity": "sha1-5TKxnYiuW8bEF+iwWTpv6VSx3JM=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "callsites": "2.0.0", + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "is-ci": "1.0.10", + "istanbul-api": "1.1.10", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-source-maps": "1.2.1", + "jest-changed-files": "20.0.3", + "jest-config": "20.0.4", + "jest-docblock": "20.0.3", + "jest-environment-jsdom": "20.0.3", + "jest-haste-map": "20.0.4", + "jest-jasmine2": "20.0.4", + "jest-message-util": "20.0.3", + "jest-regex-util": "20.0.3", + "jest-resolve-dependencies": "20.0.3", + "jest-runtime": "20.0.4", + "jest-snapshot": "20.0.3", + "jest-util": "20.0.3", + "micromatch": "2.3.11", + "node-notifier": "5.1.2", + "pify": "2.3.0", + "slash": "1.0.0", + "string-length": "1.0.1", + "throat": "3.2.0", + "which": "1.2.14", + "worker-farm": "1.4.1", + "yargs": "7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", + "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "babel-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-20.0.3.tgz", + "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", + "dev": true, + "requires": { + "babel-core": "6.25.0", + "babel-plugin-istanbul": "4.1.4", + "babel-preset-jest": "20.0.3" + } + }, + "babel-plugin-jest-hoist": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", + "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", + "dev": true + }, + "babel-preset-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", + "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "20.0.3" + } + }, + "bser": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "jest-changed-files": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-20.0.3.tgz", + "integrity": "sha1-k5TVzGXEOEBhSb7xv01Sto4D4/g=", + "dev": true + }, + "jest-config": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-20.0.4.tgz", + "integrity": "sha1-43kwqyIXyRNgXv8T5712PsSPruo=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "glob": "7.1.2", + "jest-environment-jsdom": "20.0.3", + "jest-environment-node": "20.0.3", + "jest-jasmine2": "20.0.4", + "jest-matcher-utils": "20.0.3", + "jest-regex-util": "20.0.3", + "jest-resolve": "20.0.4", + "jest-validate": "20.0.3", + "pretty-format": "20.0.3" + } + }, + "jest-diff": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-20.0.3.tgz", + "integrity": "sha1-gfKI/Z5nXw+yPHXxwrGURf5YZhc=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "diff": "3.3.1", + "jest-matcher-utils": "20.0.3", + "pretty-format": "20.0.3" + } + }, + "jest-environment-jsdom": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz", + "integrity": "sha1-BIqKwS7iJfcZBBdxODS7mZeH3pk=", + "dev": true, + "requires": { + "jest-mock": "20.0.3", + "jest-util": "20.0.3", + "jsdom": "9.12.0" + } + }, + "jest-environment-node": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-20.0.3.tgz", + "integrity": "sha1-1Ii8RhKvLCRumG6K52caCZFj1AM=", + "dev": true, + "requires": { + "jest-mock": "20.0.3", + "jest-util": "20.0.3" + } + }, + "jest-haste-map": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-20.0.4.tgz", + "integrity": "sha1-ZT61XIic48Ah97lGk/IKQVm63wM=", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "20.0.3", + "micromatch": "2.3.11", + "sane": "1.6.0", + "worker-farm": "1.4.1" + } + }, + "jest-jasmine2": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz", + "integrity": "sha1-/MWxQReA2RHQQpAu8YWehS5g1eE=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-matchers": "20.0.3", + "jest-message-util": "20.0.3", + "jest-snapshot": "20.0.3", + "once": "1.4.0", + "p-map": "1.1.1" + } + }, + "jest-matcher-utils": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", + "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "pretty-format": "20.0.3" + } + }, + "jest-matchers": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matchers/-/jest-matchers-20.0.3.tgz", + "integrity": "sha1-ymnbHDLbWm9wf6XgQBq7VXAN/WA=", + "dev": true, + "requires": { + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-message-util": "20.0.3", + "jest-regex-util": "20.0.3" + } + }, + "jest-message-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-20.0.3.tgz", + "integrity": "sha1-auwoRDBvyw5udNV5bBAG2W/dgxw=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "micromatch": "2.3.11", + "slash": "1.0.0" + } + }, + "jest-mock": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-20.0.3.tgz", + "integrity": "sha1-i8Bw6QQUqhVcEajWTIaaDVxx2lk=", + "dev": true + }, + "jest-regex-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-20.0.3.tgz", + "integrity": "sha1-hburXRM+RGJbGfr4xqpRItCF12I=", + "dev": true + }, + "jest-resolve": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-20.0.4.tgz", + "integrity": "sha1-lEiz6La6/BVHlETGSZBFt//ll6U=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "is-builtin-module": "1.0.0", + "resolve": "1.3.3" + } + }, + "jest-resolve-dependencies": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz", + "integrity": "sha1-bhSntxevDyyzZnxUneQK8Bexcjo=", + "dev": true, + "requires": { + "jest-regex-util": "20.0.3" + } + }, + "jest-runtime": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-20.0.4.tgz", + "integrity": "sha1-osgCIZxCA/dU3xQE5JAYYWnRJNg=", + "dev": true, + "requires": { + "babel-core": "6.25.0", + "babel-jest": "20.0.3", + "babel-plugin-istanbul": "4.1.4", + "chalk": "1.1.3", + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "jest-config": "20.0.4", + "jest-haste-map": "20.0.4", + "jest-regex-util": "20.0.3", + "jest-resolve": "20.0.4", + "jest-util": "20.0.3", + "json-stable-stringify": "1.0.1", + "micromatch": "2.3.11", + "strip-bom": "3.0.0", + "yargs": "7.1.0" + } + }, + "jest-snapshot": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-20.0.3.tgz", + "integrity": "sha1-W4R+GtsaTZCFKn+fElCG4YfHZWY=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-util": "20.0.3", + "natural-compare": "1.4.0", + "pretty-format": "20.0.3" + } + }, + "jest-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-20.0.3.tgz", + "integrity": "sha1-DAf32A2C9OWmfG+LnD/n9lz9Mq0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-message-util": "20.0.3", + "jest-mock": "20.0.3", + "jest-validate": "20.0.3", + "leven": "2.1.0", + "mkdirp": "0.5.1" + } + }, + "jest-validate": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-20.0.3.tgz", + "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-matcher-utils": "20.0.3", + "leven": "2.1.0", + "pretty-format": "20.0.3" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "pretty-format": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", + "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1", + "ansi-styles": "3.1.0" + } + }, + "sane": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-1.6.0.tgz", + "integrity": "sha1-lhDEUjB6E10pwf3+JUcDQYDEZ3U=", + "dev": true, + "requires": { + "anymatch": "1.3.0", + "exec-sh": "0.2.0", + "fb-watchman": "1.9.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.10.0" + }, + "dependencies": { + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true, + "requires": { + "bser": "1.0.2" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "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-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "3.0.0" + } + } + } + }, + "jest-docblock": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-20.0.3.tgz", + "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=", + "dev": true + }, + "jest-matcher-utils": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", + "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "pretty-format": "20.0.3" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "jest-validate": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-20.0.3.tgz", + "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-matcher-utils": "20.0.3", + "leven": "2.1.0", + "pretty-format": "20.0.3" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", + "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "3.1.3" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jschardet": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", + "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==" + }, + "jscodeshift": { + "version": "0.3.32", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.3.32.tgz", + "integrity": "sha1-3s5etgLxY0DY2VTH+WrJB8UC6rs=", + "requires": { + "async": "1.5.2", + "babel-core": "5.8.38", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-preset-es2015": "6.24.1", + "babel-preset-stage-1": "6.24.1", + "babel-register": "6.24.1", + "babylon": "6.17.4", + "colors": "1.1.2", + "flow-parser": "0.49.1", + "lodash": "4.17.4", + "micromatch": "2.3.11", + "node-dir": "0.1.8", + "nomnom": "1.8.1", + "recast": "0.12.6", + "temp": "0.8.3", + "write-file-atomic": "1.3.4" + }, + "dependencies": { + "ast-types": { + "version": "0.9.11", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.11.tgz", + "integrity": "sha1-NxF3u1kjL/XOqh0J7lytcFsaWqk=" + }, + "babel-core": { + "version": "5.8.38", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.38.tgz", + "integrity": "sha1-H8ruedfmG3ULALjlT238nQr4ZVg=", + "requires": { + "babel-plugin-constant-folding": "1.0.1", + "babel-plugin-dead-code-elimination": "1.0.2", + "babel-plugin-eval": "1.0.1", + "babel-plugin-inline-environment-variables": "1.0.1", + "babel-plugin-jscript": "1.0.4", + "babel-plugin-member-expression-literals": "1.0.1", + "babel-plugin-property-literals": "1.0.1", + "babel-plugin-proto-to-assign": "1.0.4", + "babel-plugin-react-constant-elements": "1.0.3", + "babel-plugin-react-display-name": "1.0.3", + "babel-plugin-remove-console": "1.0.1", + "babel-plugin-remove-debugger": "1.0.1", + "babel-plugin-runtime": "1.0.7", + "babel-plugin-undeclared-variables-check": "1.0.2", + "babel-plugin-undefined-to-void": "1.1.6", + "babylon": "5.8.38", + "bluebird": "2.11.0", + "chalk": "1.1.3", + "convert-source-map": "1.5.0", + "core-js": "1.2.7", + "debug": "2.6.8", + "detect-indent": "3.0.1", + "esutils": "2.0.2", + "fs-readdir-recursive": "0.1.2", + "globals": "6.4.1", + "home-or-tmp": "1.0.0", + "is-integer": "1.0.7", + "js-tokens": "1.0.1", + "json5": "0.4.0", + "lodash": "3.10.1", + "minimatch": "2.0.10", + "output-file-sync": "1.1.2", + "path-exists": "1.0.0", + "path-is-absolute": "1.0.1", + "private": "0.1.7", + "regenerator": "0.8.40", + "regexpu": "1.3.0", + "repeating": "1.1.3", + "resolve": "1.3.3", + "shebang-regex": "1.0.0", + "slash": "1.0.0", + "source-map": "0.5.6", + "source-map-support": "0.2.10", + "to-fast-properties": "1.0.3", + "trim-right": "1.0.1", + "try-resolve": "1.0.1" + }, + "dependencies": { + "babylon": { + "version": "5.8.38", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz", + "integrity": "sha1-7JsSCxG/bM1Bc6GL8hfmC3mFn/0=" + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + } + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "detect-indent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz", + "integrity": "sha1-ncXl3bzu+DJXZLlFGwK8bVQIT3U=", + "requires": { + "get-stdin": "4.0.1", + "minimist": "1.2.0", + "repeating": "1.1.3" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + }, + "globals": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-6.4.1.tgz", + "integrity": "sha1-hJgDKzttHMge68X3lpDY/in6v08=" + }, + "home-or-tmp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz", + "integrity": "sha1-S58eQIAMPlDGwn94FnavzOcfOYU=", + "requires": { + "os-tmpdir": "1.0.2", + "user-home": "1.1.1" + } + }, + "js-tokens": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz", + "integrity": "sha1-zENaXIuUrRWst5gxQPyAGCyJrq4=" + }, + "json5": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", + "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=" + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "recast": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.6.tgz", + "integrity": "sha1-Sw+4L+sdELO9YtNJQ0Jtmz7TDUw=", + "requires": { + "ast-types": "0.9.11", + "core-js": "2.4.1", + "esprima": "4.0.0", + "private": "0.1.7", + "source-map": "0.5.6" + }, + "dependencies": { + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + } + } + }, + "repeating": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", + "integrity": "sha1-PUEUIYh3U3SU+X93+Xhfq4EPpKw=", + "requires": { + "is-finite": "1.0.2" + } + }, + "source-map-support": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz", + "integrity": "sha1-6lo5AKHByyUJagrozFwrSxDe09w=", + "requires": { + "source-map": "0.1.32" + }, + "dependencies": { + "source-map": { + "version": "0.1.32", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", + "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "jsdom": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-9.12.0.tgz", + "integrity": "sha1-6MVG//ywbADUgzyoRBD+1/igl9Q=", + "dev": true, + "requires": { + "abab": "1.0.3", + "acorn": "4.0.13", + "acorn-globals": "3.1.0", + "array-equal": "1.0.0", + "content-type-parser": "1.0.1", + "cssom": "0.3.2", + "cssstyle": "0.2.37", + "escodegen": "1.8.1", + "html-encoding-sniffer": "1.0.1", + "nwmatcher": "1.4.1", + "parse5": "1.5.1", + "request": "2.81.0", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.3.2", + "webidl-conversions": "4.0.1", + "whatwg-encoding": "1.0.1", + "whatwg-url": "4.8.0", + "xml-name-validator": "2.0.1" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsprim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "leven": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/leven/-/leven-1.0.2.tgz", + "integrity": "sha1-kUS27ryl8dBoAWnxpncNzqYLdcM=" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lint-staged": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-4.1.3.tgz", + "integrity": "sha512-nOV/CUs10lQz7STNkNs+X3lQahaMfWj31OoTPQxVVg17pqDbBi8chV564nk/GdTgHNAF7RyRFt0ZiA2cTjgppw==", + "dev": true, + "requires": { + "app-root-path": "2.0.1", + "chalk": "2.1.0", + "cosmiconfig": "1.1.0", + "execa": "0.8.0", + "is-glob": "4.0.0", + "jest-validate": "20.0.3", + "listr": "0.12.0", + "lodash": "4.17.4", + "log-symbols": "2.0.0", + "minimatch": "3.0.4", + "npm-which": "3.0.1", + "p-map": "1.1.1", + "staged-git-files": "0.0.4", + "stringify-object": "3.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "log-symbols": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.0.0.tgz", + "integrity": "sha512-ValCSal2pRxRbet7O69a/1g5fZ2MLxf1YXIslNrdJF42ofY9zVf6MTqTwfhG+2x168xrbZATCgFQfXAwdNHv+w==", + "dev": true, + "requires": { + "chalk": "2.1.0" + } + } + } + }, + "listr": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", + "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.2.0", + "listr-verbose-renderer": "0.4.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.1.1", + "rxjs": "5.4.1", + "stream-to-observable": "0.1.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + }, + "listr-update-renderer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz", + "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.1.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "indent-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.1.0.tgz", + "integrity": "sha1-CP9DNGAziDmbMp5rlTjcejz13n0=" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz", + "integrity": "sha1-RNwBuww0oDxXIVTU0Izemx3FYg8=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.28.5", + "figures": "1.7.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "3.1.3", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "requires": { + "chalk": "1.1.3" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "requires": { + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "1.1.0" + } + }, + "mem-fs": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.1.3.tgz", + "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", + "requires": { + "through2": "2.0.3", + "vinyl": "1.2.0", + "vinyl-file": "2.0.0" + } + }, + "mem-fs-editor": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-3.0.2.tgz", + "integrity": "sha1-3Qpuryu4prN3QAZ6pUnrUwEFr58=", + "requires": { + "commondir": "1.0.1", + "deep-extend": "0.4.2", + "ejs": "2.5.7", + "glob": "7.1.2", + "globby": "6.1.0", + "mkdirp": "0.5.1", + "multimatch": "2.1.0", + "rimraf": "2.2.8", + "through2": "2.0.3", + "vinyl": "2.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "requires": { + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "remove-trailing-separator": "1.0.2", + "replace-ext": "1.0.0" + } + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.3" + } + }, + "miller-rabin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=" + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=" + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=", + "optional": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-dir": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.8.tgz", + "integrity": "sha1-VfuN62mQcHB/tn+RpGDwRIKUx30=" + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-libs-browser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.0.0.tgz", + "integrity": "sha1-o6WeyXAkmFtG6Vg3lkb5bEthZkY=", + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.1.4", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.11.1", + "domain-browser": "1.1.7", + "events": "1.1.1", + "https-browserify": "0.0.1", + "os-browserify": "0.2.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.3", + "stream-browserify": "2.0.1", + "stream-http": "2.7.2", + "string_decoder": "0.10.31", + "timers-browserify": "2.0.4", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "node-notifier": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.1.2.tgz", + "integrity": "sha1-L6nhJgX6EACdRFSdb82KY93g5P8=", + "dev": true, + "requires": { + "growly": "1.3.0", + "semver": "5.3.0", + "shellwords": "0.1.0", + "which": "1.2.14" + } + }, + "nomnom": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", + "requires": { + "chalk": "0.4.0", + "underscore": "1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=" + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=" + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.3.0", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.0.2" + } + }, + "npm-path": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.3.tgz", + "integrity": "sha1-Fc/04ciaONp39W9gVbJPl137K74=", + "dev": true, + "requires": { + "which": "1.2.14" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "2.0.1" + } + }, + "npm-which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", + "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", + "dev": true, + "requires": { + "commander": "2.10.0", + "npm-path": "2.0.3", + "which": "1.2.14" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nwmatcher": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.1.tgz", + "integrity": "sha1-eumwew6oBNt+JfBctf5Al9TklJ8=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.2" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "ora": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "os-browserify": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", + "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "requires": { + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "object-assign": "4.1.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "requires": { + "p-reduce": "1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-lazy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-lazy/-/p-lazy-1.0.0.tgz", + "integrity": "sha1-7FPIAvLuOsKPFmzILQsrAt4nqDU=" + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "1.1.0" + } + }, + "p-map": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.1.1.tgz", + "integrity": "sha1-BfXkrpegaDcbwqXMhr+9vBnErno=" + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" + }, + "p-timeout": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.0.tgz", + "integrity": "sha1-mCD5lDTFgXhotPNICe5SkWYNW2w=", + "requires": { + "p-finally": "1.0.0" + } + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "requires": { + "asn1.js": "4.9.1", + "browserify-aes": "1.0.8", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.8" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "pluralize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-4.0.0.tgz", + "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "prettier": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.6.1.tgz", + "integrity": "sha512-f85qBoQiqiFM/sCmJaN4Lagj9bqMcv38vCftqp4GfVessAqq3Ns6g+3gd8UXReStLLE/DGEdwiZXoFKxphKqwg==" + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=" + }, + "pretty-format": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", + "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1", + "ansi-styles": "3.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + } + } + }, + "private": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "read-chunk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", + "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "requires": { + "pify": "3.0.0", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + } + }, + "recast": { + "version": "git://github.com/kalcifer/recast.git#b66a17eee9e072338744b947a406d3f134bc0b0d", + "requires": { + "ast-types": "0.9.2", + "esprima": "3.1.3", + "private": "0.1.7", + "source-map": "0.5.6" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "1.3.3" + } + }, + "regenerate": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", + "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=" + }, + "regenerator": { + "version": "0.8.40", + "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.40.tgz", + "integrity": "sha1-oORXxY69uuV1yfjNdRJ+k3VkNdg=", + "requires": { + "commoner": "0.10.8", + "defs": "1.1.1", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "private": "0.1.7", + "recast": "0.10.33", + "through": "2.3.8" + }, + "dependencies": { + "ast-types": { + "version": "0.8.12", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz", + "integrity": "sha1-oNkOQ1G7iHcWyD/WN+v4GK9K38w=" + }, + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" + }, + "recast": { + "version": "0.10.33", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", + "integrity": "sha1-lCgI96oBbx+nFCxGHX5XBKqo1pc=", + "requires": { + "ast-types": "0.8.12", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "private": "0.1.7", + "source-map": "0.5.6" + } + } + } + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" + }, + "regenerator-transform": { + "version": "0.9.11", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz", + "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=", + "requires": { + "babel-runtime": "6.23.0", + "babel-types": "6.25.0", + "private": "0.1.7" + } + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "requires": { + "is-equal-shallow": "0.1.3", + "is-primitive": "2.0.0" + } + }, + "regexpu": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexpu/-/regexpu-1.3.0.tgz", + "integrity": "sha1-5TTcmRqeWEYFDJjebX3UpVyeoW0=", + "requires": { + "esprima": "2.7.3", + "recast": "0.10.43", + "regenerate": "1.3.2", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + }, + "dependencies": { + "ast-types": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", + "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=" + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "recast": { + "version": "0.10.43", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", + "requires": { + "ast-types": "0.8.15", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "private": "0.1.7", + "source-map": "0.5.6" + }, + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" + } + } + } + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "requires": { + "regenerate": "1.3.2", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "requires": { + "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } + } + }, + "remove-trailing-separator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", + "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "1.0.2" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + } + }, + "resolve": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.0.tgz", + "integrity": "sha1-d6G4+Rl6YOdzO08Nl35pzNm1/YY=", + "requires": { + "expand-tilde": "2.0.2", + "global-modules": "0.2.3" + }, + "dependencies": { + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "0.2.0", + "which": "1.2.14" + } + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + } + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "requires": { + "rx-lite": "4.0.8" + } + }, + "rxjs": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.1.tgz", + "integrity": "sha1-ti91fyeURdJloYpY+wpw3JDpFiY=", + "requires": { + "symbol-observable": "1.0.4" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=" + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", + "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", + "requires": { + "inherits": "2.0.3" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "requires": { + "glob": "7.1.2", + "interpret": "1.0.3", + "rechoir": "0.6.2" + } + }, + "shellwords": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.0.tgz", + "integrity": "sha1-Zq/Ue2oSky2Qccv9mKUueFzQuhQ=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-fmt": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz", + "integrity": "sha1-GRv1ZqWeZTBILLJatTtKjchcOms=" + }, + "simple-is": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz", + "integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=" + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + }, + "source-map-support": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", + "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "requires": { + "source-map": "0.5.6" + } + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "requires": { + "concat-stream": "1.6.0", + "os-shim": "0.1.3" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "stable": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.6.tgz", + "integrity": "sha1-kQ9dKu17Ugxud3SZwfMuE5/eyxA=" + }, + "staged-git-files": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-0.0.4.tgz", + "integrity": "sha1-15fhtVHKemOd7AI33G60u5vhfTU=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "stream-to-observable": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", + "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=" + }, + "string-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true, + "requires": { + "strip-ansi": "3.0.1" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringify-object": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.0.tgz", + "integrity": "sha1-lDcKE15BvASDWIE7+ZSB8TFcaqY=", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "1.0.1", + "is-obj": "1.0.1", + "is-regexp": "1.0.0" + } + }, + "stringmap": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz", + "integrity": "sha1-VWwTeyWPlCuHdvWy71gqoGnX0bE=" + }, + "stringset": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz", + "integrity": "sha1-7yWcTjSTRDd/zRyRPdLoSMnAQrU=" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "requires": { + "first-chunk-stream": "2.0.0", + "strip-bom": "2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + } + } + }, + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "table": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", + "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.4", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "tapable": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.6.tgz", + "integrity": "sha1-IGvo4YiGC1FEJTdebxrom/sB/Y0=" + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "requires": { + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" + } + }, + "test-exclude": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", + "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "textextensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.1.0.tgz", + "integrity": "sha1-G+DcKg3CRNRL6KCa9qha+5PE28M=" + }, + "throat": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "timers-browserify": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", + "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==", + "requires": { + "setimmediate": "1.0.5" + } + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "try-resolve": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/try-resolve/-/try-resolve-1.0.1.tgz", + "integrity": "sha1-z95vq9ctY+V5fPqrhzq76OcA6RI=" + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "tryor": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz", + "integrity": "sha1-gUXkynyv9ArN48z5Rui4u3W0Fys=" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "requires": { + "source-map": "0.5.6", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "requires": { + "source-map": "0.5.6", + "uglify-js": "2.8.29", + "webpack-sources": "1.0.1" + } + }, + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" + }, + "untildify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", + "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "1.0.4" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "1.1.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "dev": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-2.0.0.tgz", + "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0", + "strip-bom-stream": "2.0.0", + "vinyl": "1.2.0" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", + "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", + "dev": true + }, + "watchpack": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", + "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "requires": { + "async": "2.5.0", + "chokidar": "1.7.0", + "graceful-fs": "4.1.11" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "webidl-conversions": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.1.tgz", + "integrity": "sha1-gBWherg+fhsxFjhIas6B2mziBqA=", + "dev": true + }, + "webpack": { + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.5.6.tgz", + "integrity": "sha512-sXnxfx6KoZVrFAGLjdhCCwDtDwkYMfwm8mJjkQv3thr5pjTlbxopVlr/kJwc9Bz317gL+gNjvz++ir9TgG1MDg==", + "requires": { + "acorn": "5.1.2", + "acorn-dynamic-import": "2.0.2", + "ajv": "5.2.2", + "ajv-keywords": "2.1.0", + "async": "2.5.0", + "enhanced-resolve": "3.4.1", + "escope": "3.6.0", + "interpret": "1.0.3", + "json-loader": "0.5.7", + "json5": "0.5.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "mkdirp": "0.5.1", + "node-libs-browser": "2.0.0", + "source-map": "0.5.6", + "supports-color": "4.4.0", + "tapable": "0.2.8", + "uglifyjs-webpack-plugin": "0.4.6", + "watchpack": "1.4.0", + "webpack-sources": "1.0.1", + "yargs": "8.0.2" + }, + "dependencies": { + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==" + }, + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "object-assign": "4.1.1", + "tapable": "0.2.8" + } + }, + "tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" + } + } + }, + "webpack-addons": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/webpack-addons/-/webpack-addons-1.1.2.tgz", + "integrity": "sha1-goWxgfl6coIMHWhAIliEYOT3xrc=", + "requires": { + "babel-code-frame": "6.22.0", + "babel-preset-es2015": "6.24.1", + "babel-preset-stage-3": "6.24.1", + "jscodeshift": "0.3.32" + } + }, + "webpack-addons-ylvis": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/webpack-addons-ylvis/-/webpack-addons-ylvis-0.0.34.tgz", + "integrity": "sha1-lxPUEIil8IZ29nCl7HBItDKDHFo=", + "requires": { + "webpack-addons": "0.0.4", + "yeoman-generator": "git://github.com/ev1stensberg/generator.git#9e24fa31c85302ca1145ae34fc68b4f133251ca0" + }, + "dependencies": { + "webpack-addons": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/webpack-addons/-/webpack-addons-0.0.4.tgz", + "integrity": "sha1-s8TV1qGmcrhCDQB16fd9KM1wWhI=" + } + } + }, + "webpack-sources": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz", + "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==", + "requires": { + "source-list-map": "2.0.0", + "source-map": "0.5.6" + } + }, + "whatwg-encoding": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz", + "integrity": "sha1-PGxFGhmO567FWx7GHQkgxngBpfQ=", + "dev": true, + "requires": { + "iconv-lite": "0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + } + } + }, + "whatwg-url": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-4.8.0.tgz", + "integrity": "sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA=", + "dev": true, + "requires": { + "tr46": "0.0.3", + "webidl-conversions": "3.0.1" + }, + "dependencies": { + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + } + } + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "worker-farm": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.4.1.tgz", + "integrity": "sha512-tgFAtgOYLPutkAyzgpS6VJFL5HY+0ui1Tvua+fITgz8ByaJTMFGtazR6xxQfwfiAcbwE+2fLG/K49wc2TfwCNw==", + "dev": true, + "requires": { + "errno": "0.1.4", + "xtend": "4.0.1" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.0.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.0", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "requires": { + "lru-cache": "4.1.1", + "which": "1.2.14" + } + }, + "execa": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz", + "integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=", + "requires": { + "cross-spawn": "4.0.2", + "get-stream": "2.3.1", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "4.1.1", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "os-locale": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.0.0.tgz", + "integrity": "sha1-FZGN7VEFIrge565aMJ1U9jn8OaQ=", + "requires": { + "execa": "0.5.1", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", + "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "yeoman-environment": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.0.0.tgz", + "integrity": "sha1-2vovxRLBaMuDE0U+UxjmRzEmWRU=", + "requires": { + "chalk": "1.1.3", + "debug": "2.6.8", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "globby": "6.1.0", + "grouped-queue": "0.3.3", + "inquirer": "3.2.3", + "is-scoped": "1.0.0", + "lodash": "4.17.4", + "log-symbols": "1.0.2", + "mem-fs": "1.1.3", + "text-table": "0.2.0", + "untildify": "3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "untildify": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.2.tgz", + "integrity": "sha1-fx8wIFWz/qDz6B3HjrNnZstl4/E=" + } + } + }, + "yeoman-generator": { + "version": "git://github.com/ev1stensberg/generator.git#9e24fa31c85302ca1145ae34fc68b4f133251ca0", + "requires": { + "async": "2.5.0", + "chalk": "1.1.3", + "cli-table": "0.3.1", + "cross-spawn": "5.1.0", + "dargs": "5.1.0", + "dateformat": "2.0.0", + "debug": "2.6.8", + "detect-conflict": "1.0.1", + "error": "7.0.2", + "find-up": "2.1.0", + "github-username": "4.1.0", + "istextorbinary": "2.1.0", + "lodash": "4.17.4", + "mem-fs-editor": "3.0.2", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "pretty-bytes": "4.0.2", + "read-chunk": "2.1.0", + "read-pkg-up": "2.0.0", + "rimraf": "2.2.8", + "run-async": "2.3.0", + "shelljs": "0.7.8", + "text-table": "0.2.0", + "through2": "2.0.3", + "yeoman-environment": "1.6.6" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "diff": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz", + "integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=" + }, + "external-editor": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", + "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", + "requires": { + "extend": "3.0.1", + "spawn-sync": "1.0.15", + "tmp": "0.0.29" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globby": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz", + "integrity": "sha1-CA9UVJ7BuCpsYOYx/ILhIR2+lfg=", + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "6.0.4", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "inquirer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "requires": { + "ansi-escapes": "1.4.0", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "external-editor": "1.1.1", + "figures": "1.7.0", + "lodash": "4.17.4", + "mute-stream": "0.0.6", + "pinkie-promise": "2.0.1", + "run-async": "2.3.0", + "rx": "4.1.0", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "yeoman-environment": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-1.6.6.tgz", + "integrity": "sha1-zYX6Z9FWBg5EDXgH1+988NLR1nE=", + "requires": { + "chalk": "1.1.3", + "debug": "2.6.8", + "diff": "2.2.3", + "escape-string-regexp": "1.0.5", + "globby": "4.1.0", + "grouped-queue": "0.3.3", + "inquirer": "1.2.3", + "lodash": "4.17.4", + "log-symbols": "1.0.2", + "mem-fs": "1.1.3", + "text-table": "0.2.0", + "untildify": "2.1.0" + } + } + } + } + } +} diff --git a/package.json b/package.json index 4fca0b3a08e..46840e10053 100644 --- a/package.json +++ b/package.json @@ -16,65 +16,63 @@ "node": ">=4.0.0" }, "scripts": { - "lint:bin": "eslint ./bin", - "lint:lib": "eslint ./lib", - "lint:test": "eslint ./__mocks__", - "lint:staged": "lint-staged", - "lint": "npm run lint:bin && npm run lint:lib && npm run lint:test", - "install-commit-validator": "fit-commit-js install", - "test": "jest --coverage --runInBand" + "lint": "eslint \"**/*.js\"", + "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", + "precommit": "lint-staged", + "pretest": "npm run lint", + "test": "jest --coverage" + }, + "lint-staged": { + "{lib,bin,__mocks__}/**/!(__testfixtures__)/**.js": [ + "eslint --fix", + "git add" + ] + }, + "jest": { + "testEnvironment": "node" }, "dependencies": { "babel-code-frame": "^6.22.0", - "babel-core": "^6.21.0", - "babel-preset-es2015": "^6.18.0", - "babel-preset-stage-3": "^6.17.0", - "chalk": "^1.1.3", - "cross-spawn": "^5.0.1", - "diff": "^3.2.0", - "enhanced-resolve": "^3.0.2", - "fit-commit-js": "^0.3.1", - "global-modules": "^0.2.3", - "got": "^6.6.3", - "inquirer": "^2.0.0", - "interpret": "^1.0.1", - "jscodeshift": "^0.3.30", - "listr": "^0.11.0", - "loader-utils": "^0.2.16", + "babel-core": "^6.25.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-3": "^6.24.1", + "chalk": "^2.0.1", + "cross-spawn": "^5.1.0", + "diff": "^3.3.0", + "enhanced-resolve": "^3.3.0", + "global-modules": "^1.0.0", + "got": "^7.1.0", + "inquirer": "^3.2.0", + "interpret": "^1.0.3", + "jscodeshift": "^0.3.32", + "listr": "^0.12.0", + "loader-utils": "^1.1.0", "lodash": "^4.17.4", "p-each-series": "^1.0.0", "p-lazy": "^1.0.0", - "prettier": "^1.2.2", + "prettier": "^1.5.3", "recast": "git://github.com/kalcifer/recast.git#bug/allowbreak", - "resolve-cwd": "^2.0.0", - "supports-color": "^3.1.2", - "webpack": "^2.5.1", - "webpack-addons": "^1.1.2", - "yargs": "^6.5.0", - "yeoman-environment": "^1.6.6", + "rx": "^4.1.0", + "supports-color": "^4.2.0", + "webpack": "^3.3.0", + "webpack-addons": "1.1.2", + "webpack-addons-ylvis": "0.0.34", + "yargs": "^8.0.2", + "yeoman-environment": "^2.0.0", "yeoman-generator": "git://github.com/ev1stensberg/generator.git#Feature-getArgument" }, "devDependencies": { - "ajv": "^4.11.3", - "ajv-keywords": "^1.5.1", - "babel-cli": "^6.18.0", - "babel-eslint": "^6.1.2", - "babel-jest": "^19.0.0", - "babel-polyfill": "^6.20.0", - "eslint": "^3.12.2", - "eslint-plugin-node": "^3.0.5", - "jest": "^19.0.2", - "lint-staged": "^3.2.8", - "pre-commit": "^1.2.2" - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "pre-commit": "lint:staged", - "jest": { - "testEnvironment": "node" + "ajv": "^5.2.2", + "ajv-keywords": "^2.1.0", + "babel-cli": "^6.24.1", + "babel-eslint": "^7.2.3", + "babel-jest": "^20.0.3", + "babel-polyfill": "^6.23.0", + "eslint": "^4.2.0", + "eslint-plugin-node": "^5.1.0", + "husky": "^0.14.3", + "jest": "^20.0.4", + "jest-cli": "^20.0.4", + "lint-staged": "^4.1.3" } } From 65251628391e7d031ebbf96aecc23d80adfe2080 Mon Sep 17 00:00:00 2001 From: Emanuele Date: Mon, 18 Sep 2017 09:36:58 +0100 Subject: [PATCH 02/24] [Feature] Added support to Flow inside transformations (#174) * [FLOW] Implemented interfaces and flow types inside the transformations * [FLOW] first commit * Added flwo to two other files * Reviewed interfaces * Created different intefaces for expressions * Fixed rest of trasformations * More developments * Updated code after code review * Fixed failing tests * Removed yarn file * Applied linting * Updated packages * Applied lint style to the imports due to code review --- .babelrc | 2 +- .eslintrc.js | 4 +- .flowconfig | 11 + .../__testfixtures__/failing.js | 137 ++++--- .../bannerPlugin/bannerPlugin.js | 28 +- .../extractTextPlugin/extractTextPlugin.js | 47 +-- lib/transformations/index.js | 27 +- .../loaderOptionsPlugin.js | 24 +- lib/transformations/loaders/loaders.js | 356 +++++++++--------- lib/transformations/outputPath/outputPath.js | 67 ++-- .../removeDeprecatedPlugins.js | 38 +- .../removeJsonLoader/removeJsonLoader.js | 47 +-- lib/transformations/resolve/resolve.js | 47 +-- .../uglifyJsPlugin/uglifyJsPlugin.js | 40 +- lib/transformations/utils.js | 231 ++++++------ lib/types.js | 183 +++++++++ package-lock.json | 66 +++- package.json | 3 + 18 files changed, 791 insertions(+), 567 deletions(-) create mode 100644 .flowconfig create mode 100644 lib/types.js diff --git a/.babelrc b/.babelrc index 11f1df83f71..36afa5aa994 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets": ["es2015", "stage-3"] + "presets": ["es2015", "stage-3", "flow"] } diff --git a/.eslintrc.js b/.eslintrc.js index 4c2f4e927bd..c6380e19e03 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { "root": true, - "plugins": ["node"], - "extends": ["eslint:recommended", "plugin:node/recommended"], + "plugins": ["node", "flowtype"], + "extends": ["eslint:recommended", "plugin:node/recommended", "plugin:flowtype/recommended"], "env": { "node": true, "es6": true, diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 00000000000..a571c285c48 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,11 @@ +[ignore] + +[include] + +[libs] +flow-typed + +[options] +module.system.node.resolve_dirname=./lib/ +module.system.node.resolve_dirname=node_modules +experimental.const_params=false diff --git a/lib/transformations/__testfixtures__/failing.js b/lib/transformations/__testfixtures__/failing.js index 95de24dcb82..a52f3ffe703 100644 --- a/lib/transformations/__testfixtures__/failing.js +++ b/lib/transformations/__testfixtures__/failing.js @@ -1,81 +1,80 @@ -var webpack = require('webpack'); -var nodeEnvironment = process.env.NODE_ENV -var _ = require('lodash'); +var webpack = require("webpack"); +var nodeEnvironment = process.env.NODE_ENV; +var _ = require("lodash"); var config = { - entry: { - 'lib': './app/index.js', - 'email': './app/email.js' - }, - plugins: [ - new webpack.DefinePlugin({ - 'INCLUDE_ALL_MODULES': function includeAllModulesGlobalFn(modulesArray, application) { - modulesArray.forEach(function executeModuleIncludesFn(moduleFn) { - moduleFn(application); - }); - }, - ENVIRONMENT: JSON.stringify(nodeEnvironment) - }) - ], - output: { - path: __dirname + '/app', - filename: 'bundle.js' - }, - resolve: { - root: __dirname + '/app' - }, - module: { - // preLoaders: [ - // { test: /\.js?$/, loader: 'eslint', exclude: /node_modules/ } - // ], - loaders: [ - { test: /\.js$/, exclude: /(node_modules)/, loader: 'babel' }, - { test: /\.html/, exclude: [/(node_modules)/, /src\/index\.html/], loader: 'html-loader' }, - { test: /\.s?css$/, loader: 'style!css!sass' }, - { test: /\.(png|jpg)$/, loader: 'url-loader?mimetype=image/png' } - ] - }, - // extra configuration options. - // eslint: { - // configFile: '.eslintrc.js' - // } -} + entry: { + lib: "./app/index.js", + email: "./app/email.js" + }, + plugins: [ + new webpack.DefinePlugin({ + INCLUDE_ALL_MODULES: function includeAllModulesGlobalFn(modulesArray, application) { + modulesArray.forEach(function executeModuleIncludesFn(moduleFn) { + moduleFn(application); + }); + }, + ENVIRONMENT: JSON.stringify(nodeEnvironment) + }) + ], + output: { + path: __dirname + "/app", + filename: "bundle.js" + }, + resolve: { + root: __dirname + "/app" + }, + module: { + // preLoaders: [ + // { test: /\.js?$/, loader: 'eslint', exclude: /node_modules/ } + // ], + loaders: [ + { test: /\.js$/, exclude: /(node_modules)/, loader: "babel" }, + { test: /\.html/, exclude: [/(node_modules)/, /src\/index\.html/], loader: "html-loader" }, + { test: /\.s?css$/, loader: "style!css!sass" }, + { test: /\.(png|jpg)$/, loader: "url-loader?mimetype=image/png" } + ] + }, + // extra configuration options. + // eslint: { + // configFile: '.eslintrc.js' + // } +}; switch (nodeEnvironment) { - case 'production': - config.plugins.push(new webpack.optimize.UglifyJsPlugin()); - case 'preproduction': - config.output.path = __dirname + '/dist'; - config.plugins.push(new webpack.optimize.DedupePlugin()); - config.plugins.push(new webpack.optimize.OccurenceOrderPlugin()); + case "production": + config.plugins.push(new webpack.optimize.UglifyJsPlugin()); + case "preproduction": + config.output.path = __dirname + "/dist"; + config.plugins.push(new webpack.optimize.DedupePlugin()); + config.plugins.push(new webpack.optimize.OccurenceOrderPlugin()); - config.output.filename = '[name].js'; + config.output.filename = "[name].js"; - config.entry = { - 'lib': ['./app/index.js', 'angular', 'lodash'], - 'email': ['./app/email.js', 'angular'] - }; + config.entry = { + lib: ["./app/index.js", "angular", "lodash"], + email: ["./app/email.js", "angular"] + }; - config.devtool = 'source-map'; - config.output.libraryTarget = 'commonjs2'; - - break; + config.devtool = "source-map"; + config.output.libraryTarget = "commonjs2"; + break; - case 'test': - config.entry = './index.js'; - break; + case "test": + config.entry = "./index.js"; + break; - case 'development': - config.entry = { - 'lib': ['./app/index.js', 'webpack/hot/dev-server'], - 'email': ['./app/email.js', 'webpack/hot/dev-server'] - }; - config.output.filename = '[name].js'; - config.devtool = 'source-map'; - break; + case "development": + config.entry = { + lib: ["./app/index.js", "webpack/hot/dev-server"], + email: ["./app/email.js", "webpack/hot/dev-server"] + }; + config.output.filename = "[name].js"; + config.devtool = "source-map"; + break; - default: - console.warn('Unknown or Undefined Node Environment. Please refer to package.json for available build commands.'); + default: + console.warn("Unknown or Undefined Node Environment. Please refer to package.json for available build commands."); } -module.exports = config; \ No newline at end of file +module.exports = config; diff --git a/lib/transformations/bannerPlugin/bannerPlugin.js b/lib/transformations/bannerPlugin/bannerPlugin.js index 0d78942fa34..2e04fa6c002 100644 --- a/lib/transformations/bannerPlugin/bannerPlugin.js +++ b/lib/transformations/bannerPlugin/bannerPlugin.js @@ -1,25 +1,25 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + INewExpression, + IPath +} from "../../types"; const utils = require("../utils"); -module.exports = function(j, ast) { - return utils - .findPluginsByName(j, ast, ["webpack.BannerPlugin"]) - .forEach(path => { - const args = path.value.arguments; +module.exports = function(j: Ijscodeshit, ast: IPath<*>) { + return utils.findPluginsByName(j, ast, ["webpack.BannerPlugin"]) + .forEach((path: IPath) => { + const args: any[] = path.value.arguments; // any node // If the first argument is a literal replace it with object notation // See https://webpack.js.org/guides/migrating/#bannerplugin-breaking-change if (args && args.length > 1 && args[0].type === j.Literal.name) { // and remove the first argument path.value.arguments = [path.value.arguments[1]]; - utils.createOrUpdatePluginByName( - j, - path.parent, - "webpack.BannerPlugin", - { - banner: args[0].value - } - ); + utils.createOrUpdatePluginByName(j, path.parent, "webpack.BannerPlugin", { + banner: args[0].value + }); } }); }; diff --git a/lib/transformations/extractTextPlugin/extractTextPlugin.js b/lib/transformations/extractTextPlugin/extractTextPlugin.js index 67df2f5e65b..97ce0ad07dc 100644 --- a/lib/transformations/extractTextPlugin/extractTextPlugin.js +++ b/lib/transformations/extractTextPlugin/extractTextPlugin.js @@ -1,26 +1,34 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + INewExpression, + IObjectExpression, + IMemberExpression, + ILiteral +} from "../../types"; const utils = require("../utils"); -function findInvocation(j, node, pluginName) { - const invocation = - j(node) - .find(j.MemberExpression) - .filter(p => p.get("object").value.name === pluginName) - .size() > 0; - return invocation; +function findInvocation(j: Ijscodeshit, node: IPath, pluginName: string): boolean { + let found: boolean = false; + found = j(node) + .find(j.MemberExpression) + .filter(p => p.get("object").value.name === pluginName).size() > 0; + return found; } -module.exports = function(j, ast) { - const changeArguments = function(p) { - const args = p.value.arguments; +module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { + const changeArguments = function(p: IPath) { + const args: any[] = p.value.arguments; // if(args.length === 1) { // return p; // } else - const literalArgs = args.filter(p => utils.isType(p, "Literal")); + const literalArgs: IPath[] = args.filter(p => utils.isType(p, "Literal")); if (literalArgs && literalArgs.length > 1) { - const newArgs = j.objectExpression( - literalArgs.map((p, index) => + const newArgs: IObjectExpression = j.objectExpression( + literalArgs.map((p: IPath, index: number) => utils.createProperty(j, index === 0 ? "fallback" : "use", p.value) ) ); @@ -28,15 +36,10 @@ module.exports = function(j, ast) { } return p; }; - const name = utils.findVariableToPlugin( - j, - ast, - "extract-text-webpack-plugin" - ); + const name: ?string = utils.findVariableToPlugin(j, ast, "extract-text-webpack-plugin"); if (!name) return ast; - return ast - .find(j.CallExpression) - .filter(p => findInvocation(j, p, name)) + return ast.find(j.CallExpression) + .filter((p: IPath) => findInvocation(j, p, name)) .forEach(changeArguments); }; diff --git a/lib/transformations/index.js b/lib/transformations/index.js index 53d1d38c301..74e9c25db6d 100644 --- a/lib/transformations/index.js +++ b/lib/transformations/index.js @@ -1,4 +1,8 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + IPath +} from "../types"; const jscodeshift = require("jscodeshift"); const pEachSeries = require("p-each-series"); @@ -25,12 +29,11 @@ const transformsObject = { }; const transformations = Object.keys(transformsObject).reduce((res, key) => { - res[key] = (ast, source) => - transformSingleAST(ast, source, transformsObject[key]); + res[key] = (ast, source) => transformSingleAST(ast, source, transformsObject[key]); return res; }, {}); -function transformSingleAST(ast, source, transformFunction) { +function transformSingleAST(ast: IPath<*>, source: string, transformFunction: Function): IPath<*> { return new PLazy((resolve, reject) => { setTimeout(() => { try { @@ -53,16 +56,12 @@ function transformSingleAST(ast, source, transformFunction) { * @param { Object } options - Reacst formatting options * @returns { String } Transformed source code * */ -function transform(source, transforms, options) { - const ast = jscodeshift(source); - const recastOptions = Object.assign( - { - quote: "single" - }, - options - ); - transforms = - transforms || Object.keys(transformations).map(k => transformations[k]); +function transform(source: string, transforms: Function[], options: Object): string { + const ast: IPath<*> = jscodeshift(source); + const recastOptions = Object.assign({ + quote: "single" + }, options); + transforms = transforms || Object.keys(transformations).map(k => transformations[k]); return pEachSeries(transforms, f => f(ast, source)) .then(() => { return ast.toSource(recastOptions); diff --git a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js index fdefc80cedd..35e3a2afd6e 100644 --- a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js +++ b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js @@ -1,17 +1,22 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + IArrayExpression +} from "../../types"; const isEmpty = require("lodash/isEmpty"); const findPluginsByName = require("../utils").findPluginsByName; -const createOrUpdatePluginByName = require("../utils") - .createOrUpdatePluginByName; +const createOrUpdatePluginByName = require("../utils").createOrUpdatePluginByName; const safeTraverse = require("../utils").safeTraverse; -module.exports = function(j, ast) { - const loaderOptions = {}; +module.exports = function(j: Ijscodeshit, ast: IPath<*>) { + const loaderOptions: Object = {}; // If there is debug: true, set debug: true in the plugin // TODO: remove global debug setting - // TODO: I can"t figure out how to find the topmost `debug: true`. help! + // TODO: I can't figure out how to find the topmost `debug: true`. help! if (ast.find(j.Identifier, { name: "debug" }).size()) { loaderOptions.debug = true; } @@ -23,11 +28,8 @@ module.exports = function(j, ast) { return ast .find(j.ArrayExpression) - .filter( - path => - safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins" - ) - .forEach(path => { + .filter((path: IPath<*>) => safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins") + .forEach((path: IPath) => { !isEmpty(loaderOptions) && createOrUpdatePluginByName(j, path, "webpack.LoaderOptionsPlugin", loaderOptions); }); diff --git a/lib/transformations/loaders/loaders.js b/lib/transformations/loaders/loaders.js index 17254c5643f..635620cfd4a 100644 --- a/lib/transformations/loaders/loaders.js +++ b/lib/transformations/loaders/loaders.js @@ -1,57 +1,70 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + IObjectExpression, + IProperty, + IArrayExpression, + ILiteral, + IIdentifier +} from "../../types"; const utils = require("../utils"); -module.exports = function(j, ast) { +module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { /** - * Creates an Array expression out of loaders string for syntaxes like - * - * { - * loader: 'style!css` - * } - * - * or - * - * { - * loaders: ['style', 'css'] - * } - * - * or - * - * loaders: [{ - * loader: 'style' - * }, - * { - * loader: 'css', - * }] - * - * it should generate - * - * { - * use: [{ - * loader: 'style' - * }, - * { - * loader: 'css' - * }] - * } - * @param {NodeObject} path Must be an ObjectExpression - * @returns {NodeObject} The created array expression - */ - const createArrayExpressionFromArray = function(path) { + * Creates an Array expression out of loaders string + * + * + * For syntaxes like + * + * { + * loader: 'style!css` + * } + * + * or + * + * { + * loaders: ['style', 'css'] + * } + * + * or + * + * loaders: [{ + * loader: 'style' + * }, + * { + * loader: 'css', + * }] + * + * it should generate + * + * { + * use: [{ + * loader: 'style' + * }, + * { + * loader: 'css' + * }] + * } + * @param {Node} path Must be an ObjectExpression + * @return {Node} [] + */ + const createArrayExpressionFromArray = function(path: IPath): IPath<*> { + const value: IObjectExpression = path.value; // Find paths with `loaders` keys in the given Object - const paths = path.value.properties.filter(prop => - prop.key.name.startsWith("loader") - ); + const paths = value.properties.filter((prop: IProperty<*>) => prop.key.name.startsWith("loader")); // For each pair of key and value - paths.forEach(pair => { + paths.forEach((pair: IProperty<*>) => { // Replace 'loaders' Identifier with 'use' pair.key.name = "use"; // If the value is an Array if (pair.value.type === j.ArrayExpression.name) { // replace its elements + const pairValue: IArrayExpression = pair.value; pair.value = j.arrayExpression( - pair.value.elements.map(arrElement => { + pairValue.elements.map(arrElement => { // If items of the array are Strings if (arrElement.type === j.Literal.name) { // Replace with `{ loader: LOADER }` Object @@ -63,78 +76,67 @@ module.exports = function(j, ast) { return arrElement; }) ); - // If the value is String of loaders like 'style!css' + // If the value is String of loaders like 'style!css' } else if (pair.value.type === j.Literal.name) { // Replace it with Array expression of loaders + const literalValue: ILiteral = pair.value; pair.value = j.arrayExpression( - pair.value.value.split("!").map(loader => { - return j.objectExpression([ - utils.createProperty(j, "loader", loader) - ]); - }) + literalValue.value + .split("!") + .map(loader => { + return j.objectExpression([ + utils.createProperty(j, "loader", loader) + ]); + }) ); } }); return path; }; - const createLoaderWithQuery = p => { + const createLoaderWithQuery = (p: IPath): IObjectExpression => { let properties = p.value.properties; - let loaderValue = properties.reduce( - (val, prop) => (prop.key.name === "loader" ? prop.value.value : val), - "" - ); + let loaderValue = properties + .reduce((val, prop) => prop.key.name === "loader" ? prop.value.value : val, ""); let loader = loaderValue.split("?")[0]; let query = loaderValue.split("?")[1]; - let options = query.split("&").map(option => { + let options: Object[] = query.split("&").map(option => { const param = option.split("="); const key = param[0]; const val = param[1] || true; // No value in query string means it is truthy value return j.objectProperty(j.identifier(key), utils.createLiteral(j, val)); }); - let loaderProp = utils.createProperty(j, "loader", loader); - let queryProp = j.property( - "init", - j.identifier("options"), - j.objectExpression(options) - ); + let loaderProp: IProperty<*> = utils.createProperty(j, "loader", loader); + let queryProp: IProperty = j.property("init", j.identifier("options"), j.objectExpression(options)); return j.objectExpression([loaderProp, queryProp]); }; - const findLoaderWithQueryString = p => { - return p.value.properties.reduce((predicate, prop) => { - return ( - (utils.safeTraverse(prop, ["value", "value", "indexOf"]) && - prop.value.value.indexOf("?") > -1) || - predicate - ); - }, false); + const findLoaderWithQueryString = (p: IPath): boolean => { + return p.value.properties + .reduce((predicate, prop) => { + return utils.safeTraverse(prop, ["value", "value", "indexOf"]) + && prop.value.value.indexOf("?") > -1 + || predicate; + }, false); }; /** - * If the path value is `loaders` and it's located in `module` object - * we assume it's the loader's section - * - * @param {NodeObject} path Must be an ObjectExpression - * @return {tbd} tbd - */ - const checkForLoader = path => - path.value.name === "loaders" && - utils.safeTraverse(path, [ - "parent", - "parent", - "parent", - "node", - "key", - "name" - ]) === "module"; + * If the path value is `loaders` and it's located in `module` object + * we assume it's the loader's section + * + * @param {Node} path [description] + * @return {Node} [description] + */ + const checkForLoader = path => path.value.name === "loaders" && + utils.safeTraverse(path, ["parent", "parent", "parent", "node", "key", "name"]) === "module"; /** - * Puts node path that is pre- or postLoader into `enforce` key - * @param {object} p tbd - * @returns {object} A new object that contains the pre/post loaders in the enforce key of the loader - */ - const fitIntoLoaders = p => { + * Puts node path that is pre- or postLoader into `enforce` key + * + * @param {Node} p [] + * @returns {*} [] + */ + const fitIntoLoaders = (p: IPath): IPath => { let loaders; p.value.properties.map(prop => { const keyName = prop.key.name; @@ -157,115 +159,105 @@ module.exports = function(j, ast) { } }); if (loaders) { - p.value.properties = p.value.properties.filter( - prop => prop.key.name === "loaders" - ); + p.value.properties = p.value.properties.filter(prop => prop.key.name === "loaders"); } return p; }; /** - * Find pre and postLoaders - * @returns {*} All the pre and post loaders - */ - const prepostLoaders = () => - ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) - .forEach(fitIntoLoaders); + * Find pre and postLoaders + * + * @param {[type]} IPath [description] + * @return {[type]} [description] + */ + const prepostLoaders = (): IPath => ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) + .forEach(fitIntoLoaders); /** - * Convert top level `loaders` to `rules` - * See https://webpack.js.org/configuration/module/#module-rules - * @returns {Array} An array of object of all the rules - */ - const loadersToRules = () => - ast - .find(j.Identifier) - .filter(checkForLoader) - .forEach(p => (p.value.name = "rules")); + * Convert top level `loaders` to `rules` + * See https://webpack.js.org/configuration/module/#module-rules + * @param {[type]} IPath [description] + * @return {[type]} [description] + */ + const loadersToRules = (): IPath => ast + .find(j.Identifier) + .filter(checkForLoader) + .forEach((p: IPath) => p.value.name = "rules"); /** - * Converts 'loader' and 'loaders' to Array of {Rule.Use} - * @returns {Array} An array of objects of all the rules - */ - const loadersToArrayExpression = () => - ast - .find(j.ObjectExpression) - .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) - .filter( - path => - utils.safeTraverse(path, [ - "parent", - "parent", - "node", - "key", - "name" - ]) === "rules" - ) - .forEach(createArrayExpressionFromArray); + * Converts 'loader' and 'loaders' to Array of {Rule.Use} + * + * @returns {Node} [] + */ + const loadersToArrayExpression = (): IPath => ast + .find(j.ObjectExpression) + .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) + .filter(path => utils.safeTraverse( + path, ["parent", "parent", "node", "key", "name"]) === "rules") + .forEach(createArrayExpressionFromArray); /** - * Finds loaders with options encoded as query string and replaces it with options obejct - * - * i.e. for loader like - * - * { - * loader: 'css?modules&importLoaders=1&string=test123' - * } - * - * it should generate - * { - * loader: 'css-loader', - * options: { - * modules: true, - * importLoaders: 1, - * string: 'test123' - * } - * } - * @returns {Object} An object of the generated loader settings - */ - const loaderWithQueryParam = () => - ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, "loader")) - .filter(findLoaderWithQueryString) - .replaceWith(createLoaderWithQuery); + * Finds loaders with options encoded as query string and replaces it with options obejct + * + * i.e. for loader like + * + * { + * loader: 'css?modules&importLoaders=1&string=test123' + * } + * + * it should generate + * { + * loader: 'css-loader', + * options: { + * modules: true, + * importLoaders: 1, + * string: 'test123' + * } + * } + * + * @type {[type]} + * @returns {Node} [] + */ + const loaderWithQueryParam = (): IPath => ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["loader"])) + .filter(findLoaderWithQueryString) + .replaceWith(createLoaderWithQuery); /** - * Finds nodes with `query` key and replaces it with `options` - * - * i.e. for - * { - * query: { ... } - * } - * - * it should generate - * - * { - * options: { ... } - * } - * @returns {Object} An object with the replaced query into options - */ - const loaderWithQueryProp = () => - ast - .find(j.Identifier) - .filter(p => p.value.name === "query") - .replaceWith(j.identifier("options")); + * Finds nodes with `query` key and replaces it with `options` + * + * i.e. for + * { + * query: { ... } + * } + * + * it should generate + * + * { + * options: { ... } + * } + * @returns {Node} [] + */ + const loaderWithQueryProp = (): IPath => ast + .find(j.Identifier) + .filter(p => p.value.name === "query") + .replaceWith(j.identifier("options")); /** - * Adds required `-loader` suffix to loader with missing suffix - * i.e. for `babel` it should generate `babel-loader` - * @returns {object} The new object that has all the `-loader` sufixes - */ - const addLoaderSuffix = () => - ast.find(j.ObjectExpression).forEach(path => { + * Adds required `-loader` suffix to loader with missing suffix + * i.e. for `babel` it should generate `babel-loader` + * @returns {Node} [] + */ + const addLoaderSuffix = (): IPath => ast + .find(j.ObjectExpression) + .forEach(path => { path.value.properties.forEach(prop => { - if ( - prop.key.name === "loader" && - utils.safeTraverse(prop, ["value", "value"]) && - !prop.value.value.endsWith("-loader") - ) { + if (prop.key.name === "loader" + && utils.safeTraverse(prop, ["value", "value"]) + && !prop.value.value.endsWith("-loader")) { prop.value = j.literal(prop.value.value + "-loader"); } }); diff --git a/lib/transformations/outputPath/outputPath.js b/lib/transformations/outputPath/outputPath.js index 39e28ef4ea9..f5a95cb023d 100644 --- a/lib/transformations/outputPath/outputPath.js +++ b/lib/transformations/outputPath/outputPath.js @@ -1,39 +1,31 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + ICallExpression, + IPath +} from "../../types"; const utils = require("../utils"); -module.exports = function(j, ast) { +module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { const literalOutputPath = ast .find(j.ObjectExpression) - .filter( - p => - utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === - "output" - ) + .filter((p: IPath<*>) => utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === "output") .find(j.Property) - .filter( - p => - utils.safeTraverse(p, ["value", "key", "name"]) === "path" && - utils.safeTraverse(p, ["value", "value", "type"]) === "Literal" - ); + .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "key", "name"]) === "path" + && utils.safeTraverse(p, ["value", "value", "type"]) === "Literal"); if (literalOutputPath) { - let pathVarName = "path"; - let isPathPresent = false; + let pathVarName: ?string = "path"; + let isPathPresent: boolean = false; const pathDecalaration = ast .find(j.VariableDeclarator) - .filter( - p => - utils.safeTraverse(p, ["value", "init", "callee", "name"]) === - "require" - ) - .filter( - p => - utils.safeTraverse(p, ["value", "init", "arguments"]) && - p.value.init.arguments.reduce((isPresent, a) => { - return (a.type === "Literal" && a.value === "path") || isPresent; - }, false) - ); + .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "init", "callee", "name"]) === "require") + .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "init", "arguments"]) + && p.value.init.arguments.reduce((isPresent, a) => { + return a.type === "Literal" && a.value === "path" || isPresent; + }, false)); if (pathDecalaration) { isPathPresent = true; @@ -41,27 +33,26 @@ module.exports = function(j, ast) { pathVarName = utils.safeTraverse(p, ["value", "id", "name"]); }); } - + const finalPathName: string = (pathVarName: any); literalOutputPath .find(j.Literal) - .replaceWith(p => replaceWithPath(j, p, pathVarName)); + .replaceWith((p: IPath<*>) => replaceWithPath(j, p, finalPathName)); if (!isPathPresent) { - const pathRequire = utils.getRequire(j, "path", "path"); - return ast - .find(j.Program) - .replaceWith(p => - j.program([].concat(pathRequire).concat(p.value.body)) - ); + const pathRequire: string = (utils.getRequire(j, "path", "path"): any); + return ast.find(j.Program) + .replaceWith(p => j.program([].concat(pathRequire).concat(p.value.body))); } } return ast; }; -function replaceWithPath(j, p, pathVarName) { +function replaceWithPath(j: Ijscodeshit, p: IPath<*>, pathVarName: string): IPath { const convertedPath = j.callExpression( - j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false), - [j.identifier("__dirname"), p.value] - ); + j.memberExpression( + j.identifier(pathVarName), + j.identifier("join"), + false), + [j.identifier("__dirname"), p.value]); return convertedPath; } diff --git a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js index 89944b0e012..078a17e32f8 100644 --- a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js +++ b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js @@ -1,28 +1,32 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath +} from "../../types"; const codeFrame = require("babel-code-frame"); const chalk = require("chalk"); const utils = require("../utils"); -const example = `plugins: [ +const example: string = `plugins: [ new webpack.optimize.OccurrenceOrderPlugin(), new webpack.optimize.UglifyJsPlugin(), new webpack.optimize.DedupePlugin() ]`; -module.exports = function(j, ast, source) { +module.exports = function(j: Ijscodeshit, ast: IPath<*>, source: string) { // List of deprecated plugins to remove // each item refers to webpack.optimize.[NAME] construct - const deprecatedPlugingsList = [ + const deprecatedPlugingsList: string[] = [ "webpack.optimize.OccurrenceOrderPlugin", "webpack.optimize.DedupePlugin" ]; - return utils - .findPluginsByName(j, ast, deprecatedPlugingsList) - .forEach(path => { + return utils.findPluginsByName(j, ast, deprecatedPlugingsList) + .forEach((path: IPath<*>) => { // For now we only support the case there plugins are defined in an Array - const arrayPath = utils.safeTraverse(path, ["parent", "value"]); + const arrayPath: ?IPath<*> = utils.safeTraverse(path, ["parent","value"]); if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) { // Check how many plugins are defined and // if there is only last plugin left remove `plugins: []` node @@ -34,13 +38,17 @@ module.exports = function(j, ast, source) { } } else { const startLoc = path.value.loc.start; - const messageOutput = `${chalk.red("Only plugins instantiated in the array can be automatically removed i.e.:")} - ${codeFrame(example, null, null, { highlightCode: true })} -${chalk.red("but you use it like this:")} - ${codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true })} -${chalk.red("Please remove deprecated plugins manually. ")} -See ${chalk.underline("https://webpack.js.org/guides/migrating/")} for more information.`; - console.log(messageOutput); + console.log(` +${ chalk.red("Only plugins instantiated in the array can be automatically removed i.e.:") } + +${ codeFrame(example, null, null, { highlightCode: true }) } + +${ chalk.red("but you use it like this:") } + +${ codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true }) } + +${ chalk.red("Please remove deprecated plugins manually. ") } +See ${ chalk.underline("https://webpack.js.org/guides/migrating/")} for more information.`); } }); }; diff --git a/lib/transformations/removeJsonLoader/removeJsonLoader.js b/lib/transformations/removeJsonLoader/removeJsonLoader.js index a222b35bb1a..90fb8151cc9 100644 --- a/lib/transformations/removeJsonLoader/removeJsonLoader.js +++ b/lib/transformations/removeJsonLoader/removeJsonLoader.js @@ -1,18 +1,25 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + ILiteral, + IArrayExpression +} from "../../types"; const utils = require("../utils"); -module.exports = function(j, ast) { - function removeLoaderByName(path, name) { - const loadersNode = path.value.value; +module.exports = function(j: Ijscodeshit, ast: IPath<*>) { + function removeLoaderByName(path: IPath<*>, name: string) { + const loadersNode: Object = path.value.value; switch (loadersNode.type) { case j.ArrayExpression.name: { - let loaders = loadersNode.elements.map(p => { + let loaders = (loadersNode: IArrayExpression).elements.map(p => { return utils.safeTraverse(p, ["properties", "0", "value", "value"]); }); const loaderIndex = loaders.indexOf(name); if (loaders.length && loaderIndex > -1) { - // Remove loader from the array + // Remove loader from the array loaders.splice(loaderIndex, 1); // and from AST loadersNode.elements.splice(loaderIndex, 1); @@ -25,9 +32,9 @@ module.exports = function(j, ast) { break; } case j.Literal.name: { - // If only the loader with the matching name was used - // we can remove the whole Property node completely - if (loadersNode.value === name) { + // If only the loader with the matching name was used + // we can remove the whole Property node completely + if ((loadersNode: ILiteral).value === name) { j(path.parent).remove(); } break; @@ -35,25 +42,19 @@ module.exports = function(j, ast) { } } - function removeLoaders(ast) { + function removeLoaders(ast: IPath<*>) { ast - .find(j.Property, { - key: { - name: "use" - } - }) - .forEach(path => removeLoaderByName(path, "json-loader")); + .find(j.Property, { key: { name: "use" } }) + .forEach((path: IPath<*>) => removeLoaderByName(path, "json-loader")); ast - .find(j.Property, { - key: { - name: "loader" - } - }) - .forEach(path => removeLoaderByName(path, "json-loader")); + .find(j.Property, { key: { name: "loader" } }) + .forEach((path: IPath<*>) => removeLoaderByName(path, "json-loader")); } - const transforms = [removeLoaders]; + const transforms = [ + removeLoaders + ]; transforms.forEach(t => t(ast)); diff --git a/lib/transformations/resolve/resolve.js b/lib/transformations/resolve/resolve.js index 6c91c54280a..2ee320ca97e 100644 --- a/lib/transformations/resolve/resolve.js +++ b/lib/transformations/resolve/resolve.js @@ -1,24 +1,32 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + IProperty, + IObjectExpression, + IArrayExpression +} from "../../types"; -module.exports = function transformer(j, ast) { - const getRootVal = p => { +module.exports = function transformer(j: Ijscodeshit, ast: IPath<*>) { + + const getRootVal = (p: IPath>): IProperty => { return p.node.value.properties.filter(prop => prop.key.name === "root")[0]; }; const getRootIndex = p => { - return p.node.value.properties.reduce((rootIndex, prop, index) => { - return prop.key.name === "root" ? index : rootIndex; - }, -1); + return p.node.value.properties + .reduce((rootIndex, prop, index) => { + return prop.key.name === "root" ? index : rootIndex; + }, -1); }; - const isModulePresent = p => { - const modules = p.node.value.properties.filter( - prop => prop.key.name === "modules" - ); + const isModulePresent = (p: IPath>) => { + const modules = p.node.value.properties.filter(prop => prop.key.name === "modules"); return modules.length > 0 && modules[0]; }; - const createModuleArray = p => { + const createModuleArray = (p: IPath>): IPath> => { const rootVal = getRootVal(p); let modulesVal = null; if (rootVal.value.type === "ArrayExpression") { @@ -29,11 +37,7 @@ module.exports = function transformer(j, ast) { let module = isModulePresent(p); if (!module) { - module = j.property( - "init", - j.identifier("modules"), - j.arrayExpression(modulesVal) - ); + module = j.property("init", j.identifier("modules"), j.arrayExpression(modulesVal)); p.node.value.properties = p.node.value.properties.concat([module]); } else { module.value.elements = module.value.elements.concat(modulesVal); @@ -45,12 +49,11 @@ module.exports = function transformer(j, ast) { return ast .find(j.Property) - .filter(p => { - return ( - p.node.key.name === "resolve" && - p.node.value.properties.filter(prop => prop.key.name === "root") - .length === 1 - ); + .filter((p: IPath>) => { + return p.node.key.name === "resolve" + && p.node.value.properties + .filter(prop => prop.key.name === "root") + .length === 1; }) .forEach(createModuleArray); }; diff --git a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js index a4e71398126..adf5f8e0aed 100644 --- a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js +++ b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js @@ -1,26 +1,32 @@ -"use strict"; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath +} from "../../types"; const findPluginsByName = require("../utils").findPluginsByName; -module.exports = function(j, ast) { +module.exports = function(j: Ijscodeshit, ast: IPath<*>) { + function createSourceMapsProperty() { return j.property("init", j.identifier("sourceMap"), j.identifier("true")); } - return findPluginsByName(j, ast, [ - "webpack.optimize.UglifyJsPlugin" - ]).forEach(path => { - const args = path.value.arguments; + return findPluginsByName(j, ast, ["webpack.optimize.UglifyJsPlugin"]) + .forEach(path => { + const args = path.value.arguments; - if (args.length) { - // Plugin is called with object as arguments - j(path) - .find(j.ObjectExpression) - .get("properties") - .value.push(createSourceMapsProperty()); - } else { - // Plugin is called without arguments - args.push(j.objectExpression([createSourceMapsProperty()])); - } - }); + if (args.length) { + // Plugin is called with object as arguments + j(path) + .find(j.ObjectExpression) + .get("properties") + .value + .push(createSourceMapsProperty()); + } else { + // Plugin is called without arguments + args.push(j.objectExpression([createSourceMapsProperty()])); + } + }); }; diff --git a/lib/transformations/utils.js b/lib/transformations/utils.js index c0ce8b35c86..35c8651a41c 100644 --- a/lib/transformations/utils.js +++ b/lib/transformations/utils.js @@ -1,8 +1,19 @@ -"use strict"; - -function safeTraverse(obj, paths) { - let val = obj; - let idx = 0; +// @flow +// eslint-disable-next-line node/no-unsupported-features +import type { + Ijscodeshit, + IPath, + IProperty, + ILiteral, + IIdentifier, + IVariableDeclarator, + IObjectExpression, + IArrayExpression +} from "../types"; + +function safeTraverse(obj: Object, paths: string[]): ?any { + let val: Object = obj; + let idx: number = 0; while (idx < paths.length) { if (!val) { @@ -15,17 +26,15 @@ function safeTraverse(obj, paths) { } // Convert nested MemberExpressions to strings like webpack.optimize.DedupePlugin -function memberExpressionToPathString(path) { +function memberExpressionToPathString(path: Object): string { if (path && path.object) { - return [memberExpressionToPathString(path.object), path.property.name].join( - "." - ); + return [memberExpressionToPathString(path.object), path.property.name].join("."); } return path.name; } // Convert Array like ['webpack', 'optimize', 'DedupePlugin'] to nested MemberExpressions -function pathsToMemberExpression(j, paths) { +function pathsToMemberExpression(j: Ijscodeshit, paths: string[]) { if (!paths.length) { return null; } else if (paths.length === 1) { @@ -47,16 +56,17 @@ function pathsToMemberExpression(j, paths) { * * @param j — jscodeshift API * @param { Node } node - Node to start search from -* @param { Array } pluginNamesArray - Array of plugin names like `webpack.optimize.LoaderOptionsPlugin` +* @param { Array } pluginNamesArray - Array of plugin names like `webpack.LoaderOptionsPlugin` * @returns Path * */ -function findPluginsByName(j, node, pluginNamesArray) { - return node.find(j.NewExpression).filter(path => { - return pluginNamesArray.some( - plugin => - memberExpressionToPathString(path.get("callee").value) === plugin - ); - }); +function findPluginsByName(j: Ijscodeshit, node: IPath<*>, pluginNamesArray: string[]): IPath<*> { + return node + .find(j.NewExpression) + .filter(path => { + return pluginNamesArray.some( + plugin => memberExpressionToPathString(path.get("callee").value) === plugin + ); + }); } /* @@ -68,12 +78,8 @@ function findPluginsByName(j, node, pluginNamesArray) { * @param { Node } node - Node to start search from * @returns Path * */ -function findPluginsRootNodes(j, node) { - return node.find(j.Property, { - key: { - name: "plugins" - } - }); +function findPluginsRootNodes(j: Ijscodeshit, node: IPath<*>): IPath> { + return node.find(j.Property, { key: { name: "plugins" } }); } /* @@ -86,7 +92,7 @@ function findPluginsRootNodes(j, node) { * @param { string | number | boolean } value - Property value * @returns Node * */ -function createProperty(j, key, value) { +function createProperty(j: Ijscodeshit, key: string | number, value: any): IProperty<*> { return j.property( "init", createIdentifierOrLiteral(j, key), @@ -104,8 +110,8 @@ function createProperty(j, key, value) { * @returns { Node } * */ -function createLiteral(j, val) { - let literalVal = val; +function createLiteral(j: Ijscodeshit, val: string | boolean | number): IPath { + let literalVal: any = val; // We'll need String to native type conversions if (typeof val === "string") { // 'true' => true @@ -128,7 +134,7 @@ function createLiteral(j, val) { * @returns { Node } * */ -function createIdentifierOrLiteral(j, val) { +function createIdentifierOrLiteral(j: Ijscodeshit, val: any): any { // IPath | IPath doesn't work, find another way let literalVal = val; // We'll need String to native type conversions if (typeof val === "string" || val.__paths) { @@ -166,14 +172,12 @@ function createIdentifierOrLiteral(j, val) { * * @param j — jscodeshift API * @param { NodePath } rooNodePath - `plugins: []` NodePath where plugin should be added. See https://github.com/facebook/jscodeshift/wiki/jscodeshift-Documentation#nodepaths - * @param { string } pluginName - ex. `webpack.optimize.LoaderOptionsPlugin` + * @param { string } pluginName - ex. `webpack.LoaderOptionsPlugin` * @param { Object } options - plugin options * @returns void * */ -function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { - const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [ - pluginName - ]); +function createOrUpdatePluginByName(j: Ijscodeshit, rootNodePath: IPath<*>, pluginName: string, options: any) { + const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [pluginName]); let optionsProps; if (options) { optionsProps = Object.keys(options).map(key => { @@ -190,9 +194,11 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { if (args.length) { // Plugin is called with object as arguments // we will merge those objects - let currentProps = j(path).find(j.ObjectExpression).get("properties"); + let currentProps = j(path) + .find(j.ObjectExpression) + .get("properties"); - optionsProps.forEach(opt => { + optionsProps.forEach((opt: any) => { // Search for same keys in the existing object const existingProps = j(currentProps) .find(j.Identifier) @@ -208,9 +214,12 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { currentProps.value.push(opt); } }); + } else { // Plugin is called without arguments - args.push(j.objectExpression(optionsProps)); + args.push( + j.objectExpression(optionsProps) + ); } } }); @@ -238,9 +247,8 @@ function createOrUpdatePluginByName(j, rootNodePath, pluginName, options) { * @returns { string } variable name - ex. 'var s = require(s) gives "s"` * */ -function findVariableToPlugin(j, rootNode, pluginPackageName) { - const moduleVarNames = rootNode - .find(j.VariableDeclarator) +function findVariableToPlugin(j: Ijscodeshit, rootNode: IPath<*>, pluginPackageName: string): ?string { + const moduleVarNames: IVariableDeclarator[] = rootNode.find(j.VariableDeclarator) .filter(j.filters.VariableDeclarator.requiresModule(pluginPackageName)) .nodes(); if (moduleVarNames.length === 0) return null; @@ -256,15 +264,17 @@ function findVariableToPlugin(j, rootNode, pluginPackageName) { * @returns {boolean} */ -function isType(path, type) { +function isType(path: IPath<*>, type: string): boolean { return path.type === type; } -function findObjWithOneOfKeys(p, keyNames) { - return p.value.properties.reduce((predicate, prop) => { - const name = prop.key.name; - return keyNames.indexOf(name) > -1 || predicate; - }, false); +function findObjWithOneOfKeys(p: IPath<*>, keyNames: string[]): boolean { + return p.value.properties + .reduce((predicate, prop) => { + const name = prop.key.name; + return keyNames.indexOf(name) > -1 + || predicate; + }, false); } /* @@ -277,11 +287,14 @@ function findObjWithOneOfKeys(p, keyNames) { * @returns {NodePath} - the created ast */ -function getRequire(j, constName, packagePath) { +function getRequire(j: Ijscodeshit, constName: string, packagePath: string): IPath { return j.variableDeclaration("const", [ j.variableDeclarator( j.identifier(constName), - j.callExpression(j.identifier("require"), [j.literal(packagePath)]) + j.callExpression( + j.identifier("require"), + [j.literal(packagePath)] + ) ) ]); } @@ -297,10 +310,8 @@ function getRequire(j, constName, packagePath) { * @returns - nothing */ -function checkIfExistsAndAddValue(j, node, key, value) { - const existingProp = node.value.properties.filter( - prop => prop.key.name === key - ); +function checkIfExistsAndAddValue(j: Ijscodeshit, node: IPath, key: string, value: string): void { + const existingProp = node.value.properties.filter(prop => prop.key.name === key); let prop; if (existingProp.length > 0) { prop = existingProp[0]; @@ -319,7 +330,7 @@ function checkIfExistsAndAddValue(j, node, key, value) { * @param { String } key - st name * @returns - { Array } arr - An empty array */ -function createEmptyArrayProperty(j, key) { +function createEmptyArrayProperty(j: Ijscodeshit, key: string): IProperty { return j.property("init", j.identifier(key), j.arrayExpression([])); } @@ -330,28 +341,25 @@ function createEmptyArrayProperty(j, key) { * @param j — jscodeshift API * @param { String } key - object name * @param { string } subProps - computed value of the property +* @param { Boolean } shouldDropKeys - * @returns - { Array } arr - An array with the object properties */ -function createArrayWithChildren(j, key, subProps, shouldDropKeys) { +function createArrayWithChildren(j: Ijscodeshit, key: string, subProps: { [string]: any }, shouldDropKeys: boolean) { let arr = createEmptyArrayProperty(j, key); if (shouldDropKeys) { - subProps.forEach(subProperty => { + subProps.forEach((subProperty: IPath<*>) => { let objectOfArray = j.objectExpression([]); - if (typeof subProperty !== "string") { + if (typeof(subProperty) !== "string") { loopThroughObjects(j, objectOfArray, subProperty); arr.value.elements.push(objectOfArray); } else { - return arr.value.elements.push( - createIdentifierOrLiteral(j, subProperty) - ); + return arr.value.elements.push(createIdentifierOrLiteral(j, subProperty)); } }); } else { - Object.keys(subProps[key]).forEach(subProperty => { - arr.value.elements.push( - createIdentifierOrLiteral(j, subProps[key][subProperty]) - ); + Object.keys(subProps[key]).forEach((subProperty) => { + arr.value.elements.push(createIdentifierOrLiteral(j, subProps[key][subProperty])); }); } return arr; @@ -368,30 +376,24 @@ function createArrayWithChildren(j, key, subProps, shouldDropKeys) { * nothing is left */ -function loopThroughObjects(j, p, obj) { - Object.keys(obj).forEach(prop => { +function loopThroughObjects(j: Ijscodeshit, p: IObjectExpression, obj: Object): void { + Object.keys(obj).forEach((prop) => { if (prop.indexOf("inject") >= 0) { - return p.properties.push(createIdentifierOrLiteral(j, obj[prop])); + // TODO to insert the type of node, identifier or literal + const propertyExpression: IPath<*> = createIdentifierOrLiteral(j, obj[prop]); + return p.properties.push(propertyExpression); } // eslint-disable-next-line no-irregular-whitespace - if (typeof obj[prop] !== "object" || obj[prop] instanceof RegExp) { - p.properties.push( - createObjectWithSuppliedProperty( - j, - prop, - createIdentifierOrLiteral(j, obj[prop]) - ) - ); + if (typeof(obj[prop]) !== "object" || obj[prop] instanceof RegExp) { + p.properties.push(createObjectWithSuppliedProperty( + j, prop, createIdentifierOrLiteral(j, obj[prop]) + )); } else if (Array.isArray(obj[prop])) { let arrayProp = createArrayWithChildren(j, prop, obj[prop], true); p.properties.push(arrayProp); } else { let objectBlock = j.objectExpression([]); - let propertyOfBlock = createObjectWithSuppliedProperty( - j, - prop, - objectBlock - ); + let propertyOfBlock = createObjectWithSuppliedProperty(j, prop, objectBlock); loopThroughObjects(j, objectBlock, obj[prop]); p.properties.push(propertyOfBlock); } @@ -408,7 +410,7 @@ function loopThroughObjects(j, p, obj) { * @returns - { Node } - An property with the supplied property */ -function createObjectWithSuppliedProperty(j, key, prop) { +function createObjectWithSuppliedProperty(j: Ijscodeshit, key: string, prop: any): IProperty<*> { return j.property("init", j.identifier(key), prop); } @@ -421,7 +423,7 @@ function createObjectWithSuppliedProperty(j, key, prop) { * @returns - { Node } - A literal node with the found regexp */ -function createExternalRegExp(j, prop) { +function createExternalRegExp(j: Ijscodeshit, prop: any): IPath { let regExpProp = prop.__paths[0].value.program.body[0].expression; return j.literal(regExpProp.value); } @@ -437,8 +439,8 @@ function createExternalRegExp(j, prop) { * @returns - { Node } - Returns node the pushed property */ -function pushCreateProperty(j, p, key, val) { - let property; +function pushCreateProperty(j: Ijscodeshit, p: IPath, key: string, val: any): number { + let property: string | IPath | IPath; if (val.hasOwnProperty("type")) { property = val; } else { @@ -460,45 +462,32 @@ function pushCreateProperty(j, p, key, val) { *subProperty is an array, else it will invoke a function that will push a single node */ -function pushObjectKeys(j, p, webpackProperties, name) { - p.value.properties - .filter(n => safeTraverse(n, ["key", "name"]) === name) - .forEach(prop => { - Object.keys(webpackProperties).forEach(webpackProp => { - if (webpackProp.indexOf("inject") >= 0) { - return prop.value.properties.push( - createIdentifierOrLiteral(j, webpackProperties[webpackProp]) - ); - } else if (Array.isArray(webpackProperties[webpackProp])) { - const propArray = createArrayWithChildren( - j, - webpackProp, - webpackProperties[webpackProp], - true - ); - return prop.value.properties.push(propArray); - } else if ( - typeof webpackProperties[webpackProp] !== "object" || - webpackProperties[webpackProp].__paths || - webpackProperties[webpackProp] instanceof RegExp - ) { - return pushCreateProperty( - j, - prop, - webpackProp, - webpackProperties[webpackProp] - ); - } else { - pushCreateProperty(j, prop, webpackProp, j.objectExpression([])); - return pushObjectKeys( - j, - prop, - webpackProperties[webpackProp], - webpackProp - ); - } - }); +function pushObjectKeys(j: Ijscodeshit, p: IPath<*>, webpackProperties: Object, name: string): any { + p.value.properties.filter(n => + (safeTraverse(n, ["key", "name"]) === name) + ).forEach((prop) => { + Object.keys(webpackProperties).forEach((webpackProp) => { + if (webpackProp.indexOf("inject") >= 0) { + return prop.value.properties.push(createIdentifierOrLiteral(j, webpackProperties[webpackProp])); + } else if (Array.isArray(webpackProperties[webpackProp])) { + const propArray = createArrayWithChildren( + j, webpackProp, webpackProperties[webpackProp], true + ); + return prop.value.properties.push(propArray); + } else if (typeof(webpackProperties[webpackProp]) !== "object" || webpackProperties[webpackProp].__paths || webpackProperties[webpackProp] instanceof RegExp) { + return pushCreateProperty( + j, prop, webpackProp, webpackProperties[webpackProp] + ); + } else { + pushCreateProperty( + j, prop, webpackProp, j.objectExpression([]) + ); + return pushObjectKeys( + j, prop, webpackProperties[webpackProp], webpackProp + ); + } }); + }); } /* @@ -516,7 +505,7 @@ function pushObjectKeys(j, p, webpackProperties, name) { * @returns - { Function } cb - Returns the callback and pushes a new node */ -function isAssignment(j, p, cb, identifier, property) { +function isAssignment(j: Ijscodeshit, p: IPath<*>, cb: () => void, identifier: string, property: Object): any { if (p.parent.value.type === "AssignmentExpression") { if (j) { return cb(j, p, identifier, property); diff --git a/lib/types.js b/lib/types.js new file mode 100644 index 00000000000..fc5651e22c6 --- /dev/null +++ b/lib/types.js @@ -0,0 +1,183 @@ +// @flow +/* eslint-disable node/no-unsupported-features */ + +export type Ijscodeshit = { + literal: (literalVal: string | boolean | number) => IPath, + identifier: (literalVal: string | boolean | number) => IPath, + property: (name: string, key: any, assignee: any) => IProperty<*>, + memberExpression: (first: any, second: any) => any, + (): IPath<*>, + // (node: IPath<*>): IPath<*>, + objectExpression: (options: any[]) => IObjectExpression, + arrayExpression: () => any, + program: (paths: string[]) => IPath<*>, + callExpression: () => IPath, + objectProperty: (node: any, objectLiteral?: Object) => IPath, + filters: { + VariableDeclarator: { + requiresModule: (moduelToRequire: any) => () => void + } + }, + variableDeclaration: (declarationName: string, declaratino: any) => IPath, + variableDeclarator: (declarator: any, expression: any) => IPath, + newExpression: (rightExpression: any, leftExpressino: any) => IIdentifier, + + // primitives expressions + NewExpression: Expression, + MemberExpression: Expression, + CallExpression: Expression, + ObjectExpression: Expression, + Literal: Expression, + Property: Expression, + VariableDeclarator: Expression, + Identifier: Expression, + ArrayExpression: Expression, + Program: Expression +}; + +export type Expression = { + name: string +} + +export type IPath = { + value: NodeType, + parent: IPath<*>, + node: NodeType, + type: string, + find: (memberToFind: Expression) => IPath<*>, + size: () => number, + filter: (callback: (node: IPath<*>) => any) => IPath<*>, + forEach: (callback: (node: IPath<*>) => any | void) => IPath<*>, + replaceWith: (any) => IPath<*>, + toSource: (options?: Object) => IPath<*>, + get: (property: string) => any, + remove: (node: any) => void, + nodes: () => any[] +} +/** + * [IAstNodeCommentLine description] + * @type {Object} + */ +export type IAstNodeCommentLine = { + type: string, + value: string, + start: number, + end: number, + loc: ILoc, + rage: number[] +} + +/** + * [ILoc description] + * @type {Object} + */ +type ILoc = { + start: { + line: number, + column: number + }, + end: { + line: number, + column: number + } +} + +/** + * [ITokenType description] + * @type {Object} + */ +export type ITokenType = { + loc: ILoc, + end: number, + start: number, + type: { + label: string, + keyword: string, + beforeExpr: boolean, + startsExpr: boolean, + rightAssociative: boolean, + isLoop: boolean, + isAssign: boolean, + prefix: boolean, + postfix: boolean, + binop: any, + updateContext: any + } +} + +export type ILiteral = { + type: string, + start: number, + end: number, + loc: ILoc, + value: string, + rawValue: string, + raw: string, + name: string +} + +export type INewExpression = { + arguments: any[] +} + +export type IObjectExpression = { + properties: any[], + type: string, + range: [number, number], + loc: ILoc +} + +export type IProperty = { + type: string, + key: IIdentifier, + computed: boolean, + kind: string, + value: any, // any node + loc: ILoc, + value: NodeType +} + +export type IIdentifier = { + name: string, + type: string, + loc: ILoc, + range: [number, number] +} + +export type IArrayExpression = { + elements: any[], // ILiteral[] | IObjectExpression[] + value: any // any node +} + +export type IMemberExpression = { + type: string, + computed: boolean, + object: IIdentifier, + property: IIdentifier, + range: [number, number], + loc: ILoc +} + +export type IVariableDeclaration = { + declaration: IVariableDeclarator[], + type: string, + kind: string, + range: [number, number], + loc: ILoc +} + +export type IVariableDeclarator = { + type: string, + id: IIdentifier, + init: any, + range: [number, number], + loc: ILoc +} + +export type ICallExpression = { + type: string, + callee: IMemberExpression, + arguments?: any[], + range: [number, number], + loc: ILoc +} diff --git a/package-lock.json b/package-lock.json index 4716022286a..504137263c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1080,6 +1080,15 @@ "babel-plugin-transform-regenerator": "6.24.1" } }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "6.22.0" + } + }, "babel-preset-stage-1": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", @@ -2310,6 +2319,15 @@ } } }, + "eslint-plugin-flowtype": { + "version": "2.35.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.35.1.tgz", + "integrity": "sha512-YTCeVsMOi3ga8PJjdAV97FaTNXNknzrO+4ZDMHJN65i4uMjL5KgfgQZpyVsBirWOfgXMKRduxpsyM64K/0LbXw==", + "dev": true, + "requires": { + "lodash": "4.17.4" + } + }, "eslint-plugin-node": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.1.0.tgz", @@ -2594,6 +2612,12 @@ "write": "0.2.1" } }, + "flow-bin": { + "version": "0.49.1", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.49.1.tgz", + "integrity": "sha1-yeRWsxc6dTWk/68olWNSxju44+k=", + "dev": true + }, "flow-parser": { "version": "0.49.1", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.49.1.tgz", @@ -3407,6 +3431,14 @@ } } }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "requires": { + "safe-buffer": "5.0.1" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -3417,14 +3449,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", - "requires": { - "safe-buffer": "5.0.1" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -6324,6 +6348,16 @@ "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", "dev": true }, + "pre-commit": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", + "integrity": "sha1-287g7p3nI15X95xW186UZBpp7sY=", + "requires": { + "cross-spawn": "5.1.0", + "spawn-sync": "1.0.15", + "which": "1.2.14" + } + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -7124,6 +7158,14 @@ "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=" }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", @@ -7148,14 +7190,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringify-object": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.0.tgz", diff --git a/package.json b/package.json index 46840e10053..3a99527065c 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,11 @@ "babel-eslint": "^7.2.3", "babel-jest": "^20.0.3", "babel-polyfill": "^6.23.0", + "babel-preset-flow": "^6.23.0", "eslint": "^4.2.0", + "eslint-plugin-flowtype": "^2.35.1", "eslint-plugin-node": "^5.1.0", + "flow-bin": "^0.49.1", "husky": "^0.14.3", "jest": "^20.0.4", "jest-cli": "^20.0.4", From c09be3b9523d408d1ec79682c9ecabd157163f3a Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 20 Sep 2017 16:52:49 -0400 Subject: [PATCH 03/24] docs: Documentation for migrate (#175) * initial draft of migrate documentation * formatting * formatting * added summary of migrate changes * maintain consistent usage of user through documentation --- MIGRATE.md | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/MIGRATE.md b/MIGRATE.md index 8b137891791..84803a84c17 100644 --- a/MIGRATE.md +++ b/MIGRATE.md @@ -1 +1,161 @@ +## webpack-migrate +The `migrate` feature eases the transition from [version 1](http://webpack.github.io/docs/) to [version 2](https://gist.github.com/sokra/27b24881210b56bbaff7). `migrate` +also allows users to switch to the new version of webpack without having to extensively [refactor](https://webpack.js.org/guides/migrating/). + +### Usage +To use `migrate`, run the following command, with the value of `` being a path to an existing webpack configuration file + +```bash +webpack-cli migrate +``` + +Given a basic configuration file like so: + +```javascript +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const path = require('path'); +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +const webpack = require('webpack'); + +module.exports = { + + entry: { + index: './src/index.js', + vendor: './src/vendor.js' + }, + + output: { + filename: '[name].[chunkhash].js', + chunkFilename: '[name].[chunkhash].js', + path: path.resolve(__dirname, 'dist') + }, + + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel', + query: { + presets: ['es2015'] + } + }, + { + test: /\.(scss|css)$/, + loader: ExtractTextPlugin.extract('style', 'css!sass') + } + ] + }, + + plugins: [ + new UglifyJSPlugin(), + + new ExtractTextPlugin('styles-[contentHash].css'), + + new webpack.optimize.CommonsChunkPlugin({ + name: 'common', + filename: 'common-[hash].min.js' + }), + + new HtmlWebpackPlugin() + ] + +}; +``` + +The `migrate` command, when run, will show the proposed changes to the config file in the terminal, prompting the user to +accept the changes or not: + +```bash +$ webpack-cli migrate ./webpack.config.js + ✔ Reading webpack config + ✔ Migrating config from v1 to v2 +- loaders: [ ++ rules: [ +- loader: 'babel', + query: { ++ use: [{ + loader: 'babel-loader' + }], + options: { +- loader: ExtractTextPlugin.extract('style', 'css!sass') ++ use: ExtractTextPlugin.extract({ + fallback: 'style', + use: 'css!sass' + }) +? Are you sure these changes are fine? Yes + + ✔︎ New webpack v2 config file is at /Users/obuckley/Workspace/github/repos/webpack-migrate-sandbox/webpack.config.js +``` + + +After it has run, we have our new webpack config file! + +```javascript +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const path = require('path'); +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +const webpack = require('webpack'); + +module.exports = { + + entry: { + index: './src/index.js', + vendor: './src/vendor.js' + }, + + output: { + filename: '[name].[chunkhash].js', + chunkFilename: '[name].[chunkhash].js', + path: path.resolve(__dirname, 'dist') + }, + + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + use: [{ + loader: 'babel-loader' + }], + options: { + presets: ['es2015'] + } + }, + { + test: /\.(scss|css)$/, + use: ExtractTextPlugin.extract({ + fallback: 'style', + use: 'css!sass' + }) + } + ] + }, + + plugins: [ + new UglifyJSPlugin(), + + new ExtractTextPlugin('styles-[contentHash].css'), + + new webpack.optimize.CommonsChunkPlugin({ + name: 'common', + filename: 'common-[hash].min.js' + }), + + new HtmlWebpackPlugin() + ] + +}; +``` + +In summary, we can see the follow changes were made +1. The webpack schema for using loaders has changed + - `loaders` is now `module.rules` + - `query` is now `options` +1. All loaders now have to have the *loader* suffix, e.g. `babel` -> `babel-loader` + +**Note: This command does NOT handle updating dependencies in _package.json_, it is only a migration tool for the config +file itself. Users are expected to manage dependencies themselves.** From e887dba1fe8a8ca08daf43e8bb895ec184892dba Mon Sep 17 00:00:00 2001 From: Ian J Sikes Date: Fri, 29 Sep 2017 14:59:31 -0700 Subject: [PATCH 04/24] Feature/generate loader (#183) * Add template files for loader yeoman generator * Create yeoman generator for a webpack loader project * Add tests for loader-generator * Add `mkdirp` dependency for loader-generator * Add function to create yeoman env and run loader-generator * Add `generate-loader` command to webpack-cli * Copy loader templates from proper directory * Add template files for plugin generator * Create yeoman generator for webpack plugins * Add function to create yeoman env and run plugin generator * Add cli command to generate plugin * Register generate- commands in yargs * Add template files for loader examples and tests * Copy loader test and example template files in generator * Add template files for plugin examples and tests * Copy plugin test and example template files in generator * Refactor generator file copying, switch .includes with .indexOf in CLI arg parsing * Change `indexOf('foo') > -1` to `indexOf('foo') >= 0` * Factor out generator copy utilities into separate module * Rewrite generators using a function that returns a customized generator class * Fix linting errors * Remove //eslint-disable lines from template files --- bin/config-yargs.js | 10 +++ bin/webpack.js | 8 +- lib/generate-loader/index.js | 17 ++++ lib/generate-loader/loader-generator.js | 58 +++++++++++++ lib/generate-loader/loader-generator.test.js | 17 ++++ .../examples/simple/src/index.js.tpl | 11 +++ .../examples/simple/src/lazy-module.js.tpl | 1 + .../simple/src/static-esm-module.js.tpl | 1 + .../examples/simple/webpack.config.js.tpl | 27 ++++++ .../templates/src/_index.js.tpl | 25 ++++++ lib/generate-loader/templates/src/cjs.js.tpl | 1 + .../test/fixtures/simple-file.js.tpl | 3 + .../templates/test/functional.test.js.tpl | 21 +++++ .../templates/test/test-utils.js.tpl | 82 +++++++++++++++++++ .../templates/test/unit.test.js.tpl | 32 ++++++++ lib/generate-plugin/index.js | 17 ++++ lib/generate-plugin/plugin-generator.js | 40 +++++++++ .../examples/simple/_webpack.config.js.tpl | 13 +++ .../examples/simple/src/index.js.tpl | 11 +++ .../examples/simple/src/lazy-module.js.tpl | 1 + .../simple/src/static-esm-module.js.tpl | 1 + .../templates/src/_index.js.tpl | 16 ++++ lib/generate-plugin/templates/src/cjs.js.tpl | 1 + .../test/fixtures/simple-file.js.tpl | 3 + .../templates/test/functional.test.js.tpl | 10 +++ .../templates/test/test-utils.js.tpl | 82 +++++++++++++++++++ lib/utils/copy-utils.js | 50 +++++++++++ lib/utils/webpack-generator.js | 65 +++++++++++++++ package-lock.json | 7 -- package.json | 1 + 30 files changed, 623 insertions(+), 9 deletions(-) create mode 100644 lib/generate-loader/index.js create mode 100644 lib/generate-loader/loader-generator.js create mode 100644 lib/generate-loader/loader-generator.test.js create mode 100644 lib/generate-loader/templates/examples/simple/src/index.js.tpl create mode 100644 lib/generate-loader/templates/examples/simple/src/lazy-module.js.tpl create mode 100644 lib/generate-loader/templates/examples/simple/src/static-esm-module.js.tpl create mode 100644 lib/generate-loader/templates/examples/simple/webpack.config.js.tpl create mode 100644 lib/generate-loader/templates/src/_index.js.tpl create mode 100644 lib/generate-loader/templates/src/cjs.js.tpl create mode 100644 lib/generate-loader/templates/test/fixtures/simple-file.js.tpl create mode 100644 lib/generate-loader/templates/test/functional.test.js.tpl create mode 100644 lib/generate-loader/templates/test/test-utils.js.tpl create mode 100644 lib/generate-loader/templates/test/unit.test.js.tpl create mode 100644 lib/generate-plugin/index.js create mode 100644 lib/generate-plugin/plugin-generator.js create mode 100644 lib/generate-plugin/templates/examples/simple/_webpack.config.js.tpl create mode 100644 lib/generate-plugin/templates/examples/simple/src/index.js.tpl create mode 100644 lib/generate-plugin/templates/examples/simple/src/lazy-module.js.tpl create mode 100644 lib/generate-plugin/templates/examples/simple/src/static-esm-module.js.tpl create mode 100644 lib/generate-plugin/templates/src/_index.js.tpl create mode 100644 lib/generate-plugin/templates/src/cjs.js.tpl create mode 100644 lib/generate-plugin/templates/test/fixtures/simple-file.js.tpl create mode 100644 lib/generate-plugin/templates/test/functional.test.js.tpl create mode 100644 lib/generate-plugin/templates/test/test-utils.js.tpl create mode 100644 lib/utils/copy-utils.js create mode 100644 lib/utils/webpack-generator.js diff --git a/bin/config-yargs.js b/bin/config-yargs.js index c7ca20a2b67..ac2187e350d 100644 --- a/bin/config-yargs.js +++ b/bin/config-yargs.js @@ -28,6 +28,16 @@ module.exports = function(yargs) { "Migrate your webpack configuration from webpack 1 to webpack 2", group: INIT_GROUP }, + "generate-loader": { + type: "boolean", + describe: "Generates a new webpack loader project", + group: INIT_GROUP + }, + "generate-plugin": { + type: "boolean", + describe: "Generates a new webpack plugin project", + group: INIT_GROUP + }, config: { type: "string", describe: "Path to the config file", diff --git a/bin/webpack.js b/bin/webpack.js index 19e31709f9a..db514c3f362 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -159,11 +159,11 @@ if (argv.verbose) { argv["display-cached"] = true; argv["display-cached-assets"] = true; } -if (argv._.includes("init")) { +if (argv._.indexOf("init") >= 0) { const initPkgs = argv._.length === 1 ? [] : [argv._.pop()]; return require("../lib/initialize")(initPkgs); -} else if (argv._.includes("migrate")) { +} else if (argv._.indexOf("migrate") >= 0) { const filePaths = argv._.length === 1 ? [] : [argv._.pop()]; if (!filePaths.length) { throw new Error("Please specify a path to your webpack config"); @@ -171,6 +171,10 @@ if (argv._.includes("init")) { const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); return require("../lib/migrate.js")(inputConfigPath, inputConfigPath); +} else if (argv._.indexOf("generate-loader") >= 0) { + return require("../lib/generate-loader/index.js")(); +} else if (argv._.indexOf("generate-plugin") >= 0) { + return require("../lib/generate-plugin/index.js")(); } else { var options = require("./convert-argv")(yargs, argv); diff --git a/lib/generate-loader/index.js b/lib/generate-loader/index.js new file mode 100644 index 00000000000..ff83f5f84fa --- /dev/null +++ b/lib/generate-loader/index.js @@ -0,0 +1,17 @@ +var yeoman = require("yeoman-environment"); +var LoaderGenerator = require("./loader-generator").LoaderGenerator; + +/** + * Runs a yeoman generator to create a new webpack loader project + * @returns {void} + */ +function loaderCreator() { + var env = yeoman.createEnv(); + var generatorName = "webpack-loader-generator"; + + env.registerStub(LoaderGenerator, generatorName); + + env.run(generatorName); +} + +module.exports = loaderCreator; diff --git a/lib/generate-loader/loader-generator.js b/lib/generate-loader/loader-generator.js new file mode 100644 index 00000000000..9e5a22e27b5 --- /dev/null +++ b/lib/generate-loader/loader-generator.js @@ -0,0 +1,58 @@ +var path = require("path"); +var _ = require("lodash"); +var webpackGenerator = require("../utils/webpack-generator"); + +/** + * Formats a string into webpack loader format + * (eg: 'style-loader', 'raw-loader') + * + * @param {string} name A loader name to be formatted + * @returns {string} The formatted string + */ +function makeLoaderName(name) { + name = _.kebabCase(name); + if (!/loader$/.test(name)) { + name += "-loader"; + } + return name; +} + +/** + * A yeoman generator class for creating a webpack + * loader project. It adds some starter loader code + * and runs `webpack-defaults`. + * + * @class LoaderGenerator + * @extends {Generator} + */ +var LoaderGenerator = webpackGenerator( + [{ + type: "input", + name: "name", + message: "Loader name", + default: "my-loader", + filter: makeLoaderName, + validate: str => str.length > 0, + }], + path.join(__dirname, "templates"), + [ + "src/cjs.js.tpl", + "test/test-utils.js.tpl", + "test/unit.test.js.tpl", + "test/functional.test.js.tpl", + "test/fixtures/simple-file.js.tpl", + "examples/simple/webpack.config.js.tpl", + "examples/simple/src/index.js.tpl", + "examples/simple/src/lazy-module.js.tpl", + "examples/simple/src/static-esm-module.js.tpl", + ], + [ + "src/_index.js.tpl", + ], + (gen) => ({ name: gen.props.name }) +); + +module.exports = { + makeLoaderName, + LoaderGenerator, +}; diff --git a/lib/generate-loader/loader-generator.test.js b/lib/generate-loader/loader-generator.test.js new file mode 100644 index 00000000000..3dc3e55dd7e --- /dev/null +++ b/lib/generate-loader/loader-generator.test.js @@ -0,0 +1,17 @@ +"use strict"; + +var makeLoaderName = require("./loader-generator").makeLoaderName; + +describe("makeLoaderName", () => { + + it("should kebab-case loader name and append '-loader'", () => { + var loaderName = makeLoaderName("This is a test"); + expect(loaderName).toEqual("this-is-a-test-loader"); + }); + + it("should not modify a properly formatted loader name", () => { + var loaderName = makeLoaderName("properly-named-loader"); + expect(loaderName).toEqual("properly-named-loader"); + }); + +}); diff --git a/lib/generate-loader/templates/examples/simple/src/index.js.tpl b/lib/generate-loader/templates/examples/simple/src/index.js.tpl new file mode 100644 index 00000000000..2c49d366408 --- /dev/null +++ b/lib/generate-loader/templates/examples/simple/src/index.js.tpl @@ -0,0 +1,11 @@ +import esmModule from './static-esm-module'; + +const getLazyModule = () => System.import('./lazy-module'); + +setTimeout(() => { + getLazyModule.then((modDefault) => { + console.log(modDefault); + }); +}, 300); + +console.log(esmModule); diff --git a/lib/generate-loader/templates/examples/simple/src/lazy-module.js.tpl b/lib/generate-loader/templates/examples/simple/src/lazy-module.js.tpl new file mode 100644 index 00000000000..f3dac067326 --- /dev/null +++ b/lib/generate-loader/templates/examples/simple/src/lazy-module.js.tpl @@ -0,0 +1 @@ +export default 'lazy'; diff --git a/lib/generate-loader/templates/examples/simple/src/static-esm-module.js.tpl b/lib/generate-loader/templates/examples/simple/src/static-esm-module.js.tpl new file mode 100644 index 00000000000..d02ba545bd3 --- /dev/null +++ b/lib/generate-loader/templates/examples/simple/src/static-esm-module.js.tpl @@ -0,0 +1 @@ +export default 'foo'; diff --git a/lib/generate-loader/templates/examples/simple/webpack.config.js.tpl b/lib/generate-loader/templates/examples/simple/webpack.config.js.tpl new file mode 100644 index 00000000000..75b6744b7a2 --- /dev/null +++ b/lib/generate-loader/templates/examples/simple/webpack.config.js.tpl @@ -0,0 +1,27 @@ +const path = require('path'); + +module.exports = { + entry: './src/index.js', + output: { + path: path.join(__dirname, 'example_dist'), + filename: '[name].chunk.js', + }, + module: { + rules: [ + { + test: /\.js$/, + use: [ + { + loader: 'example-loader', + options: {}, + }, + ], + }, + ], + }, + resolveLoader: { + alias: { + 'example-loader': require.resolve('../../src/'), + }, + }, +}; diff --git a/lib/generate-loader/templates/src/_index.js.tpl b/lib/generate-loader/templates/src/_index.js.tpl new file mode 100644 index 00000000000..c69d5d329a6 --- /dev/null +++ b/lib/generate-loader/templates/src/_index.js.tpl @@ -0,0 +1,25 @@ +/** + * See the webpack docs for more information about loaders: + * https://github.com/webpack/docs/wiki/how-to-write-a-loader + */ + +export default function loader(source) { + const { loaders, resource, request, version, webpack } = this; + + const newSource = ` + /** + * <%= name %> + * + * Resource Location: ${resource} + * Loaders chained to module: ${JSON.stringify(loaders)} + * Loader API Version: ${version} + * Is this in "webpack mode": ${webpack} + * This is the users request for the module: ${request} + */ + /** + * Original Source From Loader + */ + ${source}`; + + return newSource; +} diff --git a/lib/generate-loader/templates/src/cjs.js.tpl b/lib/generate-loader/templates/src/cjs.js.tpl new file mode 100644 index 00000000000..82657ce3a74 --- /dev/null +++ b/lib/generate-loader/templates/src/cjs.js.tpl @@ -0,0 +1 @@ +module.exports = require('./index').default; diff --git a/lib/generate-loader/templates/test/fixtures/simple-file.js.tpl b/lib/generate-loader/templates/test/fixtures/simple-file.js.tpl new file mode 100644 index 00000000000..908ed137dff --- /dev/null +++ b/lib/generate-loader/templates/test/fixtures/simple-file.js.tpl @@ -0,0 +1,3 @@ +import foo from "./foo"; // eslint-disable-line + +console.log(foo); diff --git a/lib/generate-loader/templates/test/functional.test.js.tpl b/lib/generate-loader/templates/test/functional.test.js.tpl new file mode 100644 index 00000000000..b69f8d7f17a --- /dev/null +++ b/lib/generate-loader/templates/test/functional.test.js.tpl @@ -0,0 +1,21 @@ +import { + runWebpackExampleInMemory, +} from '../test/test-utils'; + +test('should run with no errors or warnings', async () => { + const buildStats = await runWebpackExampleInMemory('simple'); + const { errors, warnings } = buildStats; + + expect([...errors, ...warnings].length).toBe(0); +}); + +test('should append transformations to JavaScript module', async () => { + const buildStats = await runWebpackExampleInMemory('simple'); + const { modules } = buildStats; + + const moduleToTest = modules[0].source()._source._value; + const loadedString = '* Original Source From Loader'; + + expect(moduleToTest).toEqual(expect.stringContaining(loadedString)); + expect(moduleToTest).toMatchSnapshot(); +}); diff --git a/lib/generate-loader/templates/test/test-utils.js.tpl b/lib/generate-loader/templates/test/test-utils.js.tpl new file mode 100644 index 00000000000..bf8116f065f --- /dev/null +++ b/lib/generate-loader/templates/test/test-utils.js.tpl @@ -0,0 +1,82 @@ +import path from 'path'; +import webpack from 'webpack'; +import Promise from 'bluebird'; +import MemoryFs from 'memory-fs'; + +const fs = new MemoryFs(); +const unitTestFixtures = path.resolve(__dirname, 'fixtures'); + +/** + * + * + * @param {string} fixtureName + * @param {string} [withQueryString=''] + * @returns {string} Absolute path of a file with query that is to be run by a loader. + */ +function getFixtureResource(fixtureName, withQueryString = '') { + return `${getFixture(fixtureName)}?${withQueryString}`; +} + +/** + * + * + * @param {string} fixtureName + * @returns {string} Absolute path of a file with query that is to be run by a loader. + */ +function getFixture(fixtureName) { + return path.resolve(unitTestFixtures, `${fixtureName}.js`); +} + +/** + * + * + * @param {Object} withOptions - Loader Options + * @returns {{loader: string, options: Object}} + */ +function getLoader(withOptions) { + return [{ loader: path.resolve(__dirname, '../dist/index.js'), options: withOptions }]; +} + +/** + * + * + * @param {string} exampleName + * @returns {Object|Array} - Returns an object or array of objects representing the webpack configuration options + */ +function getExampleConfig(exampleName) { + return require(`../examples/${exampleName}/webpack.config.js`); +} + +/** + * + * + * @param {string} exampleName - name of example inside of examples folder + * @returns + */ +async function runWebpackExampleInMemory(exampleName) { + const webpackConfig = getExampleConfig(exampleName); + const compiler = webpack(webpackConfig); + + compiler.outputFileSystem = fs; + + const run = Promise.promisify(compiler.run, { context: compiler }); + const stats = await run(); + + + const { compilation } = stats; + const { errors, warnings, assets, entrypoints, chunks, modules } = compilation; + const statsJson = stats.toJson(); + + return { + assets, + entrypoints, + errors, + warnings, + stats, + chunks, + modules, + statsJson, + }; +} + +export { getExampleConfig, runWebpackExampleInMemory, fs, getFixtureResource, getLoader, getFixture }; diff --git a/lib/generate-loader/templates/test/unit.test.js.tpl b/lib/generate-loader/templates/test/unit.test.js.tpl new file mode 100644 index 00000000000..ac1b90a4e4a --- /dev/null +++ b/lib/generate-loader/templates/test/unit.test.js.tpl @@ -0,0 +1,32 @@ +import fs from 'fs'; +import Promise from 'bluebird'; +import { runLoaders } from 'loader-runner'; +import { getFixtureResource, getFixture, getLoader } from './test-utils'; + +const runLoadersPromise = Promise.promisify(runLoaders); +const readFilePromise = Promise.promisify(fs.readFile, { context: fs }); + + +const loaders = getLoader(); + +describe('Example Loader Tests: Fixture: simple-file', () => { + const fixtureName = 'simple-file'; + const resource = getFixture(fixtureName); + + test('loaded file should be different', async () => { + const originalSource = await readFilePromise(resource); + const { result } = await runLoadersPromise({ resource: getFixtureResource(fixtureName), loaders }); + + expect(result).not.toEqual(originalSource); + }); + + test('loader prepends correct information', async () => { + const { result } = await runLoadersPromise({ resource: getFixtureResource(fixtureName), loaders }); + const resultMatcher = expect.arrayContaining([ + expect.stringContaining(' * Original Source From Loader'), + ]); + + expect(result).toEqual(resultMatcher); + expect(result).toMatchSnapshot(); + }); +}); diff --git a/lib/generate-plugin/index.js b/lib/generate-plugin/index.js new file mode 100644 index 00000000000..82fe7dd386d --- /dev/null +++ b/lib/generate-plugin/index.js @@ -0,0 +1,17 @@ +var yeoman = require("yeoman-environment"); +var PluginGenerator = require("./plugin-generator").PluginGenerator; + +/** + * Runs a yeoman generator to create a new webpack plugin project + * @returns {void} + */ +function pluginCreator() { + var env = yeoman.createEnv(); + var generatorName = "webpack-plugin-generator"; + + env.registerStub(PluginGenerator, generatorName); + + env.run(generatorName); +} + +module.exports = pluginCreator; diff --git a/lib/generate-plugin/plugin-generator.js b/lib/generate-plugin/plugin-generator.js new file mode 100644 index 00000000000..fcddd43993a --- /dev/null +++ b/lib/generate-plugin/plugin-generator.js @@ -0,0 +1,40 @@ +var path = require("path"); +var _ = require("lodash"); +var webpackGenerator = require("../utils/webpack-generator"); + +/** + * A yeoman generator class for creating a webpack + * plugin project. It adds some starter plugin code + * and runs `webpack-defaults`. + * + * @class PluginGenerator + * @extends {Generator} + */ +var PluginGenerator = webpackGenerator( + [{ + type: "input", + name: "name", + message: "Plugin name", + default: "my-webpack-plugin", + filter: _.kebabCase, + validate: str => str.length > 0, + }], + path.join(__dirname, "templates"), + [ + "src/cjs.js.tpl", + "test/test-utils.js.tpl", + "test/functional.test.js.tpl", + "examples/simple/src/index.js.tpl", + "examples/simple/src/lazy-module.js.tpl", + "examples/simple/src/static-esm-module.js.tpl", + ], + [ + "src/_index.js.tpl", + "examples/simple/_webpack.config.js.tpl", + ], + (gen) => ({ name: _.upperFirst(_.camelCase(gen.props.name)) }) +); + +module.exports = { + PluginGenerator, +}; diff --git a/lib/generate-plugin/templates/examples/simple/_webpack.config.js.tpl b/lib/generate-plugin/templates/examples/simple/_webpack.config.js.tpl new file mode 100644 index 00000000000..e50ecc3e588 --- /dev/null +++ b/lib/generate-plugin/templates/examples/simple/_webpack.config.js.tpl @@ -0,0 +1,13 @@ +const path = require('path'); +const <%= name %> = require('../../src/index.js'); + +module.exports = { + entry: './src/index.js', + output: { + path: path.join(__dirname, 'example_dist'), + filename: '[name].chunk.js', + }, + plugins: [ + new <%= name %>() + ] +}; diff --git a/lib/generate-plugin/templates/examples/simple/src/index.js.tpl b/lib/generate-plugin/templates/examples/simple/src/index.js.tpl new file mode 100644 index 00000000000..2c49d366408 --- /dev/null +++ b/lib/generate-plugin/templates/examples/simple/src/index.js.tpl @@ -0,0 +1,11 @@ +import esmModule from './static-esm-module'; + +const getLazyModule = () => System.import('./lazy-module'); + +setTimeout(() => { + getLazyModule.then((modDefault) => { + console.log(modDefault); + }); +}, 300); + +console.log(esmModule); diff --git a/lib/generate-plugin/templates/examples/simple/src/lazy-module.js.tpl b/lib/generate-plugin/templates/examples/simple/src/lazy-module.js.tpl new file mode 100644 index 00000000000..f3dac067326 --- /dev/null +++ b/lib/generate-plugin/templates/examples/simple/src/lazy-module.js.tpl @@ -0,0 +1 @@ +export default 'lazy'; diff --git a/lib/generate-plugin/templates/examples/simple/src/static-esm-module.js.tpl b/lib/generate-plugin/templates/examples/simple/src/static-esm-module.js.tpl new file mode 100644 index 00000000000..d02ba545bd3 --- /dev/null +++ b/lib/generate-plugin/templates/examples/simple/src/static-esm-module.js.tpl @@ -0,0 +1 @@ +export default 'foo'; diff --git a/lib/generate-plugin/templates/src/_index.js.tpl b/lib/generate-plugin/templates/src/_index.js.tpl new file mode 100644 index 00000000000..1a9001b8d67 --- /dev/null +++ b/lib/generate-plugin/templates/src/_index.js.tpl @@ -0,0 +1,16 @@ +/** + * See the webpack docs for more information about plugins: + * https://github.com/webpack/docs/wiki/how-to-write-a-plugin + */ + +function <%= name %>(options) { + // Setup the plugin instance with options... +} + +<%= name %>.prototype.apply = function(compiler) { + compiler.plugin('done', function() { + console.log('Hello World!'); + }); +}; + +module.exports = <%= name %>; diff --git a/lib/generate-plugin/templates/src/cjs.js.tpl b/lib/generate-plugin/templates/src/cjs.js.tpl new file mode 100644 index 00000000000..82657ce3a74 --- /dev/null +++ b/lib/generate-plugin/templates/src/cjs.js.tpl @@ -0,0 +1 @@ +module.exports = require('./index').default; diff --git a/lib/generate-plugin/templates/test/fixtures/simple-file.js.tpl b/lib/generate-plugin/templates/test/fixtures/simple-file.js.tpl new file mode 100644 index 00000000000..908ed137dff --- /dev/null +++ b/lib/generate-plugin/templates/test/fixtures/simple-file.js.tpl @@ -0,0 +1,3 @@ +import foo from "./foo"; // eslint-disable-line + +console.log(foo); diff --git a/lib/generate-plugin/templates/test/functional.test.js.tpl b/lib/generate-plugin/templates/test/functional.test.js.tpl new file mode 100644 index 00000000000..07f2099cec0 --- /dev/null +++ b/lib/generate-plugin/templates/test/functional.test.js.tpl @@ -0,0 +1,10 @@ +import { + runWebpackExampleInMemory, +} from '../test/test-utils'; + +test('should run with no errors or warnings', async () => { + const buildStats = await runWebpackExampleInMemory('simple'); + const { errors, warnings } = buildStats; + + expect([...errors, ...warnings].length).toBe(0); +}); diff --git a/lib/generate-plugin/templates/test/test-utils.js.tpl b/lib/generate-plugin/templates/test/test-utils.js.tpl new file mode 100644 index 00000000000..bf8116f065f --- /dev/null +++ b/lib/generate-plugin/templates/test/test-utils.js.tpl @@ -0,0 +1,82 @@ +import path from 'path'; +import webpack from 'webpack'; +import Promise from 'bluebird'; +import MemoryFs from 'memory-fs'; + +const fs = new MemoryFs(); +const unitTestFixtures = path.resolve(__dirname, 'fixtures'); + +/** + * + * + * @param {string} fixtureName + * @param {string} [withQueryString=''] + * @returns {string} Absolute path of a file with query that is to be run by a loader. + */ +function getFixtureResource(fixtureName, withQueryString = '') { + return `${getFixture(fixtureName)}?${withQueryString}`; +} + +/** + * + * + * @param {string} fixtureName + * @returns {string} Absolute path of a file with query that is to be run by a loader. + */ +function getFixture(fixtureName) { + return path.resolve(unitTestFixtures, `${fixtureName}.js`); +} + +/** + * + * + * @param {Object} withOptions - Loader Options + * @returns {{loader: string, options: Object}} + */ +function getLoader(withOptions) { + return [{ loader: path.resolve(__dirname, '../dist/index.js'), options: withOptions }]; +} + +/** + * + * + * @param {string} exampleName + * @returns {Object|Array} - Returns an object or array of objects representing the webpack configuration options + */ +function getExampleConfig(exampleName) { + return require(`../examples/${exampleName}/webpack.config.js`); +} + +/** + * + * + * @param {string} exampleName - name of example inside of examples folder + * @returns + */ +async function runWebpackExampleInMemory(exampleName) { + const webpackConfig = getExampleConfig(exampleName); + const compiler = webpack(webpackConfig); + + compiler.outputFileSystem = fs; + + const run = Promise.promisify(compiler.run, { context: compiler }); + const stats = await run(); + + + const { compilation } = stats; + const { errors, warnings, assets, entrypoints, chunks, modules } = compilation; + const statsJson = stats.toJson(); + + return { + assets, + entrypoints, + errors, + warnings, + stats, + chunks, + modules, + statsJson, + }; +} + +export { getExampleConfig, runWebpackExampleInMemory, fs, getFixtureResource, getLoader, getFixture }; diff --git a/lib/utils/copy-utils.js b/lib/utils/copy-utils.js new file mode 100644 index 00000000000..e515d862257 --- /dev/null +++ b/lib/utils/copy-utils.js @@ -0,0 +1,50 @@ +var path = require("path"); + +/** + * Takes in a file path in the `./templates` directory. Copies that + * file to the destination, with the `.tpl` extension stripped. + * + * @param {Generator} generator A Yeoman Generator instance + * @param {string} templateDir Absolute path to template directory + * @returns {Function} A curried function that takes a file path and copies it + */ +var generatorCopy = (generator, templateDir) => /** @param {string} filePath */ (filePath) => { + var sourceParts = templateDir.split(path.delimiter); + sourceParts.push.apply(sourceParts, filePath.split("/")); + var targetParts = path.dirname(filePath).split("/"); + targetParts.push(path.basename(filePath, ".tpl")); + + generator.fs.copy( + path.join.apply(null, sourceParts), + generator.destinationPath(path.join.apply(null, targetParts)) + ); +}; + +/** + * Takes in a file path in the `./templates` directory. Copies that + * file to the destination, with the `.tpl` extension and `_` prefix + * stripped. Passes `this.props` to the template. + * + * @param {Generator} generator A Yeoman Generator instance + * @param {string} templateDir Absolute path to template directory + * @param {any} templateData An object containing the data passed to + * the template files. + * @returns {Function} A curried function that takes a file path and copies it + */ +var generatorCopyTpl = (generator, templateDir, templateData) => /** @param {string} filePath */ (filePath) => { + var sourceParts = templateDir.split(path.delimiter); + sourceParts.push.apply(sourceParts, filePath.split("/")); + var targetParts = path.dirname(filePath).split("/"); + targetParts.push(path.basename(filePath, ".tpl").slice(1)); + + generator.fs.copyTpl( + path.join.apply(null, sourceParts), + generator.destinationPath(path.join.apply(null, targetParts)), + templateData + ); +}; + +module.exports = { + generatorCopy, + generatorCopyTpl, +}; diff --git a/lib/utils/webpack-generator.js b/lib/utils/webpack-generator.js new file mode 100644 index 00000000000..f7f058098a6 --- /dev/null +++ b/lib/utils/webpack-generator.js @@ -0,0 +1,65 @@ +var path = require("path"); +var mkdirp = require("mkdirp"); +var Generator = require("yeoman-generator"); +var copyUtils = require("../utils/copy-utils"); + +/** + * Creates a Yeoman Generator that generates a project conforming + * to webpack-defaults. + * + * @param {any[]} prompts An array of Yeoman prompt objects + * + * @param {string} templateDir Absolute path to template directory + * + * @param {string[]} copyFiles An array of file paths (relative to `./templates`) + * of files to be copied to the generated project. File paths should be of the + * form `path/to/file.js.tpl`. + * + * @param {string[]} copyTemplateFiles An array of file paths (relative to + * `./templates`) of files to be copied to the generated project. Template + * file paths should be of the form `path/to/_file.js.tpl`. + * + * @param {Function} templateFn A function that is passed a generator instance and + * returns an object containing data to be supplied to the template files. + * + * @returns {Generator} A class extending Generator + */ +function webpackGenerator(prompts, templateDir, copyFiles, copyTemplateFiles, templateFn) { + //eslint-disable-next-line + return class extends Generator { + prompting() { + return this.prompt(prompts).then(props => { + this.props = props; + }); + } + + default() { + var currentDirName = path.basename(this.destinationPath()); + if (currentDirName !== this.props.name) { + this.log(` + Your project must be inside a folder named ${this.props.name} + I will create this folder for you. + `); + mkdirp(this.props.name); + var pathToProjectDir = this.destinationPath(this.props.name); + this.destinationRoot(pathToProjectDir); + } + } + + writing() { + this.copy = copyUtils.generatorCopy(this, templateDir); + this.copyTpl = copyUtils.generatorCopyTpl(this, templateDir, templateFn(this)); + + copyFiles.forEach(this.copy); + copyTemplateFiles.forEach(this.copyTpl); + } + + install() { + this.npmInstall(["webpack-defaults", "bluebird"], { "save-dev": true }).then(() => { + this.spawnCommand("npm", ["run", "webpack-defaults"]); + }); + } + }; +} + +module.exports = webpackGenerator; diff --git a/package-lock.json b/package-lock.json index 504137263c9..db75dc657e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1449,7 +1449,6 @@ "requires": { "anymatch": "1.3.0", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -5869,12 +5868,6 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, - "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=", - "optional": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", diff --git a/package.json b/package.json index 3a99527065c..9c28c1776d4 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "listr": "^0.12.0", "loader-utils": "^1.1.0", "lodash": "^4.17.4", + "mkdirp": "^0.5.1", "p-each-series": "^1.0.0", "p-lazy": "^1.0.0", "prettier": "^1.5.3", From c8633c0475cc1860f025933b43a8e32915bb7376 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 22:57:26 +0200 Subject: [PATCH 05/24] Add unit tests for CLI and add flow compilation (#186) * add unit tests for everything and flow compilation * add travis builds * add cli to signature & add ignore to trash code * port to jest * remove redundant cli command * Feature/generate loader (#183) * Add template files for loader yeoman generator * Create yeoman generator for a webpack loader project * Add tests for loader-generator * Add `mkdirp` dependency for loader-generator * Add function to create yeoman env and run loader-generator * Add `generate-loader` command to webpack-cli * Copy loader templates from proper directory * Add template files for plugin generator * Create yeoman generator for webpack plugins * Add function to create yeoman env and run plugin generator * Add cli command to generate plugin * Register generate- commands in yargs * Add template files for loader examples and tests * Copy loader test and example template files in generator * Add template files for plugin examples and tests * Copy plugin test and example template files in generator * Refactor generator file copying, switch .includes with .indexOf in CLI arg parsing * Change `indexOf('foo') > -1` to `indexOf('foo') >= 0` * Factor out generator copy utilities into separate module * Rewrite generators using a function that returns a customized generator class * Fix linting errors * Remove //eslint-disable lines from template files * add unit tests for everything and flow compilation * add travis builds * add cli to signature & add ignore to trash code * port to jest * remove redundant cli command * rebase against master --- .eslintignore | 2 + .gitignore | 6 + .travis.yml | 1 + bin/config-yargs.js | 2 +- bin/convert-argv.js | 126 +- bin/prepareOptions.js | 30 + bin/webpack.js | 456 ++-- lib/creator/yeoman/utils/entry.js | 120 +- lib/creator/yeoman/webpack-generator.js | 482 ++-- lib/generate-loader/loader-generator.js | 28 +- lib/generate-loader/loader-generator.test.js | 2 - lib/generate-plugin/plugin-generator.js | 29 +- .../bannerPlugin/bannerPlugin.js | 20 +- .../extractTextPlugin/extractTextPlugin.js | 27 +- lib/transformations/index.js | 31 +- .../loaderOptionsPlugin.js | 21 +- lib/transformations/loaders/loaders.js | 143 +- lib/transformations/outputPath/outputPath.js | 57 +- .../removeDeprecatedPlugins.js | 29 +- .../removeJsonLoader/removeJsonLoader.js | 10 +- lib/transformations/resolve/resolve.js | 35 +- .../uglifyJsPlugin/uglifyJsPlugin.js | 36 +- lib/transformations/utils.js | 243 +- lib/types.js | 49 +- lib/utils/copy-utils.js | 13 +- lib/utils/npm-exists.js | 2 +- lib/utils/resolve-packages.js | 3 +- lib/utils/validateSchema.js | 6 +- lib/utils/webpack-generator.js | 18 +- package-lock.json | 2324 ++++++++++++----- package.json | 25 +- test/BinTestCases.test.js | 145 + test/binCases/config-name/found-many/index.js | 1 + .../binCases/config-name/found-many/index2.js | 1 + .../binCases/config-name/found-many/index3.js | 0 test/binCases/config-name/found-many/stdin.js | 10 + .../binCases/config-name/found-many/test.opts | 6 + .../config-name/found-many/webpack.config.js | 16 + test/binCases/config-name/found-one/index.js | 1 + test/binCases/config-name/found-one/index2.js | 1 + test/binCases/config-name/found-one/stdin.js | 9 + test/binCases/config-name/found-one/test.opts | 5 + .../config-name/found-one/webpack.config.js | 12 + test/binCases/config-name/not-found/stdin.js | 7 + test/binCases/config-name/not-found/test.opts | 2 + .../config-name/not-found/webpack.config.js | 5 + test/binCases/configFile/profile/bar.js | 1 + test/binCases/configFile/profile/foo.js | 3 + test/binCases/configFile/profile/index.js | 1 + test/binCases/configFile/profile/stdin.js | 11 + .../configFile/profile/webpack.config.js | 6 + test/binCases/entry/multi-file/a.js | 1 + test/binCases/entry/multi-file/index.js | 1 + test/binCases/entry/multi-file/stdin.js | 11 + test/binCases/entry/multi-file/test.opts | 6 + .../entry/multi-file/webpack.config.js | 1 + test/binCases/entry/named-entry/a.js | 1 + test/binCases/entry/named-entry/index.js | 1 + test/binCases/entry/named-entry/stdin.js | 11 + test/binCases/entry/named-entry/test.opts | 6 + .../entry/named-entry/webpack.config.js | 1 + test/binCases/entry/non-hyphenated-args/a.js | 1 + .../entry/non-hyphenated-args/index.js | 1 + .../entry/non-hyphenated-args/stdin.js | 11 + .../entry/non-hyphenated-args/test.opts | 6 + .../non-hyphenated-args/webpack.config.js | 1 + test/binCases/errors/issue-5576/a.js | 1 + test/binCases/errors/issue-5576/a/.keep | 1 + test/binCases/errors/issue-5576/stdin.js | 13 + test/binCases/errors/issue-5576/test.opts | 3 + .../errors/issue-5576/webpack.config.js | 1 + test/binCases/errors/parse/index.js | 1 + test/binCases/errors/parse/stdin.js | 16 + test/binCases/errors/parse/webpack.config.js | 4 + test/binCases/help/help-output/stdin.js | 17 + test/binCases/help/help-output/test.opts | 1 + test/binCases/module/module-bind/file.post | 1 + test/binCases/module/module-bind/file.pre | 1 + test/binCases/module/module-bind/index.js | 3 + .../module/module-bind/post-loader.js | 4 + .../binCases/module/module-bind/pre-loader.js | 4 + test/binCases/module/module-bind/stdin.js | 10 + test/binCases/module/module-bind/test.opts | 7 + .../module/module-bind/webpack.config.js | 5 + .../uglifyjsplugin-empty-args/index.js | 1 + .../uglifyjsplugin-empty-args/stdin.js | 10 + .../uglifyjsplugin-empty-args/test.opts | 6 + .../webpack.config.js | 5 + test/binCases/stats/custom-preset/index.js | 1 + test/binCases/stats/custom-preset/stdin.js | 7 + test/binCases/stats/custom-preset/test.opts | 5 + test/binCases/stats/multi-config/index.js | 1 + test/binCases/stats/multi-config/index2.js | 1 + test/binCases/stats/multi-config/stdin.js | 7 + .../stats/multi-config/webpack.config.js | 12 + test/binCases/stats/none/index.js | 1 + test/binCases/stats/none/stdin.js | 7 + test/binCases/stats/none/webpack.config.js | 6 + test/binCases/stats/single-config/index.js | 1 + test/binCases/stats/single-config/stdin.js | 16 + .../stats/single-config/webpack.config.js | 11 + test/binCases/test.opts | 5 + .../watch/multi-config-watch-opt/async | 0 .../watch/multi-config-watch-opt/index.js | 1 + .../watch/multi-config-watch-opt/index2.js | 1 + .../watch/multi-config-watch-opt/stdin.js | 10 + .../watch/multi-config-watch-opt/test.opts | 6 + .../multi-config-watch-opt/webpack.config.js | 10 + test/binCases/watch/multi-config/async | 0 test/binCases/watch/multi-config/index.js | 1 + test/binCases/watch/multi-config/index2.js | 1 + test/binCases/watch/multi-config/stdin.js | 10 + .../watch/multi-config/webpack.config.js | 11 + .../watch/single-config-watch-opt/async | 0 .../watch/single-config-watch-opt/index.js | 0 .../watch/single-config-watch-opt/stdin.js | 10 + .../watch/single-config-watch-opt/test.opts | 6 + .../single-config-watch-opt/webpack.config.js | 5 + test/binCases/watch/single-config/async | 0 test/binCases/watch/single-config/index.js | 0 test/binCases/watch/single-config/stdin.js | 10 + .../watch/single-config/webpack.config.js | 6 + test/js/bin/config-name/found-many/main.js | 74 + test/js/bin/config-name/found-one/main.js | 74 + test/js/bin/configFile/profile/null.js | 90 + test/js/bin/entry/multi-file/null.js | 89 + test/js/bin/entry/named-entry/foo.js | 74 + test/js/bin/entry/named-entry/null.js | 75 + test/js/bin/entry/non-hyphenated-args/main.js | 75 + test/js/bin/entry/non-hyphenated-args/null.js | 74 + test/js/bin/errors/parse/null.js | 73 + test/js/bin/module/module-bind/null.js | 90 + .../plugins/uglifyjsplugin-empty-args/null.js | 1 + test/js/bin/stats/custom-preset/null.js | 74 + test/js/bin/stats/multi-config/null.js | 74 + test/js/bin/stats/none/null.js | 74 + test/js/bin/stats/single-config/null.js | 74 + .../bin/watch/multi-config-watch-opt/null.js | 74 + test/js/bin/watch/multi-config/null.js | 74 + .../bin/watch/single-config-watch-opt/null.js | 73 + test/js/bin/watch/single-config/null.js | 73 + 141 files changed, 4799 insertions(+), 1543 deletions(-) create mode 100644 bin/prepareOptions.js create mode 100644 test/BinTestCases.test.js create mode 100644 test/binCases/config-name/found-many/index.js create mode 100644 test/binCases/config-name/found-many/index2.js create mode 100644 test/binCases/config-name/found-many/index3.js create mode 100644 test/binCases/config-name/found-many/stdin.js create mode 100644 test/binCases/config-name/found-many/test.opts create mode 100644 test/binCases/config-name/found-many/webpack.config.js create mode 100644 test/binCases/config-name/found-one/index.js create mode 100644 test/binCases/config-name/found-one/index2.js create mode 100644 test/binCases/config-name/found-one/stdin.js create mode 100644 test/binCases/config-name/found-one/test.opts create mode 100644 test/binCases/config-name/found-one/webpack.config.js create mode 100644 test/binCases/config-name/not-found/stdin.js create mode 100644 test/binCases/config-name/not-found/test.opts create mode 100644 test/binCases/config-name/not-found/webpack.config.js create mode 100644 test/binCases/configFile/profile/bar.js create mode 100644 test/binCases/configFile/profile/foo.js create mode 100644 test/binCases/configFile/profile/index.js create mode 100644 test/binCases/configFile/profile/stdin.js create mode 100644 test/binCases/configFile/profile/webpack.config.js create mode 100644 test/binCases/entry/multi-file/a.js create mode 100644 test/binCases/entry/multi-file/index.js create mode 100644 test/binCases/entry/multi-file/stdin.js create mode 100644 test/binCases/entry/multi-file/test.opts create mode 100644 test/binCases/entry/multi-file/webpack.config.js create mode 100644 test/binCases/entry/named-entry/a.js create mode 100644 test/binCases/entry/named-entry/index.js create mode 100644 test/binCases/entry/named-entry/stdin.js create mode 100644 test/binCases/entry/named-entry/test.opts create mode 100644 test/binCases/entry/named-entry/webpack.config.js create mode 100644 test/binCases/entry/non-hyphenated-args/a.js create mode 100644 test/binCases/entry/non-hyphenated-args/index.js create mode 100644 test/binCases/entry/non-hyphenated-args/stdin.js create mode 100644 test/binCases/entry/non-hyphenated-args/test.opts create mode 100644 test/binCases/entry/non-hyphenated-args/webpack.config.js create mode 100644 test/binCases/errors/issue-5576/a.js create mode 100644 test/binCases/errors/issue-5576/a/.keep create mode 100644 test/binCases/errors/issue-5576/stdin.js create mode 100644 test/binCases/errors/issue-5576/test.opts create mode 100644 test/binCases/errors/issue-5576/webpack.config.js create mode 100644 test/binCases/errors/parse/index.js create mode 100644 test/binCases/errors/parse/stdin.js create mode 100644 test/binCases/errors/parse/webpack.config.js create mode 100644 test/binCases/help/help-output/stdin.js create mode 100644 test/binCases/help/help-output/test.opts create mode 100644 test/binCases/module/module-bind/file.post create mode 100644 test/binCases/module/module-bind/file.pre create mode 100644 test/binCases/module/module-bind/index.js create mode 100644 test/binCases/module/module-bind/post-loader.js create mode 100644 test/binCases/module/module-bind/pre-loader.js create mode 100644 test/binCases/module/module-bind/stdin.js create mode 100644 test/binCases/module/module-bind/test.opts create mode 100644 test/binCases/module/module-bind/webpack.config.js create mode 100644 test/binCases/plugins/uglifyjsplugin-empty-args/index.js create mode 100644 test/binCases/plugins/uglifyjsplugin-empty-args/stdin.js create mode 100644 test/binCases/plugins/uglifyjsplugin-empty-args/test.opts create mode 100644 test/binCases/plugins/uglifyjsplugin-empty-args/webpack.config.js create mode 100644 test/binCases/stats/custom-preset/index.js create mode 100644 test/binCases/stats/custom-preset/stdin.js create mode 100644 test/binCases/stats/custom-preset/test.opts create mode 100644 test/binCases/stats/multi-config/index.js create mode 100644 test/binCases/stats/multi-config/index2.js create mode 100644 test/binCases/stats/multi-config/stdin.js create mode 100644 test/binCases/stats/multi-config/webpack.config.js create mode 100644 test/binCases/stats/none/index.js create mode 100644 test/binCases/stats/none/stdin.js create mode 100644 test/binCases/stats/none/webpack.config.js create mode 100644 test/binCases/stats/single-config/index.js create mode 100644 test/binCases/stats/single-config/stdin.js create mode 100644 test/binCases/stats/single-config/webpack.config.js create mode 100644 test/binCases/test.opts create mode 100644 test/binCases/watch/multi-config-watch-opt/async create mode 100644 test/binCases/watch/multi-config-watch-opt/index.js create mode 100644 test/binCases/watch/multi-config-watch-opt/index2.js create mode 100644 test/binCases/watch/multi-config-watch-opt/stdin.js create mode 100644 test/binCases/watch/multi-config-watch-opt/test.opts create mode 100644 test/binCases/watch/multi-config-watch-opt/webpack.config.js create mode 100644 test/binCases/watch/multi-config/async create mode 100644 test/binCases/watch/multi-config/index.js create mode 100644 test/binCases/watch/multi-config/index2.js create mode 100644 test/binCases/watch/multi-config/stdin.js create mode 100644 test/binCases/watch/multi-config/webpack.config.js create mode 100644 test/binCases/watch/single-config-watch-opt/async create mode 100644 test/binCases/watch/single-config-watch-opt/index.js create mode 100644 test/binCases/watch/single-config-watch-opt/stdin.js create mode 100644 test/binCases/watch/single-config-watch-opt/test.opts create mode 100644 test/binCases/watch/single-config-watch-opt/webpack.config.js create mode 100644 test/binCases/watch/single-config/async create mode 100644 test/binCases/watch/single-config/index.js create mode 100644 test/binCases/watch/single-config/stdin.js create mode 100644 test/binCases/watch/single-config/webpack.config.js create mode 100644 test/js/bin/config-name/found-many/main.js create mode 100644 test/js/bin/config-name/found-one/main.js create mode 100644 test/js/bin/configFile/profile/null.js create mode 100644 test/js/bin/entry/multi-file/null.js create mode 100644 test/js/bin/entry/named-entry/foo.js create mode 100644 test/js/bin/entry/named-entry/null.js create mode 100644 test/js/bin/entry/non-hyphenated-args/main.js create mode 100644 test/js/bin/entry/non-hyphenated-args/null.js create mode 100644 test/js/bin/errors/parse/null.js create mode 100644 test/js/bin/module/module-bind/null.js create mode 100644 test/js/bin/plugins/uglifyjsplugin-empty-args/null.js create mode 100644 test/js/bin/stats/custom-preset/null.js create mode 100644 test/js/bin/stats/multi-config/null.js create mode 100644 test/js/bin/stats/none/null.js create mode 100644 test/js/bin/stats/single-config/null.js create mode 100644 test/js/bin/watch/multi-config-watch-opt/null.js create mode 100644 test/js/bin/watch/multi-config/null.js create mode 100644 test/js/bin/watch/single-config-watch-opt/null.js create mode 100644 test/js/bin/watch/single-config/null.js diff --git a/.eslintignore b/.eslintignore index 2eee14cbe2a..aa24f295da5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,4 @@ **/__testfixtures__/* coverage +test +dist diff --git a/.gitignore b/.gitignore index 79960dd2d49..798edadc1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ yarn-error.log # Jest Coverage coverage + +# Dist build +dist + +# Test Compilation +test/js/* diff --git a/.travis.yml b/.travis.yml index 807f3a1f60b..4e493cc75ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,6 @@ before_script: - bash <(curl -s https://codecov.io/bash) script: + - npm run prepublish - npm run lint - npm run test diff --git a/bin/config-yargs.js b/bin/config-yargs.js index ac2187e350d..e5cff717a3a 100644 --- a/bin/config-yargs.js +++ b/bin/config-yargs.js @@ -10,7 +10,7 @@ var INIT_GROUP = "Initialization:"; module.exports = function(yargs) { yargs .help("help") - .alias("help", "h", "?") + .alias("help", "h") .version() .alias("version", "v") .options({ diff --git a/bin/convert-argv.js b/bin/convert-argv.js index 29dc5062918..aa77df656fa 100644 --- a/bin/convert-argv.js +++ b/bin/convert-argv.js @@ -1,9 +1,8 @@ -"use strict"; - var path = require("path"); var fs = require("fs"); fs.existsSync = fs.existsSync || path.existsSync; var interpret = require("interpret"); +var prepareOptions = require("./prepareOptions"); module.exports = function(yargs, argv, convertOptions) { var options = []; @@ -20,7 +19,7 @@ module.exports = function(yargs, argv, convertOptions) { argv["optimize-minimize"] = true; argv["define"] = [] .concat(argv["define"] || []) - .concat("process.env.NODE_ENV='production'"); + .concat("process.env.NODE_ENV=\"production\""); } var configFileLoaded = false; @@ -103,14 +102,7 @@ module.exports = function(yargs, argv, convertOptions) { var requireConfig = function requireConfig(configPath) { var options = require(configPath); - var isES6DefaultExportedFunc = - typeof options === "object" && - options !== null && - typeof options.default === "function"; - if (typeof options === "function" || isES6DefaultExportedFunc) { - options = isES6DefaultExportedFunc ? options.default : options; - options = options(argv.env, argv); - } + options = prepareOptions(options, argv); return options; }; @@ -134,7 +126,7 @@ module.exports = function(yargs, argv, convertOptions) { console.error( "Config did not export an object or a function returning an object." ); - process.exit(-1); + process.exit(-1); // eslint-disable-line } // process Promise @@ -147,6 +139,22 @@ module.exports = function(yargs, argv, convertOptions) { return processConfiguredOptions(options.default); } + // filter multi-config by name + if (Array.isArray(options) && argv["config-name"]) { + var namedOptions = options.filter(function(opt) { + return opt.name === argv["config-name"]; + }); + if (namedOptions.length === 0) { + console.error( + "Configuration with name '" + argv["config-name"] + "' was not found." + ); + process.exit(-1); // eslint-disable-line + } else if (namedOptions.length === 1) { + return processConfiguredOptions(namedOptions[0]); + } + options = namedOptions; + } + if (Array.isArray(options)) { options.forEach(processOptions); } else { @@ -169,11 +177,12 @@ module.exports = function(yargs, argv, convertOptions) { options.watchOptions.aggregateTimeout = +argv["watch-aggregate-timeout"]; } - if (argv["watch-poll"]) { + if (typeof argv["watch-poll"] !== undefined) { options.watchOptions = options.watchOptions || {}; - if (typeof argv["watch-poll"] !== "boolean") + if (argv["watch-poll"] === "true" || argv["watch-poll"] === "") + options.watchOptions.poll = true; + else if (!isNaN(argv["watch-poll"])) options.watchOptions.poll = +argv["watch-poll"]; - else options.watchOptions.poll = true; } if (argv["watch-stdin"]) { @@ -233,21 +242,22 @@ module.exports = function(yargs, argv, convertOptions) { } function mapArgToBoolean(name, optionName) { + if (options[optionName || name]) { + options[name] = true; + } + //eslint-disable-next-line + if (name && options[name] == true) { + return; + } ifArg(name, function(bool) { if (bool === true) options[optionName || name] = true; else if (bool === false) options[optionName || name] = false; }); } - //eslint-disable-next-line - function mapArgToPath(name, optionName) { - ifArg(name, function(str) { - options[optionName || name] = path.resolve(str); - }); - } function loadPlugin(name) { var loadUtils = require("loader-utils"); - var args = null; + var args; try { var p = name && name.indexOf("?"); if (p > -1) { @@ -256,7 +266,7 @@ module.exports = function(yargs, argv, convertOptions) { } } catch (e) { console.log("Invalid plugin arguments " + name + " (" + e + ")."); - process.exit(-1); + process.exit(-1); // eslint-disable-line } var path; @@ -265,7 +275,7 @@ module.exports = function(yargs, argv, convertOptions) { path = resolve.sync(process.cwd(), name); } catch (e) { console.log("Cannot resolve plugin " + name + "."); - process.exit(-1); + process.exit(-1); // eslint-disable-line } var Plugin; try { @@ -297,14 +307,21 @@ module.exports = function(yargs, argv, convertOptions) { ifArgPair( "entry", function(name, entry) { - options.entry[name] = entry; + if ( + typeof options.entry[name] !== "undefined" && + options.entry[name] !== null + ) { + options.entry[name] = [].concat(options.entry[name]).concat(entry); + } else { + options.entry[name] = entry; + } }, function() { ensureObject(options, "entry"); } ); - function bindLoaders(arg, collection) { + function bindRules(arg) { ifArgPair( arg, function(name, binding) { @@ -312,28 +329,31 @@ module.exports = function(yargs, argv, convertOptions) { name = binding; binding += "-loader"; } - options.module[collection].push({ + var rule = { + /* eslint-disable no-useless-escape */ test: new RegExp( "\\." + - // eslint thinks that the escapes are useless, - // however, when testing them, the special regex chars - // mess up with the regex we want to use to check. - // eslint-disable-next-line name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + "$" - ), + ) /* eslint-enable no-useless-escape */, loader: binding - }); + }; + if (arg === "module-bind-pre") { + rule.enforce = "pre"; + } else if (arg === "module-bind-post") { + rule.enforce = "post"; + } + options.module.rules.push(rule); }, function() { ensureObject(options, "module"); - ensureArray(options.module, collection); + ensureArray(options.module, "rules"); } ); } - bindLoaders("module-bind", "loaders"); - bindLoaders("module-bind-pre", "preLoaders"); - bindLoaders("module-bind-post", "postLoaders"); + bindRules("module-bind"); + bindRules("module-bind-pre"); + bindRules("module-bind-post"); var defineObject; ifArgPair( @@ -357,7 +377,7 @@ module.exports = function(yargs, argv, convertOptions) { ifArg("output-path", function(value) { ensureObject(options, "output"); - options.output.path = value; + options.output.path = path.resolve(value); }); ifArg("output-filename", function(value) { @@ -502,7 +522,7 @@ module.exports = function(yargs, argv, convertOptions) { ifArg("prefetch", function(request) { ensureArray(options, "plugins"); - var PrefetchPlugin = require("webpack/PrefetchPlugin"); + var PrefetchPlugin = require("webpack/lib/PrefetchPlugin"); options.plugins.push(new PrefetchPlugin(request)); }); @@ -516,16 +536,10 @@ module.exports = function(yargs, argv, convertOptions) { } else { name = value; } - var ProvidePlugin = require("webpack/ProvidePlugin"); + var ProvidePlugin = require("webpack/lib/ProvidePlugin"); options.plugins.push(new ProvidePlugin(name, value)); }); - ifBooleanArg("labeled-modules", function() { - ensureArray(options, "plugins"); - var LabeledModulesPlugin = require("webpack/lib/dependencies/LabeledModulesPlugin"); - options.plugins.push(new LabeledModulesPlugin()); - }); - ifArg("plugin", function(value) { ensureArray(options, "plugins"); options.plugins.push(loadPlugin(value)); @@ -534,15 +548,18 @@ module.exports = function(yargs, argv, convertOptions) { mapArgToBoolean("bail"); mapArgToBoolean("profile"); - if (noOutputFilenameDefined) { ensureObject(options, "output"); if (convertOptions && convertOptions.outputFilename) { - options.output.path = path.dirname(convertOptions.outputFilename); + options.output.path = path.resolve( + path.dirname(convertOptions.outputFilename) + ); options.output.filename = path.basename(convertOptions.outputFilename); } else if (argv._.length > 0) { options.output.filename = argv._.pop(); - options.output.path = path.dirname(options.output.filename); + options.output.path = path.resolve( + path.dirname(options.output.filename) + ); options.output.filename = path.basename(options.output.filename); } else if (configFileLoaded) { throw new Error( @@ -556,7 +573,7 @@ module.exports = function(yargs, argv, convertOptions) { "A configuration file could be named 'webpack.config.js' in the current directory." ); console.error("Use --help to display the CLI options."); - process.exit(-1); + process.exit(-1); // eslint-disable-line } } @@ -584,7 +601,12 @@ module.exports = function(yargs, argv, convertOptions) { if (i < 0 || (j >= 0 && j < i)) { var resolved = path.resolve(content); if (fs.existsSync(resolved)) { - addTo("main", resolved); + addTo( + "main", + `${resolved}${fs.statSync(resolved).isDirectory() + ? path.sep + : ""}` + ); } else { addTo("main", content); } @@ -609,7 +631,7 @@ module.exports = function(yargs, argv, convertOptions) { ); } console.error("Use --help to display the CLI options."); - process.exit(-1); + process.exit(-1); // eslint-disable-line } } }; diff --git a/bin/prepareOptions.js b/bin/prepareOptions.js new file mode 100644 index 00000000000..09d83469dba --- /dev/null +++ b/bin/prepareOptions.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = function prepareOptions(options, argv) { + argv = argv || {}; + + options = handleExport(options); + + if (Array.isArray(options)) { + options = options.map(_options => handleFunction(_options, argv)); + } else { + options = handleFunction(options, argv); + } + return options; +}; + +function handleExport(options) { + const isES6DefaultExported = + typeof options === "object" && + options !== null && + typeof options.default !== "undefined"; + options = isES6DefaultExported ? options.default : options; + return options; +} + +function handleFunction(options, argv) { + if (typeof options === "function") { + options = options(argv.env, argv); + } + return options; +} diff --git a/bin/webpack.js b/bin/webpack.js index db514c3f362..f1f070fb4fe 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -1,36 +1,50 @@ #!/usr/bin/env node + /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ -"use strict"; - var path = require("path"); var resolveCwd = require("resolve-cwd"); - +// Local version replace global one var localCLI = resolveCwd.silent("webpack-cli/bin/webpack"); -if (localCLI && path.relative(localCLI, __filename) !== "") { - require(localCLI); -} else { - try { - require("./webpack"); - } catch (err) { - console.error(`\n ${err.message}`); - process.exitCode = 1; +if (process.argv.slice(2).indexOf("init") >= 0) { + const initPkgs = + process.argv.slice(2).length === 1 ? [] : [process.argv.slice(2).pop()]; + //eslint-disable-next-line + return require("../dist/initialize")(initPkgs); +} else if (process.argv.slice(2).indexOf("migrate") >= 0) { + const filePaths = + process.argv.slice(2).length === 1 ? [] : [process.argv.slice(2).pop()]; + if (!filePaths.length) { + throw new Error("Please specify a path to your webpack config"); } + const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); + //eslint-disable-next-line + return require("../dist/migrate.js")(inputConfigPath, inputConfigPath); +} else if (process.argv.slice(2).indexOf("generate-loader") >= 0) { + return require("../lib/generate-loader/index.js")(); +} else if (process.argv.slice(2).indexOf("generate-plugin") >= 0) { + return require("../lib/generate-plugin/index.js")(); } +if (localCLI && path.relative(localCLI, __filename) !== "") { + return require(localCLI); +} else { + return require("webpack/bin/webpack"); +} +// eslint-disable-next-line var yargs = require("yargs").usage( - "webpack " + + "webpack-cli " + require("../package.json").version + "\n" + "Usage: https://webpack.js.org/api/cli/\n" + "Usage without config file: webpack [] \n" + "Usage with config file: webpack" ); -require("./config-yargs")(yargs); +require("./config-yargs")(yargs); var DISPLAY_GROUP = "Stats options:"; var BASIC_GROUP = "Basic options:"; @@ -134,262 +148,262 @@ yargs.options({ group: DISPLAY_GROUP, describe: "Display information about exports provided from modules" }, + "display-optimization-bailout": { + type: "boolean", + group: DISPLAY_GROUP, + describe: + "Display information about why optimization bailed out for modules" + }, "display-error-details": { type: "boolean", group: DISPLAY_GROUP, describe: "Display details about errors" }, + display: { + type: "string", + group: DISPLAY_GROUP, + describe: + "Select display preset (verbose, detailed, normal, minimal, errors-only, none)" + }, verbose: { type: "boolean", group: DISPLAY_GROUP, describe: "Show more details" } }); +// yargs will terminate the process early when the user uses help or version. +// This causes large help outputs to be cut short (https://github.com/nodejs/node/wiki/API-changes-between-v0.10-and-v4#process). +// To prevent this we use the yargs.parse API and exit the process normally -var argv = yargs.argv; - -if (argv.verbose) { - argv["display-reasons"] = true; - argv["display-depth"] = true; - argv["display-entrypoints"] = true; - argv["display-used-exports"] = true; - argv["display-provided-exports"] = true; - argv["display-error-details"] = true; - argv["display-modules"] = true; - argv["display-cached"] = true; - argv["display-cached-assets"] = true; -} -if (argv._.indexOf("init") >= 0) { - const initPkgs = argv._.length === 1 ? [] : [argv._.pop()]; - - return require("../lib/initialize")(initPkgs); -} else if (argv._.indexOf("migrate") >= 0) { - const filePaths = argv._.length === 1 ? [] : [argv._.pop()]; - if (!filePaths.length) { - throw new Error("Please specify a path to your webpack config"); - } - const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); - - return require("../lib/migrate.js")(inputConfigPath, inputConfigPath); -} else if (argv._.indexOf("generate-loader") >= 0) { - return require("../lib/generate-loader/index.js")(); -} else if (argv._.indexOf("generate-plugin") >= 0) { - return require("../lib/generate-plugin/index.js")(); -} else { - var options = require("./convert-argv")(yargs, argv); - - return processOptions(options); -} - -function ifArg(name, fn, init) { - if (Array.isArray(argv[name])) { - if (init) init(); - argv[name].forEach(fn); - } else if (typeof argv[name] !== "undefined") { - if (init) init(); - fn(argv[name], -1); - } -} //eslint-disable-next-line -function processOptions(options) { - // process Promise - if (typeof options.then === "function") { - options.then(processOptions).catch(function(err) { - console.error(err.stack || err); - process.exitCode = -1; - }); +yargs.parse(process.argv.slice(2), (err, argv, output) => { + // arguments validation failed + if (err && output) { + console.error(output); + process.exitCode = 1; return; } - - var firstOptions = [].concat(options)[0]; - var statsPresetToOptions = require("webpack/lib/Stats.js").presetToOptions; - - var outputOptions = options.stats; - if (typeof outputOptions === "boolean" || typeof outputOptions === "string") { - outputOptions = statsPresetToOptions(outputOptions); - } else if (!outputOptions) { - outputOptions = {}; + if (output) { + console.log(output); + return; } - outputOptions = Object.create(outputOptions); - if (Array.isArray(options) && !outputOptions.children) { - outputOptions.children = options.map(o => o.stats); + if (argv.verbose) { + argv["display"] = "verbose"; } - if (typeof outputOptions.context === "undefined") - outputOptions.context = firstOptions.context; - - ifArg("json", function(bool) { - if (bool) outputOptions.json = bool; - }); - if (typeof outputOptions.colors === "undefined") - outputOptions.colors = require("supports-color"); + var options = require("./convert-argv")(yargs, argv); - ifArg("sort-modules-by", function(value) { - outputOptions.modulesSort = value; - }); + function ifArg(name, fn, init) { + if (Array.isArray(argv[name])) { + if (init) init(); + argv[name].forEach(fn); + } else if (typeof argv[name] !== "undefined") { + if (init) init(); + fn(argv[name], -1); + } + } - ifArg("sort-chunks-by", function(value) { - outputOptions.chunksSort = value; - }); + function processOptions(options) { + // process Promise + if (typeof options.then === "function") { + options.then(processOptions).catch(function(err) { + console.error(err.stack || err); + process.exit(1); // eslint-disable-line + }); + return; + } - ifArg("sort-assets-by", function(value) { - outputOptions.assetsSort = value; - }); + var firstOptions = [].concat(options)[0]; + var statsPresetToOptions = require("webpack/lib/Stats.js").presetToOptions; + + var outputOptions = options.stats; + if ( + typeof outputOptions === "boolean" || + typeof outputOptions === "string" + ) { + outputOptions = statsPresetToOptions(outputOptions); + } else if (!outputOptions) { + outputOptions = {}; + } - ifArg("display-exclude", function(value) { - outputOptions.exclude = value; - }); + ifArg("display", function(preset) { + outputOptions = statsPresetToOptions(preset); + }); - if (!outputOptions.json) { - if (typeof outputOptions.cached === "undefined") - outputOptions.cached = false; - if (typeof outputOptions.cachedAssets === "undefined") - outputOptions.cachedAssets = false; + outputOptions = Object.create(outputOptions); + if (Array.isArray(options) && !outputOptions.children) { + outputOptions.children = options.map(o => o.stats); + } + if (typeof outputOptions.context === "undefined") + outputOptions.context = firstOptions.context; - ifArg("display-chunks", function(bool) { - outputOptions.modules = !bool; - outputOptions.chunks = bool; + ifArg("json", function(bool) { + if (bool) outputOptions.json = bool; }); - ifArg("display-entrypoints", function(bool) { - outputOptions.entrypoints = bool; - }); + if (typeof outputOptions.colors === "undefined") + outputOptions.colors = require("supports-color"); - ifArg("display-reasons", function(bool) { - outputOptions.reasons = bool; + ifArg("sort-modules-by", function(value) { + outputOptions.modulesSort = value; }); - ifArg("display-depth", function(bool) { - outputOptions.depth = bool; + ifArg("sort-chunks-by", function(value) { + outputOptions.chunksSort = value; }); - ifArg("display-used-exports", function(bool) { - outputOptions.usedExports = bool; + ifArg("sort-assets-by", function(value) { + outputOptions.assetsSort = value; }); - ifArg("display-provided-exports", function(bool) { - outputOptions.providedExports = bool; + ifArg("display-exclude", function(value) { + outputOptions.exclude = value; }); - ifArg("display-error-details", function(bool) { - outputOptions.errorDetails = bool; - }); + if (!outputOptions.json) { + if (typeof outputOptions.cached === "undefined") + outputOptions.cached = false; + if (typeof outputOptions.cachedAssets === "undefined") + outputOptions.cachedAssets = false; + + ifArg("display-chunks", function(bool) { + if (bool) { + outputOptions.modules = false; + outputOptions.chunks = true; + outputOptions.chunkModules = true; + } + }); - ifArg("display-origins", function(bool) { - outputOptions.chunkOrigins = bool; - }); + ifArg("display-entrypoints", function(bool) { + if (bool) outputOptions.entrypoints = true; + }); - ifArg("display-max-modules", function(value) { - outputOptions.maxModules = value; - }); + ifArg("display-reasons", function(bool) { + if (bool) outputOptions.reasons = true; + }); - ifArg("display-cached", function(bool) { - if (bool) outputOptions.cached = true; - }); + ifArg("display-depth", function(bool) { + if (bool) outputOptions.depth = true; + }); - ifArg("display-cached-assets", function(bool) { - if (bool) outputOptions.cachedAssets = true; - }); + ifArg("display-used-exports", function(bool) { + if (bool) outputOptions.usedExports = true; + }); - if (!outputOptions.exclude) - outputOptions.exclude = [ - "node_modules", - "bower_components", - "components" - ]; + ifArg("display-provided-exports", function(bool) { + if (bool) outputOptions.providedExports = true; + }); - if (argv["display-modules"]) { - outputOptions.maxModules = Infinity; - outputOptions.exclude = undefined; - } - } else { - if (typeof outputOptions.chunks === "undefined") - outputOptions.chunks = true; - if (typeof outputOptions.entrypoints === "undefined") - outputOptions.entrypoints = true; - if (typeof outputOptions.modules === "undefined") - outputOptions.modules = true; - if (typeof outputOptions.chunkModules === "undefined") - outputOptions.chunkModules = true; - if (typeof outputOptions.reasons === "undefined") - outputOptions.reasons = true; - if (typeof outputOptions.cached === "undefined") - outputOptions.cached = true; - if (typeof outputOptions.cachedAssets === "undefined") - outputOptions.cachedAssets = true; - } + ifArg("display-optimization-bailout", function(bool) { + if (bool) outputOptions.optimizationBailout = bool; + }); - ifArg("hide-modules", function(bool) { - if (bool) { - outputOptions.modules = false; - outputOptions.chunkModules = false; - } - }); - - var webpack = require("webpack/lib/webpack.js"); - - Error.stackTraceLimit = 30; - var lastHash = null; - var compiler; - try { - compiler = webpack(options); - } catch (e) { - var WebpackOptionsValidationError = require("webpack/lib/WebpackOptionsValidationError"); - if (e instanceof WebpackOptionsValidationError) { - if (argv.color) - console.error( - "\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m" - ); - else console.error(e.message); - process.exitCode = 1; - } - throw e; - } + ifArg("display-error-details", function(bool) { + if (bool) outputOptions.errorDetails = true; + }); - if (argv.progress) { - var ProgressPlugin = require("webpack/lib/ProgressPlugin"); - compiler.apply( - new ProgressPlugin({ - profile: argv.profile - }) - ); - } + ifArg("display-origins", function(bool) { + if (bool) outputOptions.chunkOrigins = true; + }); + + ifArg("display-max-modules", function(value) { + outputOptions.maxModules = +value; + }); + + ifArg("display-cached", function(bool) { + if (bool) outputOptions.cached = true; + }); + + ifArg("display-cached-assets", function(bool) { + if (bool) outputOptions.cachedAssets = true; + }); - function compilerCallback(err, stats) { - if (!options.watch || err) { - // Do not keep cache anymore - compiler.purgeInputFileSystem(); + if (!outputOptions.exclude) + outputOptions.exclude = [ + "node_modules", + "bower_components", + "components" + ]; + + if (argv["display-modules"]) { + outputOptions.maxModules = Infinity; + outputOptions.exclude = undefined; + outputOptions.modules = true; + } } - if (err) { - lastHash = null; - console.error(err.stack || err); - if (err.details) console.error(err.details); - process.exitCode = 1; + + ifArg("hide-modules", function(bool) { + if (bool) { + outputOptions.modules = false; + outputOptions.chunkModules = false; + } + }); + + var webpack = require("webpack/lib/webpack.js"); + + Error.stackTraceLimit = 30; + var lastHash = null; + var compiler; + try { + compiler = webpack(options); + } catch (e) { + var WebpackOptionsValidationError = require("webpack/lib/WebpackOptionsValidationError"); + if (e instanceof WebpackOptionsValidationError) { + if (argv.color) + console.error( + "\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m" + ); + else console.error(e.message); + process.exit(1); // eslint-disable-line no-process-exit + } + throw e; } - if (outputOptions.json) { - process.stdout.write( - JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n" + if (argv.progress) { + var ProgressPlugin = require("webpack/lib/ProgressPlugin"); + compiler.apply( + new ProgressPlugin({ + profile: argv.profile + }) ); - } else if (stats.hash !== lastHash) { - lastHash = stats.hash; - process.stdout.write(stats.toString(outputOptions) + "\n"); } - if (!options.watch && stats.hasErrors()) { - process.on("exit", function() { + + function compilerCallback(err, stats) { + if (!options.watch || err) { + // Do not keep cache anymore + compiler.purgeInputFileSystem(); + } + if (err) { + lastHash = null; + console.error(err.stack || err); + if (err.details) console.error(err.details); + process.exit(1); // eslint-disable-line + } + if (outputOptions.json) { + process.stdout.write( + JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n" + ); + } else if (stats.hash !== lastHash) { + lastHash = stats.hash; + var statsString = stats.toString(outputOptions); + if (statsString) process.stdout.write(statsString + "\n"); + } + if (!options.watch && stats.hasErrors()) { process.exitCode = 2; - }); + } } + if (firstOptions.watch || options.watch) { + var watchOptions = + firstOptions.watchOptions || firstOptions.watch || options.watch || {}; + if (watchOptions.stdin) { + process.stdin.on("end", function() { + process.exit(); // eslint-disable-line + }); + process.stdin.resume(); + } + compiler.watch(watchOptions, compilerCallback); + console.log("\nWebpack is watching the files…\n"); + } else compiler.run(compilerCallback); } - if (firstOptions.watch || options.watch) { - var watchOptions = - firstOptions.watchOptions || firstOptions.watch || options.watch || {}; - if (watchOptions.stdin) { - process.stdin.on("end", function() { - process.exitCode = 0; - }); - process.stdin.resume(); - } - compiler.watch(watchOptions, compilerCallback); - console.log("\nWebpack is watching the files…\n"); - } else compiler.run(compilerCallback); -} + + processOptions(options); +}); diff --git a/lib/creator/yeoman/utils/entry.js b/lib/creator/yeoman/utils/entry.js index a21ae95eabc..027499c9610 100644 --- a/lib/creator/yeoman/utils/entry.js +++ b/lib/creator/yeoman/utils/entry.js @@ -7,69 +7,75 @@ module.exports = (self, answer) => { let entryIdentifiers; let result; if (answer["entryType"] === true) { - result = self.prompt([ - InputValidate( - "multipleEntries", - "Type the names you want for your modules (entry files), separated by comma [example: 'app,vendor']", - validate - ) - ]).then(multipleEntriesAnswer => { - let webpackEntryPoint = {}; - entryIdentifiers = multipleEntriesAnswer["multipleEntries"].split(","); - function forEachPromise(obj, fn) { - return obj.reduce(function(promise, prop) { - const trimmedProp = prop.trim(); - return promise.then(n => { - if (n) { - Object.keys(n).forEach((val) => { - if ( - n[val].charAt(0) !== "(" - && n[val].charAt(0) !== "[" - && n[val].indexOf("function") < 0 - && n[val].indexOf("path") < 0 - && n[val].indexOf("process") < 0 - ) { - n[val] = `"${n[val]}.js"`; - } - webpackEntryPoint[val] = n[val]; - }); - } else { - n = {}; - } - return fn(trimmedProp); - }); - }, Promise.resolve()); - } - return forEachPromise(entryIdentifiers, (entryProp) => self.prompt([ + result = self + .prompt([ InputValidate( - `${entryProp}`, - `What is the location of "${entryProp}"? [example: "./src/${entryProp}"]`, + "multipleEntries", + "Type the names you want for your modules (entry files), separated by comma [example: 'app,vendor']", validate ) - ])).then(propAns => { - Object.keys(propAns).forEach((val) => { - if ( - propAns[val].charAt(0) !== "(" - && propAns[val].charAt(0) !== "[" - && propAns[val].indexOf("function") < 0 - && propAns[val].indexOf("path") < 0 - && propAns[val].indexOf("process") < 0 - ) { - propAns[val] = `"${propAns[val]}.js"`; - } - webpackEntryPoint[val] = propAns[val]; + ]) + .then(multipleEntriesAnswer => { + let webpackEntryPoint = {}; + entryIdentifiers = multipleEntriesAnswer["multipleEntries"].split(","); + function forEachPromise(obj, fn) { + return obj.reduce(function(promise, prop) { + const trimmedProp = prop.trim(); + return promise.then(n => { + if (n) { + Object.keys(n).forEach(val => { + if ( + n[val].charAt(0) !== "(" && + n[val].charAt(0) !== "[" && + n[val].indexOf("function") < 0 && + n[val].indexOf("path") < 0 && + n[val].indexOf("process") < 0 + ) { + n[val] = `"${n[val]}.js"`; + } + webpackEntryPoint[val] = n[val]; + }); + } else { + n = {}; + } + return fn(trimmedProp); + }); + }, Promise.resolve()); + } + return forEachPromise(entryIdentifiers, entryProp => + self.prompt([ + InputValidate( + `${entryProp}`, + `What is the location of "${entryProp}"? [example: "./src/${entryProp}"]`, + validate + ) + ]) + ).then(propAns => { + Object.keys(propAns).forEach(val => { + if ( + propAns[val].charAt(0) !== "(" && + propAns[val].charAt(0) !== "[" && + propAns[val].indexOf("function") < 0 && + propAns[val].indexOf("path") < 0 && + propAns[val].indexOf("process") < 0 + ) { + propAns[val] = `"${propAns[val]}.js"`; + } + webpackEntryPoint[val] = propAns[val]; + }); + return webpackEntryPoint; }); - return webpackEntryPoint; }); - }); } else { - result = self.prompt([ - InputValidate( - "singularEntry", - "Which module will be the first to enter the application? [example: './src/index']", - validate - ) - ]).then((singularAnswer) => `"${singularAnswer["singularEntry"]}"`); + result = self + .prompt([ + InputValidate( + "singularEntry", + "Which module will be the first to enter the application? [example: './src/index']", + validate + ) + ]) + .then(singularAnswer => `"${singularAnswer["singularEntry"]}"`); } return result; }; diff --git a/lib/creator/yeoman/webpack-generator.js b/lib/creator/yeoman/webpack-generator.js index 08b5018f45c..f959dcc9ad6 100644 --- a/lib/creator/yeoman/webpack-generator.js +++ b/lib/creator/yeoman/webpack-generator.js @@ -3,7 +3,8 @@ const Generator = require("yeoman-generator"); const chalk = require("chalk"); -const createCommonsChunkPlugin = require("webpack-addons").createCommonsChunkPlugin; +const createCommonsChunkPlugin = require("webpack-addons") + .createCommonsChunkPlugin; const Input = require("webpack-addons").Input; const Confirm = require("webpack-addons").Confirm; @@ -37,7 +38,9 @@ module.exports = class WebpackGenerator extends Generator { `\n${chalk.bold("Insecure about some of the questions?")}\n` ); process.stdout.write( - `\n${chalk.bold.green("https://github.com/webpack/webpack-cli/blob/master/INIT.md")}\n\n` + `\n${chalk.bold.green( + "https://github.com/webpack/webpack-cli/blob/master/INIT.md" + )}\n\n` ); this.configuration.config.webpackOptions.module = { rules: [] @@ -54,68 +57,88 @@ module.exports = class WebpackGenerator extends Generator { Confirm("entryType", "Will your application have multiple bundles?") ]).then(entryTypeAnswer => { // Ask different questions for entry points - entryQuestions(self, entryTypeAnswer).then(entryOptions => { - this.configuration.config.webpackOptions.entry = entryOptions; - oneOrMoreEntries = Object.keys(entryOptions); - }).then(() => { - this.prompt([ - Input( - "outputType", - "Which folder will your generated bundles be in? [default: dist]:" - ) - ]).then(outputTypeAnswer => { - if (!this.configuration.config.webpackOptions.entry.length) { - this.configuration.config.topScope.push(tooltip.commonsChunk()); - this.configuration.config.webpackOptions.output = { - filename: "'[name].[chunkhash].js'", - chunkFilename: "'[name].[chunkhash].js'" - }; - } else { - this.configuration.config.webpackOptions.output = { - filename: "'[name].bundle.js'", - }; - } - if (outputTypeAnswer["outputType"].length) { - outputPath = outputTypeAnswer["outputType"]; - } - this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`; - }).then(() => { + entryQuestions(self, entryTypeAnswer) + .then(entryOptions => { + this.configuration.config.webpackOptions.entry = entryOptions; + oneOrMoreEntries = Object.keys(entryOptions); + }) + .then(() => { this.prompt([ - Confirm("prodConfirm", "Are you going to use this in production?") - ]).then(prodAnswer => { - if (prodAnswer["prodConfirm"] === true) { - this.isProd = true; - } else { - this.isProd = false; - } - }).then(() => { - this.prompt([ - Confirm("babelConfirm", "Will you be using ES2015?") - ]).then(ans => { - if (ans["babelConfirm"] === true) { - this.configuration.config.webpackOptions.module.rules.push(getBabelPlugin()); - this.npmInstalls.push("babel-loader", "babel-core", "babel-preset-es2015"); + Input( + "outputType", + "Which folder will your generated bundles be in? [default: dist]:" + ) + ]) + .then(outputTypeAnswer => { + if (!this.configuration.config.webpackOptions.entry.length) { + this.configuration.config.topScope.push(tooltip.commonsChunk()); + this.configuration.config.webpackOptions.output = { + filename: "'[name].[chunkhash].js'", + chunkFilename: "'[name].[chunkhash].js'" + }; + } else { + this.configuration.config.webpackOptions.output = { + filename: "'[name].bundle.js'" + }; } - }).then(() => { + if (outputTypeAnswer["outputType"].length) { + outputPath = outputTypeAnswer["outputType"]; + } + this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`; + }) + .then(() => { this.prompt([ - RawList( - "stylingType", - "Will you use one of the below CSS solutions?", - ["SASS", "LESS", "CSS", "PostCSS", "No"] + Confirm( + "prodConfirm", + "Are you going to use this in production?" ) - ]).then(stylingAnswer => { - if (!this.isProd) { - ExtractUseProps = []; - } - switch (stylingAnswer["stylingType"]) { - case "SASS": - this.npmInstalls.push( - "sass-loader", "node-sass", - "style-loader", "css-loader" - ); - regExpForStyles = new RegExp(/\.(scss|css)$/); - if (this.isProd) { - ExtractUseProps = `use: [{ + ]) + .then(prodAnswer => { + if (prodAnswer["prodConfirm"] === true) { + this.isProd = true; + } else { + this.isProd = false; + } + }) + .then(() => { + this.prompt([ + Confirm("babelConfirm", "Will you be using ES2015?") + ]) + .then(ans => { + if (ans["babelConfirm"] === true) { + this.configuration.config.webpackOptions.module.rules.push( + getBabelPlugin() + ); + this.npmInstalls.push( + "babel-loader", + "babel-core", + "babel-preset-es2015" + ); + } + }) + .then(() => { + this.prompt([ + RawList( + "stylingType", + "Will you use one of the below CSS solutions?", + ["SASS", "LESS", "CSS", "PostCSS", "No"] + ) + ]) + .then(stylingAnswer => { + if (!this.isProd) { + ExtractUseProps = []; + } + switch (stylingAnswer["stylingType"]) { + case "SASS": + this.npmInstalls.push( + "sass-loader", + "node-sass", + "style-loader", + "css-loader" + ); + regExpForStyles = new RegExp(/\.(scss|css)$/); + if (this.isProd) { + ExtractUseProps = `use: [{ loader: "css-loader", options: { sourceMap: true @@ -127,24 +150,30 @@ module.exports = class WebpackGenerator extends Generator { } }], fallback: "style-loader"`; - } else { - ExtractUseProps.push({ - loader: "'style-loader'" - }, { - loader: "'css-loader'" - }, { - loader: "'sass-loader'" - }); - } - break; - case "LESS": - regExpForStyles = new RegExp(/\.(less|css)$/); - this.npmInstalls.push( - "less-loader", "less", - "style-loader", "css-loader" - ); - if (this.isProd) { - ExtractUseProps = ` + } else { + ExtractUseProps.push( + { + loader: "'style-loader'" + }, + { + loader: "'css-loader'" + }, + { + loader: "'sass-loader'" + } + ); + } + break; + case "LESS": + regExpForStyles = new RegExp(/\.(less|css)$/); + this.npmInstalls.push( + "less-loader", + "less", + "style-loader", + "css-loader" + ); + if (this.isProd) { + ExtractUseProps = ` use: [{ loader: "css-loader", options: { @@ -157,35 +186,40 @@ module.exports = class WebpackGenerator extends Generator { } }], fallback: "style-loader"`; - } else { - ExtractUseProps.push({ - loader: "'css-loader'", - options: { - sourceMap: true - } - }, { - loader: "'less-loader'", - options: { - sourceMap: true - } - }); - } - break; - case "PostCSS": - this.configuration.config.topScope.push( - tooltip.postcss(), - "const autoprefixer = require('autoprefixer');", - "const precss = require('precss');", - "\n" - ); - this.npmInstalls.push( - "style-loader", "css-loader", - "postcss-loader", "precss", - "autoprefixer" - ); - regExpForStyles = new RegExp(/\.css$/); - if (this.isProd) { - ExtractUseProps = ` + } else { + ExtractUseProps.push( + { + loader: "'css-loader'", + options: { + sourceMap: true + } + }, + { + loader: "'less-loader'", + options: { + sourceMap: true + } + } + ); + } + break; + case "PostCSS": + this.configuration.config.topScope.push( + tooltip.postcss(), + "const autoprefixer = require('autoprefixer');", + "const precss = require('precss');", + "\n" + ); + this.npmInstalls.push( + "style-loader", + "css-loader", + "postcss-loader", + "precss", + "autoprefixer" + ); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = ` use: [{ loader: "style-loader" },{ @@ -206,133 +240,157 @@ module.exports = class WebpackGenerator extends Generator { } }], fallback: "style-loader"`; - } else { - ExtractUseProps.push({ - loader: "'style-loader'" - },{ - loader: "'css-loader'", - options: { - sourceMap: true, - importLoaders: 1 - } - }, { - loader: "'postcss-loader'", - options: { - plugins: `function () { + } else { + ExtractUseProps.push( + { + loader: "'style-loader'" + }, + { + loader: "'css-loader'", + options: { + sourceMap: true, + importLoaders: 1 + } + }, + { + loader: "'postcss-loader'", + options: { + plugins: `function () { return [ precss, autoprefixer ]; }` - } - }); - } - break; - case "CSS": - this.npmInstalls.push("style-loader", "css-loader"); - regExpForStyles = new RegExp(/\.css$/); - if (this.isProd) { - ExtractUseProps = `use: [{ + } + } + ); + } + break; + case "CSS": + this.npmInstalls.push( + "style-loader", + "css-loader" + ); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = `use: [{ loader: "css-loader", options: { sourceMap: true } }], fallback: "style-loader"`; - } else { - ExtractUseProps.push({ - loader: "'style-loader'", - options: { - sourceMap: true - } - }, { - loader: "'css-loader'", - }); - } - break; - default: - regExpForStyles = null; - } - }).then(() => { - // Ask if the user wants to use extractPlugin - this.prompt([ - Input( - "extractPlugin", - "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)" - ) - ]).then(extractAnswer => { - if (regExpForStyles) { - if (this.isProd) { - - this.configuration.config.topScope.push(tooltip.cssPlugin()); - this.npmInstalls.push("extract-text-webpack-plugin"); - if (extractAnswer["extractPlugin"].length !== 0) { - this.configuration.config.webpackOptions.plugins.push( - "new ExtractTextPlugin('" + - extractAnswer["extractPlugin"] + - ".[contentHash].css')" - ); - } else { - this.configuration.config.webpackOptions.plugins.push( - "new ExtractTextPlugin('" + - "style.css')" - ); - } - const moduleRulesObj = { - test: regExpForStyles, - use: `ExtractTextPlugin.extract({ + } else { + ExtractUseProps.push( + { + loader: "'style-loader'", + options: { + sourceMap: true + } + }, + { + loader: "'css-loader'" + } + ); + } + break; + default: + regExpForStyles = null; + } + }) + .then(() => { + // Ask if the user wants to use extractPlugin + this.prompt([ + Input( + "extractPlugin", + "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)" + ) + ]) + .then(extractAnswer => { + if (regExpForStyles) { + if (this.isProd) { + this.configuration.config.topScope.push( + tooltip.cssPlugin() + ); + this.npmInstalls.push( + "extract-text-webpack-plugin" + ); + if ( + extractAnswer["extractPlugin"].length !== 0 + ) { + this.configuration.config.webpackOptions.plugins.push( + "new ExtractTextPlugin('" + + extractAnswer["extractPlugin"] + + ".[contentHash].css')" + ); + } else { + this.configuration.config.webpackOptions.plugins.push( + "new ExtractTextPlugin('" + "style.css')" + ); + } + const moduleRulesObj = { + test: regExpForStyles, + use: `ExtractTextPlugin.extract({ ${ExtractUseProps} })` - }; - this.configuration.config.webpackOptions.module.rules.push( - moduleRulesObj - ); - this.configuration.config.topScope.push( - "const ExtractTextPlugin = require('extract-text-webpack-plugin');", - "\n" - ); - } else { - const moduleRulesObj = { - test: regExpForStyles, - use: ExtractUseProps - }; - this.configuration.config.webpackOptions.module.rules.push( - moduleRulesObj - ); - } - } - }).then(() => { - if (!this.configuration.config.webpackOptions.entry.length) { - oneOrMoreEntries.forEach(prop => { - this.configuration.config.webpackOptions.plugins.push( - createCommonsChunkPlugin(prop) - ); + }; + this.configuration.config.webpackOptions.module.rules.push( + moduleRulesObj + ); + this.configuration.config.topScope.push( + "const ExtractTextPlugin = require('extract-text-webpack-plugin');", + "\n" + ); + } else { + const moduleRulesObj = { + test: regExpForStyles, + use: ExtractUseProps + }; + this.configuration.config.webpackOptions.module.rules.push( + moduleRulesObj + ); + } + } + }) + .then(() => { + if ( + !this.configuration.config.webpackOptions.entry + .length + ) { + oneOrMoreEntries.forEach(prop => { + this.configuration.config.webpackOptions.plugins.push( + createCommonsChunkPlugin(prop) + ); + }); + } + done(); + }); + }); }); - } - done(); }); - }); }); - }); }); - }); }); } installPlugins() { let asyncNamePrompt = this.async(); let defaultName = this.isProd ? "prod" : "config"; this.prompt([ - Input("nameType", `Name your 'webpack.[name].js?' [default: '${defaultName}']:`) - ]).then(nameAnswer => { - if (nameAnswer["nameType"].length) { - this.configuration.config.configName = nameAnswer["nameType"]; - } else { - this.configuration.config.configName = defaultName; - } - }).then(() => { - asyncNamePrompt(); - this.npmInstall(this.npmInstalls, { "save-dev": true }); - }); + Input( + "nameType", + `Name your 'webpack.[name].js?' [default: '${defaultName}']:` + ) + ]) + .then(nameAnswer => { + if (nameAnswer["nameType"].length) { + this.configuration.config.configName = nameAnswer["nameType"]; + } else { + this.configuration.config.configName = defaultName; + } + }) + .then(() => { + asyncNamePrompt(); + this.npmInstall(this.npmInstalls, { "save-dev": true }); + }); } - }; diff --git a/lib/generate-loader/loader-generator.js b/lib/generate-loader/loader-generator.js index 9e5a22e27b5..8d5720c69ab 100644 --- a/lib/generate-loader/loader-generator.js +++ b/lib/generate-loader/loader-generator.js @@ -26,14 +26,16 @@ function makeLoaderName(name) { * @extends {Generator} */ var LoaderGenerator = webpackGenerator( - [{ - type: "input", - name: "name", - message: "Loader name", - default: "my-loader", - filter: makeLoaderName, - validate: str => str.length > 0, - }], + [ + { + type: "input", + name: "name", + message: "Loader name", + default: "my-loader", + filter: makeLoaderName, + validate: str => str.length > 0 + } + ], path.join(__dirname, "templates"), [ "src/cjs.js.tpl", @@ -44,15 +46,13 @@ var LoaderGenerator = webpackGenerator( "examples/simple/webpack.config.js.tpl", "examples/simple/src/index.js.tpl", "examples/simple/src/lazy-module.js.tpl", - "examples/simple/src/static-esm-module.js.tpl", - ], - [ - "src/_index.js.tpl", + "examples/simple/src/static-esm-module.js.tpl" ], - (gen) => ({ name: gen.props.name }) + ["src/_index.js.tpl"], + gen => ({ name: gen.props.name }) ); module.exports = { makeLoaderName, - LoaderGenerator, + LoaderGenerator }; diff --git a/lib/generate-loader/loader-generator.test.js b/lib/generate-loader/loader-generator.test.js index 3dc3e55dd7e..232013598ed 100644 --- a/lib/generate-loader/loader-generator.test.js +++ b/lib/generate-loader/loader-generator.test.js @@ -3,7 +3,6 @@ var makeLoaderName = require("./loader-generator").makeLoaderName; describe("makeLoaderName", () => { - it("should kebab-case loader name and append '-loader'", () => { var loaderName = makeLoaderName("This is a test"); expect(loaderName).toEqual("this-is-a-test-loader"); @@ -13,5 +12,4 @@ describe("makeLoaderName", () => { var loaderName = makeLoaderName("properly-named-loader"); expect(loaderName).toEqual("properly-named-loader"); }); - }); diff --git a/lib/generate-plugin/plugin-generator.js b/lib/generate-plugin/plugin-generator.js index fcddd43993a..ffc4022119a 100644 --- a/lib/generate-plugin/plugin-generator.js +++ b/lib/generate-plugin/plugin-generator.js @@ -11,14 +11,16 @@ var webpackGenerator = require("../utils/webpack-generator"); * @extends {Generator} */ var PluginGenerator = webpackGenerator( - [{ - type: "input", - name: "name", - message: "Plugin name", - default: "my-webpack-plugin", - filter: _.kebabCase, - validate: str => str.length > 0, - }], + [ + { + type: "input", + name: "name", + message: "Plugin name", + default: "my-webpack-plugin", + filter: _.kebabCase, + validate: str => str.length > 0 + } + ], path.join(__dirname, "templates"), [ "src/cjs.js.tpl", @@ -26,15 +28,12 @@ var PluginGenerator = webpackGenerator( "test/functional.test.js.tpl", "examples/simple/src/index.js.tpl", "examples/simple/src/lazy-module.js.tpl", - "examples/simple/src/static-esm-module.js.tpl", - ], - [ - "src/_index.js.tpl", - "examples/simple/_webpack.config.js.tpl", + "examples/simple/src/static-esm-module.js.tpl" ], - (gen) => ({ name: _.upperFirst(_.camelCase(gen.props.name)) }) + ["src/_index.js.tpl", "examples/simple/_webpack.config.js.tpl"], + gen => ({ name: _.upperFirst(_.camelCase(gen.props.name)) }) ); module.exports = { - PluginGenerator, + PluginGenerator }; diff --git a/lib/transformations/bannerPlugin/bannerPlugin.js b/lib/transformations/bannerPlugin/bannerPlugin.js index 2e04fa6c002..0a13a818ac1 100644 --- a/lib/transformations/bannerPlugin/bannerPlugin.js +++ b/lib/transformations/bannerPlugin/bannerPlugin.js @@ -1,15 +1,12 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - Ijscodeshit, - INewExpression, - IPath -} from "../../types"; +import type { Ijscodeshit, INewExpression, IPath } from "../../types"; const utils = require("../utils"); module.exports = function(j: Ijscodeshit, ast: IPath<*>) { - return utils.findPluginsByName(j, ast, ["webpack.BannerPlugin"]) + return utils + .findPluginsByName(j, ast, ["webpack.BannerPlugin"]) .forEach((path: IPath) => { const args: any[] = path.value.arguments; // any node // If the first argument is a literal replace it with object notation @@ -17,9 +14,14 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>) { if (args && args.length > 1 && args[0].type === j.Literal.name) { // and remove the first argument path.value.arguments = [path.value.arguments[1]]; - utils.createOrUpdatePluginByName(j, path.parent, "webpack.BannerPlugin", { - banner: args[0].value - }); + utils.createOrUpdatePluginByName( + j, + path.parent, + "webpack.BannerPlugin", + { + banner: args[0].value + } + ); } }); }; diff --git a/lib/transformations/extractTextPlugin/extractTextPlugin.js b/lib/transformations/extractTextPlugin/extractTextPlugin.js index 97ce0ad07dc..622d02e4d25 100644 --- a/lib/transformations/extractTextPlugin/extractTextPlugin.js +++ b/lib/transformations/extractTextPlugin/extractTextPlugin.js @@ -11,11 +11,17 @@ import type { const utils = require("../utils"); -function findInvocation(j: Ijscodeshit, node: IPath, pluginName: string): boolean { +function findInvocation( + j: Ijscodeshit, + node: IPath, + pluginName: string +): boolean { let found: boolean = false; - found = j(node) - .find(j.MemberExpression) - .filter(p => p.get("object").value.name === pluginName).size() > 0; + found = + j(node) + .find(j.MemberExpression) + .filter(p => p.get("object").value.name === pluginName) + .size() > 0; return found; } @@ -25,7 +31,9 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { // if(args.length === 1) { // return p; // } else - const literalArgs: IPath[] = args.filter(p => utils.isType(p, "Literal")); + const literalArgs: IPath[] = args.filter(p => + utils.isType(p, "Literal") + ); if (literalArgs && literalArgs.length > 1) { const newArgs: IObjectExpression = j.objectExpression( literalArgs.map((p: IPath, index: number) => @@ -36,10 +44,15 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { } return p; }; - const name: ?string = utils.findVariableToPlugin(j, ast, "extract-text-webpack-plugin"); + const name: ?string = utils.findVariableToPlugin( + j, + ast, + "extract-text-webpack-plugin" + ); if (!name) return ast; - return ast.find(j.CallExpression) + return ast + .find(j.CallExpression) .filter((p: IPath) => findInvocation(j, p, name)) .forEach(changeArguments); }; diff --git a/lib/transformations/index.js b/lib/transformations/index.js index 74e9c25db6d..dd202a62f92 100644 --- a/lib/transformations/index.js +++ b/lib/transformations/index.js @@ -1,8 +1,6 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - IPath -} from "../types"; +import type { IPath } from "../types"; const jscodeshift = require("jscodeshift"); const pEachSeries = require("p-each-series"); @@ -29,11 +27,16 @@ const transformsObject = { }; const transformations = Object.keys(transformsObject).reduce((res, key) => { - res[key] = (ast, source) => transformSingleAST(ast, source, transformsObject[key]); + res[key] = (ast, source) => + transformSingleAST(ast, source, transformsObject[key]); return res; }, {}); -function transformSingleAST(ast: IPath<*>, source: string, transformFunction: Function): IPath<*> { +function transformSingleAST( + ast: IPath<*>, + source: string, + transformFunction: Function +): IPath<*> { return new PLazy((resolve, reject) => { setTimeout(() => { try { @@ -56,12 +59,20 @@ function transformSingleAST(ast: IPath<*>, source: string, transformFunction: Fu * @param { Object } options - Reacst formatting options * @returns { String } Transformed source code * */ -function transform(source: string, transforms: Function[], options: Object): string { +function transform( + source: string, + transforms: Function[], + options: Object +): string { const ast: IPath<*> = jscodeshift(source); - const recastOptions = Object.assign({ - quote: "single" - }, options); - transforms = transforms || Object.keys(transformations).map(k => transformations[k]); + const recastOptions = Object.assign( + { + quote: "single" + }, + options + ); + transforms = + transforms || Object.keys(transformations).map(k => transformations[k]); return pEachSeries(transforms, f => f(ast, source)) .then(() => { return ast.toSource(recastOptions); diff --git a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js index 35e3a2afd6e..f661c352bb3 100644 --- a/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js +++ b/lib/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js @@ -1,14 +1,11 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - Ijscodeshit, - IPath, - IArrayExpression -} from "../../types"; +import type { Ijscodeshit, IPath, IArrayExpression } from "../../types"; const isEmpty = require("lodash/isEmpty"); const findPluginsByName = require("../utils").findPluginsByName; -const createOrUpdatePluginByName = require("../utils").createOrUpdatePluginByName; +const createOrUpdatePluginByName = require("../utils") + .createOrUpdatePluginByName; const safeTraverse = require("../utils").safeTraverse; module.exports = function(j: Ijscodeshit, ast: IPath<*>) { @@ -28,9 +25,17 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>) { return ast .find(j.ArrayExpression) - .filter((path: IPath<*>) => safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins") + .filter( + (path: IPath<*>) => + safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins" + ) .forEach((path: IPath) => { !isEmpty(loaderOptions) && - createOrUpdatePluginByName(j, path, "webpack.LoaderOptionsPlugin", loaderOptions); + createOrUpdatePluginByName( + j, + path, + "webpack.LoaderOptionsPlugin", + loaderOptions + ); }); }; diff --git a/lib/transformations/loaders/loaders.js b/lib/transformations/loaders/loaders.js index 635620cfd4a..48509dcc653 100644 --- a/lib/transformations/loaders/loaders.js +++ b/lib/transformations/loaders/loaders.js @@ -51,10 +51,14 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @param {Node} path Must be an ObjectExpression * @return {Node} [] */ - const createArrayExpressionFromArray = function(path: IPath): IPath<*> { + const createArrayExpressionFromArray = function( + path: IPath + ): IPath<*> { const value: IObjectExpression = path.value; // Find paths with `loaders` keys in the given Object - const paths = value.properties.filter((prop: IProperty<*>) => prop.key.name.startsWith("loader")); + const paths = value.properties.filter((prop: IProperty<*>) => + prop.key.name.startsWith("loader") + ); // For each pair of key and value paths.forEach((pair: IProperty<*>) => { // Replace 'loaders' Identifier with 'use' @@ -76,28 +80,30 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { return arrElement; }) ); - // If the value is String of loaders like 'style!css' + // If the value is String of loaders like 'style!css' } else if (pair.value.type === j.Literal.name) { // Replace it with Array expression of loaders const literalValue: ILiteral = pair.value; pair.value = j.arrayExpression( - literalValue.value - .split("!") - .map(loader => { - return j.objectExpression([ - utils.createProperty(j, "loader", loader) - ]); - }) + literalValue.value.split("!").map(loader => { + return j.objectExpression([ + utils.createProperty(j, "loader", loader) + ]); + }) ); } }); return path; }; - const createLoaderWithQuery = (p: IPath): IObjectExpression => { + const createLoaderWithQuery = ( + p: IPath + ): IObjectExpression => { let properties = p.value.properties; - let loaderValue = properties - .reduce((val, prop) => prop.key.name === "loader" ? prop.value.value : val, ""); + let loaderValue = properties.reduce( + (val, prop) => (prop.key.name === "loader" ? prop.value.value : val), + "" + ); let loader = loaderValue.split("?")[0]; let query = loaderValue.split("?")[1]; let options: Object[] = query.split("&").map(option => { @@ -107,17 +113,22 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { return j.objectProperty(j.identifier(key), utils.createLiteral(j, val)); }); let loaderProp: IProperty<*> = utils.createProperty(j, "loader", loader); - let queryProp: IProperty = j.property("init", j.identifier("options"), j.objectExpression(options)); + let queryProp: IProperty = j.property( + "init", + j.identifier("options"), + j.objectExpression(options) + ); return j.objectExpression([loaderProp, queryProp]); }; const findLoaderWithQueryString = (p: IPath): boolean => { - return p.value.properties - .reduce((predicate, prop) => { - return utils.safeTraverse(prop, ["value", "value", "indexOf"]) - && prop.value.value.indexOf("?") > -1 - || predicate; - }, false); + return p.value.properties.reduce((predicate, prop) => { + return ( + (utils.safeTraverse(prop, ["value", "value", "indexOf"]) && + prop.value.value.indexOf("?") > -1) || + predicate + ); + }, false); }; /** @@ -127,8 +138,16 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @param {Node} path [description] * @return {Node} [description] */ - const checkForLoader = path => path.value.name === "loaders" && - utils.safeTraverse(path, ["parent", "parent", "parent", "node", "key", "name"]) === "module"; + const checkForLoader = path => + path.value.name === "loaders" && + utils.safeTraverse(path, [ + "parent", + "parent", + "parent", + "node", + "key", + "name" + ]) === "module"; /** * Puts node path that is pre- or postLoader into `enforce` key @@ -136,7 +155,9 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @param {Node} p [] * @returns {*} [] */ - const fitIntoLoaders = (p: IPath): IPath => { + const fitIntoLoaders = ( + p: IPath + ): IPath => { let loaders; p.value.properties.map(prop => { const keyName = prop.key.name; @@ -159,7 +180,9 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { } }); if (loaders) { - p.value.properties = p.value.properties.filter(prop => prop.key.name === "loaders"); + p.value.properties = p.value.properties.filter( + prop => prop.key.name === "loaders" + ); } return p; }; @@ -170,10 +193,11 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @param {[type]} IPath [description] * @return {[type]} [description] */ - const prepostLoaders = (): IPath => ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) - .forEach(fitIntoLoaders); + const prepostLoaders = (): IPath => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) + .forEach(fitIntoLoaders); /** * Convert top level `loaders` to `rules` @@ -181,22 +205,32 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @param {[type]} IPath [description] * @return {[type]} [description] */ - const loadersToRules = (): IPath => ast - .find(j.Identifier) - .filter(checkForLoader) - .forEach((p: IPath) => p.value.name = "rules"); + const loadersToRules = (): IPath => + ast + .find(j.Identifier) + .filter(checkForLoader) + .forEach((p: IPath) => (p.value.name = "rules")); /** * Converts 'loader' and 'loaders' to Array of {Rule.Use} * * @returns {Node} [] */ - const loadersToArrayExpression = (): IPath => ast - .find(j.ObjectExpression) - .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) - .filter(path => utils.safeTraverse( - path, ["parent", "parent", "node", "key", "name"]) === "rules") - .forEach(createArrayExpressionFromArray); + const loadersToArrayExpression = (): IPath => + ast + .find(j.ObjectExpression) + .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) + .filter( + path => + utils.safeTraverse(path, [ + "parent", + "parent", + "node", + "key", + "name" + ]) === "rules" + ) + .forEach(createArrayExpressionFromArray); /** * Finds loaders with options encoded as query string and replaces it with options obejct @@ -220,11 +254,12 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * @type {[type]} * @returns {Node} [] */ - const loaderWithQueryParam = (): IPath => ast - .find(j.ObjectExpression) - .filter(p => utils.findObjWithOneOfKeys(p, ["loader"])) - .filter(findLoaderWithQueryString) - .replaceWith(createLoaderWithQuery); + const loaderWithQueryParam = (): IPath => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["loader"])) + .filter(findLoaderWithQueryString) + .replaceWith(createLoaderWithQuery); /** * Finds nodes with `query` key and replaces it with `options` @@ -241,23 +276,25 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { * } * @returns {Node} [] */ - const loaderWithQueryProp = (): IPath => ast - .find(j.Identifier) - .filter(p => p.value.name === "query") - .replaceWith(j.identifier("options")); + const loaderWithQueryProp = (): IPath => + ast + .find(j.Identifier) + .filter(p => p.value.name === "query") + .replaceWith(j.identifier("options")); /** * Adds required `-loader` suffix to loader with missing suffix * i.e. for `babel` it should generate `babel-loader` * @returns {Node} [] */ - const addLoaderSuffix = (): IPath => ast - .find(j.ObjectExpression) - .forEach(path => { + const addLoaderSuffix = (): IPath => + ast.find(j.ObjectExpression).forEach(path => { path.value.properties.forEach(prop => { - if (prop.key.name === "loader" - && utils.safeTraverse(prop, ["value", "value"]) - && !prop.value.value.endsWith("-loader")) { + if ( + prop.key.name === "loader" && + utils.safeTraverse(prop, ["value", "value"]) && + !prop.value.value.endsWith("-loader") + ) { prop.value = j.literal(prop.value.value + "-loader"); } }); diff --git a/lib/transformations/outputPath/outputPath.js b/lib/transformations/outputPath/outputPath.js index f5a95cb023d..3cd5b1a928a 100644 --- a/lib/transformations/outputPath/outputPath.js +++ b/lib/transformations/outputPath/outputPath.js @@ -1,31 +1,41 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - Ijscodeshit, - ICallExpression, - IPath -} from "../../types"; +import type { Ijscodeshit, ICallExpression, IPath } from "../../types"; const utils = require("../utils"); module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { const literalOutputPath = ast .find(j.ObjectExpression) - .filter((p: IPath<*>) => utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === "output") + .filter( + (p: IPath<*>) => + utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === + "output" + ) .find(j.Property) - .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "key", "name"]) === "path" - && utils.safeTraverse(p, ["value", "value", "type"]) === "Literal"); + .filter( + (p: IPath<*>) => + utils.safeTraverse(p, ["value", "key", "name"]) === "path" && + utils.safeTraverse(p, ["value", "value", "type"]) === "Literal" + ); if (literalOutputPath) { let pathVarName: ?string = "path"; let isPathPresent: boolean = false; const pathDecalaration = ast .find(j.VariableDeclarator) - .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "init", "callee", "name"]) === "require") - .filter((p: IPath<*>) => utils.safeTraverse(p, ["value", "init", "arguments"]) - && p.value.init.arguments.reduce((isPresent, a) => { - return a.type === "Literal" && a.value === "path" || isPresent; - }, false)); + .filter( + (p: IPath<*>) => + utils.safeTraverse(p, ["value", "init", "callee", "name"]) === + "require" + ) + .filter( + (p: IPath<*>) => + utils.safeTraverse(p, ["value", "init", "arguments"]) && + p.value.init.arguments.reduce((isPresent, a) => { + return (a.type === "Literal" && a.value === "path") || isPresent; + }, false) + ); if (pathDecalaration) { isPathPresent = true; @@ -40,19 +50,24 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>): IPath<*> { if (!isPathPresent) { const pathRequire: string = (utils.getRequire(j, "path", "path"): any); - return ast.find(j.Program) - .replaceWith(p => j.program([].concat(pathRequire).concat(p.value.body))); + return ast + .find(j.Program) + .replaceWith(p => + j.program([].concat(pathRequire).concat(p.value.body)) + ); } } return ast; }; -function replaceWithPath(j: Ijscodeshit, p: IPath<*>, pathVarName: string): IPath { +function replaceWithPath( + j: Ijscodeshit, + p: IPath<*>, + pathVarName: string +): IPath { const convertedPath = j.callExpression( - j.memberExpression( - j.identifier(pathVarName), - j.identifier("join"), - false), - [j.identifier("__dirname"), p.value]); + j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false), + [j.identifier("__dirname"), p.value] + ); return convertedPath; } diff --git a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js index 078a17e32f8..24b43447a12 100644 --- a/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js +++ b/lib/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js @@ -1,9 +1,6 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - Ijscodeshit, - IPath -} from "../../types"; +import type { Ijscodeshit, IPath } from "../../types"; const codeFrame = require("babel-code-frame"); const chalk = require("chalk"); @@ -23,10 +20,14 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>, source: string) { "webpack.optimize.DedupePlugin" ]; - return utils.findPluginsByName(j, ast, deprecatedPlugingsList) + return utils + .findPluginsByName(j, ast, deprecatedPlugingsList) .forEach((path: IPath<*>) => { // For now we only support the case there plugins are defined in an Array - const arrayPath: ?IPath<*> = utils.safeTraverse(path, ["parent","value"]); + const arrayPath: ?IPath<*> = utils.safeTraverse(path, [ + "parent", + "value" + ]); if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) { // Check how many plugins are defined and // if there is only last plugin left remove `plugins: []` node @@ -39,16 +40,20 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>, source: string) { } else { const startLoc = path.value.loc.start; console.log(` -${ chalk.red("Only plugins instantiated in the array can be automatically removed i.e.:") } +${chalk.red( + "Only plugins instantiated in the array can be automatically removed i.e.:" + )} -${ codeFrame(example, null, null, { highlightCode: true }) } +${codeFrame(example, null, null, { highlightCode: true })} -${ chalk.red("but you use it like this:") } +${chalk.red("but you use it like this:")} -${ codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true }) } +${codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true })} -${ chalk.red("Please remove deprecated plugins manually. ") } -See ${ chalk.underline("https://webpack.js.org/guides/migrating/")} for more information.`); +${chalk.red("Please remove deprecated plugins manually. ")} +See ${chalk.underline( + "https://webpack.js.org/guides/migrating/" + )} for more information.`); } }); }; diff --git a/lib/transformations/removeJsonLoader/removeJsonLoader.js b/lib/transformations/removeJsonLoader/removeJsonLoader.js index 90fb8151cc9..79914586ca7 100644 --- a/lib/transformations/removeJsonLoader/removeJsonLoader.js +++ b/lib/transformations/removeJsonLoader/removeJsonLoader.js @@ -19,7 +19,7 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>) { }); const loaderIndex = loaders.indexOf(name); if (loaders.length && loaderIndex > -1) { - // Remove loader from the array + // Remove loader from the array loaders.splice(loaderIndex, 1); // and from AST loadersNode.elements.splice(loaderIndex, 1); @@ -32,8 +32,8 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>) { break; } case j.Literal.name: { - // If only the loader with the matching name was used - // we can remove the whole Property node completely + // If only the loader with the matching name was used + // we can remove the whole Property node completely if ((loadersNode: ILiteral).value === name) { j(path.parent).remove(); } @@ -52,9 +52,7 @@ module.exports = function(j: Ijscodeshit, ast: IPath<*>) { .forEach((path: IPath<*>) => removeLoaderByName(path, "json-loader")); } - const transforms = [ - removeLoaders - ]; + const transforms = [removeLoaders]; transforms.forEach(t => t(ast)); diff --git a/lib/transformations/resolve/resolve.js b/lib/transformations/resolve/resolve.js index 2ee320ca97e..e6ec9ab915b 100644 --- a/lib/transformations/resolve/resolve.js +++ b/lib/transformations/resolve/resolve.js @@ -9,24 +9,28 @@ import type { } from "../../types"; module.exports = function transformer(j: Ijscodeshit, ast: IPath<*>) { - - const getRootVal = (p: IPath>): IProperty => { + const getRootVal = ( + p: IPath> + ): IProperty => { return p.node.value.properties.filter(prop => prop.key.name === "root")[0]; }; const getRootIndex = p => { - return p.node.value.properties - .reduce((rootIndex, prop, index) => { - return prop.key.name === "root" ? index : rootIndex; - }, -1); + return p.node.value.properties.reduce((rootIndex, prop, index) => { + return prop.key.name === "root" ? index : rootIndex; + }, -1); }; const isModulePresent = (p: IPath>) => { - const modules = p.node.value.properties.filter(prop => prop.key.name === "modules"); + const modules = p.node.value.properties.filter( + prop => prop.key.name === "modules" + ); return modules.length > 0 && modules[0]; }; - const createModuleArray = (p: IPath>): IPath> => { + const createModuleArray = ( + p: IPath> + ): IPath> => { const rootVal = getRootVal(p); let modulesVal = null; if (rootVal.value.type === "ArrayExpression") { @@ -37,7 +41,11 @@ module.exports = function transformer(j: Ijscodeshit, ast: IPath<*>) { let module = isModulePresent(p); if (!module) { - module = j.property("init", j.identifier("modules"), j.arrayExpression(modulesVal)); + module = j.property( + "init", + j.identifier("modules"), + j.arrayExpression(modulesVal) + ); p.node.value.properties = p.node.value.properties.concat([module]); } else { module.value.elements = module.value.elements.concat(modulesVal); @@ -50,10 +58,11 @@ module.exports = function transformer(j: Ijscodeshit, ast: IPath<*>) { return ast .find(j.Property) .filter((p: IPath>) => { - return p.node.key.name === "resolve" - && p.node.value.properties - .filter(prop => prop.key.name === "root") - .length === 1; + return ( + p.node.key.name === "resolve" && + p.node.value.properties.filter(prop => prop.key.name === "root") + .length === 1 + ); }) .forEach(createModuleArray); }; diff --git a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js index adf5f8e0aed..cf0acdd6b1f 100644 --- a/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js +++ b/lib/transformations/uglifyJsPlugin/uglifyJsPlugin.js @@ -1,32 +1,28 @@ // @flow // eslint-disable-next-line node/no-unsupported-features -import type { - Ijscodeshit, - IPath -} from "../../types"; +import type { Ijscodeshit, IPath } from "../../types"; const findPluginsByName = require("../utils").findPluginsByName; module.exports = function(j: Ijscodeshit, ast: IPath<*>) { - function createSourceMapsProperty() { return j.property("init", j.identifier("sourceMap"), j.identifier("true")); } - return findPluginsByName(j, ast, ["webpack.optimize.UglifyJsPlugin"]) - .forEach(path => { - const args = path.value.arguments; + return findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]).forEach(path => { + const args = path.value.arguments; - if (args.length) { - // Plugin is called with object as arguments - j(path) - .find(j.ObjectExpression) - .get("properties") - .value - .push(createSourceMapsProperty()); - } else { - // Plugin is called without arguments - args.push(j.objectExpression([createSourceMapsProperty()])); - } - }); + if (args.length) { + // Plugin is called with object as arguments + j(path) + .find(j.ObjectExpression) + .get("properties") + .value.push(createSourceMapsProperty()); + } else { + // Plugin is called without arguments + args.push(j.objectExpression([createSourceMapsProperty()])); + } + }); }; diff --git a/lib/transformations/utils.js b/lib/transformations/utils.js index 35c8651a41c..d9d46240f50 100644 --- a/lib/transformations/utils.js +++ b/lib/transformations/utils.js @@ -28,7 +28,9 @@ function safeTraverse(obj: Object, paths: string[]): ?any { // Convert nested MemberExpressions to strings like webpack.optimize.DedupePlugin function memberExpressionToPathString(path: Object): string { if (path && path.object) { - return [memberExpressionToPathString(path.object), path.property.name].join("."); + return [memberExpressionToPathString(path.object), path.property.name].join( + "." + ); } return path.name; } @@ -59,14 +61,17 @@ function pathsToMemberExpression(j: Ijscodeshit, paths: string[]) { * @param { Array } pluginNamesArray - Array of plugin names like `webpack.LoaderOptionsPlugin` * @returns Path * */ -function findPluginsByName(j: Ijscodeshit, node: IPath<*>, pluginNamesArray: string[]): IPath<*> { - return node - .find(j.NewExpression) - .filter(path => { - return pluginNamesArray.some( - plugin => memberExpressionToPathString(path.get("callee").value) === plugin - ); - }); +function findPluginsByName( + j: Ijscodeshit, + node: IPath<*>, + pluginNamesArray: string[] +): IPath<*> { + return node.find(j.NewExpression).filter(path => { + return pluginNamesArray.some( + plugin => + memberExpressionToPathString(path.get("callee").value) === plugin + ); + }); } /* @@ -78,7 +83,10 @@ function findPluginsByName(j: Ijscodeshit, node: IPath<*>, pluginNamesArray: str * @param { Node } node - Node to start search from * @returns Path * */ -function findPluginsRootNodes(j: Ijscodeshit, node: IPath<*>): IPath> { +function findPluginsRootNodes( + j: Ijscodeshit, + node: IPath<*> +): IPath> { return node.find(j.Property, { key: { name: "plugins" } }); } @@ -92,7 +100,11 @@ function findPluginsRootNodes(j: Ijscodeshit, node: IPath<*>): IPath { +function createProperty( + j: Ijscodeshit, + key: string | number, + value: any +): IProperty<*> { return j.property( "init", createIdentifierOrLiteral(j, key), @@ -110,7 +122,10 @@ function createProperty(j: Ijscodeshit, key: string | number, value: any): IProp * @returns { Node } * */ -function createLiteral(j: Ijscodeshit, val: string | boolean | number): IPath { +function createLiteral( + j: Ijscodeshit, + val: string | boolean | number +): IPath { let literalVal: any = val; // We'll need String to native type conversions if (typeof val === "string") { @@ -134,7 +149,8 @@ function createLiteral(j: Ijscodeshit, val: string | boolean | number): IPath | IPath doesn't work, find another way +function createIdentifierOrLiteral(j: Ijscodeshit, val: any): any { + // IPath | IPath doesn't work, find another way let literalVal = val; // We'll need String to native type conversions if (typeof val === "string" || val.__paths) { @@ -176,8 +192,15 @@ function createIdentifierOrLiteral(j: Ijscodeshit, val: any): any { // IPath, pluginName: string, options: any) { - const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [pluginName]); +function createOrUpdatePluginByName( + j: Ijscodeshit, + rootNodePath: IPath<*>, + pluginName: string, + options: any +) { + const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [ + pluginName + ]); let optionsProps; if (options) { optionsProps = Object.keys(options).map(key => { @@ -214,12 +237,9 @@ function createOrUpdatePluginByName(j: Ijscodeshit, rootNodePath: IPath<*>, plug currentProps.value.push(opt); } }); - } else { // Plugin is called without arguments - args.push( - j.objectExpression(optionsProps) - ); + args.push(j.objectExpression(optionsProps)); } } }); @@ -247,8 +267,13 @@ function createOrUpdatePluginByName(j: Ijscodeshit, rootNodePath: IPath<*>, plug * @returns { string } variable name - ex. 'var s = require(s) gives "s"` * */ -function findVariableToPlugin(j: Ijscodeshit, rootNode: IPath<*>, pluginPackageName: string): ?string { - const moduleVarNames: IVariableDeclarator[] = rootNode.find(j.VariableDeclarator) +function findVariableToPlugin( + j: Ijscodeshit, + rootNode: IPath<*>, + pluginPackageName: string +): ?string { + const moduleVarNames: IVariableDeclarator[] = rootNode + .find(j.VariableDeclarator) .filter(j.filters.VariableDeclarator.requiresModule(pluginPackageName)) .nodes(); if (moduleVarNames.length === 0) return null; @@ -269,12 +294,10 @@ function isType(path: IPath<*>, type: string): boolean { } function findObjWithOneOfKeys(p: IPath<*>, keyNames: string[]): boolean { - return p.value.properties - .reduce((predicate, prop) => { - const name = prop.key.name; - return keyNames.indexOf(name) > -1 - || predicate; - }, false); + return p.value.properties.reduce((predicate, prop) => { + const name = prop.key.name; + return keyNames.indexOf(name) > -1 || predicate; + }, false); } /* @@ -287,14 +310,15 @@ function findObjWithOneOfKeys(p: IPath<*>, keyNames: string[]): boolean { * @returns {NodePath} - the created ast */ -function getRequire(j: Ijscodeshit, constName: string, packagePath: string): IPath { +function getRequire( + j: Ijscodeshit, + constName: string, + packagePath: string +): IPath { return j.variableDeclaration("const", [ j.variableDeclarator( j.identifier(constName), - j.callExpression( - j.identifier("require"), - [j.literal(packagePath)] - ) + j.callExpression(j.identifier("require"), [j.literal(packagePath)]) ) ]); } @@ -310,8 +334,15 @@ function getRequire(j: Ijscodeshit, constName: string, packagePath: string): IPa * @returns - nothing */ -function checkIfExistsAndAddValue(j: Ijscodeshit, node: IPath, key: string, value: string): void { - const existingProp = node.value.properties.filter(prop => prop.key.name === key); +function checkIfExistsAndAddValue( + j: Ijscodeshit, + node: IPath, + key: string, + value: string +): void { + const existingProp = node.value.properties.filter( + prop => prop.key.name === key + ); let prop; if (existingProp.length > 0) { prop = existingProp[0]; @@ -330,7 +361,10 @@ function checkIfExistsAndAddValue(j: Ijscodeshit, node: IPath * @param { String } key - st name * @returns - { Array } arr - An empty array */ -function createEmptyArrayProperty(j: Ijscodeshit, key: string): IProperty { +function createEmptyArrayProperty( + j: Ijscodeshit, + key: string +): IProperty { return j.property("init", j.identifier(key), j.arrayExpression([])); } @@ -345,21 +379,30 @@ function createEmptyArrayProperty(j: Ijscodeshit, key: string): IProperty) => { let objectOfArray = j.objectExpression([]); - if (typeof(subProperty) !== "string") { + if (typeof subProperty !== "string") { loopThroughObjects(j, objectOfArray, subProperty); arr.value.elements.push(objectOfArray); } else { - return arr.value.elements.push(createIdentifierOrLiteral(j, subProperty)); + return arr.value.elements.push( + createIdentifierOrLiteral(j, subProperty) + ); } }); } else { - Object.keys(subProps[key]).forEach((subProperty) => { - arr.value.elements.push(createIdentifierOrLiteral(j, subProps[key][subProperty])); + Object.keys(subProps[key]).forEach(subProperty => { + arr.value.elements.push( + createIdentifierOrLiteral(j, subProps[key][subProperty]) + ); }); } return arr; @@ -376,24 +419,39 @@ function createArrayWithChildren(j: Ijscodeshit, key: string, subProps: { [strin * nothing is left */ -function loopThroughObjects(j: Ijscodeshit, p: IObjectExpression, obj: Object): void { - Object.keys(obj).forEach((prop) => { +function loopThroughObjects( + j: Ijscodeshit, + p: IObjectExpression, + obj: Object +): void { + Object.keys(obj).forEach(prop => { if (prop.indexOf("inject") >= 0) { // TODO to insert the type of node, identifier or literal - const propertyExpression: IPath<*> = createIdentifierOrLiteral(j, obj[prop]); + const propertyExpression: IPath<*> = createIdentifierOrLiteral( + j, + obj[prop] + ); return p.properties.push(propertyExpression); } // eslint-disable-next-line no-irregular-whitespace - if (typeof(obj[prop]) !== "object" || obj[prop] instanceof RegExp) { - p.properties.push(createObjectWithSuppliedProperty( - j, prop, createIdentifierOrLiteral(j, obj[prop]) - )); + if (typeof obj[prop] !== "object" || obj[prop] instanceof RegExp) { + p.properties.push( + createObjectWithSuppliedProperty( + j, + prop, + createIdentifierOrLiteral(j, obj[prop]) + ) + ); } else if (Array.isArray(obj[prop])) { let arrayProp = createArrayWithChildren(j, prop, obj[prop], true); p.properties.push(arrayProp); } else { let objectBlock = j.objectExpression([]); - let propertyOfBlock = createObjectWithSuppliedProperty(j, prop, objectBlock); + let propertyOfBlock = createObjectWithSuppliedProperty( + j, + prop, + objectBlock + ); loopThroughObjects(j, objectBlock, obj[prop]); p.properties.push(propertyOfBlock); } @@ -410,7 +468,11 @@ function loopThroughObjects(j: Ijscodeshit, p: IObjectExpression, obj: Object): * @returns - { Node } - An property with the supplied property */ -function createObjectWithSuppliedProperty(j: Ijscodeshit, key: string, prop: any): IProperty<*> { +function createObjectWithSuppliedProperty( + j: Ijscodeshit, + key: string, + prop: any +): IProperty<*> { return j.property("init", j.identifier(key), prop); } @@ -439,7 +501,12 @@ function createExternalRegExp(j: Ijscodeshit, prop: any): IPath { * @returns - { Node } - Returns node the pushed property */ -function pushCreateProperty(j: Ijscodeshit, p: IPath, key: string, val: any): number { +function pushCreateProperty( + j: Ijscodeshit, + p: IPath, + key: string, + val: any +): number { let property: string | IPath | IPath; if (val.hasOwnProperty("type")) { property = val; @@ -462,32 +529,50 @@ function pushCreateProperty(j: Ijscodeshit, p: IPath, key: st *subProperty is an array, else it will invoke a function that will push a single node */ -function pushObjectKeys(j: Ijscodeshit, p: IPath<*>, webpackProperties: Object, name: string): any { - p.value.properties.filter(n => - (safeTraverse(n, ["key", "name"]) === name) - ).forEach((prop) => { - Object.keys(webpackProperties).forEach((webpackProp) => { - if (webpackProp.indexOf("inject") >= 0) { - return prop.value.properties.push(createIdentifierOrLiteral(j, webpackProperties[webpackProp])); - } else if (Array.isArray(webpackProperties[webpackProp])) { - const propArray = createArrayWithChildren( - j, webpackProp, webpackProperties[webpackProp], true - ); - return prop.value.properties.push(propArray); - } else if (typeof(webpackProperties[webpackProp]) !== "object" || webpackProperties[webpackProp].__paths || webpackProperties[webpackProp] instanceof RegExp) { - return pushCreateProperty( - j, prop, webpackProp, webpackProperties[webpackProp] - ); - } else { - pushCreateProperty( - j, prop, webpackProp, j.objectExpression([]) - ); - return pushObjectKeys( - j, prop, webpackProperties[webpackProp], webpackProp - ); - } +function pushObjectKeys( + j: Ijscodeshit, + p: IPath<*>, + webpackProperties: Object, + name: string +): any { + p.value.properties + .filter(n => safeTraverse(n, ["key", "name"]) === name) + .forEach(prop => { + Object.keys(webpackProperties).forEach(webpackProp => { + if (webpackProp.indexOf("inject") >= 0) { + return prop.value.properties.push( + createIdentifierOrLiteral(j, webpackProperties[webpackProp]) + ); + } else if (Array.isArray(webpackProperties[webpackProp])) { + const propArray = createArrayWithChildren( + j, + webpackProp, + webpackProperties[webpackProp], + true + ); + return prop.value.properties.push(propArray); + } else if ( + typeof webpackProperties[webpackProp] !== "object" || + webpackProperties[webpackProp].__paths || + webpackProperties[webpackProp] instanceof RegExp + ) { + return pushCreateProperty( + j, + prop, + webpackProp, + webpackProperties[webpackProp] + ); + } else { + pushCreateProperty(j, prop, webpackProp, j.objectExpression([])); + return pushObjectKeys( + j, + prop, + webpackProperties[webpackProp], + webpackProp + ); + } + }); }); - }); } /* @@ -505,7 +590,13 @@ function pushObjectKeys(j: Ijscodeshit, p: IPath<*>, webpackProperties: Object, * @returns - { Function } cb - Returns the callback and pushes a new node */ -function isAssignment(j: Ijscodeshit, p: IPath<*>, cb: () => void, identifier: string, property: Object): any { +function isAssignment( + j: Ijscodeshit, + p: IPath<*>, + cb: () => void, + identifier: string, + property: Object +): any { if (p.parent.value.type === "AssignmentExpression") { if (j) { return cb(j, p, identifier, property); diff --git a/lib/types.js b/lib/types.js index fc5651e22c6..b6edbcbe147 100644 --- a/lib/types.js +++ b/lib/types.js @@ -4,7 +4,7 @@ export type Ijscodeshit = { literal: (literalVal: string | boolean | number) => IPath, identifier: (literalVal: string | boolean | number) => IPath, - property: (name: string, key: any, assignee: any) => IProperty<*>, + property: (name: string, key: any, assignee: any) => IProperty<*>, memberExpression: (first: any, second: any) => any, (): IPath<*>, // (node: IPath<*>): IPath<*>, @@ -12,14 +12,23 @@ export type Ijscodeshit = { arrayExpression: () => any, program: (paths: string[]) => IPath<*>, callExpression: () => IPath, - objectProperty: (node: any, objectLiteral?: Object) => IPath, + objectProperty: ( + node: any, + objectLiteral?: Object + ) => IPath, filters: { VariableDeclarator: { requiresModule: (moduelToRequire: any) => () => void } }, - variableDeclaration: (declarationName: string, declaratino: any) => IPath, - variableDeclarator: (declarator: any, expression: any) => IPath, + variableDeclaration: ( + declarationName: string, + declaratino: any + ) => IPath, + variableDeclarator: ( + declarator: any, + expression: any + ) => IPath, newExpression: (rightExpression: any, leftExpressino: any) => IIdentifier, // primitives expressions @@ -37,7 +46,7 @@ export type Ijscodeshit = { export type Expression = { name: string -} +}; export type IPath = { value: NodeType, @@ -48,12 +57,12 @@ export type IPath = { size: () => number, filter: (callback: (node: IPath<*>) => any) => IPath<*>, forEach: (callback: (node: IPath<*>) => any | void) => IPath<*>, - replaceWith: (any) => IPath<*>, + replaceWith: any => IPath<*>, toSource: (options?: Object) => IPath<*>, get: (property: string) => any, remove: (node: any) => void, nodes: () => any[] -} +}; /** * [IAstNodeCommentLine description] * @type {Object} @@ -65,7 +74,7 @@ export type IAstNodeCommentLine = { end: number, loc: ILoc, rage: number[] -} +}; /** * [ILoc description] @@ -80,7 +89,7 @@ type ILoc = { line: number, column: number } -} +}; /** * [ITokenType description] @@ -103,7 +112,7 @@ export type ITokenType = { binop: any, updateContext: any } -} +}; export type ILiteral = { type: string, @@ -114,18 +123,18 @@ export type ILiteral = { rawValue: string, raw: string, name: string -} +}; export type INewExpression = { arguments: any[] -} +}; export type IObjectExpression = { properties: any[], type: string, range: [number, number], loc: ILoc -} +}; export type IProperty = { type: string, @@ -135,19 +144,19 @@ export type IProperty = { value: any, // any node loc: ILoc, value: NodeType -} +}; export type IIdentifier = { name: string, type: string, loc: ILoc, range: [number, number] -} +}; export type IArrayExpression = { elements: any[], // ILiteral[] | IObjectExpression[] value: any // any node -} +}; export type IMemberExpression = { type: string, @@ -156,7 +165,7 @@ export type IMemberExpression = { property: IIdentifier, range: [number, number], loc: ILoc -} +}; export type IVariableDeclaration = { declaration: IVariableDeclarator[], @@ -164,7 +173,7 @@ export type IVariableDeclaration = { kind: string, range: [number, number], loc: ILoc -} +}; export type IVariableDeclarator = { type: string, @@ -172,7 +181,7 @@ export type IVariableDeclarator = { init: any, range: [number, number], loc: ILoc -} +}; export type ICallExpression = { type: string, @@ -180,4 +189,4 @@ export type ICallExpression = { arguments?: any[], range: [number, number], loc: ILoc -} +}; diff --git a/lib/utils/copy-utils.js b/lib/utils/copy-utils.js index e515d862257..d161d38943d 100644 --- a/lib/utils/copy-utils.js +++ b/lib/utils/copy-utils.js @@ -8,7 +8,10 @@ var path = require("path"); * @param {string} templateDir Absolute path to template directory * @returns {Function} A curried function that takes a file path and copies it */ -var generatorCopy = (generator, templateDir) => /** @param {string} filePath */ (filePath) => { +var generatorCopy = ( + generator, + templateDir +) => /** @param {string} filePath */ filePath => { var sourceParts = templateDir.split(path.delimiter); sourceParts.push.apply(sourceParts, filePath.split("/")); var targetParts = path.dirname(filePath).split("/"); @@ -31,7 +34,11 @@ var generatorCopy = (generator, templateDir) => /** @param {string} filePath */ * the template files. * @returns {Function} A curried function that takes a file path and copies it */ -var generatorCopyTpl = (generator, templateDir, templateData) => /** @param {string} filePath */ (filePath) => { +var generatorCopyTpl = ( + generator, + templateDir, + templateData +) => /** @param {string} filePath */ filePath => { var sourceParts = templateDir.split(path.delimiter); sourceParts.push.apply(sourceParts, filePath.split("/")); var targetParts = path.dirname(filePath).split("/"); @@ -46,5 +53,5 @@ var generatorCopyTpl = (generator, templateDir, templateData) => /** @param {str module.exports = { generatorCopy, - generatorCopyTpl, + generatorCopyTpl }; diff --git a/lib/utils/npm-exists.js b/lib/utils/npm-exists.js index 22c60bc3ae9..f8a11b8d9d4 100644 --- a/lib/utils/npm-exists.js +++ b/lib/utils/npm-exists.js @@ -16,7 +16,7 @@ const constant = value => () => value; module.exports = function npmExists(moduleName) { //eslint-disable-next-line - if (moduleName.length <= 14 || moduleName.slice(0,14) !== 'webpack-addons') { + if (moduleName.length <= 14 || moduleName.slice(0, 14) !== "webpack-addons") { throw new TypeError( chalk.bold(`${moduleName} isn't a valid name.\n`) + chalk.red( diff --git a/lib/utils/resolve-packages.js b/lib/utils/resolve-packages.js index 016d6f107b8..98f8457722d 100644 --- a/lib/utils/resolve-packages.js +++ b/lib/utils/resolve-packages.js @@ -16,7 +16,8 @@ const globalPath = require("global-modules"); */ function processPromise(child) { - return new Promise(function(resolve, reject) { //eslint-disable-line + return new Promise(function(resolve, reject) { + //eslint-disable-line if (child.status !== 0) { reject(); } else { diff --git a/lib/utils/validateSchema.js b/lib/utils/validateSchema.js index 2975d93cf19..3a20782e68f 100644 --- a/lib/utils/validateSchema.js +++ b/lib/utils/validateSchema.js @@ -5,13 +5,13 @@ "use strict"; /* eslint-disable */ -const Ajv = require('ajv'); +const Ajv = require("ajv"); const ajv = new Ajv({ - errorDataPath: 'configuration', + errorDataPath: "configuration", allErrors: true, verbose: true }); -require('ajv-keywords')(ajv, ['instanceof']); +require("ajv-keywords")(ajv, ["instanceof"]); /* eslint-enable */ function validateSchema(schema, options) { diff --git a/lib/utils/webpack-generator.js b/lib/utils/webpack-generator.js index f7f058098a6..561f10931f7 100644 --- a/lib/utils/webpack-generator.js +++ b/lib/utils/webpack-generator.js @@ -24,7 +24,13 @@ var copyUtils = require("../utils/copy-utils"); * * @returns {Generator} A class extending Generator */ -function webpackGenerator(prompts, templateDir, copyFiles, copyTemplateFiles, templateFn) { +function webpackGenerator( + prompts, + templateDir, + copyFiles, + copyTemplateFiles, + templateFn +) { //eslint-disable-next-line return class extends Generator { prompting() { @@ -48,14 +54,20 @@ function webpackGenerator(prompts, templateDir, copyFiles, copyTemplateFiles, te writing() { this.copy = copyUtils.generatorCopy(this, templateDir); - this.copyTpl = copyUtils.generatorCopyTpl(this, templateDir, templateFn(this)); + this.copyTpl = copyUtils.generatorCopyTpl( + this, + templateDir, + templateFn(this) + ); copyFiles.forEach(this.copy); copyTemplateFiles.forEach(this.copyTpl); } install() { - this.npmInstall(["webpack-defaults", "bluebird"], { "save-dev": true }).then(() => { + this.npmInstall(["webpack-defaults", "bluebird"], { + "save-dev": true + }).then(() => { this.spawnCommand("npm", ["run", "webpack-defaults"]); }); } diff --git a/package-lock.json b/package-lock.json index db75dc657e8..d819ae34668 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,15 @@ "requires": true, "dependencies": { "abab": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz", - "integrity": "sha1-uB3l9ydOxOdW15fNg08wNkJyTl0=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", + "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "dev": true + }, + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "dev": true }, "acorn": { @@ -208,9 +214,9 @@ } }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, "ast-traverse": { @@ -223,6 +229,12 @@ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.2.tgz", "integrity": "sha1-LMGZedFcZVEIv1ZTI7jn7jh1H2s=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -240,9 +252,9 @@ "dev": true }, "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", "dev": true }, "aws4": { @@ -596,6 +608,12 @@ } } }, + "babel-plugin-jest-hoist": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.0.2.tgz", + "integrity": "sha512-iQeYbiM0lr5TCW42qvGkBBoy0rTx6SPppRFT7NwvdnSwNOGMI8+1Oc27SF5wJbCvAY7x5KScP3f0TKtunl+NRw==", + "dev": true + }, "babel-plugin-jscript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz", @@ -1089,6 +1107,15 @@ "babel-plugin-transform-flow-strip-types": "6.22.0" } }, + "babel-preset-jest": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-21.0.2.tgz", + "integrity": "sha512-WyzCFIoU+ga307hPnobHL9eRrZlpZYHQf7M3yOtimAwrLAgNFoSfin7ZVw903+zz81ZLuowZMKWCd0w3PNpAhg==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "21.0.2" + } + }, "babel-preset-stage-1": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", @@ -1234,13 +1261,19 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, + "boolify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/boolify/-/boolify-1.0.1.tgz", + "integrity": "sha1-tcCeF8rNET0Rt7s+04TMASmU2Gs=", + "dev": true + }, "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "dev": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.0" } }, "brace-expansion": { @@ -1407,6 +1440,25 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, + "camelcase-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.1.0.tgz", + "integrity": "sha1-IU00jMVFfzkxaiwxzD43JGMl5z8=", + "dev": true, + "requires": { + "camelcase": "4.1.0", + "map-obj": "2.0.0", + "quick-lru": "1.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1449,6 +1501,7 @@ "requires": { "anymatch": "1.3.0", "async-each": "1.0.1", + "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -1600,6 +1653,15 @@ "graceful-readlink": "1.0.1" } }, + "common-tags": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.4.0.tgz", + "integrity": "sha1-EYe+Tz1M8MBCfUP3Tu8fc1AWFMA=", + "dev": true, + "requires": { + "babel-runtime": "6.23.0" + } + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -1752,12 +1814,23 @@ } }, "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "dev": true, "requires": { - "boom": "2.10.1" + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + } } }, "crypto-browserify": { @@ -1812,14 +1885,6 @@ "dev": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } } }, "date-fns": { @@ -2003,6 +2068,12 @@ "randombytes": "2.0.5" } }, + "dlv": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.0.tgz", + "integrity": "sha1-/uGnxD9jvnXz9nnoUmLaXxAnZKc=", + "dev": true + }, "doctrine": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", @@ -2068,14 +2139,14 @@ "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, "enhanced-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz", - "integrity": "sha512-2qbxE7ek3YxPJ1ML6V+satHkzHpJQKWkRHmRx6mfAoW59yP8YH8BFplbegSP+u2hBd6B6KCOpvJQ3dZAP+hkpg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", "requires": { "graceful-fs": "4.1.11", "memory-fs": "0.4.1", "object-assign": "4.1.1", - "tapable": "0.2.6" + "tapable": "0.2.8" } }, "errno": { @@ -2173,40 +2244,16 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", + "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", "dev": true, "requires": { - "esprima": "2.7.3", - "estraverse": "1.9.3", + "esprima": "3.1.3", + "estraverse": "4.2.0", "esutils": "2.0.2", "optionator": "0.8.2", - "source-map": "0.2.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": "1.0.1" - } - } + "source-map": "0.5.6" } }, "escope": { @@ -2424,9 +2471,9 @@ } }, "exec-sh": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.0.tgz", - "integrity": "sha1-FPdd4/INKG75MwmbLOUKkDWc7xA=", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", "dev": true, "requires": { "merge": "1.2.0" @@ -2476,6 +2523,58 @@ "homedir-polyfill": "1.0.1" } }, + "expect": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-21.1.0.tgz", + "integrity": "sha512-gBmUVy+A4+brj/MnuiwLe+MIMfSffWUmZMNjKHrMkB0cpkAjnFdwHAxs6MvYeh4+14ocp+SfKp4ebNEhkbV3YQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "jest-diff": "21.1.0", + "jest-get-type": "21.0.2", + "jest-matcher-utils": "21.1.0", + "jest-message-util": "21.1.0", + "jest-regex-util": "21.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "jest-matcher-utils": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", + "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "jest-get-type": "21.0.2", + "pretty-format": "21.1.0" + } + }, + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", + "dev": true, + "requires": { + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" + } + } + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -2500,9 +2599,9 @@ } }, "extsprintf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true }, "fast-deep-equal": { @@ -2622,6 +2721,16 @@ "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.49.1.tgz", "integrity": "sha1-amqTLNagyPUXSnYSR1tLcWT18NA=" }, + "flow-remove-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/flow-remove-types/-/flow-remove-types-1.2.1.tgz", + "integrity": "sha1-WOJhv4uEK9I0yGyvuYKhITr/Dts=", + "dev": true, + "requires": { + "babylon": "6.17.4", + "vlq": "0.2.2" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -2642,14 +2751,14 @@ "dev": true }, "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", "dev": true, "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", - "mime-types": "2.1.15" + "mime-types": "2.1.17" } }, "fs-readdir-recursive": { @@ -2668,7 +2777,7 @@ "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", "optional": true, "requires": { - "nan": "2.6.2", + "nan": "2.7.0", "node-pre-gyp": "0.6.36" }, "dependencies": { @@ -3430,14 +3539,6 @@ } } }, - "string_decoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", - "requires": { - "safe-buffer": "5.0.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -3448,6 +3549,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "requires": { + "safe-buffer": "5.0.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -3594,14 +3703,6 @@ "dev": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } } }, "gh-got": { @@ -3759,31 +3860,19 @@ } }, "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "dev": true }, "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - } + "ajv": "5.2.2", + "har-schema": "2.0.0" } }, "has-ansi": { @@ -3836,15 +3925,15 @@ } }, "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "dev": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.0.2" } }, "hmac-drbg": { @@ -3858,9 +3947,9 @@ } }, "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==", "dev": true }, "home-or-tmp": { @@ -3895,13 +3984,13 @@ } }, "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", + "assert-plus": "1.0.0", + "jsprim": "1.4.1", "sshpk": "1.13.1" } }, @@ -4063,9 +4152,9 @@ } }, "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", + "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=" }, "invariant": { "version": "2.2.2", @@ -4307,19 +4396,19 @@ "dev": true }, "istanbul-api": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.10.tgz", - "integrity": "sha1-8n5ecSXI3hP2qAZhr3j1EuVDmys=", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.14.tgz", + "integrity": "sha1-JbxXAffGgMD//5E95G42GaOm5oA=", "dev": true, "requires": { "async": "2.5.0", "fileset": "2.0.3", "istanbul-lib-coverage": "1.1.1", "istanbul-lib-hook": "1.0.7", - "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-instrument": "1.8.0", "istanbul-lib-report": "1.1.1", "istanbul-lib-source-maps": "1.2.1", - "istanbul-reports": "1.1.1", + "istanbul-reports": "1.1.2", "js-yaml": "3.8.4", "mkdirp": "0.5.1", "once": "1.4.0" @@ -4333,6 +4422,27 @@ "requires": { "lodash": "4.17.4" } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz", + "integrity": "sha1-ZvbJQhzJ7EcE928tsIS6kHiitTI=", + "dev": true, + "requires": { + "babel-generator": "6.25.0", + "babel-template": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.3.0" + } } } }, @@ -4398,14 +4508,14 @@ "debug": "2.6.8", "istanbul-lib-coverage": "1.1.1", "mkdirp": "0.5.1", - "rimraf": "2.6.1", + "rimraf": "2.6.2", "source-map": "0.5.6" }, "dependencies": { "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { "glob": "7.1.2" @@ -4414,9 +4524,9 @@ } }, "istanbul-reports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.1.tgz", - "integrity": "sha512-P8G873A0kW24XRlxHVGhMJBhQ8gWAec+dae7ZxOBzxT4w+a9ATSPvRVK3LB1RAJ9S8bg2tOyWHAGW40Zd2dKfw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha1-D7Lj9qqZIr085F0F2KtNXo4HvU8=", "dev": true, "requires": { "handlebars": "4.0.10" @@ -4442,483 +4552,628 @@ } }, "jest": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest/-/jest-20.0.4.tgz", - "integrity": "sha1-PdJgwpidba1nix6cxNkZRPbWAqw=", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-21.1.0.tgz", + "integrity": "sha512-yPxhkAyxCymLkpZakAGm8VGNQB04HgD5bhYCQHBcIGCbH5oYHZDekkt/FBtFC2vPcyWG+dsKCqvmys/1kQYjKA==", + "dev": true, + "requires": { + "jest-cli": "21.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "jest-cli": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.1.0.tgz", + "integrity": "sha512-ISnDjHv9m0nCrSKFC+Cnr9SotaWHYRP+TK81vMtPwkV+/70JbfYJT6ZnuqgqyAnTYE4f/aCe6uyMPKHAVT1RpA==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "is-ci": "1.0.10", + "istanbul-api": "1.1.14", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-source-maps": "1.2.1", + "jest-changed-files": "21.1.0", + "jest-config": "21.1.0", + "jest-environment-jsdom": "21.1.0", + "jest-haste-map": "21.1.0", + "jest-message-util": "21.1.0", + "jest-regex-util": "21.1.0", + "jest-resolve-dependencies": "21.1.0", + "jest-runner": "21.1.0", + "jest-runtime": "21.1.0", + "jest-snapshot": "21.1.0", + "jest-util": "21.1.0", + "micromatch": "2.3.11", + "node-notifier": "5.1.2", + "pify": "3.0.0", + "slash": "1.0.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", + "which": "1.2.14", + "worker-farm": "1.5.0", + "yargs": "9.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "jest-changed-files": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-21.1.0.tgz", + "integrity": "sha512-OnjMoORBVG9Jko6Bc3UGJPx9G1PNsETiqpQXZ6wPU3fk1gtxhKYE4Mgdk28ER/CWeg7bzGUcaragLf1lf1tzbQ==", "dev": true, "requires": { - "jest-cli": "20.0.4" + "throat": "4.1.0" } }, "jest-cli": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-20.0.4.tgz", - "integrity": "sha1-5TKxnYiuW8bEF+iwWTpv6VSx3JM=", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.1.0.tgz", + "integrity": "sha512-ISnDjHv9m0nCrSKFC+Cnr9SotaWHYRP+TK81vMtPwkV+/70JbfYJT6ZnuqgqyAnTYE4f/aCe6uyMPKHAVT1RpA==", "dev": true, "requires": { - "ansi-escapes": "1.4.0", - "callsites": "2.0.0", - "chalk": "1.1.3", + "ansi-escapes": "3.0.0", + "chalk": "2.0.1", + "glob": "7.1.2", "graceful-fs": "4.1.11", "is-ci": "1.0.10", - "istanbul-api": "1.1.10", + "istanbul-api": "1.1.14", "istanbul-lib-coverage": "1.1.1", "istanbul-lib-instrument": "1.7.3", "istanbul-lib-source-maps": "1.2.1", - "jest-changed-files": "20.0.3", - "jest-config": "20.0.4", - "jest-docblock": "20.0.3", - "jest-environment-jsdom": "20.0.3", - "jest-haste-map": "20.0.4", - "jest-jasmine2": "20.0.4", - "jest-message-util": "20.0.3", - "jest-regex-util": "20.0.3", - "jest-resolve-dependencies": "20.0.3", - "jest-runtime": "20.0.4", - "jest-snapshot": "20.0.3", - "jest-util": "20.0.3", + "jest-changed-files": "21.1.0", + "jest-config": "21.1.0", + "jest-environment-jsdom": "21.1.0", + "jest-haste-map": "21.1.0", + "jest-message-util": "21.1.0", + "jest-regex-util": "21.1.0", + "jest-resolve-dependencies": "21.1.0", + "jest-runner": "21.1.0", + "jest-runtime": "21.1.0", + "jest-snapshot": "21.1.0", + "jest-util": "21.1.0", "micromatch": "2.3.11", "node-notifier": "5.1.2", - "pify": "2.3.0", + "pify": "3.0.0", "slash": "1.0.0", - "string-length": "1.0.1", - "throat": "3.2.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", "which": "1.2.14", - "worker-farm": "1.4.1", - "yargs": "7.1.0" + "worker-farm": "1.5.0", + "yargs": "9.0.1" }, "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true }, - "babel-jest": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-20.0.3.tgz", - "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", - "dev": true, - "requires": { - "babel-core": "6.25.0", - "babel-plugin-istanbul": "4.1.4", - "babel-preset-jest": "20.0.3" - } + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, - "babel-plugin-jest-hoist": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", - "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "babel-preset-jest": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", - "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "20.0.3" - } - }, - "bser": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", - "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "node-int64": "0.4.0" + "ansi-regex": "3.0.0" } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camelcase": { + } + } + }, + "jest-config": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.1.0.tgz", + "integrity": "sha512-RQnWwHRSIRvtyJQeZTpXUmsNYVVr/qu3XWfV3FTFkDsxHQi6Sj5sfUK5FHCNUCXIuFTs+r3qbYoMz2q8rdm/EA==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "glob": "7.1.2", + "jest-environment-jsdom": "21.1.0", + "jest-environment-node": "21.1.0", + "jest-get-type": "21.0.2", + "jest-jasmine2": "21.1.0", + "jest-regex-util": "21.1.0", + "jest-resolve": "21.1.0", + "jest-util": "21.1.0", + "jest-validate": "21.1.0", + "pretty-format": "21.1.0" + }, + "dependencies": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - } - } - }, - "cliui": { + "ansi-styles": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "color-convert": "1.9.0" } }, - "jest-changed-files": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-20.0.3.tgz", - "integrity": "sha1-k5TVzGXEOEBhSb7xv01Sto4D4/g=", - "dev": true - }, - "jest-config": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-20.0.4.tgz", - "integrity": "sha1-43kwqyIXyRNgXv8T5712PsSPruo=", + "jest-validate": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.1.0.tgz", + "integrity": "sha512-xS0cyErNWpsLFlGkn/b87pk/Mv7J+mCTs8hQ4KmtOIIoM1sHYobXII8AtkoN8FC7E3+Ptxjo+/3xWk6LK1dKcw==", "dev": true, "requires": { - "chalk": "1.1.3", - "glob": "7.1.2", - "jest-environment-jsdom": "20.0.3", - "jest-environment-node": "20.0.3", - "jest-jasmine2": "20.0.4", - "jest-matcher-utils": "20.0.3", - "jest-regex-util": "20.0.3", - "jest-resolve": "20.0.4", - "jest-validate": "20.0.3", - "pretty-format": "20.0.3" + "chalk": "2.0.1", + "jest-get-type": "21.0.2", + "leven": "2.1.0", + "pretty-format": "21.1.0" } }, - "jest-diff": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-20.0.3.tgz", - "integrity": "sha1-gfKI/Z5nXw+yPHXxwrGURf5YZhc=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "diff": "3.3.1", - "jest-matcher-utils": "20.0.3", - "pretty-format": "20.0.3" - } + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true }, - "jest-environment-jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz", - "integrity": "sha1-BIqKwS7iJfcZBBdxODS7mZeH3pk=", + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", "dev": true, "requires": { - "jest-mock": "20.0.3", - "jest-util": "20.0.3", - "jsdom": "9.12.0" + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" } + } + } + }, + "jest-diff": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.1.0.tgz", + "integrity": "sha512-mGJinKrAB6hj1cpO1FOuDCfgILozGvYi4Zpk8GrxmNgdd9/9llIA2Xzu5879Fa4ayh7lb9ej2NdvuNLMCjbrMg==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "diff": "3.3.1", + "jest-get-type": "21.0.2", + "pretty-format": "21.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, - "jest-environment-node": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-20.0.3.tgz", - "integrity": "sha1-1Ii8RhKvLCRumG6K52caCZFj1AM=", + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "jest-mock": "20.0.3", - "jest-util": "20.0.3" + "color-convert": "1.9.0" } }, - "jest-haste-map": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-20.0.4.tgz", - "integrity": "sha1-ZT61XIic48Ah97lGk/IKQVm63wM=", + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", "dev": true, "requires": { - "fb-watchman": "2.0.0", - "graceful-fs": "4.1.11", - "jest-docblock": "20.0.3", - "micromatch": "2.3.11", - "sane": "1.6.0", - "worker-farm": "1.4.1" + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" } + } + } + }, + "jest-docblock": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.1.0.tgz", + "integrity": "sha512-ai3olFJ/3cSd60klaRIcC/Cb44/RsJ69qS8uXxfWXEbnbDqjcbl5K8Z5ekfY15hgVZGSAiLz7pOwfjIBE/yJVw==", + "dev": true + }, + "jest-environment-jsdom": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-21.1.0.tgz", + "integrity": "sha512-sMcGlN11SnnuJKzR5oJ5LsDRzHEBLUeMRImDbvxyusNW9l17wAEsoLuAWbv0W8crZTTwjRO6/mitpNF3PmVsMg==", + "dev": true, + "requires": { + "jest-mock": "21.1.0", + "jest-util": "21.1.0", + "jsdom": "9.12.0" + } + }, + "jest-environment-node": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-21.1.0.tgz", + "integrity": "sha512-Lv/pcK2zq2DZKL/q7+u8mrlSeXmaMGgmJOx0+Ew+FxYKdSzO0jpEUTEfzQOnMvpSWMqjKUYLDYkCPCBFcOX93w==", + "dev": true, + "requires": { + "jest-mock": "21.1.0", + "jest-util": "21.1.0" + } + }, + "jest-get-type": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.0.2.tgz", + "integrity": "sha512-4KvNzzXMXeapGaMWd+SL5e47zcMn8KTWjom6Fl3avxVXnbKS7abD1p4xWe4ToAZfgNoYNsQ9Av/mnWMnZK/Z4A==", + "dev": true + }, + "jest-haste-map": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-21.1.0.tgz", + "integrity": "sha512-a7chVtmpzRgRkYDL4eZgRuXZUlos1JOC7Dam3WryXGiD/1GNj+QONt6jcsAzDZohzs9XYg2EkjyGxIAXcNipBg==", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "21.1.0", + "micromatch": "2.3.11", + "sane": "2.2.0", + "worker-farm": "1.5.0" + } + }, + "jest-jasmine2": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-21.1.0.tgz", + "integrity": "sha512-YjbAaXN6K5f8rtwPVxkMRIYNZGB5GiJcApcj/5ER7uGJrqJMqyCklMAPZR5Gq8XPzzuDVfoB2h7kxyOGVqaxrw==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "expect": "21.1.0", + "graceful-fs": "4.1.11", + "jest-diff": "21.1.0", + "jest-matcher-utils": "21.1.0", + "jest-message-util": "21.1.0", + "jest-snapshot": "21.1.0", + "p-cancelable": "0.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, - "jest-jasmine2": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz", - "integrity": "sha1-/MWxQReA2RHQQpAu8YWehS5g1eE=", + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "chalk": "1.1.3", - "graceful-fs": "4.1.11", - "jest-diff": "20.0.3", - "jest-matcher-utils": "20.0.3", - "jest-matchers": "20.0.3", - "jest-message-util": "20.0.3", - "jest-snapshot": "20.0.3", - "once": "1.4.0", - "p-map": "1.1.1" + "color-convert": "1.9.0" } }, "jest-matcher-utils": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", - "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", + "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", "dev": true, "requires": { - "chalk": "1.1.3", - "pretty-format": "20.0.3" + "chalk": "2.0.1", + "jest-get-type": "21.0.2", + "pretty-format": "21.1.0" } }, - "jest-matchers": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-matchers/-/jest-matchers-20.0.3.tgz", - "integrity": "sha1-ymnbHDLbWm9wf6XgQBq7VXAN/WA=", + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", "dev": true, "requires": { - "jest-diff": "20.0.3", - "jest-matcher-utils": "20.0.3", - "jest-message-util": "20.0.3", - "jest-regex-util": "20.0.3" + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" } - }, - "jest-message-util": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-20.0.3.tgz", - "integrity": "sha1-auwoRDBvyw5udNV5bBAG2W/dgxw=", + } + } + }, + "jest-matcher-utils": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", + "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "pretty-format": "20.0.3" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "chalk": "1.1.3", - "micromatch": "2.3.11", - "slash": "1.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, - "jest-mock": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-20.0.3.tgz", - "integrity": "sha1-i8Bw6QQUqhVcEajWTIaaDVxx2lk=", + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true - }, - "jest-regex-util": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-20.0.3.tgz", - "integrity": "sha1-hburXRM+RGJbGfr4xqpRItCF12I=", + } + } + }, + "jest-message-util": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.1.0.tgz", + "integrity": "sha512-BwKrjR4HvGoodYw3PFh95IU4qDk3nVOf3LqOKRaaR6486bJM8IZIlxWR8yfxhAN7nDGBDco/TR+U50WcPgzvgA==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "micromatch": "2.3.11", + "slash": "1.0.0" + } + }, + "jest-mock": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-21.1.0.tgz", + "integrity": "sha512-iwING4rMP1rhepAj/MVPHVxGltwwR+Lfmiy9ARevQ7XDZ/zF7h+KPFeOFMSMGvV5/dS05PHhwRjFzrjvkybNLw==", + "dev": true + }, + "jest-regex-util": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.1.0.tgz", + "integrity": "sha512-1QiJa6nvdzVgDhY1FTG3fl+2eYrCQGQoIeGaVPjt9+VmxsQ/BwZD6aglH0z6ZK/uEXZPAaj1XaemKM9tC6VVlQ==", + "dev": true + }, + "jest-resolve": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-21.1.0.tgz", + "integrity": "sha512-HKh0pnf2SwR3hDaToONjHrR9ds282QFkxCA9xMet3JpsdLL24oRYMLSQ7jtepZfA6EP+XycRE6RfcMBD8emetg==", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "chalk": "2.0.1", + "is-builtin-module": "1.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-21.1.0.tgz", + "integrity": "sha512-Xj0mzS+Gh6ERgf9ofr5/vuqtyvTh4pAp4aVe6OkiZ4cLxUl6zQ6wByXMX0CLq0hwojFYmwwt+v3+fOAV7PqHPg==", + "dev": true, + "requires": { + "jest-regex-util": "21.1.0" + } + }, + "jest-runner": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-21.1.0.tgz", + "integrity": "sha512-EXFqEQRHSo6ksBrT+vRNoBRfIVVepQF56JfTczzXLs+dIKcq3DDKaiMkkehBc2LdHzm/e63qbhz2aeQn64qqlA==", + "dev": true, + "requires": { + "jest-config": "21.1.0", + "jest-docblock": "21.1.0", + "jest-haste-map": "21.1.0", + "jest-jasmine2": "21.1.0", + "jest-message-util": "21.1.0", + "jest-runtime": "21.1.0", + "jest-util": "21.1.0", + "pify": "3.0.0", + "throat": "4.1.0", + "worker-farm": "1.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true - }, - "jest-resolve": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-20.0.4.tgz", - "integrity": "sha1-lEiz6La6/BVHlETGSZBFt//ll6U=", - "dev": true, - "requires": { - "browser-resolve": "1.11.2", - "is-builtin-module": "1.0.0", - "resolve": "1.3.3" - } - }, - "jest-resolve-dependencies": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz", - "integrity": "sha1-bhSntxevDyyzZnxUneQK8Bexcjo=", - "dev": true, - "requires": { - "jest-regex-util": "20.0.3" - } - }, - "jest-runtime": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-20.0.4.tgz", - "integrity": "sha1-osgCIZxCA/dU3xQE5JAYYWnRJNg=", + } + } + }, + "jest-runtime": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-21.1.0.tgz", + "integrity": "sha512-BNc1v8Cs6bjnti1JBCSGIJdSI/6MIGMMCiY+MpoyWXhoZGNLkUKGw7073lZtOo0PC/RZcXMDy1DcZXHH7YHKQw==", + "dev": true, + "requires": { + "babel-core": "6.25.0", + "babel-jest": "21.0.2", + "babel-plugin-istanbul": "4.1.4", + "chalk": "2.0.1", + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "jest-config": "21.1.0", + "jest-haste-map": "21.1.0", + "jest-regex-util": "21.1.0", + "jest-resolve": "21.1.0", + "jest-util": "21.1.0", + "json-stable-stringify": "1.0.1", + "micromatch": "2.3.11", + "slash": "1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "2.3.0", + "yargs": "9.0.1" + }, + "dependencies": { + "babel-jest": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-21.0.2.tgz", + "integrity": "sha512-7nF+URWcIVX3A9DiLRcuwq86a+Phl+wXN/fwlSO4boTP/GmLLVyIQTui3th7tbA8F3L5xkYEO0e3NSf7oB/BJQ==", "dev": true, "requires": { - "babel-core": "6.25.0", - "babel-jest": "20.0.3", "babel-plugin-istanbul": "4.1.4", - "chalk": "1.1.3", - "convert-source-map": "1.5.0", - "graceful-fs": "4.1.11", - "jest-config": "20.0.4", - "jest-haste-map": "20.0.4", - "jest-regex-util": "20.0.3", - "jest-resolve": "20.0.4", - "jest-util": "20.0.3", - "json-stable-stringify": "1.0.1", - "micromatch": "2.3.11", - "strip-bom": "3.0.0", - "yargs": "7.1.0" - } - }, - "jest-snapshot": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-20.0.3.tgz", - "integrity": "sha1-W4R+GtsaTZCFKn+fElCG4YfHZWY=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "jest-diff": "20.0.3", - "jest-matcher-utils": "20.0.3", - "jest-util": "20.0.3", - "natural-compare": "1.4.0", - "pretty-format": "20.0.3" - } - }, - "jest-util": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-20.0.3.tgz", - "integrity": "sha1-DAf32A2C9OWmfG+LnD/n9lz9Mq0=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "graceful-fs": "4.1.11", - "jest-message-util": "20.0.3", - "jest-mock": "20.0.3", - "jest-validate": "20.0.3", - "leven": "2.1.0", - "mkdirp": "0.5.1" + "babel-preset-jest": "21.0.2" } }, - "jest-validate": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-20.0.3.tgz", - "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "jest-matcher-utils": "20.0.3", - "leven": "2.1.0", - "pretty-format": "20.0.3" - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "pretty-format": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", - "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "ansi-regex": "2.1.1", - "ansi-styles": "3.1.0" - } - }, - "sane": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-1.6.0.tgz", - "integrity": "sha1-lhDEUjB6E10pwf3+JUcDQYDEZ3U=", - "dev": true, - "requires": { - "anymatch": "1.3.0", - "exec-sh": "0.2.0", - "fb-watchman": "1.9.2", - "minimatch": "3.0.4", - "minimist": "1.2.0", - "walker": "1.0.7", - "watch": "0.10.0" - }, - "dependencies": { - "fb-watchman": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", - "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", - "dev": true, - "requires": { - "bser": "1.0.2" - } - } + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" } - }, - "strip-bom": { + } + } + }, + "jest-snapshot": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-21.1.0.tgz", + "integrity": "sha512-oYASKqxO/Ghbdd96z/3KSQ1y4YUtqrQVzSKbnz3yjGsi1nu3AXMPmjRCM/CZXL+H+DAIgMirj5Uq0dZOxo6Bnw==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "jest-diff": "21.1.0", + "jest-matcher-utils": "21.1.0", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "pretty-format": "21.1.0" + }, + "dependencies": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "jest-matcher-utils": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", + "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", "dev": true, "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "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" + "chalk": "2.0.1", + "jest-get-type": "21.0.2", + "pretty-format": "21.1.0" } }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", "dev": true, "requires": { - "camelcase": "3.0.0" + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" } } } }, - "jest-docblock": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-20.0.3.tgz", - "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=", - "dev": true - }, - "jest-matcher-utils": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", - "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "jest-util": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-21.1.0.tgz", + "integrity": "sha512-PJxaShBieLpB55NV4+loIZHiOlfZHjAGzVRp9BDzrr2m70UxQViDJenNdz4edJMWXJLjp817t1QrWi+LjcRaKw==", "dev": true, "requires": { - "chalk": "1.1.3", - "pretty-format": "20.0.3" + "callsites": "2.0.0", + "chalk": "2.0.1", + "graceful-fs": "4.1.11", + "jest-message-util": "21.1.0", + "jest-mock": "21.1.0", + "jest-validate": "21.1.0", + "mkdirp": "0.5.1" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "color-convert": "1.9.0" } }, - "supports-color": { + "callsites": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "jest-validate": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.1.0.tgz", + "integrity": "sha512-xS0cyErNWpsLFlGkn/b87pk/Mv7J+mCTs8hQ4KmtOIIoM1sHYobXII8AtkoN8FC7E3+Ptxjo+/3xWk6LK1dKcw==", + "dev": true, + "requires": { + "chalk": "2.0.1", + "jest-get-type": "21.0.2", + "leven": "2.1.0", + "pretty-format": "21.1.0" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", "dev": true + }, + "pretty-format": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", + "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", + "dev": true, + "requires": { + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" + } } } }, @@ -5208,22 +5463,22 @@ "integrity": "sha1-6MVG//ywbADUgzyoRBD+1/igl9Q=", "dev": true, "requires": { - "abab": "1.0.3", + "abab": "1.0.4", "acorn": "4.0.13", "acorn-globals": "3.1.0", "array-equal": "1.0.0", "content-type-parser": "1.0.1", "cssom": "0.3.2", "cssstyle": "0.2.37", - "escodegen": "1.8.1", + "escodegen": "1.9.0", "html-encoding-sniffer": "1.0.1", - "nwmatcher": "1.4.1", + "nwmatcher": "1.4.2", "parse5": "1.5.1", - "request": "2.81.0", + "request": "2.82.0", "sax": "1.2.4", "symbol-tree": "3.2.2", - "tough-cookie": "2.3.2", - "webidl-conversions": "4.0.1", + "tough-cookie": "2.3.3", + "webidl-conversions": "4.0.2", "whatwg-encoding": "1.0.1", "whatwg-url": "4.8.0", "xml-name-validator": "2.0.1" @@ -5275,23 +5530,15 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "jsprim": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", - "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "dev": true, "requires": { "assert-plus": "1.0.0", - "extsprintf": "1.0.2", + "extsprintf": "1.3.0", "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } + "verror": "1.10.0" } }, "kind-of": { @@ -5590,6 +5837,24 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", + "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", @@ -5626,6 +5891,43 @@ "cli-cursor": "1.0.2" } }, + "loglevel": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.5.0.tgz", + "integrity": "sha512-OQ2jhWI5G2qsvO0UFNyCQWgKl/tFiwuPIXxELzACeUO2FqstN/R7mmL09+nhv6xOWVPPojQO1A90sCEoJSgBcQ==", + "dev": true + }, + "loglevel-colored-level-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz", + "integrity": "sha1-akAhj9x64V/HbD0PPmdsRlOIYD4=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "loglevel": "1.5.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -5653,6 +5955,24 @@ "yallist": "2.1.2" } }, + "make-plural": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-3.0.6.tgz", + "integrity": "sha1-IDOgO6wpC487uRJY9lud9+iwHKc=", + "dev": true, + "requires": { + "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, "makeerror": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", @@ -5662,6 +5982,12 @@ "tmpl": "1.0.4" } }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -5762,6 +6088,41 @@ "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", "dev": true }, + "messageformat": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-1.0.2.tgz", + "integrity": "sha1-kI9GkfKf8o2uNcRUNqJM/5NAI4g=", + "dev": true, + "requires": { + "glob": "7.0.6", + "make-plural": "3.0.6", + "messageformat-parser": "1.1.0", + "nopt": "3.0.6", + "reserved-words": "0.1.2" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "messageformat-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-1.1.0.tgz", + "integrity": "sha512-Hwem6G3MsKDLS1FtBRGIs8T50P1Q00r3srS6QJePCFbad9fq0nYxwf3rnU2BreApRGhmpKMV7oZI06Sy1c9TPA==", + "dev": true + }, "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", @@ -5792,18 +6153,18 @@ } }, "mime-db": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", "dev": true }, "mime-types": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", "dev": true, "requires": { - "mime-db": "1.27.0" + "mime-db": "1.30.0" } }, "mimic-fn": { @@ -5868,6 +6229,12 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, + "nan": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=", + "optional": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5930,7 +6297,7 @@ "requires": { "growly": "1.3.0", "semver": "5.3.0", - "shellwords": "0.1.0", + "shellwords": "0.1.1", "which": "1.2.14" } }, @@ -5965,6 +6332,15 @@ } } }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1.1.0" + } + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -6018,9 +6394,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nwmatcher": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.1.tgz", - "integrity": "sha1-eumwew6oBNt+JfBctf5Al9TklJ8=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.2.tgz", + "integrity": "sha512-QMkCGQFYp5p+zwU3INntLmz1HMfSx9dMVJMYKmE1yuSf/22Wjo6VPFa405mCLUuQn9lbQvH2DZN9lt10ZNvtAg==", "dev": true }, "oauth-sign": { @@ -6312,9 +6688,9 @@ } }, "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, "pify": { @@ -6341,37 +6717,293 @@ "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", "dev": true }, - "pre-commit": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", - "integrity": "sha1-287g7p3nI15X95xW186UZBpp7sY=", + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "prettier": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.6.1.tgz", + "integrity": "sha512-f85qBoQiqiFM/sCmJaN4Lagj9bqMcv38vCftqp4GfVessAqq3Ns6g+3gd8UXReStLLE/DGEdwiZXoFKxphKqwg==" + }, + "prettier-eslint": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-8.1.1.tgz", + "integrity": "sha512-eVvH4HQkaKfEvnXy3DizRoW8CuMSQMPFTDkWCRGBv1+XqFZc2O4cDejKPnJCAUhmaWVMLdmhweU6PwEFLM+/lA==", + "dev": true, "requires": { - "cross-spawn": "5.1.0", - "spawn-sync": "1.0.15", - "which": "1.2.14" + "common-tags": "1.4.0", + "dlv": "1.1.0", + "eslint": "4.6.1", + "indent-string": "3.2.0", + "lodash.merge": "4.6.0", + "loglevel-colored-level-prefix": "1.0.0", + "prettier": "1.7.0", + "pretty-format": "20.0.3", + "require-relative": "0.8.7", + "typescript": "2.5.2", + "typescript-eslint-parser": "7.0.0" + }, + "dependencies": { + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "prettier": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.0.tgz", + "integrity": "sha512-kIbA3UE9sYGiVCxlWg92EOHWZqte6EAkC7DS5je6NaL8g3Uw1rWe0eH+UX4Hy5OEiR9aql2vVMHeg6lR4YGxYg==", + "dev": true + } + } + }, + "prettier-eslint-cli": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/prettier-eslint-cli/-/prettier-eslint-cli-4.3.2.tgz", + "integrity": "sha512-bUHRWIt8mBndrI4X/nPpd4+Ftb7LvdIfZhTIYk5b7EB8+dQDyxcJNbbxgTGo5ukAn+HqC3frFRO58Vt/XxkDrQ==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "babel-runtime": "6.23.0", + "boolify": "1.0.1", + "camelcase-keys": "4.1.0", + "chalk": "2.1.0", + "common-tags": "1.4.0", + "eslint": "4.6.1", + "find-up": "2.1.0", + "get-stdin": "5.0.1", + "glob": "7.1.2", + "ignore": "3.3.3", + "indent-string": "3.2.0", + "lodash.memoize": "4.1.2", + "loglevel-colored-level-prefix": "1.0.0", + "messageformat": "1.0.2", + "prettier-eslint": "8.1.1", + "rxjs": "5.4.1", + "yargs": "8.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + } + } } }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "prettier": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.6.1.tgz", - "integrity": "sha512-f85qBoQiqiFM/sCmJaN4Lagj9bqMcv38vCftqp4GfVessAqq3Ns6g+3gd8UXReStLLE/DGEdwiZXoFKxphKqwg==" - }, "pretty-bytes": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", @@ -6452,9 +7084,9 @@ "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" }, "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "dev": true }, "querystring": { @@ -6467,6 +7099,12 @@ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", @@ -6757,31 +7395,31 @@ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" }, "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "version": "2.82.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.82.0.tgz", + "integrity": "sha512-/QWqfmyTfQ4OYs6EhB1h2wQsX9ZxbuNePCvCm0Mdz/mxw73mjdg0D4QdIl0TQBFs35CZmMXLjk0iCGK395CUDg==", "dev": true, "requires": { - "aws-sign2": "0.6.0", + "aws-sign2": "0.7.0", "aws4": "1.6.0", "caseless": "0.12.0", "combined-stream": "1.0.5", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", + "mime-types": "2.1.17", "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", + "performance-now": "2.1.0", + "qs": "6.5.1", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.2", + "tough-cookie": "2.3.3", "tunnel-agent": "0.6.0", "uuid": "3.1.0" } @@ -6802,6 +7440,12 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", @@ -6812,6 +7456,12 @@ "resolve-from": "1.0.1" } }, + "reserved-words": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz", + "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", + "dev": true + }, "resolve": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", @@ -6820,6 +7470,21 @@ "path-parse": "1.0.5" } }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "requires": { + "resolve-from": "3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + } + } + }, "resolve-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.0.tgz", @@ -6932,6 +7597,30 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "sane": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.2.0.tgz", + "integrity": "sha512-OSJxhHO0CgPUw3lUm3GhfREAfza45smvEI9ozuFrxKG10GHVo0ryW9FK5VYlLvxj0SV7HVKHW0voYJIRu27GWg==", + "dev": true, + "requires": { + "anymatch": "1.3.0", + "exec-sh": "0.2.1", + "fb-watchman": "2.0.0", + "fsevents": "1.1.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.18.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -6990,14 +7679,68 @@ "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", "requires": { "glob": "7.1.2", - "interpret": "1.0.3", + "interpret": "1.0.4", "rechoir": "0.6.2" } }, "shellwords": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.0.tgz", - "integrity": "sha1-Zq/Ue2oSky2Qccv9mKUueFzQuhQ=", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "should": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/should/-/should-13.1.0.tgz", + "integrity": "sha512-Nn354G2A2lnmDsKB5rQbSjdOA6XOYcdO8XysWOY7iGJMMsuQf3vo1yHcwjjczNUQJY7sKYlY/mAc2FoZpaGvDA==", + "dev": true, + "requires": { + "should-equal": "2.0.0", + "should-format": "3.0.3", + "should-type": "1.4.0", + "should-type-adaptors": "1.0.1", + "should-util": "1.0.0" + } + }, + "should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "requires": { + "should-type": "1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "requires": { + "should-type": "1.4.0", + "should-type-adaptors": "1.0.1" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "should-type-adaptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz", + "integrity": "sha1-7+VVPN9oz/ZuXF9RtxLcNRx3vqo=", + "dev": true, + "requires": { + "should-type": "1.4.0", + "should-util": "1.0.0" + } + }, + "should-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz", + "integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=", "dev": true }, "signal-exit": { @@ -7031,12 +7774,12 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", + "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", "dev": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.0" } }, "source-list-map": { @@ -7101,17 +7844,9 @@ "bcrypt-pbkdf": "1.0.1", "dashdash": "1.14.1", "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" } }, "stable": { @@ -7151,21 +7886,31 @@ "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", - "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", "dev": true, "requires": { - "strip-ansi": "3.0.1" + "astral-regex": "1.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "string-template": { @@ -7183,6 +7928,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringify-object": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.0.tgz", @@ -7363,9 +8116,9 @@ } }, "tapable": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.6.tgz", - "integrity": "sha1-IGvo4YiGC1FEJTdebxrom/sB/Y0=" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" }, "temp": { "version": "0.8.3", @@ -7400,9 +8153,9 @@ "integrity": "sha1-G+DcKg3CRNRL6KCa9qha+5PE28M=" }, "throat": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", - "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", "dev": true }, "through": { @@ -7457,9 +8210,9 @@ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" }, "tough-cookie": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", "dev": true, "requires": { "punycode": "1.4.1" @@ -7527,6 +8280,22 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz", + "integrity": "sha1-A4qV99m7tCCxvzW6MdTFwd0//jQ=", + "dev": true + }, + "typescript-eslint-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/typescript-eslint-parser/-/typescript-eslint-parser-7.0.0.tgz", + "integrity": "sha1-vlfYdo43cHr4JeM56irxjXOTyrs=", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.3.0" + } + }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", @@ -7663,12 +8432,14 @@ } }, "verror": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "extsprintf": "1.0.2" + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" } }, "vinyl": { @@ -7694,6 +8465,12 @@ "vinyl": "1.2.0" } }, + "vlq": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.2.tgz", + "integrity": "sha1-4xbVJXtAuGu0PLjV/qXX9U1rDKE=", + "dev": true + }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -7712,10 +8489,22 @@ } }, "watch": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", - "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", - "dev": true + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "dev": true, + "requires": { + "exec-sh": "0.2.1", + "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } }, "watchpack": { "version": "1.4.0", @@ -7738,15 +8527,15 @@ } }, "webidl-conversions": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.1.tgz", - "integrity": "sha1-gBWherg+fhsxFjhIas6B2mziBqA=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true }, "webpack": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.5.6.tgz", - "integrity": "sha512-sXnxfx6KoZVrFAGLjdhCCwDtDwkYMfwm8mJjkQv3thr5pjTlbxopVlr/kJwc9Bz317gL+gNjvz++ir9TgG1MDg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.6.0.tgz", + "integrity": "sha512-OsHT3D0W0KmPPh60tC7asNnOmST6bKTiR90UyEdT9QYoaJ4OYN4Gg7WK1k3VxHK07ZoiYWPsKvlS/gAjwL/vRA==", "requires": { "acorn": "5.1.2", "acorn-dynamic-import": "2.0.2", @@ -7755,7 +8544,7 @@ "async": "2.5.0", "enhanced-resolve": "3.4.1", "escope": "3.6.0", - "interpret": "1.0.3", + "interpret": "1.0.4", "json-loader": "0.5.7", "json5": "0.5.1", "loader-runner": "2.3.0", @@ -7777,6 +8566,11 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==" }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", @@ -7785,6 +8579,33 @@ "lodash": "4.17.4" } }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, "enhanced-resolve": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", @@ -7796,10 +8617,142 @@ "tapable": "0.2.8" } }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, "tapable": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "4.1.0" + } } } }, @@ -7882,12 +8835,6 @@ "isexe": "2.0.0" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -7899,9 +8846,9 @@ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" }, "worker-farm": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.4.1.tgz", - "integrity": "sha512-tgFAtgOYLPutkAyzgpS6VJFL5HY+0ui1Tvua+fITgz8ByaJTMFGtazR6xxQfwfiAcbwE+2fLG/K49wc2TfwCNw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.0.tgz", + "integrity": "sha512-DHRiUggxtbruaTwnLDm2/BRDKZIoOYvrgYUj5Bam4fU6Gtvc0FaEyoswFPBjMXAweGW2H4BDNIpy//1yXXuaqQ==", "dev": true, "requires": { "errno": "0.1.4", @@ -7963,20 +8910,20 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "requires": { "camelcase": "4.1.0", "cliui": "3.2.0", "decamelize": "1.2.0", "get-caller-file": "1.0.2", - "os-locale": "2.0.0", + "os-locale": "2.1.0", "read-pkg-up": "2.0.0", "require-directory": "2.1.1", "require-main-filename": "1.0.1", "set-blocking": "2.0.0", - "string-width": "2.1.0", + "string-width": "2.1.1", "which-module": "2.0.0", "y18n": "3.2.1", "yargs-parser": "7.0.0" @@ -8014,22 +8961,13 @@ } } }, - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "requires": { - "lru-cache": "4.1.1", - "which": "1.2.14" - } - }, "execa": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz", - "integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "requires": { - "cross-spawn": "4.0.2", - "get-stream": "2.3.1", + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", "is-stream": "1.1.0", "npm-run-path": "2.0.2", "p-finally": "1.0.0", @@ -8045,15 +8983,6 @@ "locate-path": "2.0.0" } }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" - } - }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -8066,11 +8995,11 @@ } }, "os-locale": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.0.0.tgz", - "integrity": "sha1-FZGN7VEFIrge565aMJ1U9jn8OaQ=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "requires": { - "execa": "0.5.1", + "execa": "0.7.0", "lcid": "1.0.0", "mem": "1.1.0" } @@ -8103,9 +9032,9 @@ } }, "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { "is-fullwidth-code-point": "2.0.0", "strip-ansi": "4.0.0" @@ -8135,14 +9064,21 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "requires": { - "camelcase": "4.1.0" - } + } + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" } } }, diff --git a/package.json b/package.json index 9c28c1776d4..6587f565497 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,10 @@ }, "scripts": { "lint": "eslint \"**/*.js\"", + "format": "prettier-eslint \"bin/**/**/*.js\" --write && prettier-eslint \"lib/**/**/*.js\" --write && prettier-eslint \"test/**/**/*.js\" --write", "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", + "prepublish": "flow-remove-types lib/ -d dist/", "pretest": "npm run lint", "test": "jest --coverage" }, @@ -29,7 +31,8 @@ ] }, "jest": { - "testEnvironment": "node" + "testEnvironment": "node", + "modulePathIgnorePatterns": ["dist"] }, "dependencies": { "babel-code-frame": "^6.22.0", @@ -39,11 +42,11 @@ "chalk": "^2.0.1", "cross-spawn": "^5.1.0", "diff": "^3.3.0", - "enhanced-resolve": "^3.3.0", + "enhanced-resolve": "^3.4.1", "global-modules": "^1.0.0", "got": "^7.1.0", "inquirer": "^3.2.0", - "interpret": "^1.0.3", + "interpret": "^1.0.4", "jscodeshift": "^0.3.32", "listr": "^0.12.0", "loader-utils": "^1.1.0", @@ -53,12 +56,13 @@ "p-lazy": "^1.0.0", "prettier": "^1.5.3", "recast": "git://github.com/kalcifer/recast.git#bug/allowbreak", + "resolve-cwd": "^2.0.0", "rx": "^4.1.0", - "supports-color": "^4.2.0", - "webpack": "^3.3.0", + "supports-color": "^4.4.0", + "webpack": "^3.6.0", "webpack-addons": "1.1.2", "webpack-addons-ylvis": "0.0.34", - "yargs": "^8.0.2", + "yargs": "^9.0.1", "yeoman-environment": "^2.0.0", "yeoman-generator": "git://github.com/ev1stensberg/generator.git#Feature-getArgument" }, @@ -74,9 +78,12 @@ "eslint-plugin-flowtype": "^2.35.1", "eslint-plugin-node": "^5.1.0", "flow-bin": "^0.49.1", + "flow-remove-types": "^1.2.1", "husky": "^0.14.3", - "jest": "^20.0.4", - "jest-cli": "^20.0.4", - "lint-staged": "^4.1.3" + "jest": "^21.1.0", + "jest-cli": "^21.1.0", + "lint-staged": "^4.1.3", + "prettier-eslint-cli": "^4.3.2", + "should": "^13.1.0" } } diff --git a/test/BinTestCases.test.js b/test/BinTestCases.test.js new file mode 100644 index 00000000000..6cc26058277 --- /dev/null +++ b/test/BinTestCases.test.js @@ -0,0 +1,145 @@ +/* globals describe it before */ +"use strict"; + +const path = require("path"); +const fs = require("fs"); +const spawn = require("child_process").spawn; + +function loadOptsFile(optsPath) { + // Options file parser from Mocha + // https://github.com/mochajs/mocha/blob/2bb2b9fa35818db7a02e5068364b0c417436b1af/bin/options.js#L25-L31 + return fs + .readFileSync(optsPath, "utf8") + .replace(/\\\s/g, "%20") + .split(/\s/) + .filter(Boolean) + .map(function(value) { + return value.replace(/%20/g, " "); + }); +} + +function getTestSpecificArguments(testDirectory) { + try { + return loadOptsFile(path.join(testDirectory, "test.opts")); + } catch (e) { + return null; + } +} + +function convertToArrayOfLines(outputArray) { + if (outputArray.length === 0) return outputArray; + return outputArray.join("").split("\n"); +} + +const casesPath = path.join(__dirname, "binCases"); +const defaultArgs = loadOptsFile(path.join(casesPath, "test.opts")); + +describe("BinTestCases", function() { + const categoryDirectories = fs.readdirSync(casesPath).filter(folder => { + return fs.statSync(path.join(casesPath, folder)).isDirectory(); + }); + + const categories = categoryDirectories.map(function(categoryDirectory) { + return { + name: categoryDirectory, + tests: fs.readdirSync(path.join(casesPath, categoryDirectory)) + }; + }); + + categories.forEach(function(category) { + describe(category.name, function() { + category.tests.forEach(function(testName) { + const testDirectory = path.join(casesPath, category.name, testName); + const testArgs = getTestSpecificArguments(testDirectory) || defaultArgs; + const testAssertions = require(path.join(testDirectory, "stdin.js")); + const outputPath = path.join( + path.resolve(casesPath, "../js/bin"), + category.name, + testName + ); + + const cmd = `${path.resolve(process.cwd(), "bin/webpack.js")}`; + const args = testArgs.concat(["--output-path", `${outputPath}`]); + const opts = { + cwd: path.resolve("./", testDirectory) + }; + const asyncExists = fs.existsSync(path.join(testDirectory, "async")); + + const env = { + stdout: [], + stderr: [], + error: [] + }; + + if (asyncExists) { + describe(testName, function() { + test("should run successfully", function(done) { + jest.setTimeout(10000); + const child = spawn(process.execPath, [cmd].concat(args), opts); + child.on("close", function(code) { + env.code = code; + }); + + child.on("error", function(error) { + env.error.push(error); + }); + + child.stdout.on("data", data => { + env.stdout.push(data); + }); + + child.stderr.on("data", data => { + env.stderr.push(data); + }); + setTimeout(() => { + if (env.code) { + done(`Watch didn't run ${env.error}`); + } + + const stdout = convertToArrayOfLines(env.stdout); + const stderr = convertToArrayOfLines(env.stderr); + testAssertions(stdout, stderr, done); + child.kill(); + }, 3000); // wait a little to get an output + }); + }); + } else { + describe(testName, function() { + beforeEach(function(done) { + jest.setTimeout(20000); + + const child = spawn(process.execPath, [cmd].concat(args), opts); + + child.on("close", function(code) { + env.code = code; + done(); + }); + + child.on("error", function(error) { + env.error.push(error); + }); + + child.stdout.on("data", data => { + env.stdout.push(data); + }); + + child.stderr.on("data", data => { + env.stderr.push(data); + }); + }); + + test("should not cause any errors", function() { + expect(env.error).toHaveLength(0); + }); + + test("should run successfully", function() { + const stdout = convertToArrayOfLines(env.stdout); + const stderr = convertToArrayOfLines(env.stderr); + testAssertions(env.code, stdout, stderr); + }); + }); + } + }); + }); + }); +}); diff --git a/test/binCases/config-name/found-many/index.js b/test/binCases/config-name/found-many/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/config-name/found-many/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/config-name/found-many/index2.js b/test/binCases/config-name/found-many/index2.js new file mode 100644 index 00000000000..a7f281456cc --- /dev/null +++ b/test/binCases/config-name/found-many/index2.js @@ -0,0 +1 @@ +module.exports = "bar"; diff --git a/test/binCases/config-name/found-many/index3.js b/test/binCases/config-name/found-many/index3.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/config-name/found-many/stdin.js b/test/binCases/config-name/found-many/stdin.js new file mode 100644 index 00000000000..85cc3132e37 --- /dev/null +++ b/test/binCases/config-name/found-many/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[7]).toContain('./index2.js'); + expect(stdout[7]).toContain('./index2.js'); + expect(stdout[13]).toContain('./index3.js'); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/config-name/found-many/test.opts b/test/binCases/config-name/found-many/test.opts new file mode 100644 index 00000000000..059f8c49627 --- /dev/null +++ b/test/binCases/config-name/found-many/test.opts @@ -0,0 +1,6 @@ +--config ./webpack.config.js +--config-name bar +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node + diff --git a/test/binCases/config-name/found-many/webpack.config.js b/test/binCases/config-name/found-many/webpack.config.js new file mode 100644 index 00000000000..2f6d0872765 --- /dev/null +++ b/test/binCases/config-name/found-many/webpack.config.js @@ -0,0 +1,16 @@ +var path = require("path"); + +module.exports = [ + { + name: "foo", + entry: path.resolve(__dirname, "./index") + }, + { + name: "bar", + entry: path.resolve(__dirname, "./index2") + }, + { + name: "bar", + entry: path.resolve(__dirname, "./index3.js") + } +]; diff --git a/test/binCases/config-name/found-one/index.js b/test/binCases/config-name/found-one/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/config-name/found-one/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/config-name/found-one/index2.js b/test/binCases/config-name/found-one/index2.js new file mode 100644 index 00000000000..a7f281456cc --- /dev/null +++ b/test/binCases/config-name/found-one/index2.js @@ -0,0 +1 @@ +module.exports = "bar"; diff --git a/test/binCases/config-name/found-one/stdin.js b/test/binCases/config-name/found-one/stdin.js new file mode 100644 index 00000000000..11b81e410d6 --- /dev/null +++ b/test/binCases/config-name/found-one/stdin.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + + expect(stdout[5]).toContain("./index2.js"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/config-name/found-one/test.opts b/test/binCases/config-name/found-one/test.opts new file mode 100644 index 00000000000..b9b00798672 --- /dev/null +++ b/test/binCases/config-name/found-one/test.opts @@ -0,0 +1,5 @@ +--config ./webpack.config.js +--config-name bar +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/config-name/found-one/webpack.config.js b/test/binCases/config-name/found-one/webpack.config.js new file mode 100644 index 00000000000..cfeca70c7a6 --- /dev/null +++ b/test/binCases/config-name/found-one/webpack.config.js @@ -0,0 +1,12 @@ +var path = require("path"); + +module.exports = [ + { + name: "foo", + entry: path.resolve(__dirname, "./index") + }, + { + name: "bar", + entry: path.resolve(__dirname, "./index2") + } +]; diff --git a/test/binCases/config-name/not-found/stdin.js b/test/binCases/config-name/not-found/stdin.js new file mode 100644 index 00000000000..fec19b5be2d --- /dev/null +++ b/test/binCases/config-name/not-found/stdin.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).not.toBe(0); + expect(stdout).toHaveLength(0); + expect(stderr[0]).toContain("Configuration with name 'foo' was not found."); +}; diff --git a/test/binCases/config-name/not-found/test.opts b/test/binCases/config-name/not-found/test.opts new file mode 100644 index 00000000000..dfe77dcedc7 --- /dev/null +++ b/test/binCases/config-name/not-found/test.opts @@ -0,0 +1,2 @@ +--config ./webpack.config.js +--config-name foo diff --git a/test/binCases/config-name/not-found/webpack.config.js b/test/binCases/config-name/not-found/webpack.config.js new file mode 100644 index 00000000000..3c788726cac --- /dev/null +++ b/test/binCases/config-name/not-found/webpack.config.js @@ -0,0 +1,5 @@ +module.exports = [ + { + name: "bar" + } +]; diff --git a/test/binCases/configFile/profile/bar.js b/test/binCases/configFile/profile/bar.js new file mode 100644 index 00000000000..636c1fc2774 --- /dev/null +++ b/test/binCases/configFile/profile/bar.js @@ -0,0 +1 @@ +console.log("bar"); diff --git a/test/binCases/configFile/profile/foo.js b/test/binCases/configFile/profile/foo.js new file mode 100644 index 00000000000..2753f2eb024 --- /dev/null +++ b/test/binCases/configFile/profile/foo.js @@ -0,0 +1,3 @@ +require("./bar"); + +console.log("foo"); diff --git a/test/binCases/configFile/profile/index.js b/test/binCases/configFile/profile/index.js new file mode 100644 index 00000000000..e51c55eb6a5 --- /dev/null +++ b/test/binCases/configFile/profile/index.js @@ -0,0 +1 @@ +const foo = require("./foo"); diff --git a/test/binCases/configFile/profile/stdin.js b/test/binCases/configFile/profile/stdin.js new file mode 100644 index 00000000000..100438d3af6 --- /dev/null +++ b/test/binCases/configFile/profile/stdin.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + + expect(stdout[6]).toContain("factory:"); + expect(stdout[8]).toContain("factory:"); + expect(stdout[10]).toContain("factory:"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/configFile/profile/webpack.config.js b/test/binCases/configFile/profile/webpack.config.js new file mode 100644 index 00000000000..686dc437972 --- /dev/null +++ b/test/binCases/configFile/profile/webpack.config.js @@ -0,0 +1,6 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index"), + profile: true +}; diff --git a/test/binCases/entry/multi-file/a.js b/test/binCases/entry/multi-file/a.js new file mode 100644 index 00000000000..aa7a96ad992 --- /dev/null +++ b/test/binCases/entry/multi-file/a.js @@ -0,0 +1 @@ +module.exports = "fileA"; diff --git a/test/binCases/entry/multi-file/index.js b/test/binCases/entry/multi-file/index.js new file mode 100644 index 00000000000..0d24e266fe2 --- /dev/null +++ b/test/binCases/entry/multi-file/index.js @@ -0,0 +1 @@ +module.exports = "index"; diff --git a/test/binCases/entry/multi-file/stdin.js b/test/binCases/entry/multi-file/stdin.js new file mode 100644 index 00000000000..d6a349eeea3 --- /dev/null +++ b/test/binCases/entry/multi-file/stdin.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[4]).toContain("null.js"); + expect(stdout[5]).toMatch(/multi.*index\.js.*a\.js/); // should have multi-file entry + expect(stdout[6]).toMatch(/index\.js.*\{0\}/); + expect(stdout[7]).toMatch(/a\.js.*\{0\}/); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/entry/multi-file/test.opts b/test/binCases/entry/multi-file/test.opts new file mode 100644 index 00000000000..53402ac53c5 --- /dev/null +++ b/test/binCases/entry/multi-file/test.opts @@ -0,0 +1,6 @@ +--entry ./index.js +--entry ./a.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/entry/multi-file/webpack.config.js b/test/binCases/entry/multi-file/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/entry/multi-file/webpack.config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/binCases/entry/named-entry/a.js b/test/binCases/entry/named-entry/a.js new file mode 100644 index 00000000000..aa7a96ad992 --- /dev/null +++ b/test/binCases/entry/named-entry/a.js @@ -0,0 +1 @@ +module.exports = "fileA"; diff --git a/test/binCases/entry/named-entry/index.js b/test/binCases/entry/named-entry/index.js new file mode 100644 index 00000000000..0d24e266fe2 --- /dev/null +++ b/test/binCases/entry/named-entry/index.js @@ -0,0 +1 @@ +module.exports = "index"; diff --git a/test/binCases/entry/named-entry/stdin.js b/test/binCases/entry/named-entry/stdin.js new file mode 100644 index 00000000000..92d7807231c --- /dev/null +++ b/test/binCases/entry/named-entry/stdin.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[4]).toContain("null.js"); + expect(stdout[5]).toContain("foo.js"); // named entry from --entry foo=./a.js + expect(stdout[6]).toMatch(/a\.js.*\{1\}/); + expect(stdout[7]).toMatch(/index\.js.*\{0\}/); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/entry/named-entry/test.opts b/test/binCases/entry/named-entry/test.opts new file mode 100644 index 00000000000..b8f0fa016e2 --- /dev/null +++ b/test/binCases/entry/named-entry/test.opts @@ -0,0 +1,6 @@ +--entry foo=./a.js +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/entry/named-entry/webpack.config.js b/test/binCases/entry/named-entry/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/entry/named-entry/webpack.config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/binCases/entry/non-hyphenated-args/a.js b/test/binCases/entry/non-hyphenated-args/a.js new file mode 100644 index 00000000000..aa7a96ad992 --- /dev/null +++ b/test/binCases/entry/non-hyphenated-args/a.js @@ -0,0 +1 @@ +module.exports = "fileA"; diff --git a/test/binCases/entry/non-hyphenated-args/index.js b/test/binCases/entry/non-hyphenated-args/index.js new file mode 100644 index 00000000000..0d24e266fe2 --- /dev/null +++ b/test/binCases/entry/non-hyphenated-args/index.js @@ -0,0 +1 @@ +module.exports = "index"; diff --git a/test/binCases/entry/non-hyphenated-args/stdin.js b/test/binCases/entry/non-hyphenated-args/stdin.js new file mode 100644 index 00000000000..3512125c6f8 --- /dev/null +++ b/test/binCases/entry/non-hyphenated-args/stdin.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[4]).toContain("null.js"); + expect(stdout[5]).toContain("main.js"); // non-hyphenated arg ./a.js should create chunk "main" + expect(stdout[6]).toMatch(/index\.js.*\{0\}/); // index.js should be in chunk 0 + expect(stdout[7]).toMatch(/a\.js.*\{1\}/); // a.js should be in chunk 1 + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/entry/non-hyphenated-args/test.opts b/test/binCases/entry/non-hyphenated-args/test.opts new file mode 100644 index 00000000000..6b8499d5275 --- /dev/null +++ b/test/binCases/entry/non-hyphenated-args/test.opts @@ -0,0 +1,6 @@ +./a.js +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/entry/non-hyphenated-args/webpack.config.js b/test/binCases/entry/non-hyphenated-args/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/entry/non-hyphenated-args/webpack.config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/binCases/errors/issue-5576/a.js b/test/binCases/errors/issue-5576/a.js new file mode 100644 index 00000000000..aa7a96ad992 --- /dev/null +++ b/test/binCases/errors/issue-5576/a.js @@ -0,0 +1 @@ +module.exports = "fileA"; diff --git a/test/binCases/errors/issue-5576/a/.keep b/test/binCases/errors/issue-5576/a/.keep new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/test/binCases/errors/issue-5576/a/.keep @@ -0,0 +1 @@ + diff --git a/test/binCases/errors/issue-5576/stdin.js b/test/binCases/errors/issue-5576/stdin.js new file mode 100644 index 00000000000..577ec2f6887 --- /dev/null +++ b/test/binCases/errors/issue-5576/stdin.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + expect(stdout[2]).toContain("Time: "); + expect(stdout[4]).toContain( + "ERROR in Entry module not found: Error: Can't resolve" + ); + + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/errors/issue-5576/test.opts b/test/binCases/errors/issue-5576/test.opts new file mode 100644 index 00000000000..368eb2326cf --- /dev/null +++ b/test/binCases/errors/issue-5576/test.opts @@ -0,0 +1,3 @@ +a +bundle.js + diff --git a/test/binCases/errors/issue-5576/webpack.config.js b/test/binCases/errors/issue-5576/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/errors/issue-5576/webpack.config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/binCases/errors/parse/index.js b/test/binCases/errors/parse/index.js new file mode 100644 index 00000000000..5c34318c214 --- /dev/null +++ b/test/binCases/errors/parse/index.js @@ -0,0 +1 @@ +} diff --git a/test/binCases/errors/parse/stdin.js b/test/binCases/errors/parse/stdin.js new file mode 100644 index 00000000000..158648c5e46 --- /dev/null +++ b/test/binCases/errors/parse/stdin.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + expect(stdout[2]).toContain("Time: "); + expect(stdout[5]).toContain("./index.js"); + expect(stdout[5]).toContain("[built]"); + expect(stdout[5]).toContain("[failed]"); + expect(stdout[5]).toContain("[1 error]"); + expect(stdout[7]).toContain("ERROR in ./index.js"); + expect(stdout[8]).toContain("Module parse failed:"); + + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/errors/parse/webpack.config.js b/test/binCases/errors/parse/webpack.config.js new file mode 100644 index 00000000000..f00c469a2be --- /dev/null +++ b/test/binCases/errors/parse/webpack.config.js @@ -0,0 +1,4 @@ +module.exports = { + context: __dirname, + entry: "./index" +}; diff --git a/test/binCases/help/help-output/stdin.js b/test/binCases/help/help-output/stdin.js new file mode 100644 index 00000000000..602c1914075 --- /dev/null +++ b/test/binCases/help/help-output/stdin.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toMatch(/webpack/); + expect(stdout).toContain("Config options:"); + expect(stdout).toContain("Basic options:"); + expect(stdout).toContain("Module options:"); + expect(stdout).toContain("Output options:"); + expect(stdout).toContain("Advanced options:"); + expect(stdout).toContain("Resolving options:"); + expect(stdout).toContain("Optimizing options:"); + expect(stdout).toContain("Stats options:"); + expect(stdout).toContain("Options:"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/help/help-output/test.opts b/test/binCases/help/help-output/test.opts new file mode 100644 index 00000000000..2255a80a730 --- /dev/null +++ b/test/binCases/help/help-output/test.opts @@ -0,0 +1 @@ +--help diff --git a/test/binCases/module/module-bind/file.post b/test/binCases/module/module-bind/file.post new file mode 100644 index 00000000000..8b1e502f812 --- /dev/null +++ b/test/binCases/module/module-bind/file.post @@ -0,0 +1 @@ +post diff --git a/test/binCases/module/module-bind/file.pre b/test/binCases/module/module-bind/file.pre new file mode 100644 index 00000000000..ecca61d996a --- /dev/null +++ b/test/binCases/module/module-bind/file.pre @@ -0,0 +1 @@ +pre diff --git a/test/binCases/module/module-bind/index.js b/test/binCases/module/module-bind/index.js new file mode 100644 index 00000000000..18c4f18cda7 --- /dev/null +++ b/test/binCases/module/module-bind/index.js @@ -0,0 +1,3 @@ +var pre = require("./file.pre"); +var post = require("./file.post"); +module.exports = "foo"; diff --git a/test/binCases/module/module-bind/post-loader.js b/test/binCases/module/module-bind/post-loader.js new file mode 100644 index 00000000000..713c44c1103 --- /dev/null +++ b/test/binCases/module/module-bind/post-loader.js @@ -0,0 +1,4 @@ +module.exports = function(source) { + console.log("post-loaded " + source.replace(/\r?\n/g, "")); + return source; +}; diff --git a/test/binCases/module/module-bind/pre-loader.js b/test/binCases/module/module-bind/pre-loader.js new file mode 100644 index 00000000000..32a5b4c2656 --- /dev/null +++ b/test/binCases/module/module-bind/pre-loader.js @@ -0,0 +1,4 @@ +module.exports = function(source) { + console.log("pre-loaded " + source.replace(/\r?\n/g, "")); + return source; +}; diff --git a/test/binCases/module/module-bind/stdin.js b/test/binCases/module/module-bind/stdin.js new file mode 100644 index 00000000000..53abdd0f535 --- /dev/null +++ b/test/binCases/module/module-bind/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + + expect(stdout).toEqual(expect.anything()); + expect(stdout).toContain("pre-loaded pre"); + expect(stdout).toContain("post-loaded post"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/module/module-bind/test.opts b/test/binCases/module/module-bind/test.opts new file mode 100644 index 00000000000..94331cd34e2 --- /dev/null +++ b/test/binCases/module/module-bind/test.opts @@ -0,0 +1,7 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--module-bind-pre pre=./pre-loader +--module-bind-post post=./post-loader diff --git a/test/binCases/module/module-bind/webpack.config.js b/test/binCases/module/module-bind/webpack.config.js new file mode 100644 index 00000000000..a5c12a44666 --- /dev/null +++ b/test/binCases/module/module-bind/webpack.config.js @@ -0,0 +1,5 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index") +}; diff --git a/test/binCases/plugins/uglifyjsplugin-empty-args/index.js b/test/binCases/plugins/uglifyjsplugin-empty-args/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/plugins/uglifyjsplugin-empty-args/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/plugins/uglifyjsplugin-empty-args/stdin.js b/test/binCases/plugins/uglifyjsplugin-empty-args/stdin.js new file mode 100644 index 00000000000..f99dbf070f3 --- /dev/null +++ b/test/binCases/plugins/uglifyjsplugin-empty-args/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + + expect(stdout).toEqual(expect.anything()); + expect(stdout[4]).toContain("bytes"); // without uglifyjs it's multiple kBs + + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts b/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts new file mode 100644 index 00000000000..edc5ab3dcb3 --- /dev/null +++ b/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts @@ -0,0 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--plugin webpack/lib/optimize/UglifyJsPlugin diff --git a/test/binCases/plugins/uglifyjsplugin-empty-args/webpack.config.js b/test/binCases/plugins/uglifyjsplugin-empty-args/webpack.config.js new file mode 100644 index 00000000000..a5c12a44666 --- /dev/null +++ b/test/binCases/plugins/uglifyjsplugin-empty-args/webpack.config.js @@ -0,0 +1,5 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index") +}; diff --git a/test/binCases/stats/custom-preset/index.js b/test/binCases/stats/custom-preset/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/stats/custom-preset/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/custom-preset/stdin.js b/test/binCases/stats/custom-preset/stdin.js new file mode 100644 index 00000000000..ca175acffe4 --- /dev/null +++ b/test/binCases/stats/custom-preset/stdin.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(stderr).toHaveLength(0); + expect(code).toBe(0); + expect(stdout).toHaveLength(0); +}; diff --git a/test/binCases/stats/custom-preset/test.opts b/test/binCases/stats/custom-preset/test.opts new file mode 100644 index 00000000000..e45b168921d --- /dev/null +++ b/test/binCases/stats/custom-preset/test.opts @@ -0,0 +1,5 @@ +--entry ./index.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--display diff --git a/test/binCases/stats/multi-config/index.js b/test/binCases/stats/multi-config/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/stats/multi-config/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/multi-config/index2.js b/test/binCases/stats/multi-config/index2.js new file mode 100644 index 00000000000..a7f281456cc --- /dev/null +++ b/test/binCases/stats/multi-config/index2.js @@ -0,0 +1 @@ +module.exports = "bar"; diff --git a/test/binCases/stats/multi-config/stdin.js b/test/binCases/stats/multi-config/stdin.js new file mode 100644 index 00000000000..d3023f4feb2 --- /dev/null +++ b/test/binCases/stats/multi-config/stdin.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/stats/multi-config/webpack.config.js b/test/binCases/stats/multi-config/webpack.config.js new file mode 100644 index 00000000000..f522c7813d3 --- /dev/null +++ b/test/binCases/stats/multi-config/webpack.config.js @@ -0,0 +1,12 @@ +var path = require("path"); + +module.exports = [ + { + entry: path.resolve(__dirname, "./index"), + stats: "errors-only" + }, + { + entry: path.resolve(__dirname, "./index2"), + stats: "errors-only" + } +]; diff --git a/test/binCases/stats/none/index.js b/test/binCases/stats/none/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/stats/none/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/none/stdin.js b/test/binCases/stats/none/stdin.js new file mode 100644 index 00000000000..f53dcbf4f32 --- /dev/null +++ b/test/binCases/stats/none/stdin.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toHaveLength(0); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/stats/none/webpack.config.js b/test/binCases/stats/none/webpack.config.js new file mode 100644 index 00000000000..40a6ae80766 --- /dev/null +++ b/test/binCases/stats/none/webpack.config.js @@ -0,0 +1,6 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index"), + stats: "none" +}; diff --git a/test/binCases/stats/single-config/index.js b/test/binCases/stats/single-config/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/stats/single-config/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/single-config/stdin.js b/test/binCases/stats/single-config/stdin.js new file mode 100644 index 00000000000..e0cf0717163 --- /dev/null +++ b/test/binCases/stats/single-config/stdin.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(0); + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + expect(stdout[2]).toContain("Time: "); + expect(stdout[4]).toContain("\u001b[1m\u001b[32mnull.js\u001b[39m\u001b[22m"); + expect(stdout[5]).toContain("chunk"); + expect(stdout[6]).not.toContain("./index.js"); + expect(stdout[6]).not.toContain("[built]"); + expect(stdout[6]).toContain("1 module"); + + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/stats/single-config/webpack.config.js b/test/binCases/stats/single-config/webpack.config.js new file mode 100644 index 00000000000..d15e7a1936d --- /dev/null +++ b/test/binCases/stats/single-config/webpack.config.js @@ -0,0 +1,11 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index"), + stats: { + assets: true, + colors: true, + chunks: true, + maxModules: 0 + } +}; diff --git a/test/binCases/test.opts b/test/binCases/test.opts new file mode 100644 index 00000000000..f9e6657e70b --- /dev/null +++ b/test/binCases/test.opts @@ -0,0 +1,5 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/watch/multi-config-watch-opt/async b/test/binCases/watch/multi-config-watch-opt/async new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/multi-config-watch-opt/index.js b/test/binCases/watch/multi-config-watch-opt/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/watch/multi-config-watch-opt/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/watch/multi-config-watch-opt/index2.js b/test/binCases/watch/multi-config-watch-opt/index2.js new file mode 100644 index 00000000000..a7f281456cc --- /dev/null +++ b/test/binCases/watch/multi-config-watch-opt/index2.js @@ -0,0 +1 @@ +module.exports = "bar"; diff --git a/test/binCases/watch/multi-config-watch-opt/stdin.js b/test/binCases/watch/multi-config-watch-opt/stdin.js new file mode 100644 index 00000000000..8fae9bafeb6 --- /dev/null +++ b/test/binCases/watch/multi-config-watch-opt/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(stdout, stderr, done) { + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain(""); + expect(stdout[1]).toContain("Webpack is watching the files…"); + + expect(stderr).toHaveLength(0); + done(); +}; diff --git a/test/binCases/watch/multi-config-watch-opt/test.opts b/test/binCases/watch/multi-config-watch-opt/test.opts new file mode 100644 index 00000000000..38534ad5708 --- /dev/null +++ b/test/binCases/watch/multi-config-watch-opt/test.opts @@ -0,0 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--watch diff --git a/test/binCases/watch/multi-config-watch-opt/webpack.config.js b/test/binCases/watch/multi-config-watch-opt/webpack.config.js new file mode 100644 index 00000000000..1eea67aa467 --- /dev/null +++ b/test/binCases/watch/multi-config-watch-opt/webpack.config.js @@ -0,0 +1,10 @@ +var path = require("path"); + +module.exports = [ + { + entry: path.resolve(__dirname, "./index") + }, + { + entry: path.resolve(__dirname, "./index2") + } +]; diff --git a/test/binCases/watch/multi-config/async b/test/binCases/watch/multi-config/async new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/multi-config/index.js b/test/binCases/watch/multi-config/index.js new file mode 100644 index 00000000000..e7134e7006d --- /dev/null +++ b/test/binCases/watch/multi-config/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/watch/multi-config/index2.js b/test/binCases/watch/multi-config/index2.js new file mode 100644 index 00000000000..a7f281456cc --- /dev/null +++ b/test/binCases/watch/multi-config/index2.js @@ -0,0 +1 @@ +module.exports = "bar"; diff --git a/test/binCases/watch/multi-config/stdin.js b/test/binCases/watch/multi-config/stdin.js new file mode 100644 index 00000000000..8fae9bafeb6 --- /dev/null +++ b/test/binCases/watch/multi-config/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(stdout, stderr, done) { + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain(""); + expect(stdout[1]).toContain("Webpack is watching the files…"); + + expect(stderr).toHaveLength(0); + done(); +}; diff --git a/test/binCases/watch/multi-config/webpack.config.js b/test/binCases/watch/multi-config/webpack.config.js new file mode 100644 index 00000000000..9bb64699dc7 --- /dev/null +++ b/test/binCases/watch/multi-config/webpack.config.js @@ -0,0 +1,11 @@ +var path = require("path"); + +module.exports = [ + { + entry: path.resolve(__dirname, "./index"), + watch: true + }, + { + entry: path.resolve(__dirname, "./index2") + } +]; diff --git a/test/binCases/watch/single-config-watch-opt/async b/test/binCases/watch/single-config-watch-opt/async new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/single-config-watch-opt/index.js b/test/binCases/watch/single-config-watch-opt/index.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/single-config-watch-opt/stdin.js b/test/binCases/watch/single-config-watch-opt/stdin.js new file mode 100644 index 00000000000..8fae9bafeb6 --- /dev/null +++ b/test/binCases/watch/single-config-watch-opt/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(stdout, stderr, done) { + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain(""); + expect(stdout[1]).toContain("Webpack is watching the files…"); + + expect(stderr).toHaveLength(0); + done(); +}; diff --git a/test/binCases/watch/single-config-watch-opt/test.opts b/test/binCases/watch/single-config-watch-opt/test.opts new file mode 100644 index 00000000000..38534ad5708 --- /dev/null +++ b/test/binCases/watch/single-config-watch-opt/test.opts @@ -0,0 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--watch diff --git a/test/binCases/watch/single-config-watch-opt/webpack.config.js b/test/binCases/watch/single-config-watch-opt/webpack.config.js new file mode 100644 index 00000000000..a5c12a44666 --- /dev/null +++ b/test/binCases/watch/single-config-watch-opt/webpack.config.js @@ -0,0 +1,5 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index") +}; diff --git a/test/binCases/watch/single-config/async b/test/binCases/watch/single-config/async new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/single-config/index.js b/test/binCases/watch/single-config/index.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/watch/single-config/stdin.js b/test/binCases/watch/single-config/stdin.js new file mode 100644 index 00000000000..8fae9bafeb6 --- /dev/null +++ b/test/binCases/watch/single-config/stdin.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function testAssertions(stdout, stderr, done) { + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain(""); + expect(stdout[1]).toContain("Webpack is watching the files…"); + + expect(stderr).toHaveLength(0); + done(); +}; diff --git a/test/binCases/watch/single-config/webpack.config.js b/test/binCases/watch/single-config/webpack.config.js new file mode 100644 index 00000000000..8a01f0715a7 --- /dev/null +++ b/test/binCases/watch/single-config/webpack.config.js @@ -0,0 +1,6 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index"), + watch: true +}; diff --git a/test/js/bin/config-name/found-many/main.js b/test/js/bin/config-name/found-many/main.js new file mode 100644 index 00000000000..115f09a4d04 --- /dev/null +++ b/test/js/bin/config-name/found-many/main.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "bar"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/config-name/found-one/main.js b/test/js/bin/config-name/found-one/main.js new file mode 100644 index 00000000000..115f09a4d04 --- /dev/null +++ b/test/js/bin/config-name/found-one/main.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "bar"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/configFile/profile/null.js b/test/js/bin/configFile/profile/null.js new file mode 100644 index 00000000000..ab5478d665e --- /dev/null +++ b/test/js/bin/configFile/profile/null.js @@ -0,0 +1,90 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +const foo = __webpack_require__(1); + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(2); + +console.log("foo"); + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +console.log("bar"); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/entry/multi-file/null.js b/test/js/bin/entry/multi-file/null.js new file mode 100644 index 00000000000..d76d21d5f03 --- /dev/null +++ b/test/js/bin/entry/multi-file/null.js @@ -0,0 +1,89 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(1); +module.exports = __webpack_require__(2); + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +module.exports = "index"; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +module.exports = "fileA"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/entry/named-entry/foo.js b/test/js/bin/entry/named-entry/foo.js new file mode 100644 index 00000000000..70b4cfb536a --- /dev/null +++ b/test/js/bin/entry/named-entry/foo.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "fileA"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/entry/named-entry/null.js b/test/js/bin/entry/named-entry/null.js new file mode 100644 index 00000000000..89fae7c48ce --- /dev/null +++ b/test/js/bin/entry/named-entry/null.js @@ -0,0 +1,75 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, exports) { + +module.exports = "index"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/entry/non-hyphenated-args/main.js b/test/js/bin/entry/non-hyphenated-args/main.js new file mode 100644 index 00000000000..18c1ee46cb2 --- /dev/null +++ b/test/js/bin/entry/non-hyphenated-args/main.js @@ -0,0 +1,75 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, exports) { + +module.exports = "fileA"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/entry/non-hyphenated-args/null.js b/test/js/bin/entry/non-hyphenated-args/null.js new file mode 100644 index 00000000000..527680c3621 --- /dev/null +++ b/test/js/bin/entry/non-hyphenated-args/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "index"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/errors/parse/null.js b/test/js/bin/errors/parse/null.js new file mode 100644 index 00000000000..8ab06b6a8e2 --- /dev/null +++ b/test/js/bin/errors/parse/null.js @@ -0,0 +1,73 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +throw new Error("Module parse failed: /Users/evenstensberg/Documents/webpack-cli/test/binCases/errors/parse/index.js Unexpected token (1:0)\nYou may need an appropriate loader to handle this file type.\n| }\n| "); + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/module/module-bind/null.js b/test/js/bin/module/module-bind/null.js new file mode 100644 index 00000000000..fe5e939a265 --- /dev/null +++ b/test/js/bin/module/module-bind/null.js @@ -0,0 +1,90 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var pre = __webpack_require__(1); +var post = __webpack_require__(2); +module.exports = "foo"; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +pre + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +post + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/plugins/uglifyjsplugin-empty-args/null.js b/test/js/bin/plugins/uglifyjsplugin-empty-args/null.js new file mode 100644 index 00000000000..a71ebe70b50 --- /dev/null +++ b/test/js/bin/plugins/uglifyjsplugin-empty-args/null.js @@ -0,0 +1 @@ +!function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};t.m=r,t.c=e,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},t.p="",t(t.s=0)}([function(r,t){r.exports="foo"}]); \ No newline at end of file diff --git a/test/js/bin/stats/custom-preset/null.js b/test/js/bin/stats/custom-preset/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/stats/custom-preset/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/stats/multi-config/null.js b/test/js/bin/stats/multi-config/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/stats/multi-config/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/stats/none/null.js b/test/js/bin/stats/none/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/stats/none/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/stats/single-config/null.js b/test/js/bin/stats/single-config/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/stats/single-config/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/watch/multi-config-watch-opt/null.js b/test/js/bin/watch/multi-config-watch-opt/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/watch/multi-config-watch-opt/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/watch/multi-config/null.js b/test/js/bin/watch/multi-config/null.js new file mode 100644 index 00000000000..127d2e0ca0f --- /dev/null +++ b/test/js/bin/watch/multi-config/null.js @@ -0,0 +1,74 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = "foo"; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/watch/single-config-watch-opt/null.js b/test/js/bin/watch/single-config-watch-opt/null.js new file mode 100644 index 00000000000..30d65ea5b72 --- /dev/null +++ b/test/js/bin/watch/single-config-watch-opt/null.js @@ -0,0 +1,73 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/js/bin/watch/single-config/null.js b/test/js/bin/watch/single-config/null.js new file mode 100644 index 00000000000..30d65ea5b72 --- /dev/null +++ b/test/js/bin/watch/single-config/null.js @@ -0,0 +1,73 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + + + +/***/ }) +/******/ ]); \ No newline at end of file From 79c7360098cdc5de3ebf95543518a5f171ef19f6 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:03:13 +0200 Subject: [PATCH 06/24] ast for devServer (#185) --- .../__snapshots__/devServer.test.js.snap | 31 + .../__testfixtures__/devServer-0.input.js | 6 + .../__testfixtures__/devServer-1.input.js | 6 + .../transformations/devServer/devServer.js | 40 + .../devServer/devServer.test.js | 10 + lib/creator/transformations/index.js | 4 +- package-lock.json | 3534 +++++++---------- package.json | 4 +- 8 files changed, 1583 insertions(+), 2052 deletions(-) create mode 100644 lib/creator/transformations/devServer/__snapshots__/devServer.test.js.snap create mode 100644 lib/creator/transformations/devServer/__testfixtures__/devServer-0.input.js create mode 100644 lib/creator/transformations/devServer/__testfixtures__/devServer-1.input.js create mode 100644 lib/creator/transformations/devServer/devServer.js create mode 100644 lib/creator/transformations/devServer/devServer.test.js diff --git a/lib/creator/transformations/devServer/__snapshots__/devServer.test.js.snap b/lib/creator/transformations/devServer/__snapshots__/devServer.test.js.snap new file mode 100644 index 00000000000..f1342f6724b --- /dev/null +++ b/lib/creator/transformations/devServer/__snapshots__/devServer.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`devServer transforms correctly using "devServer-0" data 1`] = ` +"module.exports = { + entry: 'index.js', + + output: { + filename: 'bundle.js' + }, + + devServer: { + contentBase: path.join(__dirname, 'dist'), + compress: true, + port: 9000 + } +} +" +`; + +exports[`devServer transforms correctly using "devServer-1" data 1`] = ` +"module.exports = { + entry: 'index.js', + + output: { + filename: 'bundle.js' + }, + + devServer: someVar +} +" +`; diff --git a/lib/creator/transformations/devServer/__testfixtures__/devServer-0.input.js b/lib/creator/transformations/devServer/__testfixtures__/devServer-0.input.js new file mode 100644 index 00000000000..080e440f373 --- /dev/null +++ b/lib/creator/transformations/devServer/__testfixtures__/devServer-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + }, +} diff --git a/lib/creator/transformations/devServer/__testfixtures__/devServer-1.input.js b/lib/creator/transformations/devServer/__testfixtures__/devServer-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/lib/creator/transformations/devServer/__testfixtures__/devServer-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/lib/creator/transformations/devServer/devServer.js b/lib/creator/transformations/devServer/devServer.js new file mode 100644 index 00000000000..14d6b765b5a --- /dev/null +++ b/lib/creator/transformations/devServer/devServer.js @@ -0,0 +1,40 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for devServer. Finds the devServer property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createDevServerProperty(p) { + utils.pushCreateProperty(j, p, "devServer", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "devServer"); + } + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createDevServerProperty)); + } else if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "devServer", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/lib/creator/transformations/devServer/devServer.test.js b/lib/creator/transformations/devServer/devServer.test.js new file mode 100644 index 00000000000..4eb14cf79e9 --- /dev/null +++ b/lib/creator/transformations/devServer/devServer.test.js @@ -0,0 +1,10 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "devServer", "devServer-0",{ + contentBase: "path.join(__dirname, 'dist')", + compress: true, + port: 9000 +}); +defineTest(__dirname, "devServer", "devServer-1", "someVar"); diff --git a/lib/creator/transformations/index.js b/lib/creator/transformations/index.js index 73610e7f74f..5768a743ba9 100644 --- a/lib/creator/transformations/index.js +++ b/lib/creator/transformations/index.js @@ -27,6 +27,7 @@ const mergeTransform = require("./other/merge"); const moduleTransform = require("./module/module"); const pluginsTransform = require("./plugins/plugins"); const topScopeTransform = require("./top-scope/top-scope"); +const devServerTransform = require("./devServer/devServer"); /* * @function runTransform @@ -58,7 +59,8 @@ const transformsObject = { moduleTransform, pluginsTransform, topScopeTransform, - mergeTransform + mergeTransform, + devServerTransform }; module.exports = function runTransform(webpackProperties) { diff --git a/package-lock.json b/package-lock.json index d819ae34668..8d417136ca1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,9 @@ "dev": true }, "abbrev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, "acorn": { @@ -56,9 +56,9 @@ } }, "ajv": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", - "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", "requires": { "co": "4.6.0", "fast-deep-equal": "1.0.0", @@ -95,9 +95,9 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==" }, "ansi-regex": { "version": "2.1.1", @@ -110,12 +110,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "anymatch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", - "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" } }, "app-root-path": { @@ -147,13 +147,13 @@ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "arr-flatten": "1.0.3" + "arr-flatten": "1.1.0" } }, "arr-flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", - "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "array-differ": { "version": "1.0.0", @@ -264,17 +264,17 @@ "dev": true }, "babel-cli": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz", - "integrity": "sha1-IHzXBbumFImy6kG1MSNBz2rKIoM=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", "dev": true, "requires": { - "babel-core": "6.25.0", - "babel-polyfill": "6.23.0", - "babel-register": "6.24.1", - "babel-runtime": "6.23.0", + "babel-core": "6.26.0", + "babel-polyfill": "6.26.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", "chokidar": "1.7.0", - "commander": "2.10.0", + "commander": "2.11.0", "convert-source-map": "1.5.0", "fs-readdir-recursive": "1.0.0", "glob": "7.1.2", @@ -282,7 +282,7 @@ "output-file-sync": "1.1.2", "path-is-absolute": "1.0.1", "slash": "1.0.0", - "source-map": "0.5.6", + "source-map": "0.5.7", "v8flags": "2.1.1" }, "dependencies": { @@ -291,13 +291,27 @@ "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz", "integrity": "sha1-jNF0XItPiinIyuw5JHaSG6GV9WA=", "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } } } }, "babel-code-frame": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { "chalk": "1.1.3", "esutils": "2.0.2", @@ -324,29 +338,29 @@ } }, "babel-core": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz", - "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", "requires": { - "babel-code-frame": "6.22.0", - "babel-generator": "6.25.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.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", + "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", + "debug": "2.6.9", "json5": "0.5.1", "lodash": "4.17.4", "minimatch": "3.0.4", "path-is-absolute": "1.0.1", "private": "0.1.7", "slash": "1.0.0", - "source-map": "0.5.6" + "source-map": "0.5.7" } }, "babel-eslint": { @@ -355,24 +369,24 @@ "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", "dev": true, "requires": { - "babel-code-frame": "6.22.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4" + "babel-code-frame": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0" } }, "babel-generator": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz", - "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", "requires": { "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", "lodash": "4.17.4", - "source-map": "0.5.6", + "source-map": "0.5.7", "trim-right": "1.0.1" } }, @@ -381,9 +395,9 @@ "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-builder-binary-assignment-operator-visitor": { @@ -392,8 +406,8 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "requires": { "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-call-delegate": { @@ -402,19 +416,19 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "requires": { "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-define-map": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz", - "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "requires": { "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", "lodash": "4.17.4" } }, @@ -423,9 +437,9 @@ "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-explode-class": { @@ -434,9 +448,9 @@ "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", "requires": { "babel-helper-bindify-decorators": "6.24.1", - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-function-name": { @@ -445,10 +459,10 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "requires": { "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -456,8 +470,8 @@ "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -465,8 +479,8 @@ "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-optimise-call-expression": { @@ -474,17 +488,17 @@ "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz", - "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", "lodash": "4.17.4" } }, @@ -494,10 +508,10 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "requires": { "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-replace-supers": { @@ -507,10 +521,10 @@ "requires": { "babel-helper-optimise-call-expression": "6.24.1", "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helpers": { @@ -518,8 +532,8 @@ "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-jest": { @@ -528,26 +542,9 @@ "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", "dev": true, "requires": { - "babel-core": "6.25.0", - "babel-plugin-istanbul": "4.1.4", + "babel-core": "6.26.0", + "babel-plugin-istanbul": "4.1.5", "babel-preset-jest": "20.0.3" - }, - "dependencies": { - "babel-plugin-jest-hoist": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", - "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", - "dev": true - }, - "babel-preset-jest": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", - "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "20.0.3" - } - } } }, "babel-messages": { @@ -555,7 +552,7 @@ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -563,7 +560,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-constant-folding": { @@ -587,31 +584,20 @@ "integrity": "sha1-H1jOkSB61qgmqL9kX6/mj/X+P/4=" }, "babel-plugin-istanbul": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz", - "integrity": "sha1-GN3oS/POMp/d8/QQP66SFFbY5Yc=", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz", + "integrity": "sha1-Z2DN2Xf0EdPhdbsGTyvDJ9mbK24=", "dev": true, "requires": { "find-up": "2.1.0", - "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-instrument": "1.8.0", "test-exclude": "4.1.1" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - } } }, "babel-plugin-jest-hoist": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.0.2.tgz", - "integrity": "sha512-iQeYbiM0lr5TCW42qvGkBBoy0rTx6SPppRFT7NwvdnSwNOGMI8+1Oc27SF5wJbCvAY7x5KScP3f0TKtunl+NRw==", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", + "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", "dev": true }, "babel-plugin-jscript": { @@ -731,7 +717,7 @@ "requires": { "babel-helper-remap-async-to-generator": "6.24.1", "babel-plugin-syntax-async-generators": "6.13.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-async-to-generator": { @@ -741,7 +727,7 @@ "requires": { "babel-helper-remap-async-to-generator": "6.24.1", "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-class-constructor-call": { @@ -750,8 +736,8 @@ "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", "requires": { "babel-plugin-syntax-class-constructor-call": "6.18.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-class-properties": { @@ -761,8 +747,8 @@ "requires": { "babel-helper-function-name": "6.24.1", "babel-plugin-syntax-class-properties": "6.13.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-decorators": { @@ -772,9 +758,9 @@ "requires": { "babel-helper-explode-class": "6.24.1", "babel-plugin-syntax-decorators": "6.13.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-arrow-functions": { @@ -782,7 +768,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { @@ -790,18 +776,18 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoping": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz", - "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=", - "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", "lodash": "4.17.4" } }, @@ -810,15 +796,15 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "requires": { - "babel-helper-define-map": "6.24.1", + "babel-helper-define-map": "6.26.0", "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.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-computed-properties": { @@ -826,8 +812,8 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -835,7 +821,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { @@ -843,8 +829,8 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-for-of": { @@ -852,7 +838,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -861,8 +847,8 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "requires": { "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-literals": { @@ -870,7 +856,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-modules-amd": { @@ -878,20 +864,20 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz", - "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", "requires": { "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-systemjs": { @@ -900,8 +886,8 @@ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "requires": { "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-umd": { @@ -910,8 +896,8 @@ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "requires": { "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-object-super": { @@ -920,7 +906,7 @@ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "requires": { "babel-helper-replace-supers": "6.24.1", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -930,10 +916,10 @@ "requires": { "babel-helper-call-delegate": "6.24.1", "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-shorthand-properties": { @@ -941,8 +927,8 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -950,7 +936,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -958,9 +944,9 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "requires": { - "babel-helper-regex": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-template-literals": { @@ -968,7 +954,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { @@ -976,7 +962,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -984,8 +970,8 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "requires": { - "babel-helper-regex": "6.24.1", - "babel-runtime": "6.23.0", + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", "regexpu-core": "2.0.0" } }, @@ -996,7 +982,7 @@ "requires": { "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-export-extensions": { @@ -1005,7 +991,7 @@ "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", "requires": { "babel-plugin-syntax-export-extensions": "6.13.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-flow-strip-types": { @@ -1014,24 +1000,24 @@ "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", "requires": { "babel-plugin-syntax-flow": "6.18.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-object-rest-spread": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz", - "integrity": "sha1-h11ryb52HFiirj/u5dxIldjH+SE=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", "requires": { "babel-plugin-syntax-object-rest-spread": "6.13.0", - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-regenerator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz", - "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "requires": { - "regenerator-transform": "0.9.11" + "regenerator-transform": "0.10.1" } }, "babel-plugin-transform-strict-mode": { @@ -1039,8 +1025,8 @@ "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-undeclared-variables-check": { @@ -1057,14 +1043,22 @@ "integrity": "sha1-f1eO+LeN+uYAM4XYQXph7aBuL4E=" }, "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", "dev": true, "requires": { - "babel-runtime": "6.23.0", - "core-js": "2.4.1", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", "regenerator-runtime": "0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } } }, "babel-preset-es2015": { @@ -1075,7 +1069,7 @@ "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.24.1", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", "babel-plugin-transform-es2015-classes": "6.24.1", "babel-plugin-transform-es2015-computed-properties": "6.24.1", "babel-plugin-transform-es2015-destructuring": "6.23.0", @@ -1084,7 +1078,7 @@ "babel-plugin-transform-es2015-function-name": "6.24.1", "babel-plugin-transform-es2015-literals": "6.22.0", "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", "babel-plugin-transform-es2015-modules-umd": "6.24.1", "babel-plugin-transform-es2015-object-super": "6.24.1", @@ -1095,7 +1089,7 @@ "babel-plugin-transform-es2015-template-literals": "6.22.0", "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-regenerator": "6.24.1" + "babel-plugin-transform-regenerator": "6.26.0" } }, "babel-preset-flow": { @@ -1108,12 +1102,12 @@ } }, "babel-preset-jest": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-21.0.2.tgz", - "integrity": "sha512-WyzCFIoU+ga307hPnobHL9eRrZlpZYHQf7M3yOtimAwrLAgNFoSfin7ZVw903+zz81ZLuowZMKWCd0w3PNpAhg==", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", + "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", "dev": true, "requires": { - "babel-plugin-jest-hoist": "21.0.2" + "babel-plugin-jest-hoist": "20.0.3" } }, "babel-preset-stage-1": { @@ -1146,75 +1140,75 @@ "babel-plugin-transform-async-generator-functions": "6.24.1", "babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-exponentiation-operator": "6.24.1", - "babel-plugin-transform-object-rest-spread": "6.23.0" + "babel-plugin-transform-object-rest-spread": "6.26.0" } }, "babel-register": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz", - "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "requires": { - "babel-core": "6.25.0", - "babel-runtime": "6.23.0", - "core-js": "2.4.1", + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", "home-or-tmp": "2.0.0", "lodash": "4.17.4", "mkdirp": "0.5.1", - "source-map-support": "0.4.15" + "source-map-support": "0.4.18" } }, "babel-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", - "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "2.4.1", - "regenerator-runtime": "0.10.5" + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" } }, "babel-template": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", - "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", - "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "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": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", - "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "requires": { - "babel-code-frame": "6.22.0", + "babel-code-frame": "6.26.0", "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "debug": "2.6.8", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.2", "lodash": "4.17.4" } }, "babel-types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", - "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { - "babel-runtime": "6.23.0", + "babel-runtime": "6.26.0", "esutils": "2.0.2", "lodash": "4.17.4", "to-fast-properties": "1.0.3" } }, "babylon": { - "version": "6.17.4", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz", - "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==" + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, "balanced-match": { "version": "1.0.0", @@ -1237,14 +1231,14 @@ } }, "big.js": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz", - "integrity": "sha1-TK2iGTZS6zyp7I5VyQFWacmAaXg=" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" }, "binary-extensions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", - "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=" }, "binaryextensions": { "version": "2.0.0", @@ -1475,19 +1469,19 @@ } }, "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", "requires": { - "ansi-styles": "3.1.0", + "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", "supports-color": "4.4.0" }, "dependencies": { "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "requires": { "color-convert": "1.9.0" } @@ -1499,7 +1493,7 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "1.3.0", + "anymatch": "1.3.2", "async-each": "1.0.1", "fsevents": "1.1.2", "glob-parent": "2.0.0", @@ -1511,9 +1505,9 @@ } }, "ci-info": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.0.0.tgz", - "integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", + "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", "dev": true }, "cipher-base": { @@ -1532,11 +1526,11 @@ "dev": true }, "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "requires": { - "restore-cursor": "1.0.1" + "restore-cursor": "2.0.0" } }, "cli-spinners": { @@ -1566,6 +1560,26 @@ "requires": { "slice-ansi": "0.0.4", "string-width": "1.0.2" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } } }, "cli-width": { @@ -1584,9 +1598,9 @@ } }, "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" }, "clone-buffer": { "version": "1.0.0", @@ -1594,9 +1608,9 @@ "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" }, "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" }, "cloneable-readable": { "version": "1.0.0", @@ -1623,13 +1637,13 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", "requires": { - "color-name": "1.1.2" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.2.tgz", - "integrity": "sha1-XIq3K2S9IhXWF66VWeuxSEdc+Y0=" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "colors": { "version": "1.1.2", @@ -1646,12 +1660,9 @@ } }, "commander": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.10.0.tgz", - "integrity": "sha512-q/r9trjmuikWDRJNTBHAVnWhuU6w+z80KgBq7j9YDclik5E7X4xi0KnlZBNFA1zOQ+SH/vHMWd2mC9QTOz7GpA==", - "requires": { - "graceful-readlink": "1.0.1" - } + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" }, "common-tags": { "version": "1.4.0", @@ -1659,7 +1670,7 @@ "integrity": "sha1-EYe+Tz1M8MBCfUP3Tu8fc1AWFMA=", "dev": true, "requires": { - "babel-runtime": "6.23.0" + "babel-runtime": "6.26.0" } }, "commondir": { @@ -1672,29 +1683,15 @@ "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", "requires": { - "commander": "2.10.0", + "commander": "2.11.0", "detective": "4.5.0", "glob": "5.0.15", "graceful-fs": "4.1.11", - "iconv-lite": "0.4.18", + "iconv-lite": "0.4.19", "mkdirp": "0.5.1", "private": "0.1.7", "q": "1.5.0", "recast": "git://github.com/kalcifer/recast.git#b66a17eee9e072338744b947a406d3f134bc0b0d" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } } }, "concat-map": { @@ -1737,9 +1734,9 @@ "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" }, "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" }, "core-util-is": { "version": "1.0.2", @@ -1753,7 +1750,7 @@ "dev": true, "requires": { "graceful-fs": "4.1.11", - "js-yaml": "3.8.4", + "js-yaml": "3.10.0", "minimist": "1.2.0", "object-assign": "4.1.1", "os-homedir": "1.0.2", @@ -1787,7 +1784,7 @@ "cipher-base": "1.0.4", "inherits": "2.0.3", "ripemd160": "2.0.1", - "sha.js": "2.4.8" + "sha.js": "2.4.9" } }, "create-hmac": { @@ -1800,7 +1797,7 @@ "inherits": "2.0.3", "ripemd160": "2.0.1", "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "sha.js": "2.4.9" } }, "cross-spawn": { @@ -1810,7 +1807,7 @@ "requires": { "lru-cache": "4.1.1", "shebang-command": "1.2.0", - "which": "1.2.14" + "which": "1.3.0" } }, "cryptiles": { @@ -1898,14 +1895,14 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" }, "dateformat": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" }, "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } @@ -1941,6 +1938,17 @@ "dev": true, "requires": { "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } } }, "defined": { @@ -1965,11 +1973,6 @@ "yargs": "3.27.0" }, "dependencies": { - "esprima-fb": { - "version": "15001.1001.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", - "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" - }, "yargs": { "version": "3.27.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz", @@ -2000,6 +2003,20 @@ "rimraf": "2.2.8" }, "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, "globby": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", @@ -2064,7 +2081,7 @@ "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", "requires": { "bn.js": "4.11.8", - "miller-rabin": "4.0.0", + "miller-rabin": "4.0.1", "randombytes": "2.0.5" } }, @@ -2253,7 +2270,15 @@ "estraverse": "4.2.0", "esutils": "2.0.2", "optionator": "0.8.2", - "source-map": "0.5.6" + "source-map": "0.5.7" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } } }, "escope": { @@ -2268,20 +2293,20 @@ } }, "eslint": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.6.1.tgz", - "integrity": "sha1-3cf8f9cL+TIFsLNEm7FqHp59SVA=", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.8.0.tgz", + "integrity": "sha1-Ip7w41Tg5h2DfHqA/fuoJeGZgV4=", "dev": true, "requires": { - "ajv": "5.2.2", - "babel-code-frame": "6.22.0", + "ajv": "5.2.3", + "babel-code-frame": "6.26.0", "chalk": "2.1.0", "concat-stream": "1.6.0", "cross-spawn": "5.1.0", - "debug": "2.6.8", + "debug": "3.1.0", "doctrine": "2.0.0", "eslint-scope": "3.7.1", - "espree": "3.5.0", + "espree": "3.5.1", "esquery": "1.0.0", "estraverse": "4.2.0", "esutils": "2.0.2", @@ -2289,9 +2314,9 @@ "functional-red-black-tree": "1.0.1", "glob": "7.1.2", "globals": "9.18.0", - "ignore": "3.3.3", + "ignore": "3.3.5", "imurmurhash": "0.1.4", - "inquirer": "3.2.3", + "inquirer": "3.3.0", "is-resolvable": "1.0.0", "js-yaml": "3.10.0", "json-stable-stringify": "1.0.1", @@ -2302,13 +2327,13 @@ "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", - "pluralize": "4.0.0", + "pluralize": "7.0.0", "progress": "2.0.0", "require-uncached": "1.0.3", - "semver": "5.3.0", + "semver": "5.4.1", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", - "table": "4.0.1", + "table": "4.0.2", "text-table": "0.2.0" }, "dependencies": { @@ -2318,40 +2343,27 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" + "ms": "2.0.0" } }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "strip-ansi": { @@ -2366,24 +2378,32 @@ } }, "eslint-plugin-flowtype": { - "version": "2.35.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.35.1.tgz", - "integrity": "sha512-YTCeVsMOi3ga8PJjdAV97FaTNXNknzrO+4ZDMHJN65i4uMjL5KgfgQZpyVsBirWOfgXMKRduxpsyM64K/0LbXw==", + "version": "2.38.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.38.0.tgz", + "integrity": "sha512-bxde09/khzLyKLO1Mu4Mm2MpHURG2Ml2W5YbgGnD8sNJmukDT8MWARvo4ftIQ3HEnIWcZqNWAp5uF2dmrg9kMw==", "dev": true, "requires": { "lodash": "4.17.4" } }, "eslint-plugin-node": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.1.0.tgz", - "integrity": "sha512-MzAAnEfNOl6g871VgjKswHkyG+bqsXX2//SWXwNkyREvWAPUoU8X6ZvcrambHEGecUIbE0pAVPzzfKU/p9H5lg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.2.0.tgz", + "integrity": "sha512-N9FLFwknT5LhRhjz1lmHguNss/MCwkrLCS4CjqqTZZTJaUhLRfDNK3zxSHL/Il3Aa0Mw+xY3T1gtsJrUNoJy8Q==", "dev": true, "requires": { - "ignore": "3.3.3", + "ignore": "3.3.5", "minimatch": "3.0.4", - "resolve": "1.3.3", + "resolve": "1.4.0", "semver": "5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } } }, "eslint-scope": { @@ -2397,9 +2417,9 @@ } }, "espree": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.0.tgz", - "integrity": "sha1-mDWGJb3QVYYeon4oZ+pyn69GPY0=", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", + "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", "dev": true, "requires": { "acorn": "5.1.2", @@ -2414,10 +2434,10 @@ } } }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" }, "esquery": { "version": "1.0.0", @@ -2480,10 +2500,9 @@ } }, "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "requires": { "cross-spawn": "5.1.0", "get-stream": "3.0.0", @@ -2524,25 +2543,19 @@ } }, "expect": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-21.1.0.tgz", - "integrity": "sha512-gBmUVy+A4+brj/MnuiwLe+MIMfSffWUmZMNjKHrMkB0cpkAjnFdwHAxs6MvYeh4+14ocp+SfKp4ebNEhkbV3YQ==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-21.2.1.tgz", + "integrity": "sha512-orfQQqFRTX0jH7znRIGi8ZMR8kTNpXklTTz8+HGTpmTKZo3Occ6JNB5FXMb8cRuiiC/GyDqsr30zUa66ACYlYw==", "dev": true, "requires": { "ansi-styles": "3.2.0", - "jest-diff": "21.1.0", - "jest-get-type": "21.0.2", - "jest-matcher-utils": "21.1.0", - "jest-message-util": "21.1.0", - "jest-regex-util": "21.1.0" + "jest-diff": "21.2.1", + "jest-get-type": "21.2.0", + "jest-matcher-utils": "21.2.1", + "jest-message-util": "21.2.1", + "jest-regex-util": "21.2.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -2551,27 +2564,6 @@ "requires": { "color-convert": "1.9.0" } - }, - "jest-matcher-utils": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", - "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", - "dev": true, - "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" - } } } }, @@ -2581,13 +2573,13 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "external-editor": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", - "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", + "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", "requires": { - "iconv-lite": "0.4.18", + "iconv-lite": "0.4.19", "jschardet": "1.5.1", - "tmp": "0.0.31" + "tmp": "0.0.33" } }, "extglob": { @@ -2638,7 +2630,7 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.2.2", + "flat-cache": "1.3.0", "object-assign": "4.1.1" } }, @@ -2655,6 +2647,22 @@ "requires": { "glob": "7.1.2", "minimatch": "3.0.4" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } } }, "fill-range": { @@ -2670,24 +2678,11 @@ } }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - }, - "dependencies": { - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - } + "locate-path": "2.0.0" } }, "first-chunk-stream": { @@ -2699,9 +2694,9 @@ } }, "flat-cache": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", - "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { "circular-json": "0.3.3", @@ -2717,9 +2712,9 @@ "dev": true }, "flow-parser": { - "version": "0.49.1", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.49.1.tgz", - "integrity": "sha1-amqTLNagyPUXSnYSR1tLcWT18NA=" + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.56.0.tgz", + "integrity": "sha1-jvHDJfUAAEk8p2TD7N0PLHGpxSU=" }, "flow-remove-types": { "version": "1.2.1", @@ -2727,8 +2722,8 @@ "integrity": "sha1-WOJhv4uEK9I0yGyvuYKhITr/Dts=", "dev": true, "requires": { - "babylon": "6.17.4", - "vlq": "0.2.2" + "babylon": "6.18.0", + "vlq": "0.2.3" } }, "for-in": { @@ -2783,14 +2778,12 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "bundled": true, "optional": true }, "ajv": { "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "bundled": true, "optional": true, "requires": { "co": "4.6.0", @@ -2799,19 +2792,16 @@ }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "bundled": true }, "aproba": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", - "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", + "bundled": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "bundled": true, "optional": true, "requires": { "delegates": "1.0.0", @@ -2820,43 +2810,36 @@ }, "asn1": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "bundled": true, "optional": true }, "assert-plus": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "bundled": true, "optional": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "bundled": true, "optional": true }, "aws-sign2": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "bundled": true, "optional": true }, "aws4": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "bundled": true, "optional": true }, "balanced-match": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "bundled": true }, "bcrypt-pbkdf": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "bundled": true, "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -2864,24 +2847,21 @@ }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "bundled": true, "requires": { "inherits": "2.0.3" } }, "boom": { "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "bundled": true, "requires": { "hoek": "2.16.3" } }, "brace-expansion": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "bundled": true, "requires": { "balanced-match": "0.4.2", "concat-map": "0.0.1" @@ -2889,53 +2869,44 @@ }, "buffer-shims": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" + "bundled": true }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "bundled": true, "optional": true }, "co": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "bundled": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "bundled": true }, "combined-stream": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "bundled": true, "requires": { "delayed-stream": "1.0.0" } }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "bundled": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "bundled": true }, "cryptiles": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "bundled": true, "optional": true, "requires": { "boom": "2.10.1" @@ -2943,8 +2914,7 @@ }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "bundled": true, "optional": true, "requires": { "assert-plus": "1.0.0" @@ -2952,16 +2922,14 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "debug": { "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "bundled": true, "optional": true, "requires": { "ms": "2.0.0" @@ -2969,25 +2937,21 @@ }, "deep-extend": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "bundled": true, "optional": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "bundled": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "optional": true }, "ecc-jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "bundled": true, "optional": true, "requires": { "jsbn": "0.1.1" @@ -2995,25 +2959,21 @@ }, "extend": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "bundled": true, "optional": true }, "extsprintf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" + "bundled": true }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "bundled": true, "optional": true }, "form-data": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "bundled": true, "optional": true, "requires": { "asynckit": "0.4.0", @@ -3023,13 +2983,11 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "bundled": true }, "fstream": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "bundled": true, "requires": { "graceful-fs": "4.1.11", "inherits": "2.0.3", @@ -3039,8 +2997,7 @@ }, "fstream-ignore": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "bundled": true, "optional": true, "requires": { "fstream": "1.0.11", @@ -3050,8 +3007,7 @@ }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "optional": true, "requires": { "aproba": "1.1.1", @@ -3066,8 +3022,7 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "bundled": true, "optional": true, "requires": { "assert-plus": "1.0.0" @@ -3075,16 +3030,14 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -3096,19 +3049,16 @@ }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "bundled": true }, "har-schema": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "bundled": true, "optional": true }, "har-validator": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "bundled": true, "optional": true, "requires": { "ajv": "4.11.8", @@ -3117,14 +3067,12 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "optional": true }, "hawk": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "bundled": true, "optional": true, "requires": { "boom": "2.10.1", @@ -3135,13 +3083,11 @@ }, "hoek": { "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "bundled": true }, "http-signature": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "bundled": true, "optional": true, "requires": { "assert-plus": "0.2.0", @@ -3151,8 +3097,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -3160,44 +3105,37 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true }, "ini": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "bundled": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "requires": { "number-is-nan": "1.0.1" } }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "bundled": true, "optional": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "bundled": true, "optional": true }, "jodid25519": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", - "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", + "bundled": true, "optional": true, "requires": { "jsbn": "0.1.1" @@ -3205,20 +3143,17 @@ }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "bundled": true, "optional": true }, "json-schema": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "bundled": true, "optional": true }, "json-stable-stringify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "bundled": true, "optional": true, "requires": { "jsonify": "0.0.0" @@ -3226,20 +3161,17 @@ }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "bundled": true, "optional": true }, "jsonify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "bundled": true, "optional": true }, "jsprim": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", - "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "bundled": true, "optional": true, "requires": { "assert-plus": "1.0.0", @@ -3250,56 +3182,48 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "mime-db": { "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" + "bundled": true }, "mime-types": { "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "bundled": true, "requires": { "mime-db": "1.27.0" } }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "requires": { "brace-expansion": "1.1.7" } }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "bundled": true }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "optional": true }, "node-pre-gyp": { "version": "0.6.36", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", - "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "bundled": true, "optional": true, "requires": { "mkdirp": "0.5.1", @@ -3315,8 +3239,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "optional": true, "requires": { "abbrev": "1.1.0", @@ -3325,8 +3248,7 @@ }, "npmlog": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", - "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==", + "bundled": true, "optional": true, "requires": { "are-we-there-yet": "1.1.4", @@ -3337,45 +3259,38 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "bundled": true }, "oauth-sign": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "bundled": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "requires": { "wrappy": "1.0.2" } }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "optional": true }, "osenv": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "bundled": true, "optional": true, "requires": { "os-homedir": "1.0.2", @@ -3384,36 +3299,30 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "bundled": true }, "performance-now": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "bundled": true, "optional": true }, "process-nextick-args": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "bundled": true }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "bundled": true, "optional": true }, "qs": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "bundled": true, "optional": true }, "rc": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "bundled": true, "optional": true, "requires": { "deep-extend": "0.4.2", @@ -3424,16 +3333,14 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "optional": true } } }, "readable-stream": { "version": "2.2.9", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", + "bundled": true, "requires": { "buffer-shims": "1.0.0", "core-util-is": "1.0.2", @@ -3446,8 +3353,7 @@ }, "request": { "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "bundled": true, "optional": true, "requires": { "aws-sign2": "0.6.0", @@ -3476,39 +3382,33 @@ }, "rimraf": { "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "bundled": true, "requires": { "glob": "7.1.2" } }, "safe-buffer": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" + "bundled": true }, "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "bundled": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "optional": true }, "sntp": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "bundled": true, "optional": true, "requires": { "hoek": "2.16.3" @@ -3516,8 +3416,7 @@ }, "sshpk": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", - "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=", + "bundled": true, "optional": true, "requires": { "asn1": "0.2.3", @@ -3533,16 +3432,14 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "requires": { "code-point-at": "1.1.0", "is-fullwidth-code-point": "1.0.0", @@ -3551,36 +3448,31 @@ }, "string_decoder": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "bundled": true, "requires": { "safe-buffer": "5.0.1" } }, "stringstream": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "bundled": true, "optional": true }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "requires": { "ansi-regex": "2.1.1" } }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "optional": true }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "bundled": true, "requires": { "block-stream": "0.0.9", "fstream": "1.0.11", @@ -3589,8 +3481,7 @@ }, "tar-pack": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", - "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", + "bundled": true, "optional": true, "requires": { "debug": "2.6.8", @@ -3605,8 +3496,7 @@ }, "tough-cookie": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "bundled": true, "optional": true, "requires": { "punycode": "1.4.1" @@ -3614,8 +3504,7 @@ }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "bundled": true, "optional": true, "requires": { "safe-buffer": "5.0.1" @@ -3623,31 +3512,26 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "bundled": true, "optional": true }, "uid-number": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "bundled": true, "optional": true }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "uuid": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", - "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", + "bundled": true, "optional": true }, "verror": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "bundled": true, "optional": true, "requires": { "extsprintf": "1.0.2" @@ -3655,8 +3539,7 @@ }, "wide-align": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "bundled": true, "optional": true, "requires": { "string-width": "1.0.2" @@ -3664,8 +3547,7 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "bundled": true } } }, @@ -3681,9 +3563,9 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" }, "get-own-enumerable-property-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-1.0.1.tgz", - "integrity": "sha1-8dTjrRQC4DmJjlbR6bmqkkwm5IQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", + "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==", "dev": true }, "get-stdin": { @@ -3723,11 +3605,10 @@ } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "fs.realpath": "1.0.0", "inflight": "1.0.6", "inherits": "2.0.3", "minimatch": "3.0.4", @@ -3757,21 +3638,21 @@ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "requires": { - "global-prefix": "1.0.1", + "global-prefix": "1.0.2", "is-windows": "1.0.1", - "resolve-dir": "1.0.0" + "resolve-dir": "1.0.1" } }, "global-prefix": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.1.tgz", - "integrity": "sha512-iPchqvFtW8olnZW+24RkCFpldmNC+dFTBlmsnIsWDGAL3U8K1k7p7EKHbKWWLGMk3vXJ+kz+ZAuD9sBkTGlOzg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "requires": { + "expand-tilde": "2.0.2", "homedir-polyfill": "1.0.1", "ini": "1.3.4", "is-windows": "1.0.1", - "resolve-dir": "1.0.0", - "which": "1.2.14" + "which": "1.3.0" } }, "globals": { @@ -3789,6 +3670,21 @@ "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } } }, "got": { @@ -3817,11 +3713,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - }, "grouped-queue": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz", @@ -3871,7 +3762,7 @@ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, "requires": { - "ajv": "5.2.2", + "ajv": "5.2.3", "har-schema": "2.0.0" } }, @@ -3889,22 +3780,21 @@ "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=" }, "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" }, "has-symbol-support-x": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.3.0.tgz", - "integrity": "sha512-kLtS+N9qwz+Buc6TUfcW5iGb59hLLr5qfxTACi/0uGpH1u5NMNWsdU57KoYRBywvPykeRmu5qfB5x0chpDSWlg==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz", + "integrity": "sha512-JkaetveU7hFbqnAC1EV1sF4rlojU2D4Usc5CmS69l6NfmPDnpnFUegzFg33eDkkpNCxZ0mQp65HwUDrNFS/8MA==" }, "has-to-string-tag-x": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.3.0.tgz", - "integrity": "sha512-Fu9Nwv8/VNJMvKjkldzXHO+yeX+TCelwUQ9dGW2LrAfHfHi6zVqQt+Qjilf0qGHvpl6Fap6o8aDhWhMt5hY/1g==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "requires": { - "has-symbol-support-x": "1.3.0" + "has-symbol-support-x": "1.4.1" } }, "hash-base": { @@ -4019,9 +3909,9 @@ } }, "iconv-lite": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, "ieee754": { "version": "1.1.8", @@ -4029,9 +3919,9 @@ "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" }, "ignore": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz", - "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", + "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==", "dev": true }, "imurmurhash": { @@ -4072,15 +3962,15 @@ "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" }, "inquirer": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.2.3.tgz", - "integrity": "sha512-Bc3KbimpDTOeQdDj18Ir/rlsGuhBSSNqdOnxaAuKhpkdnMMuKsEGbZD2v5KFF9oso2OU+BPh7+/u5obmFDRmWw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "requires": { - "ansi-escapes": "2.0.0", - "chalk": "2.0.1", + "ansi-escapes": "3.0.0", + "chalk": "2.1.0", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.0.4", + "external-editor": "2.0.5", "figures": "2.0.0", "lodash": "4.17.4", "mute-stream": "0.0.7", @@ -4092,55 +3982,11 @@ "through": "2.3.8" }, "dependencies": { - "ansi-escapes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", - "integrity": "sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=" - }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.1.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4179,7 +4025,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { - "binary-extensions": "1.8.0" + "binary-extensions": "1.10.0" } }, "is-buffer": { @@ -4201,7 +4047,7 @@ "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", "dev": true, "requires": { - "ci-info": "1.0.0" + "ci-info": "1.1.1" } }, "is-dotfile": { @@ -4236,12 +4082,9 @@ } }, "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-glob": { "version": "2.0.1", @@ -4409,7 +4252,7 @@ "istanbul-lib-report": "1.1.1", "istanbul-lib-source-maps": "1.2.1", "istanbul-reports": "1.1.2", - "js-yaml": "3.8.4", + "js-yaml": "3.10.0", "mkdirp": "0.5.1", "once": "1.4.0" }, @@ -4422,27 +4265,6 @@ "requires": { "lodash": "4.17.4" } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz", - "integrity": "sha1-ZvbJQhzJ7EcE928tsIS6kHiitTI=", - "dev": true, - "requires": { - "babel-generator": "6.25.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.3.0" - } } } }, @@ -4462,18 +4284,18 @@ } }, "istanbul-lib-instrument": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz", - "integrity": "sha1-klsjkWPqvdaMxASPUsL6T4mez6c=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz", + "integrity": "sha1-ZvbJQhzJ7EcE928tsIS6kHiitTI=", "dev": true, "requires": { - "babel-generator": "6.25.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", "istanbul-lib-coverage": "1.1.1", - "semver": "5.3.0" + "semver": "5.4.1" } }, "istanbul-lib-report": { @@ -4488,6 +4310,12 @@ "supports-color": "3.2.3" }, "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", @@ -4505,13 +4333,27 @@ "integrity": "sha512-mukVvSXCn9JQvdJl8wP/iPhqig0MRtuWuD4ZNKo6vB2Ik//AmhAKe3QnPN02dmkRe3lTudFk3rzoHhwU4hb94w==", "dev": true, "requires": { - "debug": "2.6.8", + "debug": "2.6.9", "istanbul-lib-coverage": "1.1.1", "mkdirp": "0.5.1", "rimraf": "2.6.2", - "source-map": "0.5.6" + "source-map": "0.5.7" }, "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -4547,143 +4389,85 @@ "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "requires": { - "has-to-string-tag-x": "1.3.0", + "has-to-string-tag-x": "1.4.1", "is-object": "1.0.1" } }, "jest": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-21.1.0.tgz", - "integrity": "sha512-yPxhkAyxCymLkpZakAGm8VGNQB04HgD5bhYCQHBcIGCbH5oYHZDekkt/FBtFC2vPcyWG+dsKCqvmys/1kQYjKA==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-21.2.1.tgz", + "integrity": "sha512-mXN0ppPvWYoIcC+R+ctKxAJ28xkt/Z5Js875padm4GbgUn6baeR5N4Ng6LjatIRpUQDZVJABT7Y4gucFjPryfw==", "dev": true, "requires": { - "jest-cli": "21.1.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "jest-cli": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.1.0.tgz", - "integrity": "sha512-ISnDjHv9m0nCrSKFC+Cnr9SotaWHYRP+TK81vMtPwkV+/70JbfYJT6ZnuqgqyAnTYE4f/aCe6uyMPKHAVT1RpA==", - "dev": true, - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "is-ci": "1.0.10", - "istanbul-api": "1.1.14", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-instrument": "1.7.3", - "istanbul-lib-source-maps": "1.2.1", - "jest-changed-files": "21.1.0", - "jest-config": "21.1.0", - "jest-environment-jsdom": "21.1.0", - "jest-haste-map": "21.1.0", - "jest-message-util": "21.1.0", - "jest-regex-util": "21.1.0", - "jest-resolve-dependencies": "21.1.0", - "jest-runner": "21.1.0", - "jest-runtime": "21.1.0", - "jest-snapshot": "21.1.0", - "jest-util": "21.1.0", - "micromatch": "2.3.11", - "node-notifier": "5.1.2", - "pify": "3.0.0", - "slash": "1.0.0", - "string-length": "2.0.0", - "strip-ansi": "4.0.0", - "which": "1.2.14", - "worker-farm": "1.5.0", - "yargs": "9.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } + "jest-cli": "21.2.1" } }, "jest-changed-files": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-21.1.0.tgz", - "integrity": "sha512-OnjMoORBVG9Jko6Bc3UGJPx9G1PNsETiqpQXZ6wPU3fk1gtxhKYE4Mgdk28ER/CWeg7bzGUcaragLf1lf1tzbQ==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-21.2.0.tgz", + "integrity": "sha512-+lCNP1IZLwN1NOIvBcV5zEL6GENK6TXrDj4UxWIeLvIsIDa+gf6J7hkqsW2qVVt/wvH65rVvcPwqXdps5eclTQ==", "dev": true, "requires": { "throat": "4.1.0" } }, "jest-cli": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.1.0.tgz", - "integrity": "sha512-ISnDjHv9m0nCrSKFC+Cnr9SotaWHYRP+TK81vMtPwkV+/70JbfYJT6ZnuqgqyAnTYE4f/aCe6uyMPKHAVT1RpA==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.2.1.tgz", + "integrity": "sha512-T1BzrbFxDIW/LLYQqVfo94y/hhaj1NzVQkZgBumAC+sxbjMROI7VkihOdxNR758iYbQykL2ZOWUBurFgkQrzdg==", "dev": true, "requires": { "ansi-escapes": "3.0.0", - "chalk": "2.0.1", + "chalk": "2.1.0", "glob": "7.1.2", "graceful-fs": "4.1.11", "is-ci": "1.0.10", "istanbul-api": "1.1.14", "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-instrument": "1.7.3", + "istanbul-lib-instrument": "1.8.0", "istanbul-lib-source-maps": "1.2.1", - "jest-changed-files": "21.1.0", - "jest-config": "21.1.0", - "jest-environment-jsdom": "21.1.0", - "jest-haste-map": "21.1.0", - "jest-message-util": "21.1.0", - "jest-regex-util": "21.1.0", - "jest-resolve-dependencies": "21.1.0", - "jest-runner": "21.1.0", - "jest-runtime": "21.1.0", - "jest-snapshot": "21.1.0", - "jest-util": "21.1.0", + "jest-changed-files": "21.2.0", + "jest-config": "21.2.1", + "jest-environment-jsdom": "21.2.1", + "jest-haste-map": "21.2.0", + "jest-message-util": "21.2.1", + "jest-regex-util": "21.2.0", + "jest-resolve-dependencies": "21.2.0", + "jest-runner": "21.2.1", + "jest-runtime": "21.2.1", + "jest-snapshot": "21.2.1", + "jest-util": "21.2.1", "micromatch": "2.3.11", "node-notifier": "5.1.2", "pify": "3.0.0", "slash": "1.0.0", "string-length": "2.0.0", "strip-ansi": "4.0.0", - "which": "1.2.14", + "which": "1.3.0", "worker-farm": "1.5.0", "yargs": "9.0.1" }, "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true - }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -4702,296 +4486,182 @@ } }, "jest-config": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.1.0.tgz", - "integrity": "sha512-RQnWwHRSIRvtyJQeZTpXUmsNYVVr/qu3XWfV3FTFkDsxHQi6Sj5sfUK5FHCNUCXIuFTs+r3qbYoMz2q8rdm/EA==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.2.1.tgz", + "integrity": "sha512-fJru5HtlD/5l2o25eY9xT0doK3t2dlglrqoGpbktduyoI0T5CwuB++2YfoNZCrgZipTwPuAGonYv0q7+8yDc/A==", "dev": true, "requires": { - "chalk": "2.0.1", + "chalk": "2.1.0", "glob": "7.1.2", - "jest-environment-jsdom": "21.1.0", - "jest-environment-node": "21.1.0", - "jest-get-type": "21.0.2", - "jest-jasmine2": "21.1.0", - "jest-regex-util": "21.1.0", - "jest-resolve": "21.1.0", - "jest-util": "21.1.0", - "jest-validate": "21.1.0", - "pretty-format": "21.1.0" + "jest-environment-jsdom": "21.2.1", + "jest-environment-node": "21.2.1", + "jest-get-type": "21.2.0", + "jest-jasmine2": "21.2.1", + "jest-regex-util": "21.2.0", + "jest-resolve": "21.2.0", + "jest-util": "21.2.1", + "jest-validate": "21.2.1", + "pretty-format": "21.2.1" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "jest-validate": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.1.0.tgz", - "integrity": "sha512-xS0cyErNWpsLFlGkn/b87pk/Mv7J+mCTs8hQ4KmtOIIoM1sHYobXII8AtkoN8FC7E3+Ptxjo+/3xWk6LK1dKcw==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "jest-get-type": "21.0.2", - "leven": "2.1.0", - "pretty-format": "21.1.0" - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } } } }, "jest-diff": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.1.0.tgz", - "integrity": "sha512-mGJinKrAB6hj1cpO1FOuDCfgILozGvYi4Zpk8GrxmNgdd9/9llIA2Xzu5879Fa4ayh7lb9ej2NdvuNLMCjbrMg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.2.1.tgz", + "integrity": "sha512-E5fu6r7PvvPr5qAWE1RaUwIh/k6Zx/3OOkZ4rk5dBJkEWRrUuSgbMt2EO8IUTPTd6DOqU3LW6uTIwX5FRvXoFA==", "dev": true, "requires": { - "chalk": "2.0.1", + "chalk": "2.1.0", "diff": "3.3.1", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", - "dev": true, - "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" - } - } + "jest-get-type": "21.2.0", + "pretty-format": "21.2.1" } }, "jest-docblock": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.1.0.tgz", - "integrity": "sha512-ai3olFJ/3cSd60klaRIcC/Cb44/RsJ69qS8uXxfWXEbnbDqjcbl5K8Z5ekfY15hgVZGSAiLz7pOwfjIBE/yJVw==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", + "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", "dev": true }, "jest-environment-jsdom": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-21.1.0.tgz", - "integrity": "sha512-sMcGlN11SnnuJKzR5oJ5LsDRzHEBLUeMRImDbvxyusNW9l17wAEsoLuAWbv0W8crZTTwjRO6/mitpNF3PmVsMg==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz", + "integrity": "sha512-mecaeNh0eWmzNrUNMWARysc0E9R96UPBamNiOCYL28k7mksb1d0q6DD38WKP7ABffjnXyUWJPVaWRgUOivwXwg==", "dev": true, "requires": { - "jest-mock": "21.1.0", - "jest-util": "21.1.0", + "jest-mock": "21.2.0", + "jest-util": "21.2.1", "jsdom": "9.12.0" } }, "jest-environment-node": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-21.1.0.tgz", - "integrity": "sha512-Lv/pcK2zq2DZKL/q7+u8mrlSeXmaMGgmJOx0+Ew+FxYKdSzO0jpEUTEfzQOnMvpSWMqjKUYLDYkCPCBFcOX93w==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-21.2.1.tgz", + "integrity": "sha512-R211867wx9mVBVHzrjGRGTy5cd05K7eqzQl/WyZixR/VkJ4FayS8qkKXZyYnwZi6Rxo6WEV81cDbiUx/GfuLNw==", "dev": true, "requires": { - "jest-mock": "21.1.0", - "jest-util": "21.1.0" + "jest-mock": "21.2.0", + "jest-util": "21.2.1" } }, "jest-get-type": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.0.2.tgz", - "integrity": "sha512-4KvNzzXMXeapGaMWd+SL5e47zcMn8KTWjom6Fl3avxVXnbKS7abD1p4xWe4ToAZfgNoYNsQ9Av/mnWMnZK/Z4A==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", "dev": true }, "jest-haste-map": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-21.1.0.tgz", - "integrity": "sha512-a7chVtmpzRgRkYDL4eZgRuXZUlos1JOC7Dam3WryXGiD/1GNj+QONt6jcsAzDZohzs9XYg2EkjyGxIAXcNipBg==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-21.2.0.tgz", + "integrity": "sha512-5LhsY/loPH7wwOFRMs+PT4aIAORJ2qwgbpMFlbWbxfN0bk3ZCwxJ530vrbSiTstMkYLao6JwBkLhCJ5XbY7ZHw==", "dev": true, "requires": { "fb-watchman": "2.0.0", "graceful-fs": "4.1.11", - "jest-docblock": "21.1.0", + "jest-docblock": "21.2.0", "micromatch": "2.3.11", "sane": "2.2.0", "worker-farm": "1.5.0" } }, "jest-jasmine2": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-21.1.0.tgz", - "integrity": "sha512-YjbAaXN6K5f8rtwPVxkMRIYNZGB5GiJcApcj/5ER7uGJrqJMqyCklMAPZR5Gq8XPzzuDVfoB2h7kxyOGVqaxrw==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz", + "integrity": "sha512-lw8FXXIEekD+jYNlStfgNsUHpfMWhWWCgHV7n0B7mA/vendH7vBFs8xybjQsDzJSduptBZJHqQX9SMssya9+3A==", "dev": true, "requires": { - "chalk": "2.0.1", - "expect": "21.1.0", + "chalk": "2.1.0", + "expect": "21.2.1", "graceful-fs": "4.1.11", - "jest-diff": "21.1.0", - "jest-matcher-utils": "21.1.0", - "jest-message-util": "21.1.0", - "jest-snapshot": "21.1.0", + "jest-diff": "21.2.1", + "jest-matcher-utils": "21.2.1", + "jest-message-util": "21.2.1", + "jest-snapshot": "21.2.1", "p-cancelable": "0.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "jest-matcher-utils": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", - "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", - "dev": true, - "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" - } - } } }, "jest-matcher-utils": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", - "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz", + "integrity": "sha512-kn56My+sekD43dwQPrXBl9Zn9tAqwoy25xxe7/iY4u+mG8P3ALj5IK7MLHZ4Mi3xW7uWVCjGY8cm4PqgbsqMCg==", "dev": true, "requires": { - "chalk": "1.1.3", - "pretty-format": "20.0.3" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "chalk": "2.1.0", + "jest-get-type": "21.2.0", + "pretty-format": "21.2.1" } }, "jest-message-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.1.0.tgz", - "integrity": "sha512-BwKrjR4HvGoodYw3PFh95IU4qDk3nVOf3LqOKRaaR6486bJM8IZIlxWR8yfxhAN7nDGBDco/TR+U50WcPgzvgA==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.2.1.tgz", + "integrity": "sha512-EbC1X2n0t9IdeMECJn2BOg7buOGivCvVNjqKMXTzQOu7uIfLml+keUfCALDh8o4rbtndIeyGU8/BKfoTr/LVDQ==", "dev": true, "requires": { - "chalk": "2.0.1", + "chalk": "2.1.0", "micromatch": "2.3.11", "slash": "1.0.0" } }, "jest-mock": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-21.1.0.tgz", - "integrity": "sha512-iwING4rMP1rhepAj/MVPHVxGltwwR+Lfmiy9ARevQ7XDZ/zF7h+KPFeOFMSMGvV5/dS05PHhwRjFzrjvkybNLw==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-21.2.0.tgz", + "integrity": "sha512-aZDfyVf0LEoABWiY6N0d+O963dUQSyUa4qgzurHR3TBDPen0YxKCJ6l2i7lQGh1tVdsuvdrCZ4qPj+A7PievCw==", "dev": true }, "jest-regex-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.1.0.tgz", - "integrity": "sha512-1QiJa6nvdzVgDhY1FTG3fl+2eYrCQGQoIeGaVPjt9+VmxsQ/BwZD6aglH0z6ZK/uEXZPAaj1XaemKM9tC6VVlQ==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.2.0.tgz", + "integrity": "sha512-BKQ1F83EQy0d9Jen/mcVX7D+lUt2tthhK/2gDWRgLDJRNOdRgSp1iVqFxP8EN1ARuypvDflRfPzYT8fQnoBQFQ==", "dev": true }, "jest-resolve": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-21.1.0.tgz", - "integrity": "sha512-HKh0pnf2SwR3hDaToONjHrR9ds282QFkxCA9xMet3JpsdLL24oRYMLSQ7jtepZfA6EP+XycRE6RfcMBD8emetg==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-21.2.0.tgz", + "integrity": "sha512-vefQ/Lr+VdNvHUZFQXWtOqHX3HEdOc2MtSahBO89qXywEbUxGPB9ZLP9+BHinkxb60UT2Q/tTDOS6rYc6Mwigw==", "dev": true, "requires": { "browser-resolve": "1.11.2", - "chalk": "2.0.1", + "chalk": "2.1.0", "is-builtin-module": "1.0.0" } }, "jest-resolve-dependencies": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-21.1.0.tgz", - "integrity": "sha512-Xj0mzS+Gh6ERgf9ofr5/vuqtyvTh4pAp4aVe6OkiZ4cLxUl6zQ6wByXMX0CLq0hwojFYmwwt+v3+fOAV7PqHPg==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz", + "integrity": "sha512-ok8ybRFU5ScaAcfufIQrCbdNJSRZ85mkxJ1EhUp8Bhav1W1/jv/rl1Q6QoVQHObNxmKnbHVKrfLZbCbOsXQ+bQ==", "dev": true, "requires": { - "jest-regex-util": "21.1.0" + "jest-regex-util": "21.2.0" } }, "jest-runner": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-21.1.0.tgz", - "integrity": "sha512-EXFqEQRHSo6ksBrT+vRNoBRfIVVepQF56JfTczzXLs+dIKcq3DDKaiMkkehBc2LdHzm/e63qbhz2aeQn64qqlA==", - "dev": true, - "requires": { - "jest-config": "21.1.0", - "jest-docblock": "21.1.0", - "jest-haste-map": "21.1.0", - "jest-jasmine2": "21.1.0", - "jest-message-util": "21.1.0", - "jest-runtime": "21.1.0", - "jest-util": "21.1.0", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-21.2.1.tgz", + "integrity": "sha512-Anb72BOQlHqF/zETqZ2K20dbYsnqW/nZO7jV8BYENl+3c44JhMrA8zd1lt52+N7ErnsQMd2HHKiVwN9GYSXmrg==", + "dev": true, + "requires": { + "jest-config": "21.2.1", + "jest-docblock": "21.2.0", + "jest-haste-map": "21.2.0", + "jest-jasmine2": "21.2.1", + "jest-message-util": "21.2.1", + "jest-runtime": "21.2.1", + "jest-util": "21.2.1", "pify": "3.0.0", "throat": "4.1.0", "worker-farm": "1.5.0" @@ -5006,22 +4676,22 @@ } }, "jest-runtime": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-21.1.0.tgz", - "integrity": "sha512-BNc1v8Cs6bjnti1JBCSGIJdSI/6MIGMMCiY+MpoyWXhoZGNLkUKGw7073lZtOo0PC/RZcXMDy1DcZXHH7YHKQw==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-21.2.1.tgz", + "integrity": "sha512-6omlpA3+NSE+rHwD0PQjNEjZeb2z+oRmuehMfM1tWQVum+E0WV3pFt26Am0DUfQkkPyTABvxITRjCUclYgSOsA==", "dev": true, "requires": { - "babel-core": "6.25.0", - "babel-jest": "21.0.2", - "babel-plugin-istanbul": "4.1.4", - "chalk": "2.0.1", + "babel-core": "6.26.0", + "babel-jest": "21.2.0", + "babel-plugin-istanbul": "4.1.5", + "chalk": "2.1.0", "convert-source-map": "1.5.0", "graceful-fs": "4.1.11", - "jest-config": "21.1.0", - "jest-haste-map": "21.1.0", - "jest-regex-util": "21.1.0", - "jest-resolve": "21.1.0", - "jest-util": "21.1.0", + "jest-config": "21.2.1", + "jest-haste-map": "21.2.0", + "jest-regex-util": "21.2.0", + "jest-resolve": "21.2.0", + "jest-util": "21.2.1", "json-stable-stringify": "1.0.1", "micromatch": "2.3.11", "slash": "1.0.0", @@ -5031,21 +4701,31 @@ }, "dependencies": { "babel-jest": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-21.0.2.tgz", - "integrity": "sha512-7nF+URWcIVX3A9DiLRcuwq86a+Phl+wXN/fwlSO4boTP/GmLLVyIQTui3th7tbA8F3L5xkYEO0e3NSf7oB/BJQ==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-21.2.0.tgz", + "integrity": "sha512-O0W2qLoWu1QOoOGgxiR2JID4O6WSpxPiQanrkyi9SSlM0PJ60Ptzlck47lhtnr9YZO3zYOsxHwnyeWJ6AffoBQ==", "dev": true, "requires": { - "babel-plugin-istanbul": "4.1.4", - "babel-preset-jest": "21.0.2" + "babel-plugin-istanbul": "4.1.5", + "babel-preset-jest": "21.2.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "babel-plugin-jest-hoist": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz", + "integrity": "sha512-yi5QuiVyyvhBUDLP4ButAnhYzkdrUwWDtvUJv71hjH3fclhnZg4HkDeqaitcR2dZZx/E67kGkRcPVjtVu+SJfQ==", "dev": true }, + "babel-preset-jest": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz", + "integrity": "sha512-hm9cBnr2h3J7yXoTtAVV0zg+3vg0Q/gT2GYuzlreTU0EPkJRtlNgKJJ3tBKEn0+VjAi3JykV6xCJkuUYttEEfA==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "21.2.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0" + } + }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", @@ -5060,159 +4740,59 @@ } }, "jest-snapshot": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-21.1.0.tgz", - "integrity": "sha512-oYASKqxO/Ghbdd96z/3KSQ1y4YUtqrQVzSKbnz3yjGsi1nu3AXMPmjRCM/CZXL+H+DAIgMirj5Uq0dZOxo6Bnw==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-21.2.1.tgz", + "integrity": "sha512-bpaeBnDpdqaRTzN8tWg0DqOTo2DvD3StOemxn67CUd1p1Po+BUpvePAp44jdJ7Pxcjfg+42o4NHw1SxdCA2rvg==", "dev": true, "requires": { - "chalk": "2.0.1", - "jest-diff": "21.1.0", - "jest-matcher-utils": "21.1.0", + "chalk": "2.1.0", + "jest-diff": "21.2.1", + "jest-matcher-utils": "21.2.1", "mkdirp": "0.5.1", "natural-compare": "1.4.0", - "pretty-format": "21.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "jest-matcher-utils": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", - "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", - "dev": true, - "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" - } - } + "pretty-format": "21.2.1" } }, "jest-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-21.1.0.tgz", - "integrity": "sha512-PJxaShBieLpB55NV4+loIZHiOlfZHjAGzVRp9BDzrr2m70UxQViDJenNdz4edJMWXJLjp817t1QrWi+LjcRaKw==", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-21.2.1.tgz", + "integrity": "sha512-r20W91rmHY3fnCoO7aOAlyfC51x2yeV3xF+prGsJAUsYhKeV670ZB8NO88Lwm7ASu8SdH0S+U+eFf498kjhA4g==", "dev": true, "requires": { "callsites": "2.0.0", - "chalk": "2.0.1", + "chalk": "2.1.0", "graceful-fs": "4.1.11", - "jest-message-util": "21.1.0", - "jest-mock": "21.1.0", - "jest-validate": "21.1.0", + "jest-message-util": "21.2.1", + "jest-mock": "21.2.0", + "jest-validate": "21.2.1", "mkdirp": "0.5.1" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true - }, - "jest-validate": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.1.0.tgz", - "integrity": "sha512-xS0cyErNWpsLFlGkn/b87pk/Mv7J+mCTs8hQ4KmtOIIoM1sHYobXII8AtkoN8FC7E3+Ptxjo+/3xWk6LK1dKcw==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "jest-get-type": "21.0.2", - "leven": "2.1.0", - "pretty-format": "21.1.0" - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "pretty-format": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.1.0.tgz", - "integrity": "sha512-041BVxr2pp7uGG8slfw43ysRXSaBIVqo5Li03BwI3K1/9oENlhkEEYWPkHpDzj7NlJ3GZte+Tv/DId5g2PLduA==", - "dev": true, - "requires": { - "ansi-regex": "3.0.0", - "ansi-styles": "3.2.0" - } } } }, "jest-validate": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-20.0.3.tgz", - "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz", + "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", "dev": true, "requires": { - "chalk": "1.1.3", - "jest-matcher-utils": "20.0.3", + "chalk": "2.1.0", + "jest-get-type": "21.2.0", "leven": "2.1.0", - "pretty-format": "20.0.3" + "pretty-format": "21.2.1" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true } } }, @@ -5222,13 +4802,21 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" }, "js-yaml": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", - "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", "dev": true, "requires": { "argparse": "1.0.9", - "esprima": "3.1.3" + "esprima": "4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + } } }, "jsbn": { @@ -5253,10 +4841,10 @@ "babel-plugin-transform-flow-strip-types": "6.22.0", "babel-preset-es2015": "6.24.1", "babel-preset-stage-1": "6.24.1", - "babel-register": "6.24.1", - "babylon": "6.17.4", + "babel-register": "6.26.0", + "babylon": "6.18.0", "colors": "1.1.2", - "flow-parser": "0.49.1", + "flow-parser": "0.56.0", "lodash": "4.17.4", "micromatch": "2.3.11", "node-dir": "0.1.8", @@ -5296,7 +4884,7 @@ "chalk": "1.1.3", "convert-source-map": "1.5.0", "core-js": "1.2.7", - "debug": "2.6.8", + "debug": "2.6.9", "detect-indent": "3.0.1", "esutils": "2.0.2", "fs-readdir-recursive": "0.1.2", @@ -5314,10 +4902,10 @@ "regenerator": "0.8.40", "regexpu": "1.3.0", "repeating": "1.1.3", - "resolve": "1.3.3", + "resolve": "1.4.0", "shebang-regex": "1.0.0", "slash": "1.0.0", - "source-map": "0.5.6", + "source-map": "0.5.7", "source-map-support": "0.2.10", "to-fast-properties": "1.0.3", "trim-right": "1.0.1", @@ -5411,16 +4999,16 @@ "integrity": "sha1-Sw+4L+sdELO9YtNJQ0Jtmz7TDUw=", "requires": { "ast-types": "0.9.11", - "core-js": "2.4.1", + "core-js": "2.5.1", "esprima": "4.0.0", "private": "0.1.7", - "source-map": "0.5.6" + "source-map": "0.5.7" }, "dependencies": { "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" } } }, @@ -5474,7 +5062,7 @@ "html-encoding-sniffer": "1.0.1", "nwmatcher": "1.4.2", "parse5": "1.5.1", - "request": "2.82.0", + "request": "2.83.0", "sax": "1.2.4", "symbol-tree": "3.2.2", "tough-cookie": "2.3.3", @@ -5578,9 +5166,9 @@ } }, "lint-staged": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-4.1.3.tgz", - "integrity": "sha512-nOV/CUs10lQz7STNkNs+X3lQahaMfWj31OoTPQxVVg17pqDbBi8chV564nk/GdTgHNAF7RyRFt0ZiA2cTjgppw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-4.2.3.tgz", + "integrity": "sha512-Ks1vMyVpp3ldeFDN9sIcHcFDh0v3X6Y6LOdT0Wl86/BSDM2R8PVcuFODkh0Dav7Ni/asUPKONfXRWZM9YO85IQ==", "dev": true, "requires": { "app-root-path": "2.0.1", @@ -5588,35 +5176,30 @@ "cosmiconfig": "1.1.0", "execa": "0.8.0", "is-glob": "4.0.0", - "jest-validate": "20.0.3", + "jest-validate": "21.2.1", "listr": "0.12.0", "lodash": "4.17.4", - "log-symbols": "2.0.0", + "log-symbols": "2.1.0", "minimatch": "3.0.4", "npm-which": "3.0.1", - "p-map": "1.1.1", + "p-map": "1.2.0", "staged-git-files": "0.0.4", - "stringify-object": "3.2.0" + "stringify-object": "3.2.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "is-extglob": { @@ -5635,9 +5218,9 @@ } }, "log-symbols": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.0.0.tgz", - "integrity": "sha512-ValCSal2pRxRbet7O69a/1g5fZ2MLxf1YXIslNrdJF42ofY9zVf6MTqTwfhG+2x168xrbZATCgFQfXAwdNHv+w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.1.0.tgz", + "integrity": "sha512-zLeLrzMA1A2vRF1e/0Mo+LNINzi6jzBylHj5WqvQ/WK/5WCZt8si9SyN4p9llr/HRYvVR1AoXHRHl4WTHyQAzQ==", "dev": true, "requires": { "chalk": "2.1.0" @@ -5662,8 +5245,8 @@ "log-symbols": "1.0.2", "log-update": "1.0.2", "ora": "0.2.3", - "p-map": "1.1.1", - "rxjs": "5.4.1", + "p-map": "1.2.0", + "rxjs": "5.4.3", "stream-to-observable": "0.1.0", "strip-ansi": "3.0.1" }, @@ -5710,7 +5293,7 @@ "cli-truncate": "0.2.1", "elegant-spinner": "1.0.1", "figures": "1.7.0", - "indent-string": "3.1.0", + "indent-string": "3.2.0", "log-symbols": "1.0.2", "log-update": "1.0.2", "strip-ansi": "3.0.1" @@ -5738,9 +5321,9 @@ } }, "indent-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.1.0.tgz", - "integrity": "sha1-CP9DNGAziDmbMp5rlTjcejz13n0=" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" }, "supports-color": { "version": "2.0.0", @@ -5772,6 +5355,14 @@ "supports-color": "2.0.0" } }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -5781,6 +5372,20 @@ "object-assign": "4.1.1" } }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -5789,16 +5394,14 @@ } }, "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "requires": { "graceful-fs": "4.1.11", "parse-json": "2.2.0", "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "strip-bom": "3.0.0" } }, "loader-runner": { @@ -5811,7 +5414,7 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "requires": { - "big.js": "3.1.3", + "big.js": "3.2.0", "emojis-list": "2.1.0", "json5": "0.5.1" } @@ -5889,6 +5492,35 @@ "requires": { "ansi-escapes": "1.4.0", "cli-cursor": "1.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + } } }, "loglevel": { @@ -6024,6 +5656,33 @@ "through2": "2.0.3", "vinyl": "1.2.0", "vinyl-file": "2.0.0" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } } }, "mem-fs-editor": { @@ -6043,32 +5702,17 @@ "vinyl": "2.1.0" }, "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" - }, - "vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "clone": "2.1.1", - "clone-buffer": "1.0.0", - "clone-stats": "1.0.0", - "cloneable-readable": "1.0.0", - "remove-trailing-separator": "1.0.2", - "replace-ext": "1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } } } @@ -6140,13 +5784,13 @@ "normalize-path": "2.1.1", "object.omit": "2.0.1", "parse-glob": "3.0.4", - "regex-cache": "0.4.3" + "regex-cache": "0.4.4" } }, "miller-rabin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", - "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { "bn.js": "4.11.8", "brorand": "1.1.0" @@ -6296,9 +5940,9 @@ "dev": true, "requires": { "growly": "1.3.0", - "semver": "5.3.0", + "semver": "5.4.1", "shellwords": "0.1.1", - "which": "1.2.14" + "which": "1.3.0" } }, "nomnom": { @@ -6338,7 +5982,7 @@ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "requires": { - "abbrev": "1.1.0" + "abbrev": "1.1.1" } }, "normalize-package-data": { @@ -6348,7 +5992,7 @@ "requires": { "hosted-git-info": "2.5.0", "is-builtin-module": "1.0.0", - "semver": "5.3.0", + "semver": "5.4.1", "validate-npm-package-license": "3.0.1" } }, @@ -6357,7 +6001,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "remove-trailing-separator": "1.0.2" + "remove-trailing-separator": "1.1.0" } }, "npm-path": { @@ -6366,7 +6010,7 @@ "integrity": "sha1-Fc/04ciaONp39W9gVbJPl137K74=", "dev": true, "requires": { - "which": "1.2.14" + "which": "1.3.0" } }, "npm-run-path": { @@ -6383,9 +6027,9 @@ "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", "dev": true, "requires": { - "commander": "2.10.0", + "commander": "2.11.0", "npm-path": "2.0.3", - "which": "1.2.14" + "which": "1.3.0" } }, "number-is-nan": { @@ -6428,9 +6072,12 @@ } }, "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "1.1.0" + } }, "optimist": { "version": "0.6.1", @@ -6487,6 +6134,28 @@ "supports-color": "2.0.0" } }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -6569,9 +6238,9 @@ } }, "p-map": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.1.1.tgz", - "integrity": "sha1-BfXkrpegaDcbwqXMhr+9vBnErno=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" }, "p-reduce": { "version": "1.0.0", @@ -6665,14 +6334,11 @@ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" }, "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "pify": "2.3.0" } }, "pbkdf2": { @@ -6684,7 +6350,7 @@ "create-hmac": "1.1.6", "ripemd160": "2.0.1", "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "sha.js": "2.4.9" } }, "performance-now": { @@ -6712,9 +6378,9 @@ } }, "pluralize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-4.0.0.tgz", - "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "prelude-ls": { @@ -6734,101 +6400,88 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, "prettier": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.6.1.tgz", - "integrity": "sha512-f85qBoQiqiFM/sCmJaN4Lagj9bqMcv38vCftqp4GfVessAqq3Ns6g+3gd8UXReStLLE/DGEdwiZXoFKxphKqwg==" + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", + "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=" }, "prettier-eslint": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-8.1.1.tgz", - "integrity": "sha512-eVvH4HQkaKfEvnXy3DizRoW8CuMSQMPFTDkWCRGBv1+XqFZc2O4cDejKPnJCAUhmaWVMLdmhweU6PwEFLM+/lA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-8.2.0.tgz", + "integrity": "sha512-OSx/0ULxWuIjeMO6KJoMVIDc7/Kj9a0wxUDzaGJTNiZXlNRq2bCl5jya8p42OQCVJzp1HnnQyGrWb+6/5+jbJQ==", "dev": true, "requires": { "common-tags": "1.4.0", "dlv": "1.1.0", - "eslint": "4.6.1", + "eslint": "4.8.0", "indent-string": "3.2.0", "lodash.merge": "4.6.0", "loglevel-colored-level-prefix": "1.0.0", - "prettier": "1.7.0", + "prettier": "1.7.4", "pretty-format": "20.0.3", "require-relative": "0.8.7", - "typescript": "2.5.2", + "typescript": "2.5.3", "typescript-eslint-parser": "7.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, "indent-string": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", "dev": true }, - "prettier": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.0.tgz", - "integrity": "sha512-kIbA3UE9sYGiVCxlWg92EOHWZqte6EAkC7DS5je6NaL8g3Uw1rWe0eH+UX4Hy5OEiR9aql2vVMHeg6lR4YGxYg==", - "dev": true + "pretty-format": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", + "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1", + "ansi-styles": "3.2.0" + } } } }, "prettier-eslint-cli": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/prettier-eslint-cli/-/prettier-eslint-cli-4.3.2.tgz", - "integrity": "sha512-bUHRWIt8mBndrI4X/nPpd4+Ftb7LvdIfZhTIYk5b7EB8+dQDyxcJNbbxgTGo5ukAn+HqC3frFRO58Vt/XxkDrQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/prettier-eslint-cli/-/prettier-eslint-cli-4.4.0.tgz", + "integrity": "sha512-q7kAFt+JpUQJALs110mpaT0+NEMZ4tt1SgOmeNL1D+13rABH0nIMw8fy3NnaTMSmRH9Wfuct6jHSDyqdb9PpVQ==", "dev": true, "requires": { "arrify": "1.0.1", - "babel-runtime": "6.23.0", + "babel-runtime": "6.26.0", "boolify": "1.0.1", "camelcase-keys": "4.1.0", "chalk": "2.1.0", "common-tags": "1.4.0", - "eslint": "4.6.1", + "eslint": "4.8.0", "find-up": "2.1.0", "get-stdin": "5.0.1", "glob": "7.1.2", - "ignore": "3.3.3", + "ignore": "3.3.5", "indent-string": "3.2.0", "lodash.memoize": "4.1.2", "loglevel-colored-level-prefix": "1.0.0", "messageformat": "1.0.2", - "prettier-eslint": "8.1.1", - "rxjs": "5.4.1", + "prettier-eslint": "8.2.0", + "rxjs": "5.4.3", "yargs": "8.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" - } - }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -6853,52 +6506,39 @@ } } }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, "get-stdin": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", "dev": true }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, "indent-string": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", "dev": true }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "number-is-nan": "1.0.1" } }, "os-locale": { @@ -6912,75 +6552,6 @@ "mem": "1.1.0" } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", @@ -7010,15 +6581,21 @@ "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=" }, "pretty-format": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", - "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { - "ansi-regex": "2.1.1", + "ansi-regex": "3.0.0", "ansi-styles": "3.2.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -7167,24 +6744,22 @@ } }, "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "requires": { - "load-json-file": "1.1.0", + "load-json-file": "2.0.0", "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "path-type": "2.0.0" } }, "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, "readable-stream": { @@ -7218,7 +6793,14 @@ "ast-types": "0.9.2", "esprima": "3.1.3", "private": "0.1.7", - "source-map": "0.5.6" + "source-map": "0.5.7" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + } } }, "rechoir": { @@ -7226,13 +6808,13 @@ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "requires": { - "resolve": "1.3.3" + "resolve": "1.4.0" } }, "regenerate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", - "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" }, "regenerator": { "version": "0.8.40", @@ -7252,11 +6834,6 @@ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz", "integrity": "sha1-oNkOQ1G7iHcWyD/WN+v4GK9K38w=" }, - "esprima-fb": { - "version": "15001.1001.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", - "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" - }, "recast": { "version": "0.10.33", "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", @@ -7265,33 +6842,32 @@ "ast-types": "0.8.12", "esprima-fb": "15001.1001.0-dev-harmony-fb", "private": "0.1.7", - "source-map": "0.5.6" + "source-map": "0.5.7" } } } }, "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" }, "regenerator-transform": { - "version": "0.9.11", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz", - "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", "private": "0.1.7" } }, "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "requires": { - "is-equal-shallow": "0.1.3", - "is-primitive": "2.0.0" + "is-equal-shallow": "0.1.3" } }, "regexpu": { @@ -7301,7 +6877,7 @@ "requires": { "esprima": "2.7.3", "recast": "0.10.43", - "regenerate": "1.3.2", + "regenerate": "1.3.3", "regjsgen": "0.2.0", "regjsparser": "0.1.5" }, @@ -7324,14 +6900,7 @@ "ast-types": "0.8.15", "esprima-fb": "15001.1001.0-dev-harmony-fb", "private": "0.1.7", - "source-map": "0.5.6" - }, - "dependencies": { - "esprima-fb": { - "version": "15001.1001.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", - "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" - } + "source-map": "0.5.7" } } } @@ -7341,7 +6910,7 @@ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "requires": { - "regenerate": "1.3.2", + "regenerate": "1.3.3", "regjsgen": "0.2.0", "regjsparser": "0.1.5" } @@ -7367,9 +6936,9 @@ } }, "remove-trailing-separator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", - "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "repeat-element": { "version": "1.1.2", @@ -7390,14 +6959,14 @@ } }, "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, "request": { - "version": "2.82.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.82.0.tgz", - "integrity": "sha512-/QWqfmyTfQ4OYs6EhB1h2wQsX9ZxbuNePCvCm0Mdz/mxw73mjdg0D4QdIl0TQBFs35CZmMXLjk0iCGK395CUDg==", + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", "dev": true, "requires": { "aws-sign2": "0.7.0", @@ -7454,6 +7023,14 @@ "requires": { "caller-path": "0.1.0", "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } } }, "reserved-words": { @@ -7463,9 +7040,9 @@ "dev": true }, "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", - "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", "requires": { "path-parse": "1.0.5" } @@ -7476,64 +7053,29 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { "resolve-from": "3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - } } }, "resolve-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.0.tgz", - "integrity": "sha1-d6G4+Rl6YOdzO08Nl35pzNm1/YY=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "requires": { "expand-tilde": "2.0.2", - "global-modules": "0.2.3" - }, - "dependencies": { - "global-modules": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", - "requires": { - "global-prefix": "0.1.5", - "is-windows": "0.2.0" - } - }, - "global-prefix": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", - "requires": { - "homedir-polyfill": "1.0.1", - "ini": "1.3.4", - "is-windows": "0.2.0", - "which": "1.2.14" - } - }, - "is-windows": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", - "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" - } + "global-modules": "1.0.0" } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "right-align": { @@ -7585,9 +7127,9 @@ } }, "rxjs": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.1.tgz", - "integrity": "sha1-ti91fyeURdJloYpY+wpw3JDpFiY=", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.3.tgz", + "integrity": "sha512-fSNi+y+P9ss+EZuV0GcIIqPUK07DEaMRUtLJvdcvMyFjc9dizuDjere+A4V7JrLGnm9iCc+nagV/4QdMTkqC4A==", "requires": { "symbol-observable": "1.0.4" } @@ -7603,7 +7145,7 @@ "integrity": "sha512-OSJxhHO0CgPUw3lUm3GhfREAfza45smvEI9ozuFrxKG10GHVo0ryW9FK5VYlLvxj0SV7HVKHW0voYJIRu27GWg==", "dev": true, "requires": { - "anymatch": "1.3.0", + "anymatch": "1.3.2", "exec-sh": "0.2.1", "fb-watchman": "2.0.0", "fsevents": "1.1.2", @@ -7633,9 +7175,9 @@ "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=" }, "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, "set-blocking": { "version": "2.0.0", @@ -7653,11 +7195,12 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "sha.js": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", "requires": { - "inherits": "2.0.3" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "shebang-command": { @@ -7681,6 +7224,21 @@ "glob": "7.1.2", "interpret": "1.0.4", "rechoir": "0.6.2" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } } }, "shellwords": { @@ -7788,16 +7346,16 @@ "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" }, "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-support": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "source-map": "0.5.6" + "source-map": "0.5.7" } }, "spawn-sync": { @@ -7919,13 +7477,27 @@ "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "string_decoder": { @@ -7937,12 +7509,12 @@ } }, "stringify-object": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.0.tgz", - "integrity": "sha1-lDcKE15BvASDWIE7+ZSB8TFcaqY=", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.1.tgz", + "integrity": "sha512-jPcQYw/52HUPP8uOE4kkjxl5bB9LfHkKCTptIk3qw7ozP5XMIMlHMLjt00GGSwW6DJAf/njY5EU6Vpwl4LlBKQ==", "dev": true, "requires": { - "get-own-enumerable-property-symbols": "1.0.1", + "get-own-enumerable-property-symbols": "2.0.1", "is-obj": "1.0.1", "is-regexp": "1.0.0" } @@ -7972,12 +7544,9 @@ } }, "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "0.2.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, "strip-bom-stream": { "version": "2.0.0", @@ -7986,6 +7555,16 @@ "requires": { "first-chunk-stream": "2.0.0", "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + } } }, "strip-eof": { @@ -8011,13 +7590,6 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "requires": { "has-flag": "2.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - } } }, "symbol-observable": { @@ -8032,86 +7604,27 @@ "dev": true }, "table": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", - "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", + "ajv": "5.2.3", + "ajv-keywords": "2.1.0", + "chalk": "2.1.0", "lodash": "4.17.4", - "slice-ansi": "0.0.4", + "slice-ansi": "1.0.0", "string-width": "2.1.1" }, "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "is-fullwidth-code-point": "2.0.0" } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true } } }, @@ -8140,6 +7653,81 @@ "object-assign": "4.1.1", "read-pkg-up": "1.0.1", "require-main-filename": "1.0.1" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } } }, "text-table": { @@ -8186,9 +7774,9 @@ } }, "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "requires": { "os-tmpdir": "1.0.2" } @@ -8281,9 +7869,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz", - "integrity": "sha1-A4qV99m7tCCxvzW6MdTFwd0//jQ=", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz", + "integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==", "dev": true }, "typescript-eslint-parser": { @@ -8294,6 +7882,14 @@ "requires": { "lodash.unescape": "4.0.1", "semver": "5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } } }, "uglify-js": { @@ -8301,7 +7897,7 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "requires": { - "source-map": "0.5.6", + "source-map": "0.5.7", "uglify-to-browserify": "1.0.2", "yargs": "3.10.0" }, @@ -8335,7 +7931,7 @@ "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", "requires": { - "source-map": "0.5.6", + "source-map": "0.5.7", "uglify-js": "2.8.29", "webpack-sources": "1.0.1" } @@ -8443,13 +8039,16 @@ } }, "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", - "replace-ext": "0.0.1" + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" } }, "vinyl-file": { @@ -8463,12 +8062,47 @@ "strip-bom": "2.0.0", "strip-bom-stream": "2.0.0", "vinyl": "1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } } }, "vlq": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.2.tgz", - "integrity": "sha1-4xbVJXtAuGu0PLjV/qXX9U1rDKE=", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", "dev": true }, "vm-browserify": { @@ -8539,7 +8173,7 @@ "requires": { "acorn": "5.1.2", "acorn-dynamic-import": "2.0.2", - "ajv": "5.2.2", + "ajv": "5.2.3", "ajv-keywords": "2.1.0", "async": "2.5.0", "enhanced-resolve": "3.4.1", @@ -8552,7 +8186,7 @@ "memory-fs": "0.4.1", "mkdirp": "0.5.1", "node-libs-browser": "2.0.0", - "source-map": "0.5.6", + "source-map": "0.5.7", "supports-color": "4.4.0", "tapable": "0.2.8", "uglifyjs-webpack-plugin": "0.4.6", @@ -8566,11 +8200,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==" }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", @@ -8606,48 +8235,12 @@ } } }, - "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", - "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.8" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "number-is-nan": "1.0.1" } }, "os-locale": { @@ -8660,72 +8253,6 @@ "mem": "1.1.0" } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "tapable": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", - "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", @@ -8745,14 +8272,6 @@ "y18n": "3.2.1", "yargs-parser": "7.0.0" } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "requires": { - "camelcase": "4.1.0" - } } } }, @@ -8761,7 +8280,7 @@ "resolved": "https://registry.npmjs.org/webpack-addons/-/webpack-addons-1.1.2.tgz", "integrity": "sha1-goWxgfl6coIMHWhAIliEYOT3xrc=", "requires": { - "babel-code-frame": "6.22.0", + "babel-code-frame": "6.26.0", "babel-preset-es2015": "6.24.1", "babel-preset-stage-3": "6.24.1", "jscodeshift": "0.3.32" @@ -8789,7 +8308,7 @@ "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==", "requires": { "source-list-map": "2.0.0", - "source-map": "0.5.6" + "source-map": "0.5.7" } }, "whatwg-encoding": { @@ -8828,13 +8347,18 @@ } }, "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "requires": { "isexe": "2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -8862,6 +8386,26 @@ "requires": { "string-width": "1.0.2", "strip-ansi": "3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } } }, "wrappy": { @@ -8929,11 +8473,6 @@ "yargs-parser": "7.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -8961,37 +8500,12 @@ } } }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "number-is-nan": "1.0.1" } }, "os-locale": { @@ -9003,67 +8517,6 @@ "lcid": "1.0.0", "mem": "1.1.0" } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" } } }, @@ -9083,54 +8536,41 @@ } }, "yeoman-environment": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.0.0.tgz", - "integrity": "sha1-2vovxRLBaMuDE0U+UxjmRzEmWRU=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.0.4.tgz", + "integrity": "sha512-oiY/siFXFPCWlaM2U/wLjWs5z/zifd/8XKjkfjkHJW/faWNGc6iTGqUInWdkZohBeS4Zeb/JldAGKE+wETrbdw==", "requires": { - "chalk": "1.1.3", - "debug": "2.6.8", + "chalk": "2.1.0", + "debug": "3.1.0", "diff": "3.3.1", "escape-string-regexp": "1.0.5", "globby": "6.1.0", "grouped-queue": "0.3.3", - "inquirer": "3.2.3", + "inquirer": "3.3.0", "is-scoped": "1.0.0", "lodash": "4.17.4", - "log-symbols": "1.0.2", + "log-symbols": "2.1.0", "mem-fs": "1.1.3", "text-table": "0.2.0", "untildify": "3.0.2" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ms": "2.0.0" } }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "log-symbols": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.1.0.tgz", + "integrity": "sha512-zLeLrzMA1A2vRF1e/0Mo+LNINzi6jzBylHj5WqvQ/WK/5WCZt8si9SyN4p9llr/HRYvVR1AoXHRHl4WTHyQAzQ==", "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "chalk": "2.1.0" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, "untildify": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.2.tgz", @@ -9146,8 +8586,8 @@ "cli-table": "0.3.1", "cross-spawn": "5.1.0", "dargs": "5.1.0", - "dateformat": "2.0.0", - "debug": "2.6.8", + "dateformat": "2.2.0", + "debug": "2.6.9", "detect-conflict": "1.0.1", "error": "7.0.2", "find-up": "2.1.0", @@ -9168,6 +8608,11 @@ "yeoman-environment": "1.6.6" }, "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", @@ -9188,6 +8633,14 @@ "supports-color": "2.0.0" } }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, "diff": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz", @@ -9212,14 +8665,6 @@ "object-assign": "4.1.1" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, "glob": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", @@ -9266,15 +8711,12 @@ "through": "2.3.8" } }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "number-is-nan": "1.0.1" } }, "minimist": { @@ -9287,38 +8729,30 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=" }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "2.3.0" - } + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -9338,7 +8772,7 @@ "integrity": "sha1-zYX6Z9FWBg5EDXgH1+988NLR1nE=", "requires": { "chalk": "1.1.3", - "debug": "2.6.8", + "debug": "2.6.9", "diff": "2.2.3", "escape-string-regexp": "1.0.5", "globby": "4.1.0", diff --git a/package.json b/package.json index 6587f565497..3e9d2192fda 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,9 @@ }, "jest": { "testEnvironment": "node", - "modulePathIgnorePatterns": ["dist"] + "modulePathIgnorePatterns": [ + "dist" + ] }, "dependencies": { "babel-code-frame": "^6.22.0", From acb6285c046fa195fe08e1846245945aaafde1c6 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:06:57 +0200 Subject: [PATCH 07/24] feat: replace yarn backup w/ normal yarn (#160) * feat: replace yarn backup w/ normal yarn * upgrade npm & remove yarn --- package.json | 2 +- yarn.bkup.lock | 4386 ------------------------------------------------ 2 files changed, 1 insertion(+), 4387 deletions(-) delete mode 100644 yarn.bkup.lock diff --git a/package.json b/package.json index 3e9d2192fda..0d6462ba0ee 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "main": "./bin/webpack.js", "engines": { - "node": ">=4.0.0" + "node": ">=5.0.0" }, "scripts": { "lint": "eslint \"**/*.js\"", diff --git a/yarn.bkup.lock b/yarn.bkup.lock deleted file mode 100644 index 17d44dcd656..00000000000 --- a/yarn.bkup.lock +++ /dev/null @@ -1,4386 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -abab@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" - -abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - -acorn-dynamic-import@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.1.tgz#23f671eb6e650dab277fef477c321b1178a8cca2" - dependencies: - acorn "^4.0.3" - -acorn-globals@^1.0.4: - version "1.0.9" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" - dependencies: - acorn "^2.1.0" - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^2.1.0, acorn@^2.4.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" - -acorn@^3.0.4, acorn@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -acorn@^4.0.1, acorn@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1" - -ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c" - -ajv@^4.7.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.0.tgz#7ae6169180eb199192a8b9a19fd0f47fc9ac8764" - 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" - -alter@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/alter/-/alter-0.2.0.tgz#c7588808617572034aae62480af26b1d4d1cb3cd" - dependencies: - stable "~0.1.3" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" - -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@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" - -ansicolors@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" - -anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" - dependencies: - arrify "^1.0.0" - micromatch "^2.1.5" - -append-transform@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" - -aproba@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" - -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.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.0.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-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asn1.js@^4.0.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.0.tgz#f71a1243f3e79d46d7b07d7fbf4824ee73af054a" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -ast-traverse@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ast-traverse/-/ast-traverse-0.1.1.tgz#69cf2b8386f19dcda1bb1e05d68fe359d8897de6" - -ast-types@0.8.12: - version "0.8.12" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.12.tgz#a0d90e4351bb887716c83fd637ebf818af4adfcc" - -ast-types@0.8.15: - version "0.8.15" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.15.tgz#8eef0827f04dff0ec8857ba925abe3fea6194e52" - -ast-types@0.8.18: - version "0.8.18" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.18.tgz#c8b98574898e8914e9d8de74b947564a9fe929af" - -ast-types@0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.2.tgz#2cc19979d15c655108bf565323b8e7ee38751f6b" - -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.x, async@^1.4.0, async@^1.4.2, async@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@2.0.0-rc.4: - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.0.0-rc.4.tgz#9b7f60724c17962a973f787419e0ebc5571dbad8" - dependencies: - lodash "^4.3.0" - -async@^2.1.2: - version "2.1.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" - dependencies: - lodash "^4.14.0" - -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -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.5.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" - -babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^2.0.0" - -<<<<<<< HEAD -======= -babel-core@^5: - version "5.8.38" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-5.8.38.tgz#1fcaee79d7e61b750b00b8e54f6dfc9d0af86558" - dependencies: - babel-plugin-constant-folding "^1.0.1" - babel-plugin-dead-code-elimination "^1.0.2" - babel-plugin-eval "^1.0.1" - babel-plugin-inline-environment-variables "^1.0.1" - babel-plugin-jscript "^1.0.4" - babel-plugin-member-expression-literals "^1.0.1" - babel-plugin-property-literals "^1.0.1" - babel-plugin-proto-to-assign "^1.0.3" - babel-plugin-react-constant-elements "^1.0.3" - babel-plugin-react-display-name "^1.0.3" - babel-plugin-remove-console "^1.0.1" - babel-plugin-remove-debugger "^1.0.1" - babel-plugin-runtime "^1.0.7" - babel-plugin-undeclared-variables-check "^1.0.2" - babel-plugin-undefined-to-void "^1.1.6" - babylon "^5.8.38" - bluebird "^2.9.33" - chalk "^1.0.0" - convert-source-map "^1.1.0" - core-js "^1.0.0" - debug "^2.1.1" - detect-indent "^3.0.0" - esutils "^2.0.0" - fs-readdir-recursive "^0.1.0" - globals "^6.4.0" - home-or-tmp "^1.0.0" - is-integer "^1.0.4" - js-tokens "1.0.1" - json5 "^0.4.0" - lodash "^3.10.0" - minimatch "^2.0.3" - output-file-sync "^1.1.0" - path-exists "^1.0.0" - path-is-absolute "^1.0.0" - private "^0.1.6" - regenerator "0.8.40" - regexpu "^1.3.0" - repeating "^1.1.2" - resolve "^1.1.6" - shebang-regex "^1.0.0" - slash "^1.0.0" - source-map "^0.5.0" - source-map-support "^0.2.10" - to-fast-properties "^1.0.0" - trim-right "^1.0.0" - try-resolve "^1.0.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-core@^6.0.0, babel-core@^6.18.0, babel-core@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724" - dependencies: - babel-code-frame "^6.20.0" - babel-generator "^6.21.0" - babel-helpers "^6.16.0" - babel-messages "^6.8.0" - babel-register "^6.18.0" - babel-runtime "^6.20.0" - babel-template "^6.16.0" - babel-traverse "^6.21.0" - babel-types "^6.21.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-generator@^6.18.0, babel-generator@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.21.0.tgz#605f1269c489a1c75deeca7ea16d43d4656c8494" - dependencies: - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" - -<<<<<<< HEAD -======= -babel-helper-bindify-decorators@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.18.0.tgz#fc00c573676a6e702fffa00019580892ec8780a5" - dependencies: - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-builder-binary-assignment-operator-visitor@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.18.0.tgz#8ae814989f7a53682152e3401a04fabd0bb333a6" - dependencies: - babel-helper-explode-assignable-expression "^6.18.0" - babel-runtime "^6.0.0" - babel-types "^6.18.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-helper-call-delegate@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.18.0.tgz#05b14aafa430884b034097ef29e9f067ea4133bd" - dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-define-map@^6.18.0, babel-helper-define-map@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.18.0.tgz#8d6c85dc7fbb4c19be3de40474d18e97c3676ec2" - dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.9.0" - babel-types "^6.18.0" - lodash "^4.2.0" - -<<<<<<< HEAD -======= -babel-helper-explode-assignable-expression@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.18.0.tgz#14b8e8c2d03ad735d4b20f1840b24cd1f65239fe" - dependencies: - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-explode-class@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.18.0.tgz#c44f76f4fa23b9c5d607cbac5d4115e7a76f62cb" - dependencies: - babel-helper-bindify-decorators "^6.18.0" - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6" - dependencies: - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-get-function-arity@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-hoist-variables@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.18.0.tgz#a835b5ab8b46d6de9babefae4d98ea41e866b82a" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-optimise-call-expression@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.18.0.tgz#9261d0299ee1a4f08a6dd28b7b7c777348fd8f0f" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-regex@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.18.0.tgz#ae0ebfd77de86cb2f1af258e2cc20b5fe893ecc6" - dependencies: - babel-runtime "^6.9.0" - babel-types "^6.18.0" - lodash "^4.2.0" - -<<<<<<< HEAD -======= -babel-helper-remap-async-to-generator@^6.16.0, babel-helper-remap-async-to-generator@^6.16.2: - version "6.20.3" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.20.3.tgz#9dd3b396f13e35ef63e538098500adc24c63c4e7" - dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.20.0" - babel-template "^6.16.0" - babel-traverse "^6.20.0" - babel-types "^6.20.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-helper-replace-supers@^6.18.0, babel-helper-replace-supers@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.18.0.tgz#28ec69877be4144dbd64f4cc3a337e89f29a924e" - dependencies: - babel-helper-optimise-call-expression "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helpers@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" - dependencies: - babel-runtime "^6.0.0" - babel-template "^6.16.0" - -babel-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-18.0.0.tgz#17ebba8cb3285c906d859e8707e4e79795fb65e3" - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^3.0.0" - babel-preset-jest "^18.0.0" - -babel-messages@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-check-es2015-constants@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7" - dependencies: - babel-runtime "^6.0.0" - -<<<<<<< HEAD -======= -babel-plugin-constant-folding@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-constant-folding/-/babel-plugin-constant-folding-1.0.1.tgz#8361d364c98e449c3692bdba51eff0844290aa8e" - -babel-plugin-dead-code-elimination@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz#5f7c451274dcd7cccdbfbb3e0b85dd28121f0f65" - -babel-plugin-eval@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz#a2faed25ce6be69ade4bfec263f70169195950da" - -babel-plugin-inline-environment-variables@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-inline-environment-variables/-/babel-plugin-inline-environment-variables-1.0.1.tgz#1f58ce91207ad6a826a8bf645fafe68ff5fe3ffe" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-plugin-istanbul@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.0.0.tgz#da7324520ae0b8a44b6a078e72e883374a9fab76" - dependencies: - find-up "^1.1.2" - istanbul-lib-instrument "^1.1.4" - object-assign "^4.1.0" - test-exclude "^3.2.2" - -babel-plugin-jest-hoist@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" - -<<<<<<< HEAD -======= -babel-plugin-jscript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz#8f342c38276e87a47d5fa0a8bd3d5eb6ccad8fcc" - -babel-plugin-member-expression-literals@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-member-expression-literals/-/babel-plugin-member-expression-literals-1.0.1.tgz#cc5edb0faa8dc927170e74d6d1c02440021624d3" - -babel-plugin-property-literals@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-property-literals/-/babel-plugin-property-literals-1.0.1.tgz#0252301900192980b1c118efea48ce93aab83336" - -babel-plugin-proto-to-assign@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/babel-plugin-proto-to-assign/-/babel-plugin-proto-to-assign-1.0.4.tgz#c49e7afd02f577bc4da05ea2df002250cf7cd123" - dependencies: - lodash "^3.9.3" - -babel-plugin-react-constant-elements@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-react-constant-elements/-/babel-plugin-react-constant-elements-1.0.3.tgz#946736e8378429cbc349dcff62f51c143b34e35a" - -babel-plugin-react-display-name@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-react-display-name/-/babel-plugin-react-display-name-1.0.3.tgz#754fe38926e8424a4e7b15ab6ea6139dee0514fc" - -babel-plugin-remove-console@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-remove-console/-/babel-plugin-remove-console-1.0.1.tgz#d8f24556c3a05005d42aaaafd27787f53ff013a7" - -babel-plugin-remove-debugger@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-remove-debugger/-/babel-plugin-remove-debugger-1.0.1.tgz#fd2ea3cd61a428ad1f3b9c89882ff4293e8c14c7" - -babel-plugin-runtime@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/babel-plugin-runtime/-/babel-plugin-runtime-1.0.7.tgz#bf7c7d966dd56ecd5c17fa1cb253c9acb7e54aaf" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - -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-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-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -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.3.13: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.20.0.tgz#442835e19179f45b87e92d477d70b9f1f18b5c4f" - -babel-plugin-transform-async-generator-functions@^6.17.0: - version "6.17.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.17.0.tgz#d0b5a2b2f0940f2b245fa20a00519ed7bc6cae54" - dependencies: - babel-helper-remap-async-to-generator "^6.16.2" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-async-to-generator@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999" - dependencies: - babel-helper-remap-async-to-generator "^6.16.0" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-class-constructor-call@^6.3.13: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.18.0.tgz#80855e38a1ab47b8c6c647f8ea1bcd2c00ca3aae" - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-class-properties@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.19.0.tgz#1274b349abaadc835164e2004f4a2444a2788d5f" - dependencies: - babel-helper-function-name "^6.18.0" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.9.1" - babel-template "^6.15.0" - -babel-plugin-transform-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.13.0.tgz#82d65c1470ae83e2d13eebecb0a1c2476d62da9d" - dependencies: - babel-helper-define-map "^6.8.0" - babel-helper-explode-class "^6.8.0" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - babel-types "^6.13.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-plugin-transform-es2015-arrow-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-block-scoping@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.21.0.tgz#e840687f922e70fb2c42bb13501838c174a115ed" - dependencies: - babel-runtime "^6.20.0" - babel-template "^6.15.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" - lodash "^4.2.0" - -babel-plugin-transform-es2015-classes@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.18.0.tgz#ffe7a17321bf83e494dcda0ae3fc72df48ffd1d9" - dependencies: - babel-helper-define-map "^6.18.0" - babel-helper-function-name "^6.18.0" - babel-helper-optimise-call-expression "^6.18.0" - babel-helper-replace-supers "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.9.0" - babel-template "^6.14.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-computed-properties@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870" - dependencies: - babel-helper-define-map "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-destructuring@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.19.0.tgz#ff1d911c4b3f4cab621bd66702a869acd1900533" - dependencies: - babel-runtime "^6.9.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.8.0" - -babel-plugin-transform-es2015-for-of@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.18.0.tgz#4c517504db64bf8cfc119a6b8f177211f2028a70" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-function-name@^6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719" - dependencies: - babel-helper-function-name "^6.8.0" - babel-runtime "^6.9.0" - babel-types "^6.9.0" - -babel-plugin-transform-es2015-literals@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-modules-amd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.18.0.tgz#49a054cbb762bdf9ae2d8a807076cfade6141e40" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-modules-commonjs@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.18.0.tgz#c15ae5bb11b32a0abdcc98a5837baa4ee8d67bcc" - dependencies: - babel-plugin-transform-strict-mode "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.19.0.tgz#50438136eba74527efa00a5b0fefaf1dc4071da6" - dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.11.6" - babel-template "^6.14.0" - -babel-plugin-transform-es2015-modules-umd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.18.0.tgz#23351770ece5c1f8e83ed67cb1d7992884491e50" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-object-super@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5" - dependencies: - babel-helper-replace-supers "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-parameters@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.21.0.tgz#46a655e6864ef984091448cdf024d87b60b2a7d8" - dependencies: - babel-helper-call-delegate "^6.18.0" - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.9.0" - babel-template "^6.16.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" - -babel-plugin-transform-es2015-shorthand-properties@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.18.0.tgz#e2ede3b7df47bf980151926534d1dd0cbea58f43" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-spread@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-sticky-regex@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be" - dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" - babel-types "^6.8.0" - -babel-plugin-transform-es2015-template-literals@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.18.0.tgz#0b14c48629c90ff47a0650077f6aa699bee35798" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-unicode-regex@^6.3.13: - version "6.11.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c" - dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" - regexpu-core "^2.0.0" - -<<<<<<< HEAD -======= -babel-plugin-transform-exponentiation-operator@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.8.0.tgz#db25742e9339eade676ca9acec46f955599a68a4" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.8.0" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-export-extensions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.8.0.tgz#fa80ff655b636549431bfd38f6b817bd82e47f5b" - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-flow-strip-types@^6.8.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.21.0.tgz#2eea3f8b5bb234339b47283feac155cfb237b948" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-object-rest-spread@^6.16.0: - version "6.20.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.20.2.tgz#e816c55bba77b14c16365d87e2ae48c8fd18fc2e" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.20.0" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -babel-plugin-transform-regenerator@^6.16.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.21.0.tgz#75d0c7e7f84f379358f508451c68a2c5fa5a9703" - dependencies: - regenerator-transform "0.9.8" - -babel-plugin-transform-strict-mode@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -<<<<<<< HEAD -babel-preset-es2015@^6.18.0: -======= -babel-plugin-undeclared-variables-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/babel-plugin-undeclared-variables-check/-/babel-plugin-undeclared-variables-check-1.0.2.tgz#5cf1aa539d813ff64e99641290af620965f65dee" - dependencies: - leven "^1.0.2" - -babel-plugin-undefined-to-void@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz#7f578ef8b78dfae6003385d8417a61eda06e2f81" - -babel-preset-es2015@^6.18.0, babel-preset-es2015@^6.9.0: ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.18.0.tgz#b8c70df84ec948c43dcf2bf770e988eb7da88312" - dependencies: - babel-plugin-check-es2015-constants "^6.3.13" - babel-plugin-transform-es2015-arrow-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoped-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoping "^6.18.0" - babel-plugin-transform-es2015-classes "^6.18.0" - babel-plugin-transform-es2015-computed-properties "^6.3.13" - babel-plugin-transform-es2015-destructuring "^6.18.0" - babel-plugin-transform-es2015-duplicate-keys "^6.6.0" - babel-plugin-transform-es2015-for-of "^6.18.0" - babel-plugin-transform-es2015-function-name "^6.9.0" - babel-plugin-transform-es2015-literals "^6.3.13" - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-plugin-transform-es2015-modules-systemjs "^6.18.0" - babel-plugin-transform-es2015-modules-umd "^6.18.0" - babel-plugin-transform-es2015-object-super "^6.3.13" - babel-plugin-transform-es2015-parameters "^6.18.0" - babel-plugin-transform-es2015-shorthand-properties "^6.18.0" - babel-plugin-transform-es2015-spread "^6.3.13" - babel-plugin-transform-es2015-sticky-regex "^6.3.13" - babel-plugin-transform-es2015-template-literals "^6.6.0" - babel-plugin-transform-es2015-typeof-symbol "^6.18.0" - babel-plugin-transform-es2015-unicode-regex "^6.3.13" - babel-plugin-transform-regenerator "^6.16.0" - -babel-preset-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e" - dependencies: - babel-plugin-jest-hoist "^18.0.0" - -babel-preset-stage-1@^6.5.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.16.0.tgz#9d31fbbdae7b17c549fd3ac93e3cf6902695e479" - dependencies: - babel-plugin-transform-class-constructor-call "^6.3.13" - babel-plugin-transform-export-extensions "^6.3.13" - babel-preset-stage-2 "^6.16.0" - -babel-preset-stage-2@^6.16.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.18.0.tgz#9eb7bf9a8e91c68260d5ba7500493caaada4b5b5" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-plugin-transform-class-properties "^6.18.0" - babel-plugin-transform-decorators "^6.13.0" - babel-preset-stage-3 "^6.17.0" - -babel-preset-stage-3@^6.17.0: - version "6.17.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.17.0.tgz#b6638e46db6e91e3f889013d8ce143917c685e39" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.3.13" - babel-plugin-transform-async-generator-functions "^6.17.0" - babel-plugin-transform-async-to-generator "^6.16.0" - babel-plugin-transform-exponentiation-operator "^6.3.13" - babel-plugin-transform-object-rest-spread "^6.16.0" - -babel-register@^6.18.0, babel-register@^6.9.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68" - dependencies: - babel-core "^6.18.0" - babel-runtime "^6.11.6" - 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" - -<<<<<<< HEAD -babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0: -======= -babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1: ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - -babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" - dependencies: - babel-runtime "^6.9.0" - babel-traverse "^6.16.0" - babel-types "^6.16.0" - babylon "^6.11.0" - lodash "^4.2.0" - -babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.20.0, babel-traverse@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" - dependencies: - babel-code-frame "^6.20.0" - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - babylon "^6.11.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -<<<<<<< HEAD -babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0: -======= -babel-types@^6.13.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.20.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0: ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" - dependencies: - babel-runtime "^6.20.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babylon@^5.8.38: - version "5.8.38" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.38.tgz#ec9b120b11bf6ccd4173a18bf217e60b79859ffd" - -babylon@^6.11.0, babylon@^6.13.0, babylon@^6.8.1: - version "6.14.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" - dependencies: - tweetnacl "^0.14.3" - -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" - -bluebird@^2.9.33: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - -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" - -breakable@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/breakable/-/breakable-1.0.0.tgz#784a797915a38ead27bad456b5572cb4bbaa78c1" - -brorand@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.0.6.tgz#4028706b915f91f7b349a2e0bf3c376039d216e5" - -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" - dependencies: - buffer-xor "^1.0.2" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - inherits "^2.0.1" - -browserify-cipher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.0.tgz#10773910c3c206d5420a46aad8694f820b85968f" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -bser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" - dependencies: - node-int64 "^0.4.0" - -buffer-shims@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - -buffer-xor@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -builtin-status-codes@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz#6f22003baacf003ccd287afe6872151fddc58579" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - -camelcase@^1.0.2, camelcase@^1.2.1: - 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" - -cardinal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" - dependencies: - ansicolors "~0.2.1" - redeyed "~1.0.0" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - dependencies: - ansi-styles "~1.0.0" - has-color "~0.1.0" - strip-ansi "~0.1.0" - -chokidar@^1.4.3: - 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" - -ci-info@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" - -cipher-base@^1.0.0, cipher-base@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" - dependencies: - inherits "^2.0.1" - -circular-json@^0.3.0: - 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-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" - -cli-usage@^0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" - dependencies: - marked "^0.3.6" - marked-terminal "^1.6.2" - -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -clone@^1.0.2: - 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" - -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - -colors@>=0.6.2, colors@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -commander@^2.5.0, 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" - -commoner@~0.10.3: - version "0.10.8" - resolved "https://registry.yarnpkg.com/commoner/-/commoner-0.10.8.tgz#34fc3672cd24393e8bb47e70caa0293811f4f2c5" - dependencies: - commander "^2.5.0" - detective "^4.3.1" - glob "^5.0.15" - graceful-fs "^4.1.2" - iconv-lite "^0.4.5" - mkdirp "^0.5.0" - private "^0.1.6" - q "^1.1.2" - recast "^0.11.17" - -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, concat-stream@^1.4.7: - version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" - dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -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" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -content-type-parser@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" - -convert-source-map@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - -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" - -create-ecdh@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - ripemd160 "^1.0.0" - sha.js "^2.3.6" - -create-hmac@^1.1.0, create-hmac@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170" - dependencies: - create-hash "^1.1.0" - inherits "^2.0.1" - -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" - -crypto-browserify@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - -cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" - -"cssstyle@>= 0.2.36 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" - dependencies: - cssom "0.3.x" - -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" - dependencies: - es5-ext "~0.10.2" - -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" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@^2.1.1, debug@^2.2.0: - version "2.4.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.4.4.tgz#c04d17a654e9202464803f096153f70a6f31f4be" - dependencies: - ms "0.7.2" - -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" - -decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-extend@~0.4.0: - version "0.4.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" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - -defs@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/defs/-/defs-1.1.1.tgz#b22609f2c7a11ba7a3db116805c139b1caffa9d2" - dependencies: - alter "~0.2.0" - ast-traverse "~0.1.1" - breakable "~1.0.0" - esprima-fb "~15001.1001.0-dev-harmony-fb" - simple-fmt "~0.1.0" - simple-is "~0.2.0" - stringmap "~0.2.2" - stringset "~0.2.1" - tryor "~0.1.2" - yargs "~3.27.0" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -detect-indent@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-3.0.1.tgz#9dc5e5ddbceef8325764b9451b02bc6d54084f75" - dependencies: - get-stdin "^4.0.1" - minimist "^1.1.0" - repeating "^1.1.0" - -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" - -detective@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.3.2.tgz#77697e2e7947ac3fe7c8e26a6d6f115235afa91c" - dependencies: - acorn "^3.1.0" - defined "^1.0.0" - -diff@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.1.0.tgz#9406c73a401e6c2b3ba901c5e2c44eb6a60c5385" - -diffie-hellman@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - -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" - -elliptic@^6.0.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.2.tgz#e4c81e0829cf0a65ab70e998b8232723b5c1bc48" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - inherits "^2.0.1" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -enhanced-resolve@^3.0.0, enhanced-resolve@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.0.2.tgz#0fa709f29e59ee23e6bbcb070c85f992d6247cd1" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.5" - -"errno@>=0.1.1 <0.2.0-0", errno@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - -error-ex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" - dependencies: - is-arrayish "^0.2.1" - -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" - dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" - -es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" - -es6-promise@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" - -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" - -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - -es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" - dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escodegen@^1.6.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint@^3.12.2: - version "3.12.2" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.12.2.tgz#6be5a9aa29658252abd7f91e9132bab1f26f3c34" - dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.4.6" - debug "^2.1.1" - doctrine "^1.2.2" - escope "^3.6.0" - espree "^3.3.1" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~1.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" - dependencies: - acorn "^4.0.1" - acorn-jsx "^3.0.0" - -esprima-fb@~15001.1001.0-dev-harmony-fb: - version "15001.1001.0-dev-harmony-fb" - resolved "https://registry.yarnpkg.com/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz#43beb57ec26e8cf237d3dd8b33e42533577f2659" - -esprima@^2.6.0, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -esprima@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" - -esprima@~3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.2.tgz#954b5d19321ca436092fa90f06d6798531fe8184" - -esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" - dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" - -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - -estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" - -esutils@^2.0.0, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" - dependencies: - d "~0.1.1" - es5-ext "~0.10.7" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -evp_bytestokey@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" - dependencies: - create-hash "^1.1.1" - -exec-sh@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" - dependencies: - merge "^1.1.3" - -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend@^3.0.0, extend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" - -external-editor@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-1.1.1.tgz#12d7b0db850f7ff7e7081baf4005700060c4600b" - dependencies: - extend "^3.0.0" - spawn-sync "^1.0.15" - tmp "^0.0.29" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" - -fast-levenshtein@~2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" - -fb-watchman@^1.8.0, fb-watchman@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.0.tgz#6f268f1f347a6b3c875d1e89da7e1ed79adfc0ec" - dependencies: - bser "^1.0.2" - -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" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -filename-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" - -fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" - dependencies: - glob "5.x" - minimatch "2.x" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -find-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" - -fit-commit-js@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/fit-commit-js/-/fit-commit-js-0.3.1.tgz#55c08fa17100b5b8fd347c373459f4a1754e4caf" - dependencies: - debug "^2.2.0" - git-rev-sync "^1.4.0" - is-my-json-valid "^2.13.1" - js-yaml "^3.4.6" - npmlog "^4.0.0" - ramda "^0.22.1" - -flat-cache@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.1.tgz#6c837d6225a7de5659323740b36d5361f71691ff" - dependencies: - circular-json "^0.3.0" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -flow-parser@^0.*: - version "0.37.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.37.0.tgz#1065c612a30f037ac3ee60053f6e797a6d9be8d6" - dependencies: - ast-types "0.8.18" - colors ">=0.6.2" - minimist ">=0.2.0" - -for-in@^0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" - -for-own@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" - dependencies: - for-in "^0.1.5" - -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@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz#315b4fb8c1ca5b8c47defef319d073dad3568059" - -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.0.15" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" - 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.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -gauge@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" - 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" - supports-color "^0.2.0" - wide-align "^1.1.0" - -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - -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" - -git-rev-sync@^1.4.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/git-rev-sync/-/git-rev-sync-1.8.0.tgz#15c5708b905877af1d75dd9f147106f715415066" - dependencies: - graceful-fs "4.1.6" - shelljs "0.7.4" - -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@5.x, glob@^5.0.15: - 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@^6.4.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/globals/-/globals-6.4.1.tgz#8498032b3b6d1cc81eebc5f79690d8fe29fabf4f" - -globals@^9.0.0, globals@^9.14.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -graceful-fs@4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.6.tgz#514c38772b31bee2e08bedc21a0aeb3abf54c19e" - -graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growly@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - -handlebars@^4.0.3: - 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-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" - -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-color@~0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -hash.js@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" - dependencies: - inherits "^2.0.1" - -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@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-1.0.0.tgz#4b9f1e40800c3e50c6c27f781676afcce71f3985" - dependencies: - os-tmpdir "^1.0.1" - user-home "^1.1.1" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" - -html-encoding-sniffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" - dependencies: - whatwg-encoding "^1.0.1" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -iconv-lite@0.4.13: - version "0.4.13" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" - -iconv-lite@^0.4.13, iconv-lite@^0.4.5: - version "0.4.15" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -ignore@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -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.0, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -inquirer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-2.0.0.tgz#e1351687b90d150ca403ceaa3cefb1e3065bef4b" - dependencies: - ansi-escapes "^1.1.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - external-editor "^1.1.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.6" - pinkie-promise "^2.0.0" - run-async "^2.2.0" - rx "^4.1.0" - string-width "^2.0.0" - strip-ansi "^3.0.0" - through "^2.3.6" - -interpret@^1.0.0, interpret@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" - -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" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.0.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-ci@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" - dependencies: - ci-info "^1.0.0" - -is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-integer@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-integer/-/is-integer-1.0.6.tgz#5273819fada880d123e1ac00a938e7172dd8d95e" - dependencies: - is-finite "^1.0.0" - -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4, is-my-json-valid@^2.13.1: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" - 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-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul-api@^1.0.0-aplha.10: - version "1.0.0-aplha.10" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.0.0-aplha.10.tgz#902edf5cf5404e0eba7e00ef46408488a0d3e337" - dependencies: - async "1.x" - clone "^1.0.2" - fileset "0.2.x" - istanbul-lib-coverage "^1.0.0-alpha" - istanbul-lib-hook "^1.0.0-alpha" - istanbul-lib-instrument "^1.0.0-alpha" - istanbul-lib-report "^1.0.0-alpha" - istanbul-lib-source-maps "^1.0.0-alpha" - istanbul-reports "^1.0.0-alpha" - js-yaml "3.x" - mkdirp "0.5.x" - once "1.x" - -istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2" - -istanbul-lib-hook@^1.0.0-alpha: - version "1.0.0-alpha.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz#8c5bb9f6fbd8526e0ae6cf639af28266906b938f" - dependencies: - append-transform "^0.3.0" - -istanbul-lib-instrument@^1.0.0-alpha, istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58" - 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.0.0" - semver "^5.3.0" - -istanbul-lib-report@^1.0.0-alpha: - version "1.0.0-alpha.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af" - dependencies: - async "^1.4.2" - istanbul-lib-coverage "^1.0.0-alpha" - mkdirp "^0.5.1" - path-parse "^1.0.5" - rimraf "^2.4.3" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.0.0-alpha: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f" - dependencies: - istanbul-lib-coverage "^1.0.0-alpha.0" - mkdirp "^0.5.1" - rimraf "^2.4.4" - source-map "^0.5.3" - -istanbul-reports@^1.0.0-alpha: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777" - dependencies: - handlebars "^4.0.3" - -jest-changed-files@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" - -jest-cli@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.0.0.tgz#11d141f5e9158d4f02c5c303815b5280f6887c55" - dependencies: - ansi-escapes "^1.4.0" - callsites "^2.0.0" - chalk "^1.1.1" - graceful-fs "^4.1.6" - is-ci "^1.0.9" - istanbul-api "^1.0.0-aplha.10" - istanbul-lib-coverage "^1.0.0" - istanbul-lib-instrument "^1.1.1" - jest-changed-files "^17.0.2" - jest-config "^18.0.0" - jest-environment-jsdom "^18.0.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" - jest-jasmine2 "^18.0.0" - jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-resolve-dependencies "^18.0.0" - jest-runtime "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" - json-stable-stringify "^1.0.0" - node-notifier "^4.6.1" - sane "~1.4.1" - strip-ansi "^3.0.1" - throat "^3.0.0" - which "^1.1.1" - worker-farm "^1.3.1" - yargs "^6.3.0" - -jest-config@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.0.0.tgz#21473ab68fef2fa79760d05419859b3c320e55e9" - dependencies: - chalk "^1.1.1" - jest-environment-jsdom "^18.0.0" - jest-environment-node "^18.0.0" - jest-jasmine2 "^18.0.0" - jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-util "^18.0.0" - json-stable-stringify "^1.0.0" - -jest-diff@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.0.0.tgz#f24b6f8bedaae425548511ab45edbfb9fee930b7" - dependencies: - chalk "^1.1.3" - diff "^3.0.0" - jest-matcher-utils "^18.0.0" - pretty-format "^18.0.0" - -jest-environment-jsdom@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.0.0.tgz#7341266285abce09f13f60e9b49de899802b76c5" - dependencies: - jest-mock "^18.0.0" - jest-util "^18.0.0" - jsdom "^9.8.1" - -jest-environment-node@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.0.0.tgz#6f4947b324d6b4e17df20b1998f532c161a2821d" - dependencies: - jest-mock "^18.0.0" - jest-util "^18.0.0" - -jest-file-exists@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" - -jest-haste-map@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.0.0.tgz#707d3b5ae3bcbda971c39e8b911d20ad8502c748" - dependencies: - fb-watchman "^1.9.0" - graceful-fs "^4.1.6" - multimatch "^2.1.0" - sane "~1.4.1" - worker-farm "^1.3.1" - -jest-jasmine2@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.0.0.tgz#05a35ee8cf61dd6d6d04826aa0e5915a2167a877" - dependencies: - graceful-fs "^4.1.6" - jest-matcher-utils "^18.0.0" - jest-matchers "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" - -jest-matcher-utils@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.0.0.tgz#74ad046aeb9414094fc6cd0d313847e4311f8538" - dependencies: - chalk "^1.1.3" - pretty-format "^18.0.0" - -jest-matchers@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.0.0.tgz#d081e2dfd556a0c9f11c7fdc26dc1702fad50189" - dependencies: - jest-diff "^18.0.0" - jest-matcher-utils "^18.0.0" - jest-util "^18.0.0" - -jest-mock@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" - -jest-resolve-dependencies@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.0.0.tgz#a2980a634ae2554d8ed5922686883a2988979b70" - dependencies: - jest-file-exists "^17.0.0" - jest-resolve "^18.0.0" - -jest-resolve@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.0.0.tgz#a47b0b939d8c53fc79e907db0a5110384432f3c8" - dependencies: - browser-resolve "^1.11.2" - jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" - resolve "^1.1.6" - -jest-runtime@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.0.0.tgz#fff982dffe061b89bbea5c3b6f4d3fbf7b3cf56e" - dependencies: - babel-core "^6.0.0" - babel-jest "^18.0.0" - babel-plugin-istanbul "^3.0.0" - chalk "^1.1.3" - graceful-fs "^4.1.6" - jest-config "^18.0.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" - jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" - json-stable-stringify "^1.0.0" - multimatch "^2.1.0" - yargs "^6.3.0" - -jest-snapshot@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.0.0.tgz#3602c6b13cbf5788fd101bf0d73fc76104b88486" - dependencies: - jest-diff "^18.0.0" - jest-file-exists "^17.0.0" - jest-matcher-utils "^18.0.0" - jest-util "^18.0.0" - natural-compare "^1.4.0" - pretty-format "^18.0.0" - -jest-util@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.0.0.tgz#4ef7c397ad7e1ac8f9c63a482c12a31df5e376a7" - dependencies: - chalk "^1.1.1" - diff "^3.0.0" - graceful-fs "^4.1.6" - jest-file-exists "^17.0.0" - jest-mock "^18.0.0" - mkdirp "^0.5.1" - -jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-18.0.0.tgz#ef12f70befe0fcb30f1c61c0ae58748706267d4b" - dependencies: - jest-cli "^18.0.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-tokens@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-1.0.1.tgz#cc435a5c8b94ad15acb7983140fc80182c89aeae" - -js-tokens@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" - -js-yaml@3.x, js-yaml@^3.4.6, js-yaml@^3.5.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" - -jscodeshift@^0.3.30: - version "0.3.30" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.3.30.tgz#73f459d8fc3b3a80841991aeb7d24809cef6dfc5" - dependencies: - async "^1.5.0" - babel-core "^5" - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-preset-es2015 "^6.9.0" - babel-preset-stage-1 "^6.5.0" - babel-register "^6.9.0" - babylon "^6.8.1" - colors "^1.1.2" - es6-promise "^3.0.0" - flow-parser "^0.*" - lodash "^4.13.1" - micromatch "^2.3.7" - node-dir "0.1.8" - nomnom "^1.8.1" - recast "^0.11.11" - temp "^0.8.1" - write-file-atomic "^1.2.0" - -jsdom@^9.8.1: - version "9.8.3" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.8.3.tgz#fde29c109c32a1131e0b6c65914e64198f97c370" - dependencies: - abab "^1.0.0" - acorn "^2.4.0" - acorn-globals "^1.0.4" - array-equal "^1.0.0" - content-type-parser "^1.0.1" - cssom ">= 0.3.0 < 0.4.0" - cssstyle ">= 0.2.36 < 0.3.0" - escodegen "^1.6.1" - html-encoding-sniffer "^1.0.1" - iconv-lite "^0.4.13" - nwmatcher ">= 1.3.7 < 2.0.0" - parse5 "^1.5.1" - request "^2.55.0" - sax "^1.1.4" - symbol-tree ">= 3.1.0 < 4.0.0" - tough-cookie "^2.3.1" - webidl-conversions "^3.0.1" - whatwg-encoding "^1.0.1" - whatwg-url "^3.0.0" - xml-name-validator ">= 2.0.1 < 3.0.0" - -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-loader@^0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" - -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.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.4.0.tgz#054352e4c4c80c86c0923877d449de176a732c8d" - -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.0" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" - -jsprim@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" - dependencies: - 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" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -leven@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/leven/-/leven-1.0.2.tgz#9144b6eebca5f1d0680169f1a6770dcea60b75c3" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -loader-runner@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.2.0.tgz#824c1b699c4e7a2b6501b85902d5b862bf45b3fa" - -loader-utils@^0.2.16: - version "0.2.16" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" - 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._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._basefor@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" - -lodash._bindcallback@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.clonedeep@^3.0.0: - 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.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.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@^3.10.0, lodash@^3.9.3: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: - version "4.17.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" - -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.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" - dependencies: - js-tokens "^2.0.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - dependencies: - tmpl "1.0.x" - -marked-terminal@^1.6.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" - dependencies: - cardinal "^1.0.0" - chalk "^1.1.3" - cli-table "^0.3.1" - lodash.assign "^4.2.0" - node-emoji "^1.4.1" - -marked@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - -memory-fs@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - -micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: - 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" - -miller-rabin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@~1.25.0: - version "1.25.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" - -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.13" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" - dependencies: - mime-db "~1.25.0" - -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - -"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" - -minimatch@2.x, minimatch@^2.0.3: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - 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@>=0.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -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" - -multimatch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" - dependencies: - array-differ "^1.0.0" - array-union "^1.0.1" - arrify "^1.0.0" - minimatch "^3.0.0" - -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - -mute-stream@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" - -nan@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -node-dir@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.8.tgz#55fb8deb699070707fb67f91a460f0448294c77d" - -node-emoji@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.4.3.tgz#5272f70b823c4df6d7c39f84fd8203f35b3e5d36" - dependencies: - string.prototype.codepointat "^0.2.0" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - -node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-notifier@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" - dependencies: - cli-usage "^0.1.1" - growly "^1.2.0" - lodash.clonedeep "^3.0.0" - minimist "^1.1.1" - semver "^5.1.0" - shellwords "^0.1.0" - which "^1.0.5" - -node-pre-gyp@^0.6.29: - version "0.6.32" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" - dependencies: - mkdirp "~0.5.1" - nopt "~3.0.6" - npmlog "^4.0.1" - rc "~1.1.6" - request "^2.79.0" - rimraf "~2.5.4" - semver "~5.3.0" - tar "~2.2.1" - tar-pack "~3.3.0" - -nomnom@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" - dependencies: - chalk "~0.4.0" - underscore "~1.6.0" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2: - version "2.3.5" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" - 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" - -npmlog@^4.0.0, npmlog@^4.0.1: - 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" - -"nwmatcher@>= 1.3.7 < 2.0.0": - version "1.3.9" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" - -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.x, once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -once@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.8.1, optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - -os-shim@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -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" - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -parse-asn1@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.0.0.tgz#35060f6d5015d37628c770f4e091a0b5a278bc23" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-exists@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-1.0.0.tgz#d5a8998eb71ef37a74c34eb0d9eba6e878eea081" - -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-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.9" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" - dependencies: - create-hmac "^1.1.2" - -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" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -pretty-format@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.0.0.tgz#5f45c59fe2ed6749d46765429679670b08b21137" - dependencies: - ansi-styles "^2.2.1" - -private@^0.1.6, private@~0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" - -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" - -process@^0.11.0: - version "0.11.9" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - -public-encrypt@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -q@^1.1.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -ramda@^0.22.1: - version "0.22.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.22.1.tgz#031da0c3df417c5b33c96234757eb37033f36a0e" - -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" - -randombytes@^2.0.0, randombytes@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" - -rc@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~1.0.4" - -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.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" - 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@~2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - dependencies: - 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@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - 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" - -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" - -recast@0.10.33: - version "0.10.33" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.10.33.tgz#942808f7aa016f1fa7142c461d7e5704aaa8d697" - dependencies: - ast-types "0.8.12" - esprima-fb "~15001.1001.0-dev-harmony-fb" - private "~0.1.5" - source-map "~0.5.0" - -recast@^0.10.10: - version "0.10.43" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.10.43.tgz#b95d50f6d60761a5f6252e15d80678168491ce7f" - dependencies: - ast-types "0.8.15" - esprima-fb "~15001.1001.0-dev-harmony-fb" - private "~0.1.5" - source-map "~0.5.0" - -recast@^0.11.11, recast@^0.11.17: - version "0.11.18" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.18.tgz#07af6257ca769868815209401d4d60eef1b5b947" - dependencies: - ast-types "0.9.2" - esprima "~3.1.0" - private "~0.1.5" - source-map "~0.5.0" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -redeyed@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" - dependencies: - esprima "~3.0.0" - -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.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" - -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" - -<<<<<<< HEAD -======= -regenerator@0.8.40: - version "0.8.40" - resolved "https://registry.yarnpkg.com/regenerator/-/regenerator-0.8.40.tgz#a0e457c58ebdbae575c9f8cd75127e93756435d8" - dependencies: - commoner "~0.10.3" - defs "~1.1.0" - esprima-fb "~15001.1001.0-dev-harmony-fb" - private "~0.1.5" - recast "0.10.33" - through "~2.3.8" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" - dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -<<<<<<< HEAD -======= -regexpu@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexpu/-/regexpu-1.3.0.tgz#e534dc991a9e5846050c98de6d7dd4a55c9ea16d" - dependencies: - esprima "^2.6.0" - recast "^0.10.10" - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - ->>>>>>> Feat[wip] - Adds codemod for loader to rules migration -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@^1.1.0, repeating@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-1.1.3.tgz#3d4114218877537494f97f77f9785fab810fa4ac" - dependencies: - is-finite "^1.0.0" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -request@^2.55.0, request@^2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~2.0.6" - 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" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -resolve@^1.1.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" - -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.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" - dependencies: - glob "^7.0.5" - -rimraf@~2.2.6: - version "2.2.8" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" - -ripemd160@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" - -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" - -rx@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" - -sane@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" - dependencies: - exec-sh "^0.2.0" - fb-watchman "^1.8.0" - minimatch "^3.0.2" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.10.0" - -sax@^1.1.4: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -sha.js@^2.3.6: - version "2.4.8" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" - dependencies: - inherits "^2.0.1" - -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.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.4.tgz#b8f04b3a74ddfafea22acf98e0be45ded53d59c8" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shelljs@^0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -simple-fmt@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/simple-fmt/-/simple-fmt-0.1.0.tgz#191bf566a59e6530482cb25ab53b4a8dc85c3a6b" - -simple-is@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/simple-is/-/simple-is-0.2.0.tgz#2abb75aade39deb5cc815ce10e6191164850baf0" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -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" - dependencies: - hoek "2.x.x" - -source-list-map@~0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.7.tgz#d4b5ce2a46535c72c7e8527c71a77d250618172e" - -source-map-support@^0.2.10: - version "0.2.10" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.2.10.tgz#ea5a3900a1c1cb25096a0ae8cc5c2b4b10ded3dc" - dependencies: - source-map "0.1.32" - -source-map-support@^0.4.2: - version "0.4.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" - dependencies: - source-map "^0.5.3" - -source-map@0.1.32: - version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - -spawn-sync@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" - dependencies: - concat-stream "^1.4.7" - os-shim "^0.1.2" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" - 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" - -stable@~0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.5.tgz#08232f60c732e9890784b5bed0734f8b32a887b9" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.5.0.tgz#585eee513217ed98fe199817e7313b6f772a6802" - dependencies: - builtin-status-codes "^2.0.0" - inherits "^2.0.1" - readable-stream "^2.1.0" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" - -string.prototype.codepointat@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" - -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -stringmap@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/stringmap/-/stringmap-0.2.2.tgz#556c137b258f942b8776f5b2ef582aa069d7d1b1" - -stringset@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/stringset/-/stringset-0.2.1.tgz#ef259c4e349344377fcd1c913dd2e848c9c042b5" - -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-ansi@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" - -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-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" - -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.0, 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" - -"symbol-tree@>= 3.1.0 < 4.0.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.0.tgz#2183fcd165fc30048b3421aad29ada7a339ea566" - -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -tapable@^0.2.5, tapable@~0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.5.tgz#1ff6ce7ade58e734ca9bfe36ba342304b377a4d0" - -tar-pack@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" - 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" - -temp@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" - dependencies: - os-tmpdir "^1.0.0" - rimraf "~2.2.6" - -test-exclude@^3.2.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-3.3.0.tgz#7a17ca1239988c98367b0621456dbb7d4bc38977" - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - -throat@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" - -through@^2.3.6, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -timers-browserify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" - dependencies: - setimmediate "^1.0.4" - -tmp@^0.0.29: - version "0.0.29" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" - dependencies: - os-tmpdir "~1.0.1" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -to-fast-properties@^1.0.0, 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" - -tough-cookie@^2.3.1, tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - -trim-right@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -try-resolve@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/try-resolve/-/try-resolve-1.0.1.tgz#cfde6fabd72d63e5797cfaab873abbe8e700e912" - -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" - -tryor@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/tryor/-/tryor-0.1.2.tgz#8145e4ca7caff40acde3ccf946e8b8bb75b4172b" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - -typedarray@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -uglify-js@^2.6, uglify-js@~2.7.3: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" - dependencies: - async "~0.2.6" - 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" - -underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -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" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" - dependencies: - extsprintf "1.0.2" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - dependencies: - makeerror "1.0.x" - -watch@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" - -watchpack@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.1.0.tgz#42d44627464a2fadffc9308c0f7562cfde795f24" - dependencies: - async "2.0.0-rc.4" - chokidar "^1.4.3" - graceful-fs "^4.1.2" - -webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - -webpack-sources@^0.1.0: - version "0.1.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.3.tgz#15ce2fb79d0a1da727444ba7c757bf164294f310" - dependencies: - source-list-map "~0.1.0" - source-map "~0.5.3" - -webpack@^2.2.0-rc.0: - version "2.2.0-rc.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.2.0-rc.0.tgz#a58dbdc2a06d382093bc43866a43afae768356c9" - dependencies: - acorn "^4.0.3" - acorn-dynamic-import "^2.0.0" - ajv "^4.7.0" - ajv-keywords "^1.1.1" - async "^2.1.2" - enhanced-resolve "^3.0.0" - interpret "^1.0.0" - json-loader "^0.5.4" - loader-runner "^2.2.0" - loader-utils "^0.2.16" - memory-fs "~0.3.0" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - object-assign "^4.0.1" - source-map "^0.5.3" - supports-color "^3.1.0" - tapable "~0.2.5" - uglify-js "~2.7.3" - watchpack "^1.0.0" - webpack-sources "^0.1.0" - yargs "^6.0.0" - -whatwg-encoding@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" - dependencies: - iconv-lite "0.4.13" - -whatwg-url@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-3.1.0.tgz#7bdcae490f921aef6451fb6739ec6bbd8e907bf6" - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - -which@^1.0.5, which@^1.1.1: - version "1.2.12" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" - dependencies: - isexe "^1.1.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" - -window-size@^0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - -wordwrap@0.0.2, wordwrap@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -worker-farm@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" - dependencies: - errno ">=0.1.1 <0.2.0-0" - xtend ">=4.0.0 <4.1.0-0" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -write-file-atomic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.2.0.tgz#14c66d4e4cb3ca0565c28cf3b7a6f3e4d5938fab" - dependencies: - graceful-fs "^4.1.2" - 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" - dependencies: - mkdirp "^0.5.1" - -"xml-name-validator@>= 2.0.1 < 3.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" - -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -y18n@^3.2.0, y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -yargs-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.0.tgz#6ced869cd05a3dca6a1eaee38b68aeed4b0b4101" - dependencies: - camelcase "^3.0.0" - -yargs@^6.0.0, yargs@^6.3.0, yargs@^6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.5.0.tgz#a902e23a1f0fe912b2a03f6131b7ed740c9718ff" - 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" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -yargs@~3.27.0: - version "3.27.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.27.0.tgz#21205469316e939131d59f2da0c6d7f98221ea40" - dependencies: - camelcase "^1.2.1" - cliui "^2.1.0" - decamelize "^1.0.0" - os-locale "^1.4.0" - window-size "^0.1.2" - y18n "^3.2.0" From 21ebcbe03ee60dcd6b4be3e42dedc7adc9b8ff90 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:42:33 +0200 Subject: [PATCH 08/24] Use yarn if available (#189) --- .../devServer/devServer.test.js | 2 +- lib/creator/yeoman/webpack-generator.js | 21 +++-- lib/utils/package-manager.js | 61 +++++++++++++ lib/utils/package-manager.spec.js | 90 +++++++++++++++++++ lib/utils/resolve-packages.js | 30 ++----- 5 files changed, 170 insertions(+), 34 deletions(-) create mode 100644 lib/utils/package-manager.js create mode 100644 lib/utils/package-manager.spec.js diff --git a/lib/creator/transformations/devServer/devServer.test.js b/lib/creator/transformations/devServer/devServer.test.js index 4eb14cf79e9..14b3b7d11de 100644 --- a/lib/creator/transformations/devServer/devServer.test.js +++ b/lib/creator/transformations/devServer/devServer.test.js @@ -2,7 +2,7 @@ const defineTest = require("../../../transformations/defineTest"); -defineTest(__dirname, "devServer", "devServer-0",{ +defineTest(__dirname, "devServer", "devServer-0", { contentBase: "path.join(__dirname, 'dist')", compress: true, port: 9000 diff --git a/lib/creator/yeoman/webpack-generator.js b/lib/creator/yeoman/webpack-generator.js index f959dcc9ad6..0c3ffc1ddcf 100644 --- a/lib/creator/yeoman/webpack-generator.js +++ b/lib/creator/yeoman/webpack-generator.js @@ -10,6 +10,9 @@ const Input = require("webpack-addons").Input; const Confirm = require("webpack-addons").Confirm; const RawList = require("webpack-addons").RawList; +const getPackageManager = require("../../utils/package-manager") + .getPackageManager; + const entryQuestions = require("./utils/entry"); const getBabelPlugin = require("./utils/module"); const getDefaultPlugins = require("./utils/plugins"); @@ -19,7 +22,7 @@ module.exports = class WebpackGenerator extends Generator { constructor(args, opts) { super(args, opts); this.isProd = false; - this.npmInstalls = ["webpack", "uglifyjs-webpack-plugin"]; + this.dependencies = ["webpack", "uglifyjs-webpack-plugin"]; this.configuration = { config: { webpackOptions: {}, @@ -109,7 +112,7 @@ module.exports = class WebpackGenerator extends Generator { this.configuration.config.webpackOptions.module.rules.push( getBabelPlugin() ); - this.npmInstalls.push( + this.dependencies.push( "babel-loader", "babel-core", "babel-preset-es2015" @@ -130,7 +133,7 @@ module.exports = class WebpackGenerator extends Generator { } switch (stylingAnswer["stylingType"]) { case "SASS": - this.npmInstalls.push( + this.dependencies.push( "sass-loader", "node-sass", "style-loader", @@ -166,7 +169,7 @@ module.exports = class WebpackGenerator extends Generator { break; case "LESS": regExpForStyles = new RegExp(/\.(less|css)$/); - this.npmInstalls.push( + this.dependencies.push( "less-loader", "less", "style-loader", @@ -210,7 +213,7 @@ module.exports = class WebpackGenerator extends Generator { "const precss = require('precss');", "\n" ); - this.npmInstalls.push( + this.dependencies.push( "style-loader", "css-loader", "postcss-loader", @@ -267,7 +270,7 @@ module.exports = class WebpackGenerator extends Generator { } break; case "CSS": - this.npmInstalls.push( + this.dependencies.push( "style-loader", "css-loader" ); @@ -312,7 +315,7 @@ module.exports = class WebpackGenerator extends Generator { this.configuration.config.topScope.push( tooltip.cssPlugin() ); - this.npmInstalls.push( + this.dependencies.push( "extract-text-webpack-plugin" ); if ( @@ -390,7 +393,9 @@ module.exports = class WebpackGenerator extends Generator { }) .then(() => { asyncNamePrompt(); - this.npmInstall(this.npmInstalls, { "save-dev": true }); + this.runInstall(getPackageManager(), this.dependencies, { + "save-dev": true + }); }); } }; diff --git a/lib/utils/package-manager.js b/lib/utils/package-manager.js new file mode 100644 index 00000000000..57e335dfb8b --- /dev/null +++ b/lib/utils/package-manager.js @@ -0,0 +1,61 @@ +"use strict"; + +const path = require("path"); +const fs = require("fs"); +const spawn = require("cross-spawn"); +const globalPath = require("global-modules"); + +const SPAWN_FUNCTIONS = { + npm: spawnNPM, + yarn: spawnYarn +}; + +function spawnNPM(pkg, isNew) { + return spawn.sync("npm", [isNew ? "install" : "update", "-g", pkg], { + stdio: "inherit" + }); +} + +function spawnYarn(pkg, isNew) { + return spawn.sync("yarn", ["global", isNew ? "add" : "upgrade", pkg], { + stdio: "inherit" + }); +} +/* +* @function spawnChild +* +* Spawns a new process that installs the addon/dependency +* +* @param { String } pkg - The dependency to be installed +* @returns { } spawn - Installs the package +*/ + +function spawnChild(pkg) { + const pkgPath = path.resolve(globalPath, pkg); + const packageManager = getPackageManager(); + const isNew = !fs.existsSync(pkgPath); + + return SPAWN_FUNCTIONS[packageManager](pkg, isNew); +} + +/* +* @function getPackageManager +* +* Returns the name of package manager to use, +* preferring yarn over npm if available +* +* @returns { String } - The package manager name +*/ + +function getPackageManager() { + if (spawn.sync("yarn", [" --version"], { stdio: "ignore" }).error) { + return "npm"; + } + + return "yarn"; +} + +module.exports = { + getPackageManager, + spawnChild +}; diff --git a/lib/utils/package-manager.spec.js b/lib/utils/package-manager.spec.js new file mode 100644 index 00000000000..e45b920fb4a --- /dev/null +++ b/lib/utils/package-manager.spec.js @@ -0,0 +1,90 @@ +"use strict"; + +jest.mock("cross-spawn"); +jest.mock("fs"); + +describe("package-manager", () => { + const packageManager = require("./package-manager"); + const spawn = require("cross-spawn"); + const fs = require("fs"); + + const defaultSyncResult = { + pid: 1234, + output: [null, null, null], + stdout: null, + stderr: null, + signal: null, + status: 1, + error: null + }; + + function mockSpawnErrorOnce() { + spawn.sync.mockReturnValueOnce( + Object.assign({}, defaultSyncResult, { + status: null, + error: new Error() + }) + ); + } + + spawn.sync.mockReturnValue(defaultSyncResult); + + it("should return 'yarn' from getPackageManager if it's installed", () => { + expect(packageManager.getPackageManager()).toEqual("yarn"); + }); + + it("should return 'npm' from getPackageManager if yarn is not installed", () => { + mockSpawnErrorOnce(); + expect(packageManager.getPackageManager()).toEqual("npm"); + }); + + it("should spawn yarn add from spawnChild", () => { + const packageName = "some-pkg"; + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "yarn", + ["global", "add", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn yarn upgrade from spawnChild", () => { + const packageName = "some-pkg"; + + fs.existsSync.mockReturnValueOnce(true); + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "yarn", + ["global", "upgrade", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn npm install from spawnChild", () => { + const packageName = "some-pkg"; + + mockSpawnErrorOnce(); + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "npm", + ["install", "-g", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn npm update from spawnChild", () => { + const packageName = "some-pkg"; + + mockSpawnErrorOnce(); + fs.existsSync.mockReturnValueOnce(true); + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "npm", + ["update", "-g", packageName], + { stdio: "inherit" } + ); + }); +}); diff --git a/lib/utils/resolve-packages.js b/lib/utils/resolve-packages.js index 98f8457722d..00f88bf35ed 100644 --- a/lib/utils/resolve-packages.js +++ b/lib/utils/resolve-packages.js @@ -1,11 +1,13 @@ "use strict"; const path = require("path"); -const fs = require("fs"); const chalk = require("chalk"); -const spawn = require("cross-spawn"); -const creator = require("../creator/index").creator; const globalPath = require("global-modules"); + +const creator = require("../creator/index").creator; + +const spawnChild = require("./package-manager").spawnChild; + /* * @function processPromise * @@ -26,28 +28,6 @@ function processPromise(child) { }); } -/* -* @function spawnChild -* -* Spawns a new process that installs the addon/dependency -* -* @param { String } pkg - The dependency to be installed -* @returns { } spawn - Installs the package -*/ - -function spawnChild(pkg) { - const pkgPath = path.resolve(globalPath, pkg); - let installType; - if (fs.existsSync(pkgPath)) { - installType = "update"; - } else { - installType = "install"; - } - return spawn.sync("npm", [installType, "-g", pkg], { - stdio: "inherit" - }); -} - /* * @function resolvePackages * From c7691e3d88e6a2e66cd1eb1bc8581f1f0193f711 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:50:23 +0200 Subject: [PATCH 09/24] bump version to 1.3.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d6462ba0ee..15d113f66b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.3", + "version": "1.3.4", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From 5470ef25fe8e859a18d45f86de77d9d873a7f24d Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:52:58 +0200 Subject: [PATCH 10/24] update package.json --- package-lock.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d417136ca1..00429db062a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2434,6 +2434,11 @@ } } }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + }, "esprima-fb": { "version": "15001.1001.0-dev-harmony-fb", "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", @@ -6794,13 +6799,6 @@ "esprima": "3.1.3", "private": "0.1.7", "source-map": "0.5.7" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - } } }, "rechoir": { From 7a099c799af1525f46f065972b310c1d3b64d4b1 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Thu, 5 Oct 2017 23:54:01 +0200 Subject: [PATCH 11/24] 1.3.5 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 00429db062a..741c053b336 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.4", + "version": "1.3.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 15d113f66b8..a01914cd9b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.4", + "version": "1.3.5", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From f24f06b3dbf34f3dc4a2d1a6707b09dfb477f59d Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:04:32 +0200 Subject: [PATCH 12/24] prepublish -> postinstall --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a01914cd9b1..1ccd37f362c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "format": "prettier-eslint \"bin/**/**/*.js\" --write && prettier-eslint \"lib/**/**/*.js\" --write && prettier-eslint \"test/**/**/*.js\" --write", "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", - "prepublish": "flow-remove-types lib/ -d dist/", + "postinstall": "flow-remove-types lib/ -d dist/", "pretest": "npm run lint", "test": "jest --coverage" }, From 710e6cf8f0f9166616ae5bad3ab7b22c9df9487e Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:04:43 +0200 Subject: [PATCH 13/24] 1.3.6 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 741c053b336..74fe8ea4dbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.5", + "version": "1.3.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1ccd37f362c..bb90b2d574d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.5", + "version": "1.3.6", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From 40ec7caeaa0825a68a35eb9da8d6862600747832 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:15:31 +0200 Subject: [PATCH 14/24] temp fix to prepublish issue --- .gitignore | 3 - dist/creator/index.js | 66 ++ dist/creator/index.test.js | 10 + .../__testfixtures__/context-0.input.js | 6 + .../__testfixtures__/context-1.input.js | 6 + .../__testfixtures__/context-2.input.js | 6 + .../transformations/context/context.js | 32 + .../transformations/context/context.test.js | 7 + .../__testfixtures__/devServer-0.input.js | 6 + .../__testfixtures__/devServer-1.input.js | 6 + .../transformations/devServer/devServer.js | 40 ++ .../devServer/devServer.test.js | 10 + .../__testfixtures__/devtool-0.input.js | 6 + .../__testfixtures__/devtool-1.input.js | 6 + .../transformations/devtool/devtool.js | 32 + .../transformations/devtool/devtool.test.js | 8 + .../entry/__testfixtures__/entry-0.input.js | 1 + dist/creator/transformations/entry/entry.js | 41 ++ .../transformations/entry/entry.test.js | 24 + .../__testfixtures__/externals-0.input.js | 6 + .../__testfixtures__/externals-1.input.js | 6 + .../transformations/externals/externals.js | 54 ++ .../externals/externals.test.js | 61 ++ dist/creator/transformations/index.js | 118 ++++ .../module/__testfixtures__/module-0.input.js | 6 + .../module/__testfixtures__/module-1.input.js | 6 + dist/creator/transformations/module/module.js | 32 + .../transformations/module/module.test.js | 108 +++ .../node/__testfixtures__/node-0.input.js | 6 + dist/creator/transformations/node/node.js | 28 + .../creator/transformations/node/node.test.js | 13 + .../other/__testfixtures__/other-0.input.js | 6 + dist/creator/transformations/other/amd.js | 28 + dist/creator/transformations/other/bail.js | 32 + dist/creator/transformations/other/cache.js | 32 + dist/creator/transformations/other/merge.js | 46 ++ .../transformations/other/other.test.js | 13 + dist/creator/transformations/other/profile.js | 32 + .../output/__testfixtures__/output-0.input.js | 3 + dist/creator/transformations/output/output.js | 27 + .../transformations/output/output.test.js | 15 + .../__testfixtures__/performance-0.input.js | 6 + .../performance/performance.js | 28 + .../performance/performance.test.js | 11 + .../__testfixtures__/plugins-0.input.js | 6 + .../transformations/plugins/plugins.js | 33 + .../transformations/plugins/plugins.test.js | 14 + .../__testfixtures__/resolve-0.input.js | 6 + .../transformations/resolve/resolve.js | 28 + .../transformations/resolve/resolve.test.js | 29 + .../stats/__testfixtures__/stats-0.input.js | 6 + dist/creator/transformations/stats/stats.js | 40 ++ .../transformations/stats/stats.test.js | 36 + .../target/__testfixtures__/target-0.input.js | 6 + .../target/__testfixtures__/target-1.input.js | 6 + dist/creator/transformations/target/target.js | 32 + .../transformations/target/target.test.js | 6 + .../__testfixtures__/top-scope-0.input.js | 1 + .../transformations/top-scope/top-scope.js | 21 + .../top-scope/top-scope.test.js | 5 + .../watch/__testfixtures__/watch-0.input.js | 6 + .../watch/__testfixtures__/watch-1.input.js | 6 + .../watch/__testfixtures__/watch-2.input.js | 6 + dist/creator/transformations/watch/watch.js | 32 + .../transformations/watch/watch.test.js | 8 + .../transformations/watch/watchOptions.js | 28 + .../watch/watchOptions.test.js | 21 + dist/creator/utils/run-prettier.js | 38 ++ dist/creator/utils/validate-options.js | 39 ++ dist/creator/utils/validate-options.spec.js | 25 + dist/creator/yeoman/utils/entry.js | 81 +++ dist/creator/yeoman/utils/module.js | 10 + dist/creator/yeoman/utils/plugins.js | 3 + dist/creator/yeoman/utils/tooltip.js | 47 ++ dist/creator/yeoman/utils/validate.js | 9 + dist/creator/yeoman/webpack-adapter.js | 18 + dist/creator/yeoman/webpack-generator.js | 401 +++++++++++ dist/generate-loader/index.js | 17 + dist/generate-loader/loader-generator.js | 58 ++ dist/generate-loader/loader-generator.test.js | 15 + dist/generate-plugin/index.js | 17 + dist/generate-plugin/plugin-generator.js | 39 ++ dist/initialize.js | 22 + dist/migrate.js | 114 ++++ .../__testfixtures__/failing.js | 80 +++ .../__testfixtures__/bannerPlugin-0.input.js | 5 + .../__testfixtures__/bannerPlugin-1.input.js | 4 + .../__testfixtures__/bannerPlugin-2.input.js | 6 + .../bannerPlugin/bannerPlugin.js | 27 + .../bannerPlugin/bannerPlugin.test.js | 7 + dist/transformations/defineTest.js | 95 +++ .../extractTextPlugin.input.js | 16 + .../extractTextPlugin/extractTextPlugin.js | 58 ++ .../extractTextPlugin.test.js | 5 + dist/transformations/index.js | 89 +++ dist/transformations/index.test.js | 66 ++ .../loaderOptionsPlugin-0.input.js | 6 + .../loaderOptionsPlugin-1.input.js | 9 + .../loaderOptionsPlugin-2.input.js | 9 + .../loaderOptionsPlugin-3.input.js | 17 + .../loaderOptionsPlugin.js | 41 ++ .../loaderOptionsPlugin.test.js | 8 + .../__testfixtures__/loaders-0.input.js | 65 ++ .../__testfixtures__/loaders-1.input.js | 8 + .../__testfixtures__/loaders-2.input.js | 15 + .../__testfixtures__/loaders-3.input.js | 8 + .../__testfixtures__/loaders-4.input.js | 8 + .../__testfixtures__/loaders-5.input.js | 12 + .../__testfixtures__/loaders-6.input.js | 12 + .../__testfixtures__/loaders-7.input.js | 14 + .../__testfixtures__/loaders-8.input.js | 14 + dist/transformations/loaders/loaders.js | 314 +++++++++ dist/transformations/loaders/loaders.test.js | 13 + .../__testfixtures__/outputPath-0.input.js | 5 + .../__testfixtures__/outputPath-1.input.js | 6 + .../__testfixtures__/outputPath-2.input.js | 6 + dist/transformations/outputPath/outputPath.js | 73 ++ .../outputPath/outputPath.test.js | 7 + .../removeDeprecatedPlugins-0.input.js | 6 + .../removeDeprecatedPlugins-1.input.js | 6 + .../removeDeprecatedPlugins-2.input.js | 8 + .../removeDeprecatedPlugins-3.input.js | 7 + .../removeDeprecatedPlugins-4.input.js | 8 + .../removeDeprecatedPlugins.js | 59 ++ .../removeDeprecatedPlugins.test.js | 9 + .../removeJsonLoader-0.input.js | 19 + .../removeJsonLoader-1.input.js | 12 + .../removeJsonLoader-2.input.js | 10 + .../removeJsonLoader-3.input.js | 11 + .../removeJsonLoader/removeJsonLoader.js | 60 ++ .../removeJsonLoader/removeJsonLoader.test.js | 8 + .../resolve/__testfixtures__/resolve.input.js | 20 + dist/transformations/resolve/resolve.js | 68 ++ dist/transformations/resolve/resolve.test.js | 5 + .../uglifyJsPlugin-0.input.js | 5 + .../uglifyJsPlugin-1.input.js | 6 + .../uglifyJsPlugin-2.input.js | 8 + .../uglifyJsPlugin/uglifyJsPlugin.js | 28 + .../uglifyJsPlugin/uglifyJsPlugin.test.js | 7 + dist/transformations/utils.js | 630 ++++++++++++++++++ dist/transformations/utils.test.js | 358 ++++++++++ dist/types.js | 192 ++++++ dist/utils/WebpackOptionsValidationError.js | 249 +++++++ dist/utils/copy-utils.js | 57 ++ dist/utils/npm-exists.js | 34 + dist/utils/npm-exists.spec.js | 16 + dist/utils/npm-packages-exists.js | 38 ++ dist/utils/package-manager.js | 61 ++ dist/utils/package-manager.spec.js | 90 +++ dist/utils/resolve-packages.js | 70 ++ dist/utils/resolve-packages.spec.js | 34 + dist/utils/validateSchema.js | 67 ++ dist/utils/webpack-generator.js | 77 +++ package.json | 1 + 154 files changed, 5843 insertions(+), 3 deletions(-) create mode 100644 dist/creator/index.js create mode 100644 dist/creator/index.test.js create mode 100644 dist/creator/transformations/context/__testfixtures__/context-0.input.js create mode 100644 dist/creator/transformations/context/__testfixtures__/context-1.input.js create mode 100644 dist/creator/transformations/context/__testfixtures__/context-2.input.js create mode 100644 dist/creator/transformations/context/context.js create mode 100644 dist/creator/transformations/context/context.test.js create mode 100644 dist/creator/transformations/devServer/__testfixtures__/devServer-0.input.js create mode 100644 dist/creator/transformations/devServer/__testfixtures__/devServer-1.input.js create mode 100644 dist/creator/transformations/devServer/devServer.js create mode 100644 dist/creator/transformations/devServer/devServer.test.js create mode 100644 dist/creator/transformations/devtool/__testfixtures__/devtool-0.input.js create mode 100644 dist/creator/transformations/devtool/__testfixtures__/devtool-1.input.js create mode 100644 dist/creator/transformations/devtool/devtool.js create mode 100644 dist/creator/transformations/devtool/devtool.test.js create mode 100644 dist/creator/transformations/entry/__testfixtures__/entry-0.input.js create mode 100644 dist/creator/transformations/entry/entry.js create mode 100644 dist/creator/transformations/entry/entry.test.js create mode 100644 dist/creator/transformations/externals/__testfixtures__/externals-0.input.js create mode 100644 dist/creator/transformations/externals/__testfixtures__/externals-1.input.js create mode 100644 dist/creator/transformations/externals/externals.js create mode 100644 dist/creator/transformations/externals/externals.test.js create mode 100644 dist/creator/transformations/index.js create mode 100644 dist/creator/transformations/module/__testfixtures__/module-0.input.js create mode 100644 dist/creator/transformations/module/__testfixtures__/module-1.input.js create mode 100644 dist/creator/transformations/module/module.js create mode 100644 dist/creator/transformations/module/module.test.js create mode 100644 dist/creator/transformations/node/__testfixtures__/node-0.input.js create mode 100644 dist/creator/transformations/node/node.js create mode 100644 dist/creator/transformations/node/node.test.js create mode 100644 dist/creator/transformations/other/__testfixtures__/other-0.input.js create mode 100644 dist/creator/transformations/other/amd.js create mode 100644 dist/creator/transformations/other/bail.js create mode 100644 dist/creator/transformations/other/cache.js create mode 100644 dist/creator/transformations/other/merge.js create mode 100644 dist/creator/transformations/other/other.test.js create mode 100644 dist/creator/transformations/other/profile.js create mode 100644 dist/creator/transformations/output/__testfixtures__/output-0.input.js create mode 100644 dist/creator/transformations/output/output.js create mode 100644 dist/creator/transformations/output/output.test.js create mode 100644 dist/creator/transformations/performance/__testfixtures__/performance-0.input.js create mode 100644 dist/creator/transformations/performance/performance.js create mode 100644 dist/creator/transformations/performance/performance.test.js create mode 100644 dist/creator/transformations/plugins/__testfixtures__/plugins-0.input.js create mode 100644 dist/creator/transformations/plugins/plugins.js create mode 100644 dist/creator/transformations/plugins/plugins.test.js create mode 100644 dist/creator/transformations/resolve/__testfixtures__/resolve-0.input.js create mode 100644 dist/creator/transformations/resolve/resolve.js create mode 100644 dist/creator/transformations/resolve/resolve.test.js create mode 100644 dist/creator/transformations/stats/__testfixtures__/stats-0.input.js create mode 100644 dist/creator/transformations/stats/stats.js create mode 100644 dist/creator/transformations/stats/stats.test.js create mode 100644 dist/creator/transformations/target/__testfixtures__/target-0.input.js create mode 100644 dist/creator/transformations/target/__testfixtures__/target-1.input.js create mode 100644 dist/creator/transformations/target/target.js create mode 100644 dist/creator/transformations/target/target.test.js create mode 100644 dist/creator/transformations/top-scope/__testfixtures__/top-scope-0.input.js create mode 100644 dist/creator/transformations/top-scope/top-scope.js create mode 100644 dist/creator/transformations/top-scope/top-scope.test.js create mode 100644 dist/creator/transformations/watch/__testfixtures__/watch-0.input.js create mode 100644 dist/creator/transformations/watch/__testfixtures__/watch-1.input.js create mode 100644 dist/creator/transformations/watch/__testfixtures__/watch-2.input.js create mode 100644 dist/creator/transformations/watch/watch.js create mode 100644 dist/creator/transformations/watch/watch.test.js create mode 100644 dist/creator/transformations/watch/watchOptions.js create mode 100644 dist/creator/transformations/watch/watchOptions.test.js create mode 100644 dist/creator/utils/run-prettier.js create mode 100644 dist/creator/utils/validate-options.js create mode 100644 dist/creator/utils/validate-options.spec.js create mode 100644 dist/creator/yeoman/utils/entry.js create mode 100644 dist/creator/yeoman/utils/module.js create mode 100644 dist/creator/yeoman/utils/plugins.js create mode 100644 dist/creator/yeoman/utils/tooltip.js create mode 100644 dist/creator/yeoman/utils/validate.js create mode 100644 dist/creator/yeoman/webpack-adapter.js create mode 100644 dist/creator/yeoman/webpack-generator.js create mode 100644 dist/generate-loader/index.js create mode 100644 dist/generate-loader/loader-generator.js create mode 100644 dist/generate-loader/loader-generator.test.js create mode 100644 dist/generate-plugin/index.js create mode 100644 dist/generate-plugin/plugin-generator.js create mode 100644 dist/initialize.js create mode 100644 dist/migrate.js create mode 100644 dist/transformations/__testfixtures__/failing.js create mode 100644 dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-0.input.js create mode 100644 dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-1.input.js create mode 100644 dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-2.input.js create mode 100644 dist/transformations/bannerPlugin/bannerPlugin.js create mode 100644 dist/transformations/bannerPlugin/bannerPlugin.test.js create mode 100644 dist/transformations/defineTest.js create mode 100644 dist/transformations/extractTextPlugin/__testfixtures__/extractTextPlugin.input.js create mode 100644 dist/transformations/extractTextPlugin/extractTextPlugin.js create mode 100644 dist/transformations/extractTextPlugin/extractTextPlugin.test.js create mode 100644 dist/transformations/index.js create mode 100644 dist/transformations/index.test.js create mode 100644 dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-0.input.js create mode 100644 dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-1.input.js create mode 100644 dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-2.input.js create mode 100644 dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-3.input.js create mode 100644 dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js create mode 100644 dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-0.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-1.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-2.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-3.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-4.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-5.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-6.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-7.input.js create mode 100644 dist/transformations/loaders/__testfixtures__/loaders-8.input.js create mode 100644 dist/transformations/loaders/loaders.js create mode 100644 dist/transformations/loaders/loaders.test.js create mode 100644 dist/transformations/outputPath/__testfixtures__/outputPath-0.input.js create mode 100644 dist/transformations/outputPath/__testfixtures__/outputPath-1.input.js create mode 100644 dist/transformations/outputPath/__testfixtures__/outputPath-2.input.js create mode 100644 dist/transformations/outputPath/outputPath.js create mode 100644 dist/transformations/outputPath/outputPath.test.js create mode 100644 dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-0.input.js create mode 100644 dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-1.input.js create mode 100644 dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-2.input.js create mode 100644 dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-3.input.js create mode 100644 dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-4.input.js create mode 100644 dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js create mode 100644 dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js create mode 100644 dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-0.input.js create mode 100644 dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-1.input.js create mode 100644 dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-2.input.js create mode 100644 dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-3.input.js create mode 100644 dist/transformations/removeJsonLoader/removeJsonLoader.js create mode 100644 dist/transformations/removeJsonLoader/removeJsonLoader.test.js create mode 100644 dist/transformations/resolve/__testfixtures__/resolve.input.js create mode 100644 dist/transformations/resolve/resolve.js create mode 100644 dist/transformations/resolve/resolve.test.js create mode 100644 dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-0.input.js create mode 100644 dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-1.input.js create mode 100644 dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-2.input.js create mode 100644 dist/transformations/uglifyJsPlugin/uglifyJsPlugin.js create mode 100644 dist/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js create mode 100644 dist/transformations/utils.js create mode 100644 dist/transformations/utils.test.js create mode 100644 dist/types.js create mode 100644 dist/utils/WebpackOptionsValidationError.js create mode 100644 dist/utils/copy-utils.js create mode 100644 dist/utils/npm-exists.js create mode 100644 dist/utils/npm-exists.spec.js create mode 100644 dist/utils/npm-packages-exists.js create mode 100644 dist/utils/package-manager.js create mode 100644 dist/utils/package-manager.spec.js create mode 100644 dist/utils/resolve-packages.js create mode 100644 dist/utils/resolve-packages.spec.js create mode 100644 dist/utils/validateSchema.js create mode 100644 dist/utils/webpack-generator.js diff --git a/.gitignore b/.gitignore index 798edadc1c1..4dd5c95c1b5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,8 +15,5 @@ yarn-error.log # Jest Coverage coverage -# Dist build -dist - # Test Compilation test/js/* diff --git a/dist/creator/index.js b/dist/creator/index.js new file mode 100644 index 00000000000..e68049c963a --- /dev/null +++ b/dist/creator/index.js @@ -0,0 +1,66 @@ +"use strict"; + +const yeoman = require("yeoman-environment"); +const Generator = require("yeoman-generator"); +const path = require("path"); +const defaultGenerator = require("./yeoman/webpack-generator"); +const WebpackAdapter = require("./yeoman/webpack-adapter"); +const runTransform = require("./transformations/index"); + +/* +* @function creator +* +* Runs yeoman and runs the transformations based on the object +* built up from an author/user +* +* @param { String } options - An path to the given generator +* @returns { Function } runTransform - Run transformations based on yeoman prompt +*/ + +function creator(options) { + let env = yeoman.createEnv("webpack", null, new WebpackAdapter()); + const generatorName = options + ? replaceGeneratorName(path.basename(options[0])) + : "webpack-default-generator"; + if (options) { + const WebpackGenerator = class extends Generator { + initializing() { + options.forEach(path => { + return this.composeWith(require.resolve(path)); + }); + } + }; + env.registerStub(WebpackGenerator, generatorName); + } else { + env.registerStub(defaultGenerator, "webpack-default-generator"); + } + + env.run(generatorName).on("end", () => { + if (generatorName !== "webpack-default-generator") { + //HACK / FIXME + env = env.options.env; + return runTransform(env.configuration); + } else { + return runTransform(env.getArgument("configuration")); + } + }); +} + +/* +* @function replaceGeneratorName +* +* Replaces the webpack-addons pattern with the end of the addons name merged +* with 'generator' +* +* @param { String } name - name of the generator +* @returns { String } name - replaced pattern of the name +*/ + +function replaceGeneratorName(name) { + return name.replace(/(webpack-addons)?([^:]+)(:.*)?/g, "generator$2"); +} + +module.exports = { + creator, + replaceGeneratorName +}; diff --git a/dist/creator/index.test.js b/dist/creator/index.test.js new file mode 100644 index 00000000000..a02620e312a --- /dev/null +++ b/dist/creator/index.test.js @@ -0,0 +1,10 @@ +"use strict"; + +const replaceGeneratorName = require("./index").replaceGeneratorName; + +describe("replaceGeneratorName", () => { + it("should replace a pattern of an addon", () => { + const generatorName = replaceGeneratorName("webpack-addons-thefox"); + expect(generatorName).toEqual("generator-thefox"); + }); +}); diff --git a/dist/creator/transformations/context/__testfixtures__/context-0.input.js b/dist/creator/transformations/context/__testfixtures__/context-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/context/__testfixtures__/context-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/context/__testfixtures__/context-1.input.js b/dist/creator/transformations/context/__testfixtures__/context-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/context/__testfixtures__/context-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/context/__testfixtures__/context-2.input.js b/dist/creator/transformations/context/__testfixtures__/context-2.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/context/__testfixtures__/context-2.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/context/context.js b/dist/creator/transformations/context/context.js new file mode 100644 index 00000000000..15926ce0aef --- /dev/null +++ b/dist/creator/transformations/context/context.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for context. Finds the context property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "context", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/context/context.test.js b/dist/creator/transformations/context/context.test.js new file mode 100644 index 00000000000..d21b1d8dec5 --- /dev/null +++ b/dist/creator/transformations/context/context.test.js @@ -0,0 +1,7 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "context", "context-0", "path.resolve(__dirname, 'app')"); +defineTest(__dirname, "context", "context-1", "'./some/fake/path'"); +defineTest(__dirname, "context", "context-2", "contextVariable"); diff --git a/dist/creator/transformations/devServer/__testfixtures__/devServer-0.input.js b/dist/creator/transformations/devServer/__testfixtures__/devServer-0.input.js new file mode 100644 index 00000000000..080e440f373 --- /dev/null +++ b/dist/creator/transformations/devServer/__testfixtures__/devServer-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + }, +} diff --git a/dist/creator/transformations/devServer/__testfixtures__/devServer-1.input.js b/dist/creator/transformations/devServer/__testfixtures__/devServer-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/devServer/__testfixtures__/devServer-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/devServer/devServer.js b/dist/creator/transformations/devServer/devServer.js new file mode 100644 index 00000000000..14d6b765b5a --- /dev/null +++ b/dist/creator/transformations/devServer/devServer.js @@ -0,0 +1,40 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for devServer. Finds the devServer property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createDevServerProperty(p) { + utils.pushCreateProperty(j, p, "devServer", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "devServer"); + } + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createDevServerProperty)); + } else if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "devServer", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/devServer/devServer.test.js b/dist/creator/transformations/devServer/devServer.test.js new file mode 100644 index 00000000000..14b3b7d11de --- /dev/null +++ b/dist/creator/transformations/devServer/devServer.test.js @@ -0,0 +1,10 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "devServer", "devServer-0", { + contentBase: "path.join(__dirname, 'dist')", + compress: true, + port: 9000 +}); +defineTest(__dirname, "devServer", "devServer-1", "someVar"); diff --git a/dist/creator/transformations/devtool/__testfixtures__/devtool-0.input.js b/dist/creator/transformations/devtool/__testfixtures__/devtool-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/devtool/__testfixtures__/devtool-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/devtool/__testfixtures__/devtool-1.input.js b/dist/creator/transformations/devtool/__testfixtures__/devtool-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/devtool/__testfixtures__/devtool-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/devtool/devtool.js b/dist/creator/transformations/devtool/devtool.js new file mode 100644 index 00000000000..87cf628dc41 --- /dev/null +++ b/dist/creator/transformations/devtool/devtool.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for devtool. Finds the devtool property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "devtool", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/devtool/devtool.test.js b/dist/creator/transformations/devtool/devtool.test.js new file mode 100644 index 00000000000..8702e338922 --- /dev/null +++ b/dist/creator/transformations/devtool/devtool.test.js @@ -0,0 +1,8 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "devtool", "devtool-0", "'source-map'"); +defineTest(__dirname, "devtool", "devtool-0", "myVariable"); +defineTest(__dirname, "devtool", "devtool-1", "'cheap-module-source-map'"); +defineTest(__dirname, "devtool", "devtool-1", "false"); diff --git a/dist/creator/transformations/entry/__testfixtures__/entry-0.input.js b/dist/creator/transformations/entry/__testfixtures__/entry-0.input.js new file mode 100644 index 00000000000..4ba52ba2c8d --- /dev/null +++ b/dist/creator/transformations/entry/__testfixtures__/entry-0.input.js @@ -0,0 +1 @@ +module.exports = {} diff --git a/dist/creator/transformations/entry/entry.js b/dist/creator/transformations/entry/entry.js new file mode 100644 index 00000000000..8b0970f0eef --- /dev/null +++ b/dist/creator/transformations/entry/entry.js @@ -0,0 +1,41 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for entry. Finds the entry property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createEntryProperty(p) { + if (typeof webpackProperties === "string") { + return utils.pushCreateProperty(j, p, "entry", webpackProperties); + } + if (Array.isArray(webpackProperties)) { + const externalArray = utils.createArrayWithChildren( + j, + "entry", + webpackProperties, + true + ); + return p.value.properties.push(externalArray); + } else { + utils.pushCreateProperty(j, p, "entry", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "entry"); + } + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createEntryProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/entry/entry.test.js b/dist/creator/transformations/entry/entry.test.js new file mode 100644 index 00000000000..1124378369a --- /dev/null +++ b/dist/creator/transformations/entry/entry.test.js @@ -0,0 +1,24 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "entry", "entry-0", "'index.js'"); +defineTest(__dirname, "entry", "entry-0", ["'index.js'", "'app.js'"]); +defineTest(__dirname, "entry", "entry-0", { + index: "'index.js'", + app: "'app.js'" +}); + +defineTest(__dirname, "entry", "entry-0", { + inject: "something", + app: "'app.js'", + inject_1: "else" +}); +defineTest(__dirname, "entry", "entry-0", "() => 'index.js'"); +defineTest( + __dirname, + "entry", + "entry-0", + "() => new Promise((resolve) => resolve(['./app', './router']))" +); +defineTest(__dirname, "entry", "entry-0", "entryStringVariable"); diff --git a/dist/creator/transformations/externals/__testfixtures__/externals-0.input.js b/dist/creator/transformations/externals/__testfixtures__/externals-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/externals/__testfixtures__/externals-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/externals/__testfixtures__/externals-1.input.js b/dist/creator/transformations/externals/__testfixtures__/externals-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/externals/__testfixtures__/externals-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/externals/externals.js b/dist/creator/transformations/externals/externals.js new file mode 100644 index 00000000000..29b394a1e37 --- /dev/null +++ b/dist/creator/transformations/externals/externals.js @@ -0,0 +1,54 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for externals. Finds the externals property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createExternalProperty(p) { + if ( + webpackProperties instanceof RegExp || + typeof webpackProperties === "string" + ) { + return utils.pushCreateProperty(j, p, "externals", webpackProperties); + } + if (Array.isArray(webpackProperties)) { + const externalArray = utils.createArrayWithChildren( + j, + "externals", + webpackProperties, + true + ); + return p.value.properties.push(externalArray); + } else { + utils.pushCreateProperty(j, p, "externals", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "externals"); + } + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter( + p => + utils.safeTraverse(p, [ + "parent", + "value", + "left", + "property", + "name" + ]) === "exports" + ) + .forEach(createExternalProperty); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/externals/externals.test.js b/dist/creator/transformations/externals/externals.test.js new file mode 100644 index 00000000000..a64bceaef78 --- /dev/null +++ b/dist/creator/transformations/externals/externals.test.js @@ -0,0 +1,61 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "externals", "externals-0", /react/); +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: "'react'" +}); + +defineTest(__dirname, "externals", "externals-1", "myObj"); + +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: "reactObj" +}); + +defineTest(__dirname, "externals", "externals-1", { + jquery: "'jQuery'", + react: ["reactObj", "path.join(__dirname, 'app')", "'jquery'"] +}); + +defineTest(__dirname, "externals", "externals-1", { + lodash: { + commonjs: "'lodash'", + amd: "'lodash'", + root: "'_'" + } +}); + +defineTest(__dirname, "externals", "externals-1", { + lodash: { + commonjs: "lodash", + amd: "hidash", + root: "_" + } +}); + +defineTest(__dirname, "externals", "externals-1", [ + { + a: "false", + b: "true", + "'./ext'": "./hey" + }, + "function(context, request, callback) {" + + "if (/^yourregex$/.test(request)){" + + "return callback(null, 'commonjs ' + request);" + + "}" + + "callback();" + + "}" +]); + +defineTest(__dirname, "externals", "externals-1", [ + "myObj", + "function(context, request, callback) {" + + "if (/^yourregex$/.test(request)){" + + "return callback(null, 'commonjs ' + request);" + + "}" + + "callback();" + + "}" +]); diff --git a/dist/creator/transformations/index.js b/dist/creator/transformations/index.js new file mode 100644 index 00000000000..5768a743ba9 --- /dev/null +++ b/dist/creator/transformations/index.js @@ -0,0 +1,118 @@ +"use strict"; + +const path = require("path"); +const j = require("jscodeshift"); +const chalk = require("chalk"); +const pEachSeries = require("p-each-series"); + +const runPrettier = require("../utils/run-prettier"); + +const entryTransform = require("./entry/entry"); +const outputTransform = require("./output/output"); +const contextTransform = require("./context/context"); +const resolveTransform = require("./resolve/resolve"); +const devtoolTransform = require("./devtool/devtool"); +const targetTransform = require("./target/target"); +const watchTransform = require("./watch/watch"); +const watchOptionsTransform = require("./watch/watchOptions"); +const externalsTransform = require("./externals/externals"); +const nodeTransform = require("./node/node"); +const performanceTransform = require("./performance/performance"); +const statsTransform = require("./stats/stats"); +const amdTransform = require("./other/amd"); +const bailTransform = require("./other/bail"); +const cacheTransform = require("./other/cache"); +const profileTransform = require("./other/profile"); +const mergeTransform = require("./other/merge"); +const moduleTransform = require("./module/module"); +const pluginsTransform = require("./plugins/plugins"); +const topScopeTransform = require("./top-scope/top-scope"); +const devServerTransform = require("./devServer/devServer"); + +/* +* @function runTransform +* +* Runs the transformations from an object we get from yeoman +* +* @param { Object } transformObject - Options to transform +* @returns { } - A promise that writes each transform, runs prettier +* and writes the file +*/ + +const transformsObject = { + entryTransform, + outputTransform, + contextTransform, + resolveTransform, + devtoolTransform, + targetTransform, + watchTransform, + watchOptionsTransform, + externalsTransform, + nodeTransform, + performanceTransform, + statsTransform, + amdTransform, + bailTransform, + cacheTransform, + profileTransform, + moduleTransform, + pluginsTransform, + topScopeTransform, + mergeTransform, + devServerTransform +}; + +module.exports = function runTransform(webpackProperties) { + // webpackOptions.name sent to nameTransform if match + Object.keys(webpackProperties).forEach(scaffoldPiece => { + const config = webpackProperties[scaffoldPiece]; + + const transformations = Object.keys(transformsObject).map(k => { + const stringVal = k.substr(0, k.indexOf("Transform")); + if (config.webpackOptions) { + if (config.webpackOptions[stringVal]) { + return [transformsObject[k], config.webpackOptions[stringVal]]; + } else { + return [transformsObject[k], config[stringVal]]; + } + } else { + return [transformsObject[k]]; + } + }); + + const ast = j("module.exports = {}"); + + return pEachSeries(transformations, f => { + if (!f[1]) { + return f[0](j, ast); + } else { + return f[0](j, ast, f[1]); + } + }) + .then(() => { + let configurationName; + if (!config.configName) { + configurationName = "webpack.config.js"; + } else { + configurationName = "webpack." + config.configName + ".js"; + } + + const outputPath = path.join(process.cwd(), configurationName); + const source = ast.toSource({ + quote: "single" + }); + + runPrettier(outputPath, source); + }) + .catch(err => { + console.error(err.message ? err.message : err); + }); + }); + process.stdout.write( + "\n" + + chalk.green( + "Congratulations! Your new webpack configuration file has been created!\n" + ) + ); +}; diff --git a/dist/creator/transformations/module/__testfixtures__/module-0.input.js b/dist/creator/transformations/module/__testfixtures__/module-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/module/__testfixtures__/module-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/module/__testfixtures__/module-1.input.js b/dist/creator/transformations/module/__testfixtures__/module-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/module/__testfixtures__/module-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/module/module.js b/dist/creator/transformations/module/module.js new file mode 100644 index 00000000000..991a7497e8a --- /dev/null +++ b/dist/creator/transformations/module/module.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for module. Finds the module property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createModuleProperties(p) { + utils.pushCreateProperty(j, p, "module", j.objectExpression([])); + return utils.safeTraverse(p, ["key", "name"] === "module"); + } + function createRules(p) { + return utils.pushObjectKeys(j, p, webpackProperties, "module"); + } + if (!webpackProperties) { + return ast; + } else { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createModuleProperties)) + .forEach(p => createRules(p)); + } +}; diff --git a/dist/creator/transformations/module/module.test.js b/dist/creator/transformations/module/module.test.js new file mode 100644 index 00000000000..278f246c28f --- /dev/null +++ b/dist/creator/transformations/module/module.test.js @@ -0,0 +1,108 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "module", "module-0", { + rules: [ + { + test: new RegExp(/\.(js|vue)$/), + loader: "'eslint-loader'", + enforce: "'pre'", + include: ["customObj", "'Stringy'"], + options: { + formatter: "'someOption'" + } + }, + { + test: new RegExp(/\.vue$/), + loader: "'vue-loader'", + options: "vueObject" + }, + { + test: new RegExp(/\.js$/), + loader: "'babel-loader'", + include: ["resolve('src')", "resolve('test')"] + }, + { + test: new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/), + loader: "'url-loader'", + options: { + limit: 10000, + name: "utils.assetsPath('img/[name].[hash:7].[ext]')" + } + }, + { + test: new RegExp(/\.(woff2?|eot|ttf|otf)(\?.*)?$/), + loader: "'url-loader'", + options: { + limit: "10000", + name: "utils.assetsPath('fonts/[name].[hash:7].[ext]')", + someArr: ["Hey"] + } + } + ] +}); + +defineTest(__dirname, "module", "module-1", { + noParse: /jquery|lodash/, + rules: [ + { + test: new RegExp(/\.js$/), + parser: { + amd: false + }, + use: [ + "'htmllint-loader'", + { + loader: "'html-loader'", + options: { + hello: "'world'" + } + } + ] + } + ] +}); + +defineTest(__dirname, "module", "module-0", { + rules: [ + "{{#if_eq build 'standalone'}}", + { + test: new RegExp(/\.(js|vue)$/), + loader: "'eslint-loader'", + enforce: "'pre'", + include: ["customObj", "'Stringy'"], + options: { + formatter: "'someOption'" + } + }, + { + test: new RegExp(/\.vue$/), + loader: "'vue-loader'", + options: "vueObject" + }, + { + test: new RegExp(/\.js$/), + loader: "'babel-loader'", + include: ["resolve('src')", "resolve('test')"] + }, + { + test: new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/), + loader: "'url-loader'", + options: { + limit: 10000, + name: "utils.assetsPath('img/[name].[hash:7].[ext]')", + inject: "{{#if_eq build 'standalone'}}" + } + }, + { + test: new RegExp(/\.(woff2?|eot|ttf|otf)(\?.*)?$/), + loader: "'url-loader'", + inject: "{{#if_eq build 'standalone'}}", + options: { + limit: "10000", + name: "utils.assetsPath('fonts/[name].[hash:7].[ext]')" + } + } + ] +}); diff --git a/dist/creator/transformations/node/__testfixtures__/node-0.input.js b/dist/creator/transformations/node/__testfixtures__/node-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/node/__testfixtures__/node-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/node/node.js b/dist/creator/transformations/node/node.js new file mode 100644 index 00000000000..92a3d31a271 --- /dev/null +++ b/dist/creator/transformations/node/node.js @@ -0,0 +1,28 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for node. Finds the node property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createNodeProperty(p) { + utils.pushCreateProperty(j, p, "node", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "node"); + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createNodeProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/node/node.test.js b/dist/creator/transformations/node/node.test.js new file mode 100644 index 00000000000..bfa478d9e19 --- /dev/null +++ b/dist/creator/transformations/node/node.test.js @@ -0,0 +1,13 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "node", "node-0", { + console: false, + global: true, + process: true, + Buffer: true, + __filename: "mock", + __dirname: "mock", + setImmediate: true +}); diff --git a/dist/creator/transformations/other/__testfixtures__/other-0.input.js b/dist/creator/transformations/other/__testfixtures__/other-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/other/__testfixtures__/other-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/other/amd.js b/dist/creator/transformations/other/amd.js new file mode 100644 index 00000000000..24d0aa9a24e --- /dev/null +++ b/dist/creator/transformations/other/amd.js @@ -0,0 +1,28 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for amd. Finds the amd property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createAMDProperty(p) { + utils.pushCreateProperty(j, p, "amd", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "amd"); + } + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createAMDProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/other/bail.js b/dist/creator/transformations/other/bail.js new file mode 100644 index 00000000000..1fe4f3bed37 --- /dev/null +++ b/dist/creator/transformations/other/bail.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for bail. Finds the bail property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "bail", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/other/cache.js b/dist/creator/transformations/other/cache.js new file mode 100644 index 00000000000..ecb9eae8d72 --- /dev/null +++ b/dist/creator/transformations/other/cache.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for cache. Finds the cache property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "cache", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/other/merge.js b/dist/creator/transformations/other/merge.js new file mode 100644 index 00000000000..5a80331de5d --- /dev/null +++ b/dist/creator/transformations/other/merge.js @@ -0,0 +1,46 @@ +"use strict"; + +/* +* +* Transform for merge. Finds the merge property from yeoman and creates a way +* for users to allow webpack-merge in their scaffold +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createMergeProperty(p) { + // FIXME Use j.callExp() + let exportsDecl = p.value.body.map(n => { + if (n.expression) { + return n.expression.right; + } + }); + const bodyLength = exportsDecl.length; + let newVal = {}; + newVal.type = "ExpressionStatement"; + newVal.expression = { + type: "AssignmentExpression", + operator: "=", + left: { + type: "MemberExpression", + computed: false, + object: j.identifier("module"), + property: j.identifier("exports") + }, + right: j.callExpression(j.identifier("merge"), [ + j.identifier(webpackProperties), + exportsDecl.pop() + ]) + }; + p.value.body[bodyLength - 1] = newVal; + } + if (webpackProperties) { + return ast.find(j.Program).filter(p => createMergeProperty(p)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/other/other.test.js b/dist/creator/transformations/other/other.test.js new file mode 100644 index 00000000000..a976a9ba25f --- /dev/null +++ b/dist/creator/transformations/other/other.test.js @@ -0,0 +1,13 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "amd", "other-0", { + jQuery: true, + kQuery: false +}); +defineTest(__dirname, "bail", "other-0", true); +defineTest(__dirname, "cache", "other-0", true); +defineTest(__dirname, "cache", "other-0", "cacheVal"); +defineTest(__dirname, "profile", "other-0", true); +defineTest(__dirname, "merge", "other-0", "myConfig"); diff --git a/dist/creator/transformations/other/profile.js b/dist/creator/transformations/other/profile.js new file mode 100644 index 00000000000..07f08bea4f7 --- /dev/null +++ b/dist/creator/transformations/other/profile.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for profile. Finds the profile property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "profile", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/output/__testfixtures__/output-0.input.js b/dist/creator/transformations/output/__testfixtures__/output-0.input.js new file mode 100644 index 00000000000..a9899df14fa --- /dev/null +++ b/dist/creator/transformations/output/__testfixtures__/output-0.input.js @@ -0,0 +1,3 @@ +module.exports = { + entry: 'index.js' +} diff --git a/dist/creator/transformations/output/output.js b/dist/creator/transformations/output/output.js new file mode 100644 index 00000000000..1c19f70d095 --- /dev/null +++ b/dist/creator/transformations/output/output.js @@ -0,0 +1,27 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for output. Finds the output property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ +module.exports = function(j, ast, webpackProperties) { + function createOutputProperties(p) { + utils.pushCreateProperty(j, p, "output", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "output"); + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createOutputProperties)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/output/output.test.js b/dist/creator/transformations/output/output.test.js new file mode 100644 index 00000000000..9b7544604b8 --- /dev/null +++ b/dist/creator/transformations/output/output.test.js @@ -0,0 +1,15 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); +const jscodeshift = require("jscodeshift"); + +defineTest(__dirname, "output", "output-0", { + filename: "'bundle'", + path: "'dist/assets'", + pathinfo: true, + publicPath: "'https://google.com'", + sourceMapFilename: "'[name].map'", + sourcePrefix: jscodeshift("'\t'"), + umdNamedDefine: true, + strictModuleExceptionHandling: true +}); diff --git a/dist/creator/transformations/performance/__testfixtures__/performance-0.input.js b/dist/creator/transformations/performance/__testfixtures__/performance-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/performance/__testfixtures__/performance-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/performance/performance.js b/dist/creator/transformations/performance/performance.js new file mode 100644 index 00000000000..f00c1e21572 --- /dev/null +++ b/dist/creator/transformations/performance/performance.js @@ -0,0 +1,28 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for performance. Finds the performance property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createPerformanceProperty(p) { + utils.pushCreateProperty(j, p, "performance", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "performance"); + } + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createPerformanceProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/performance/performance.test.js b/dist/creator/transformations/performance/performance.test.js new file mode 100644 index 00000000000..61840ca16ff --- /dev/null +++ b/dist/creator/transformations/performance/performance.test.js @@ -0,0 +1,11 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "performance", "performance-0", { + hints: "'warning'", + maxEntrypointSize: 400000, + maxAssetSize: 100000, + assetFilter: + "function(assetFilename) {" + "return assetFilename.endsWith('.js');" + "}" +}); diff --git a/dist/creator/transformations/plugins/__testfixtures__/plugins-0.input.js b/dist/creator/transformations/plugins/__testfixtures__/plugins-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/plugins/__testfixtures__/plugins-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/plugins/plugins.js b/dist/creator/transformations/plugins/plugins.js new file mode 100644 index 00000000000..45c382501f1 --- /dev/null +++ b/dist/creator/transformations/plugins/plugins.js @@ -0,0 +1,33 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for plugins. Finds the plugins property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createPluginsProperty(p) { + const pluginArray = utils.createArrayWithChildren( + j, + "plugins", + webpackProperties, + true + ); + return p.value.properties.push(pluginArray); + } + if (webpackProperties && Array.isArray(webpackProperties)) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createPluginsProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/plugins/plugins.test.js b/dist/creator/transformations/plugins/plugins.test.js new file mode 100644 index 00000000000..7412024992f --- /dev/null +++ b/dist/creator/transformations/plugins/plugins.test.js @@ -0,0 +1,14 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "plugins", "plugins-0", [ + "new webpack.optimize.CommonsChunkPlugin({name:" + + "'" + + "vendor" + + "'" + + ",filename:" + + "'" + + "vendor" + + "-[hash].min.js'})" +]); diff --git a/dist/creator/transformations/resolve/__testfixtures__/resolve-0.input.js b/dist/creator/transformations/resolve/__testfixtures__/resolve-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/resolve/__testfixtures__/resolve-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/resolve/resolve.js b/dist/creator/transformations/resolve/resolve.js new file mode 100644 index 00000000000..01bba7000e3 --- /dev/null +++ b/dist/creator/transformations/resolve/resolve.js @@ -0,0 +1,28 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for resolve. Finds the resolve property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createResolveProperties(p) { + utils.pushCreateProperty(j, p, "resolve", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "resolve"); + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createResolveProperties)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/resolve/resolve.test.js b/dist/creator/transformations/resolve/resolve.test.js new file mode 100644 index 00000000000..89ecd087957 --- /dev/null +++ b/dist/creator/transformations/resolve/resolve.test.js @@ -0,0 +1,29 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "resolve", "resolve-0", { + alias: { + inject: "{{#if_eq build 'standalone'}}", + hello: "'world'", + inject_1: "{{/if_eq}}", + world: "hello" + }, + aliasFields: ["'browser'", "wars"], + descriptionFiles: ["'a'", "b"], + enforceExtension: false, + enforceModuleExtension: false, + extensions: ["hey", "'ho'"], + mainFields: ["main", "'story'"], + mainFiles: ["'noMainFileHere'", "iGuess"], + modules: ["one", "'two'"], + unsafeCache: false, + resolveLoader: { + modules: ["'node_modules'", "mode_nodules"], + extensions: ["jsVal", "'.json'"], + mainFields: ["loader", "'main'"], + moduleExtensions: ["'-loader'", "value"] + }, + plugins: ["somePlugin", "'stringVal'"], + symlinks: true +}); diff --git a/dist/creator/transformations/stats/__testfixtures__/stats-0.input.js b/dist/creator/transformations/stats/__testfixtures__/stats-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/stats/__testfixtures__/stats-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/stats/stats.js b/dist/creator/transformations/stats/stats.js new file mode 100644 index 00000000000..d843caf04ee --- /dev/null +++ b/dist/creator/transformations/stats/stats.js @@ -0,0 +1,40 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for stats. Finds the stats property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createStatsProperty(p) { + utils.pushCreateProperty(j, p, "stats", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "stats"); + } + if (webpackProperties && typeof webpackProperties === "object") { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createStatsProperty)); + } else if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "stats", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/stats/stats.test.js b/dist/creator/transformations/stats/stats.test.js new file mode 100644 index 00000000000..c830ddb38e2 --- /dev/null +++ b/dist/creator/transformations/stats/stats.test.js @@ -0,0 +1,36 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "stats", "stats-0", { + assets: true, + assetsSort: "'field'", + cached: true, + cachedAssets: true, + children: true, + chunks: true, + chunkModules: true, + chunkOrigins: true, + chunksSort: "'field'", + context: "'../src/'", + colors: true, + depth: false, + entrypoints: "customVal", + errors: true, + errorDetails: true, + exclude: [], + hash: true, + maxModules: 15, + modules: true, + modulesSort: "'field'", + performance: true, + providedExports: false, + publicPath: true, + reasons: true, + source: true, + timings: true, + usedExports: false, + version: true, + warnings: true +}); +defineTest(__dirname, "stats", "stats-0", "'errors-only'"); diff --git a/dist/creator/transformations/target/__testfixtures__/target-0.input.js b/dist/creator/transformations/target/__testfixtures__/target-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/target/__testfixtures__/target-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/target/__testfixtures__/target-1.input.js b/dist/creator/transformations/target/__testfixtures__/target-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/target/__testfixtures__/target-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/target/target.js b/dist/creator/transformations/target/target.js new file mode 100644 index 00000000000..7b5dca6bed1 --- /dev/null +++ b/dist/creator/transformations/target/target.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for target. Finds the target property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (webpackProperties && webpackProperties.length) { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "target", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/target/target.test.js b/dist/creator/transformations/target/target.test.js new file mode 100644 index 00000000000..e29d6ab1853 --- /dev/null +++ b/dist/creator/transformations/target/target.test.js @@ -0,0 +1,6 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "target", "target-0", "'async-node'"); +defineTest(__dirname, "target", "target-1", "node"); diff --git a/dist/creator/transformations/top-scope/__testfixtures__/top-scope-0.input.js b/dist/creator/transformations/top-scope/__testfixtures__/top-scope-0.input.js new file mode 100644 index 00000000000..4ba52ba2c8d --- /dev/null +++ b/dist/creator/transformations/top-scope/__testfixtures__/top-scope-0.input.js @@ -0,0 +1 @@ +module.exports = {} diff --git a/dist/creator/transformations/top-scope/top-scope.js b/dist/creator/transformations/top-scope/top-scope.js new file mode 100644 index 00000000000..daa92a75642 --- /dev/null +++ b/dist/creator/transformations/top-scope/top-scope.js @@ -0,0 +1,21 @@ +/* +* +* Get an property named topScope from yeoman and inject it to the top scope of +* the config, outside module.exports +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing topscope properties +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createTopScopeProperty(p) { + webpackProperties.forEach(n => { + p.value.body.splice(-1, 0, n); + }); + } + if (webpackProperties) { + return ast.find(j.Program).filter(p => createTopScopeProperty(p)); + } +}; diff --git a/dist/creator/transformations/top-scope/top-scope.test.js b/dist/creator/transformations/top-scope/top-scope.test.js new file mode 100644 index 00000000000..728b777c5d3 --- /dev/null +++ b/dist/creator/transformations/top-scope/top-scope.test.js @@ -0,0 +1,5 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "top-scope", "top-scope-0", ["var test = 'me';"]); diff --git a/dist/creator/transformations/watch/__testfixtures__/watch-0.input.js b/dist/creator/transformations/watch/__testfixtures__/watch-0.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/watch/__testfixtures__/watch-0.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/watch/__testfixtures__/watch-1.input.js b/dist/creator/transformations/watch/__testfixtures__/watch-1.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/watch/__testfixtures__/watch-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/watch/__testfixtures__/watch-2.input.js b/dist/creator/transformations/watch/__testfixtures__/watch-2.input.js new file mode 100644 index 00000000000..ea0822c2484 --- /dev/null +++ b/dist/creator/transformations/watch/__testfixtures__/watch-2.input.js @@ -0,0 +1,6 @@ +module.exports = { + entry: 'index.js', + output: { + filename: 'bundle.js' + } +} diff --git a/dist/creator/transformations/watch/watch.js b/dist/creator/transformations/watch/watch.js new file mode 100644 index 00000000000..ed92c572672 --- /dev/null +++ b/dist/creator/transformations/watch/watch.js @@ -0,0 +1,32 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for watch. Finds the watch property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + if (typeof webpackProperties === "boolean") { + return ast + .find(j.ObjectExpression) + .filter(p => + utils.isAssignment( + j, + p, + utils.pushCreateProperty, + "watch", + webpackProperties + ) + ); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/watch/watch.test.js b/dist/creator/transformations/watch/watch.test.js new file mode 100644 index 00000000000..ddaec086374 --- /dev/null +++ b/dist/creator/transformations/watch/watch.test.js @@ -0,0 +1,8 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "watch", "watch-0", true); +defineTest(__dirname, "watch", "watch-0", false); +defineTest(__dirname, "watch", "watch-1", true); +defineTest(__dirname, "watch", "watch-1", false); diff --git a/dist/creator/transformations/watch/watchOptions.js b/dist/creator/transformations/watch/watchOptions.js new file mode 100644 index 00000000000..c7f88cb48ab --- /dev/null +++ b/dist/creator/transformations/watch/watchOptions.js @@ -0,0 +1,28 @@ +"use strict"; + +const utils = require("../../../transformations/utils"); + +/* +* +* Transform for watchOptions. Finds the watchOptions property from yeoman and creates a +* property based on what the user has given us. +* +* @param j — jscodeshift API +* @param ast - jscodeshift API +* @param { Object } webpackProperties - Object containing transformation rules +* @returns ast - jscodeshift API +*/ + +module.exports = function(j, ast, webpackProperties) { + function createWatchOptionsProperty(p) { + utils.pushCreateProperty(j, p, "watchOptions", j.objectExpression([])); + return utils.pushObjectKeys(j, p, webpackProperties, "watchOptions"); + } + if (webpackProperties) { + return ast + .find(j.ObjectExpression) + .filter(p => utils.isAssignment(null, p, createWatchOptionsProperty)); + } else { + return ast; + } +}; diff --git a/dist/creator/transformations/watch/watchOptions.test.js b/dist/creator/transformations/watch/watchOptions.test.js new file mode 100644 index 00000000000..33a7d369fc3 --- /dev/null +++ b/dist/creator/transformations/watch/watchOptions.test.js @@ -0,0 +1,21 @@ +"use strict"; + +const defineTest = require("../../../transformations/defineTest"); + +defineTest(__dirname, "watchOptions", "watch-0", { + aggregateTimeout: 300, + poll: 1000, + ignored: "/node_modules/" +}); + +defineTest(__dirname, "watchOptions", "watch-1", { + aggregateTimeout: 300, + poll: 1000, + ignored: "/node_modules/" +}); + +defineTest(__dirname, "watchOptions", "watch-2", { + aggregateTimeout: 300, + poll: 1000, + ignored: "/node_modules/" +}); diff --git a/dist/creator/utils/run-prettier.js b/dist/creator/utils/run-prettier.js new file mode 100644 index 00000000000..5d503eedde0 --- /dev/null +++ b/dist/creator/utils/run-prettier.js @@ -0,0 +1,38 @@ +"use strict"; + +const prettier = require("prettier"); +const fs = require("fs"); +const chalk = require("chalk"); + +/* +* +* Runs prettier and later prints the output configuration +* +* @param { String } outputPath - Path to write the config to +* @param { Node } source - AST to write at the given path +* @returns fs - Writes a file at given location and prints messages accordingly +*/ + +module.exports = function runPrettier(outputPath, source) { + function validateConfig() { + let prettySource; + try { + prettySource = prettier.format(source, { + singleQuote: true, + useTabs: true, + tabWidth: 1 + }); + } catch (err) { + process.stdout.write( + "\n" + + chalk.yellow( + `WARNING: Could not apply prettier to ${outputPath}` + + " due validation error, but the file has been created\n" + ) + ); + prettySource = source; + } + return fs.writeFileSync(outputPath, prettySource, "utf8"); + } + return fs.writeFile(outputPath, source, "utf8", validateConfig); +}; diff --git a/dist/creator/utils/validate-options.js b/dist/creator/utils/validate-options.js new file mode 100644 index 00000000000..143e623f63e --- /dev/null +++ b/dist/creator/utils/validate-options.js @@ -0,0 +1,39 @@ +"use strict"; + +const fs = require("fs"); +const path = require("path"); + +/* +* @function getPath +* +* Finds the current filepath of a given string +* +* @param { String } part - The name of the file to be checked. +* @returns { String } - returns an string with the filepath +*/ + +function getPath(part) { + return path.join(process.cwd(), part); +} + +/* +* @function validateOptions +* +* Validates the options passed from an inquirer instance to make +* sure the path supplied exists +* +* @param { String } part - The name of the file to be checked. +* @returns { } part - checks if the path exists or throws an error +*/ + +module.exports = function validateOptions(opts) { + return Object.keys(opts).forEach(location => { + let part = getPath(opts[location]); + try { + fs.readFileSync(part); + } catch (err) { + console.error("Found no file at:", part); + process.exitCode = 1; + } + }); +}; diff --git a/dist/creator/utils/validate-options.spec.js b/dist/creator/utils/validate-options.spec.js new file mode 100644 index 00000000000..fe342e78fa1 --- /dev/null +++ b/dist/creator/utils/validate-options.spec.js @@ -0,0 +1,25 @@ +"use strict"; + +"use strict"; + +const validateOptions = require("../../../__mocks__/creator/validate-options.mock") + .validateOptions; + +describe("validate-options", () => { + it("should throw on fake paths", () => { + expect(() => { + validateOptions({ + entry: "noop", + output: "noopsi" + }); + }).toThrowError("Did not find the file"); + }); + + it("should find the real files", () => { + expect(() => { + validateOptions({ + entry: "package.json" + }); + }).not.toThrowError(/'Did not find the file'/); + }); +}); diff --git a/dist/creator/yeoman/utils/entry.js b/dist/creator/yeoman/utils/entry.js new file mode 100644 index 00000000000..027499c9610 --- /dev/null +++ b/dist/creator/yeoman/utils/entry.js @@ -0,0 +1,81 @@ +"use strict"; + +const InputValidate = require("webpack-addons").InputValidate; +const validate = require("./validate"); + +module.exports = (self, answer) => { + let entryIdentifiers; + let result; + if (answer["entryType"] === true) { + result = self + .prompt([ + InputValidate( + "multipleEntries", + "Type the names you want for your modules (entry files), separated by comma [example: 'app,vendor']", + validate + ) + ]) + .then(multipleEntriesAnswer => { + let webpackEntryPoint = {}; + entryIdentifiers = multipleEntriesAnswer["multipleEntries"].split(","); + function forEachPromise(obj, fn) { + return obj.reduce(function(promise, prop) { + const trimmedProp = prop.trim(); + return promise.then(n => { + if (n) { + Object.keys(n).forEach(val => { + if ( + n[val].charAt(0) !== "(" && + n[val].charAt(0) !== "[" && + n[val].indexOf("function") < 0 && + n[val].indexOf("path") < 0 && + n[val].indexOf("process") < 0 + ) { + n[val] = `"${n[val]}.js"`; + } + webpackEntryPoint[val] = n[val]; + }); + } else { + n = {}; + } + return fn(trimmedProp); + }); + }, Promise.resolve()); + } + return forEachPromise(entryIdentifiers, entryProp => + self.prompt([ + InputValidate( + `${entryProp}`, + `What is the location of "${entryProp}"? [example: "./src/${entryProp}"]`, + validate + ) + ]) + ).then(propAns => { + Object.keys(propAns).forEach(val => { + if ( + propAns[val].charAt(0) !== "(" && + propAns[val].charAt(0) !== "[" && + propAns[val].indexOf("function") < 0 && + propAns[val].indexOf("path") < 0 && + propAns[val].indexOf("process") < 0 + ) { + propAns[val] = `"${propAns[val]}.js"`; + } + webpackEntryPoint[val] = propAns[val]; + }); + return webpackEntryPoint; + }); + }); + } else { + result = self + .prompt([ + InputValidate( + "singularEntry", + "Which module will be the first to enter the application? [example: './src/index']", + validate + ) + ]) + .then(singularAnswer => `"${singularAnswer["singularEntry"]}"`); + } + return result; +}; diff --git a/dist/creator/yeoman/utils/module.js b/dist/creator/yeoman/utils/module.js new file mode 100644 index 00000000000..b9b8660f606 --- /dev/null +++ b/dist/creator/yeoman/utils/module.js @@ -0,0 +1,10 @@ +module.exports = () => { + return { + test: new RegExp(/\.js$/), + exclude: "/node_modules/", + loader: "'babel-loader'", + options: { + presets: ["'es2015'"] + } + }; +}; diff --git a/dist/creator/yeoman/utils/plugins.js b/dist/creator/yeoman/utils/plugins.js new file mode 100644 index 00000000000..bcd523ad462 --- /dev/null +++ b/dist/creator/yeoman/utils/plugins.js @@ -0,0 +1,3 @@ +module.exports = () => { + return ["new UglifyJSPlugin()"]; +}; diff --git a/dist/creator/yeoman/utils/tooltip.js b/dist/creator/yeoman/utils/tooltip.js new file mode 100644 index 00000000000..97bf748a009 --- /dev/null +++ b/dist/creator/yeoman/utils/tooltip.js @@ -0,0 +1,47 @@ +module.exports = { + uglify: () => { + return `/* + * We've enabled UglifyJSPlugin for you! This minifies your app + * in order to load faster and run less javascript. + * + * https://github.com/webpack-contrib/uglifyjs-webpack-plugin + * + */`; + }, + commonsChunk: () => { + return `/* + * We've enabled commonsChunkPlugin for you. This allows your app to + * load faster and it splits the modules you provided as entries across + * different bundles! + * + * https://webpack.js.org/plugins/commons-chunk-plugin/ + * + */`; + }, + cssPlugin: () => { + return `/* + * We've enabled ExtractTextPlugin for you. This allows your app to + * use css modules that will be moved into a separate CSS file instead of inside + * one of your module entries! + * + * https://github.com/webpack-contrib/extract-text-webpack-plugin + * + */`; + }, + postcss: () => { + return `/* + * We've enabled Postcss, autoprefixer and precss for you. This allows your app + * to lint CSS, support variables and mixins, transpile future CSS syntax, + * inline images, and more! + * + * To enable SASS or LESS, add the respective loaders to module.rules + * + * https://github.com/postcss/postcss + * + * https://github.com/postcss/autoprefixer + * + * https://github.com/jonathantneal/precss + * + */`; + } +}; diff --git a/dist/creator/yeoman/utils/validate.js b/dist/creator/yeoman/utils/validate.js new file mode 100644 index 00000000000..9f8f932f7e8 --- /dev/null +++ b/dist/creator/yeoman/utils/validate.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = value => { + const pass = value.length; + if (pass) { + return true; + } + return "Please specify an answer!"; +}; diff --git a/dist/creator/yeoman/webpack-adapter.js b/dist/creator/yeoman/webpack-adapter.js new file mode 100644 index 00000000000..4a9262ea848 --- /dev/null +++ b/dist/creator/yeoman/webpack-adapter.js @@ -0,0 +1,18 @@ +"use strict"; + +const inquirer = require("inquirer"); + +/* +* @class - WebpackAdapter +* +* Custom adapter that is integrated in the scaffold. Here we can validate +* paths and answers from the user +* +*/ +module.exports = class WebpackAdapter { + prompt(questions, callback) { + const promise = inquirer.prompt(questions); + promise.then(callback || function() {}); + return promise; + } +}; diff --git a/dist/creator/yeoman/webpack-generator.js b/dist/creator/yeoman/webpack-generator.js new file mode 100644 index 00000000000..0c3ffc1ddcf --- /dev/null +++ b/dist/creator/yeoman/webpack-generator.js @@ -0,0 +1,401 @@ +"use strict"; + +const Generator = require("yeoman-generator"); +const chalk = require("chalk"); + +const createCommonsChunkPlugin = require("webpack-addons") + .createCommonsChunkPlugin; + +const Input = require("webpack-addons").Input; +const Confirm = require("webpack-addons").Confirm; +const RawList = require("webpack-addons").RawList; + +const getPackageManager = require("../../utils/package-manager") + .getPackageManager; + +const entryQuestions = require("./utils/entry"); +const getBabelPlugin = require("./utils/module"); +const getDefaultPlugins = require("./utils/plugins"); +const tooltip = require("./utils/tooltip"); + +module.exports = class WebpackGenerator extends Generator { + constructor(args, opts) { + super(args, opts); + this.isProd = false; + this.dependencies = ["webpack", "uglifyjs-webpack-plugin"]; + this.configuration = { + config: { + webpackOptions: {}, + topScope: [] + } + }; + } + prompting() { + let done = this.async(); + let self = this; + let oneOrMoreEntries; + let regExpForStyles; + let ExtractUseProps; + let outputPath = "dist"; + process.stdout.write( + `\n${chalk.bold("Insecure about some of the questions?")}\n` + ); + process.stdout.write( + `\n${chalk.bold.green( + "https://github.com/webpack/webpack-cli/blob/master/INIT.md" + )}\n\n` + ); + this.configuration.config.webpackOptions.module = { + rules: [] + }; + this.configuration.config.webpackOptions.plugins = getDefaultPlugins(); + this.configuration.config.topScope.push( + "const webpack = require('webpack')", + "const path = require('path')", + tooltip.uglify(), + "const UglifyJSPlugin = require('uglifyjs-webpack-plugin');", + "\n" + ); + this.prompt([ + Confirm("entryType", "Will your application have multiple bundles?") + ]).then(entryTypeAnswer => { + // Ask different questions for entry points + entryQuestions(self, entryTypeAnswer) + .then(entryOptions => { + this.configuration.config.webpackOptions.entry = entryOptions; + oneOrMoreEntries = Object.keys(entryOptions); + }) + .then(() => { + this.prompt([ + Input( + "outputType", + "Which folder will your generated bundles be in? [default: dist]:" + ) + ]) + .then(outputTypeAnswer => { + if (!this.configuration.config.webpackOptions.entry.length) { + this.configuration.config.topScope.push(tooltip.commonsChunk()); + this.configuration.config.webpackOptions.output = { + filename: "'[name].[chunkhash].js'", + chunkFilename: "'[name].[chunkhash].js'" + }; + } else { + this.configuration.config.webpackOptions.output = { + filename: "'[name].bundle.js'" + }; + } + if (outputTypeAnswer["outputType"].length) { + outputPath = outputTypeAnswer["outputType"]; + } + this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`; + }) + .then(() => { + this.prompt([ + Confirm( + "prodConfirm", + "Are you going to use this in production?" + ) + ]) + .then(prodAnswer => { + if (prodAnswer["prodConfirm"] === true) { + this.isProd = true; + } else { + this.isProd = false; + } + }) + .then(() => { + this.prompt([ + Confirm("babelConfirm", "Will you be using ES2015?") + ]) + .then(ans => { + if (ans["babelConfirm"] === true) { + this.configuration.config.webpackOptions.module.rules.push( + getBabelPlugin() + ); + this.dependencies.push( + "babel-loader", + "babel-core", + "babel-preset-es2015" + ); + } + }) + .then(() => { + this.prompt([ + RawList( + "stylingType", + "Will you use one of the below CSS solutions?", + ["SASS", "LESS", "CSS", "PostCSS", "No"] + ) + ]) + .then(stylingAnswer => { + if (!this.isProd) { + ExtractUseProps = []; + } + switch (stylingAnswer["stylingType"]) { + case "SASS": + this.dependencies.push( + "sass-loader", + "node-sass", + "style-loader", + "css-loader" + ); + regExpForStyles = new RegExp(/\.(scss|css)$/); + if (this.isProd) { + ExtractUseProps = `use: [{ + loader: "css-loader", + options: { + sourceMap: true + } + }, { + loader: "sass-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push( + { + loader: "'style-loader'" + }, + { + loader: "'css-loader'" + }, + { + loader: "'sass-loader'" + } + ); + } + break; + case "LESS": + regExpForStyles = new RegExp(/\.(less|css)$/); + this.dependencies.push( + "less-loader", + "less", + "style-loader", + "css-loader" + ); + if (this.isProd) { + ExtractUseProps = ` + use: [{ + loader: "css-loader", + options: { + sourceMap: true + } + }, { + loader: "less-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push( + { + loader: "'css-loader'", + options: { + sourceMap: true + } + }, + { + loader: "'less-loader'", + options: { + sourceMap: true + } + } + ); + } + break; + case "PostCSS": + this.configuration.config.topScope.push( + tooltip.postcss(), + "const autoprefixer = require('autoprefixer');", + "const precss = require('precss');", + "\n" + ); + this.dependencies.push( + "style-loader", + "css-loader", + "postcss-loader", + "precss", + "autoprefixer" + ); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = ` + use: [{ + loader: "style-loader" + },{ + loader: "css-loader", + options: { + sourceMap: true, + importLoaders: 1 + } + }, { + loader: "postcss-loader", + options: { + plugins: function () { + return [ + precss, + autoprefixer + ]; + } + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push( + { + loader: "'style-loader'" + }, + { + loader: "'css-loader'", + options: { + sourceMap: true, + importLoaders: 1 + } + }, + { + loader: "'postcss-loader'", + options: { + plugins: `function () { + return [ + precss, + autoprefixer + ]; + }` + } + } + ); + } + break; + case "CSS": + this.dependencies.push( + "style-loader", + "css-loader" + ); + regExpForStyles = new RegExp(/\.css$/); + if (this.isProd) { + ExtractUseProps = `use: [{ + loader: "css-loader", + options: { + sourceMap: true + } + }], + fallback: "style-loader"`; + } else { + ExtractUseProps.push( + { + loader: "'style-loader'", + options: { + sourceMap: true + } + }, + { + loader: "'css-loader'" + } + ); + } + break; + default: + regExpForStyles = null; + } + }) + .then(() => { + // Ask if the user wants to use extractPlugin + this.prompt([ + Input( + "extractPlugin", + "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)" + ) + ]) + .then(extractAnswer => { + if (regExpForStyles) { + if (this.isProd) { + this.configuration.config.topScope.push( + tooltip.cssPlugin() + ); + this.dependencies.push( + "extract-text-webpack-plugin" + ); + if ( + extractAnswer["extractPlugin"].length !== 0 + ) { + this.configuration.config.webpackOptions.plugins.push( + "new ExtractTextPlugin('" + + extractAnswer["extractPlugin"] + + ".[contentHash].css')" + ); + } else { + this.configuration.config.webpackOptions.plugins.push( + "new ExtractTextPlugin('" + "style.css')" + ); + } + const moduleRulesObj = { + test: regExpForStyles, + use: `ExtractTextPlugin.extract({ + ${ExtractUseProps} + })` + }; + this.configuration.config.webpackOptions.module.rules.push( + moduleRulesObj + ); + this.configuration.config.topScope.push( + "const ExtractTextPlugin = require('extract-text-webpack-plugin');", + "\n" + ); + } else { + const moduleRulesObj = { + test: regExpForStyles, + use: ExtractUseProps + }; + this.configuration.config.webpackOptions.module.rules.push( + moduleRulesObj + ); + } + } + }) + .then(() => { + if ( + !this.configuration.config.webpackOptions.entry + .length + ) { + oneOrMoreEntries.forEach(prop => { + this.configuration.config.webpackOptions.plugins.push( + createCommonsChunkPlugin(prop) + ); + }); + } + done(); + }); + }); + }); + }); + }); + }); + }); + } + installPlugins() { + let asyncNamePrompt = this.async(); + let defaultName = this.isProd ? "prod" : "config"; + this.prompt([ + Input( + "nameType", + `Name your 'webpack.[name].js?' [default: '${defaultName}']:` + ) + ]) + .then(nameAnswer => { + if (nameAnswer["nameType"].length) { + this.configuration.config.configName = nameAnswer["nameType"]; + } else { + this.configuration.config.configName = defaultName; + } + }) + .then(() => { + asyncNamePrompt(); + this.runInstall(getPackageManager(), this.dependencies, { + "save-dev": true + }); + }); + } +}; diff --git a/dist/generate-loader/index.js b/dist/generate-loader/index.js new file mode 100644 index 00000000000..ff83f5f84fa --- /dev/null +++ b/dist/generate-loader/index.js @@ -0,0 +1,17 @@ +var yeoman = require("yeoman-environment"); +var LoaderGenerator = require("./loader-generator").LoaderGenerator; + +/** + * Runs a yeoman generator to create a new webpack loader project + * @returns {void} + */ +function loaderCreator() { + var env = yeoman.createEnv(); + var generatorName = "webpack-loader-generator"; + + env.registerStub(LoaderGenerator, generatorName); + + env.run(generatorName); +} + +module.exports = loaderCreator; diff --git a/dist/generate-loader/loader-generator.js b/dist/generate-loader/loader-generator.js new file mode 100644 index 00000000000..8d5720c69ab --- /dev/null +++ b/dist/generate-loader/loader-generator.js @@ -0,0 +1,58 @@ +var path = require("path"); +var _ = require("lodash"); +var webpackGenerator = require("../utils/webpack-generator"); + +/** + * Formats a string into webpack loader format + * (eg: 'style-loader', 'raw-loader') + * + * @param {string} name A loader name to be formatted + * @returns {string} The formatted string + */ +function makeLoaderName(name) { + name = _.kebabCase(name); + if (!/loader$/.test(name)) { + name += "-loader"; + } + return name; +} + +/** + * A yeoman generator class for creating a webpack + * loader project. It adds some starter loader code + * and runs `webpack-defaults`. + * + * @class LoaderGenerator + * @extends {Generator} + */ +var LoaderGenerator = webpackGenerator( + [ + { + type: "input", + name: "name", + message: "Loader name", + default: "my-loader", + filter: makeLoaderName, + validate: str => str.length > 0 + } + ], + path.join(__dirname, "templates"), + [ + "src/cjs.js.tpl", + "test/test-utils.js.tpl", + "test/unit.test.js.tpl", + "test/functional.test.js.tpl", + "test/fixtures/simple-file.js.tpl", + "examples/simple/webpack.config.js.tpl", + "examples/simple/src/index.js.tpl", + "examples/simple/src/lazy-module.js.tpl", + "examples/simple/src/static-esm-module.js.tpl" + ], + ["src/_index.js.tpl"], + gen => ({ name: gen.props.name }) +); + +module.exports = { + makeLoaderName, + LoaderGenerator +}; diff --git a/dist/generate-loader/loader-generator.test.js b/dist/generate-loader/loader-generator.test.js new file mode 100644 index 00000000000..232013598ed --- /dev/null +++ b/dist/generate-loader/loader-generator.test.js @@ -0,0 +1,15 @@ +"use strict"; + +var makeLoaderName = require("./loader-generator").makeLoaderName; + +describe("makeLoaderName", () => { + it("should kebab-case loader name and append '-loader'", () => { + var loaderName = makeLoaderName("This is a test"); + expect(loaderName).toEqual("this-is-a-test-loader"); + }); + + it("should not modify a properly formatted loader name", () => { + var loaderName = makeLoaderName("properly-named-loader"); + expect(loaderName).toEqual("properly-named-loader"); + }); +}); diff --git a/dist/generate-plugin/index.js b/dist/generate-plugin/index.js new file mode 100644 index 00000000000..82fe7dd386d --- /dev/null +++ b/dist/generate-plugin/index.js @@ -0,0 +1,17 @@ +var yeoman = require("yeoman-environment"); +var PluginGenerator = require("./plugin-generator").PluginGenerator; + +/** + * Runs a yeoman generator to create a new webpack plugin project + * @returns {void} + */ +function pluginCreator() { + var env = yeoman.createEnv(); + var generatorName = "webpack-plugin-generator"; + + env.registerStub(PluginGenerator, generatorName); + + env.run(generatorName); +} + +module.exports = pluginCreator; diff --git a/dist/generate-plugin/plugin-generator.js b/dist/generate-plugin/plugin-generator.js new file mode 100644 index 00000000000..ffc4022119a --- /dev/null +++ b/dist/generate-plugin/plugin-generator.js @@ -0,0 +1,39 @@ +var path = require("path"); +var _ = require("lodash"); +var webpackGenerator = require("../utils/webpack-generator"); + +/** + * A yeoman generator class for creating a webpack + * plugin project. It adds some starter plugin code + * and runs `webpack-defaults`. + * + * @class PluginGenerator + * @extends {Generator} + */ +var PluginGenerator = webpackGenerator( + [ + { + type: "input", + name: "name", + message: "Plugin name", + default: "my-webpack-plugin", + filter: _.kebabCase, + validate: str => str.length > 0 + } + ], + path.join(__dirname, "templates"), + [ + "src/cjs.js.tpl", + "test/test-utils.js.tpl", + "test/functional.test.js.tpl", + "examples/simple/src/index.js.tpl", + "examples/simple/src/lazy-module.js.tpl", + "examples/simple/src/static-esm-module.js.tpl" + ], + ["src/_index.js.tpl", "examples/simple/_webpack.config.js.tpl"], + gen => ({ name: _.upperFirst(_.camelCase(gen.props.name)) }) +); + +module.exports = { + PluginGenerator +}; diff --git a/dist/initialize.js b/dist/initialize.js new file mode 100644 index 00000000000..732d36ac525 --- /dev/null +++ b/dist/initialize.js @@ -0,0 +1,22 @@ +"use strict"; + +const npmPackagesExists = require("./utils/npm-packages-exists"); +const creator = require("./creator/index").creator; + +/* +* @function initializeInquirer +* +* First function to be called after running the init flag. This is a check, +* if we are running the init command with no arguments or if we got dependencies +* +* @param { Object } pkg - packages included when running the init command +* @returns { } creator|npmPackagesExists - returns an installation of the package, +* followed up with a yeoman instance of that if there's packages. If not, it creates a defaultGenerator +*/ + +module.exports = function initializeInquirer(pkg) { + if (pkg.length === 0) { + return creator(); + } + return npmPackagesExists(pkg); +}; diff --git a/dist/migrate.js b/dist/migrate.js new file mode 100644 index 00000000000..218ce0f2c62 --- /dev/null +++ b/dist/migrate.js @@ -0,0 +1,114 @@ +"use strict"; + +const fs = require("fs"); +const chalk = require("chalk"); +const diff = require("diff"); +const inquirer = require("inquirer"); +const PLazy = require("p-lazy"); +const Listr = require("listr"); +const validateSchema = require("./utils/validateSchema.js"); +const webpackOptionsSchema = require("./utils/webpackOptionsSchema.json"); +const WebpackOptionsValidationError = require("./utils/WebpackOptionsValidationError"); + +module.exports = function transformFile( + currentConfigPath, + outputConfigPath, + options +) { + const recastOptions = Object.assign( + { + quote: "single" + }, + options + ); + const tasks = new Listr([ + { + title: "Reading webpack config", + task: ctx => + new PLazy((resolve, reject) => { + fs.readFile(currentConfigPath, "utf8", (err, content) => { + if (err) { + reject(err); + } + try { + const jscodeshift = require("jscodeshift"); + ctx.source = content; + ctx.ast = jscodeshift(content); + resolve(); + } catch (err) { + reject("Error generating AST", err); + } + }); + }) + }, + { + title: "Migrating config from v1 to v2", + task: ctx => { + const transformations = require("./transformations").transformations; + return new Listr( + Object.keys(transformations).map(key => { + const transform = transformations[key]; + return { + title: key, + task: () => transform(ctx.ast, ctx.source) + }; + }) + ); + } + } + ]); + + tasks + .run() + .then(ctx => { + const result = ctx.ast.toSource(recastOptions); + const diffOutput = diff.diffLines(ctx.source, result); + diffOutput.forEach(diffLine => { + if (diffLine.added) { + process.stdout.write(chalk.green(`+ ${diffLine.value}`)); + } else if (diffLine.removed) { + process.stdout.write(chalk.red(`- ${diffLine.value}`)); + } + }); + inquirer + .prompt([ + { + type: "confirm", + name: "confirmMigration", + message: "Are you sure these changes are fine?", + default: "Y" + } + ]) + .then(answers => { + if (answers["confirmMigration"]) { + fs.writeFile(outputConfigPath, result, "utf8", err => { + const webpackOptionsValidationErrors = validateSchema( + webpackOptionsSchema, + require(outputConfigPath) + ); + if (err) { + throw err; + } else if (webpackOptionsValidationErrors.length) { + const validationMsg = new WebpackOptionsValidationError( + webpackOptionsValidationErrors + ); + throw validationMsg.message; + } else { + console.log( + chalk.green( + `\n ✔︎ New webpack v2 config file is at ${outputConfigPath}` + ) + ); + } + }); + } else { + console.log(chalk.red("✖ Migration aborted")); + } + }); + }) + .catch(err => { + console.log(chalk.red("✖ ︎Migration aborted due to some errors")); + console.error(err); + process.exitCode = 1; + }); +}; diff --git a/dist/transformations/__testfixtures__/failing.js b/dist/transformations/__testfixtures__/failing.js new file mode 100644 index 00000000000..a52f3ffe703 --- /dev/null +++ b/dist/transformations/__testfixtures__/failing.js @@ -0,0 +1,80 @@ +var webpack = require("webpack"); +var nodeEnvironment = process.env.NODE_ENV; +var _ = require("lodash"); + +var config = { + entry: { + lib: "./app/index.js", + email: "./app/email.js" + }, + plugins: [ + new webpack.DefinePlugin({ + INCLUDE_ALL_MODULES: function includeAllModulesGlobalFn(modulesArray, application) { + modulesArray.forEach(function executeModuleIncludesFn(moduleFn) { + moduleFn(application); + }); + }, + ENVIRONMENT: JSON.stringify(nodeEnvironment) + }) + ], + output: { + path: __dirname + "/app", + filename: "bundle.js" + }, + resolve: { + root: __dirname + "/app" + }, + module: { + // preLoaders: [ + // { test: /\.js?$/, loader: 'eslint', exclude: /node_modules/ } + // ], + loaders: [ + { test: /\.js$/, exclude: /(node_modules)/, loader: "babel" }, + { test: /\.html/, exclude: [/(node_modules)/, /src\/index\.html/], loader: "html-loader" }, + { test: /\.s?css$/, loader: "style!css!sass" }, + { test: /\.(png|jpg)$/, loader: "url-loader?mimetype=image/png" } + ] + }, + // extra configuration options. + // eslint: { + // configFile: '.eslintrc.js' + // } +}; + +switch (nodeEnvironment) { + case "production": + config.plugins.push(new webpack.optimize.UglifyJsPlugin()); + case "preproduction": + config.output.path = __dirname + "/dist"; + config.plugins.push(new webpack.optimize.DedupePlugin()); + config.plugins.push(new webpack.optimize.OccurenceOrderPlugin()); + + config.output.filename = "[name].js"; + + config.entry = { + lib: ["./app/index.js", "angular", "lodash"], + email: ["./app/email.js", "angular"] + }; + + config.devtool = "source-map"; + config.output.libraryTarget = "commonjs2"; + break; + + case "test": + config.entry = "./index.js"; + break; + + case "development": + config.entry = { + lib: ["./app/index.js", "webpack/hot/dev-server"], + email: ["./app/email.js", "webpack/hot/dev-server"] + }; + config.output.filename = "[name].js"; + config.devtool = "source-map"; + break; + + default: + console.warn("Unknown or Undefined Node Environment. Please refer to package.json for available build commands."); +} + +module.exports = config; diff --git a/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-0.input.js b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-0.input.js new file mode 100644 index 00000000000..56c89e72d84 --- /dev/null +++ b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-0.input.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + new webpack.BannerPlugin('Banner', { raw: true, entryOnly: true }) + ] +} diff --git a/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-1.input.js b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-1.input.js new file mode 100644 index 00000000000..0d66b9de1ac --- /dev/null +++ b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-1.input.js @@ -0,0 +1,4 @@ +// Should do nothing if there is no banner plugin +module.exports = { + plugins: [] +} diff --git a/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-2.input.js b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-2.input.js new file mode 100644 index 00000000000..90ecde8f0de --- /dev/null +++ b/dist/transformations/bannerPlugin/__testfixtures__/bannerPlugin-2.input.js @@ -0,0 +1,6 @@ +// Only transform if it uses the old format +module.exports = { + plugins: [ + new webpack.BannerPlugin({}) + ] +} diff --git a/dist/transformations/bannerPlugin/bannerPlugin.js b/dist/transformations/bannerPlugin/bannerPlugin.js new file mode 100644 index 00000000000..ca38235686c --- /dev/null +++ b/dist/transformations/bannerPlugin/bannerPlugin.js @@ -0,0 +1,27 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const utils = require("../utils"); + +module.exports = function(j , ast ) { + return utils + .findPluginsByName(j, ast, ["webpack.BannerPlugin"]) + .forEach((path ) => { + const args = path.value.arguments; // any node + // If the first argument is a literal replace it with object notation + // See https://webpack.js.org/guides/migrating/#bannerplugin-breaking-change + if (args && args.length > 1 && args[0].type === j.Literal.name) { + // and remove the first argument + path.value.arguments = [path.value.arguments[1]]; + utils.createOrUpdatePluginByName( + j, + path.parent, + "webpack.BannerPlugin", + { + banner: args[0].value + } + ); + } + }); +}; diff --git a/dist/transformations/bannerPlugin/bannerPlugin.test.js b/dist/transformations/bannerPlugin/bannerPlugin.test.js new file mode 100644 index 00000000000..004d08b6635 --- /dev/null +++ b/dist/transformations/bannerPlugin/bannerPlugin.test.js @@ -0,0 +1,7 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "bannerPlugin", "bannerPlugin-0"); +defineTest(__dirname, "bannerPlugin", "bannerPlugin-1"); +defineTest(__dirname, "bannerPlugin", "bannerPlugin-2"); diff --git a/dist/transformations/defineTest.js b/dist/transformations/defineTest.js new file mode 100644 index 00000000000..b2417c2213e --- /dev/null +++ b/dist/transformations/defineTest.js @@ -0,0 +1,95 @@ +"use strict"; + +const fs = require("fs"); +const path = require("path"); + +/** + * Utility function to run a jscodeshift script within a unit test. + * This makes several assumptions about the environment. + * + * Notes: + * - The test should be located in a subdirectory next to the transform itself. + * Commonly tests are located in a directory called __tests__. + * + * - Test data should be located in a directory called __testfixtures__ + * alongside the transform and __tests__ directory. + * @param {String} dirName contains the name of the directory the test is located in. This + * should normally be passed via __dirname. + * @param {String} transformName contains the filename of the transform being tested, + * excluding the .js extension. + * @param {String} [testFilePrefix] Optionally contains the name of the file with the test + * data. If not specified, it defaults to the same value as `transformName`. + * This will be suffixed with ".input.js" for the input file and ".output.js" + * for the expected output. For example, if set to "foo", we will read the + * "foo.input.js" file, pass this to the transform, and expect its output to + * be equal to the contents of "foo.output.js". + * @param {Object|Boolean|String} initOptions TBD + * @return {TBD} TBD + */ +function runSingleTansform( + dirName, + transformName, + testFilePrefix, + initOptions +) { + if (!testFilePrefix) { + testFilePrefix = transformName; + } + const fixtureDir = path.join(dirName, "__testfixtures__"); + const inputPath = path.join(fixtureDir, testFilePrefix + ".input.js"); + const source = fs.readFileSync(inputPath, "utf8"); + // Assumes transform and test are on the same level + const module = require(path.join(dirName, transformName + ".js")); + // Handle ES6 modules using default export for the transform + const transform = module.default ? module.default : module; + + // Jest resets the module registry after each test, so we need to always get + // a fresh copy of jscodeshift on every test run. + let jscodeshift = require("jscodeshift/dist/core"); + if (module.parser) { + jscodeshift = jscodeshift.withParser(module.parser); + } + const ast = jscodeshift(source); + if (initOptions || typeof initOptions === "boolean") { + return transform(jscodeshift, ast, initOptions).toSource({ + quote: "single" + }); + } + return transform(jscodeshift, ast, source).toSource({ + quote: "single" + }); +} + +/** + * Handles some boilerplate around defining a simple jest/Jasmine test for a + * jscodeshift transform. + * @param {String} dirName contains the name of the directory the test is located in. This + * should normally be passed via __dirname. + * @param {String} transformName contains the filename of the transform being tested, + * excluding the .js extension. + * @param {String} [testFilePrefix] Optionally contains the name of the file with the test + * data. If not specified, it defaults to the same value as `transformName`. + * This will be suffixed with ".input.js" for the input file and ".output.js" + * for the expected output. For example, if set to "foo", we will read the + * "foo.input.js" file, pass this to the transform, and expect its output to + * be equal to the contents of "foo.output.js". + * @param {TBD} type TBD + * @return {TBD} TBD + */ +function defineTest(dirName, transformName, testFilePrefix, type) { + const testName = testFilePrefix + ? `transforms correctly using "${testFilePrefix}" data` + : "transforms correctly"; + describe(transformName, () => { + it(testName, () => { + const output = runSingleTansform( + dirName, + transformName, + testFilePrefix, + type + ); + expect(output).toMatchSnapshot(); + }); + }); +} +module.exports = defineTest; diff --git a/dist/transformations/extractTextPlugin/__testfixtures__/extractTextPlugin.input.js b/dist/transformations/extractTextPlugin/__testfixtures__/extractTextPlugin.input.js new file mode 100644 index 00000000000..f578bb4342d --- /dev/null +++ b/dist/transformations/extractTextPlugin/__testfixtures__/extractTextPlugin.input.js @@ -0,0 +1,16 @@ +let ExtractTextPlugin = require('extract-text-webpack-plugin'); +let HTMLWebpackPlugin = require('html-webpack-plugin'); + +module.export = { + module: { + rules: [ + { + test: /\.css$/, + use: ExtractTextPlugin.extract('style-loader', 'css-loader') + } + ] + }, + plugins: [ + new ExtractTextPlugin("styles.css"), + ] +} diff --git a/dist/transformations/extractTextPlugin/extractTextPlugin.js b/dist/transformations/extractTextPlugin/extractTextPlugin.js new file mode 100644 index 00000000000..05807e2ed7f --- /dev/null +++ b/dist/transformations/extractTextPlugin/extractTextPlugin.js @@ -0,0 +1,58 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + + + + + + + + +const utils = require("../utils"); + +function findInvocation( + j , + node , + pluginName +) { + let found = false; + found = + j(node) + .find(j.MemberExpression) + .filter(p => p.get("object").value.name === pluginName) + .size() > 0; + return found; +} + +module.exports = function(j , ast ) { + const changeArguments = function(p ) { + const args = p.value.arguments; + // if(args.length === 1) { + // return p; + // } else + const literalArgs = args.filter(p => + utils.isType(p, "Literal") + ); + if (literalArgs && literalArgs.length > 1) { + const newArgs = j.objectExpression( + literalArgs.map((p , index ) => + utils.createProperty(j, index === 0 ? "fallback" : "use", p.value) + ) + ); + p.value.arguments = [newArgs]; + } + return p; + }; + const name = utils.findVariableToPlugin( + j, + ast, + "extract-text-webpack-plugin" + ); + if (!name) return ast; + + return ast + .find(j.CallExpression) + .filter((p ) => findInvocation(j, p, name)) + .forEach(changeArguments); +}; diff --git a/dist/transformations/extractTextPlugin/extractTextPlugin.test.js b/dist/transformations/extractTextPlugin/extractTextPlugin.test.js new file mode 100644 index 00000000000..199067becf3 --- /dev/null +++ b/dist/transformations/extractTextPlugin/extractTextPlugin.test.js @@ -0,0 +1,5 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "extractTextPlugin"); diff --git a/dist/transformations/index.js b/dist/transformations/index.js new file mode 100644 index 00000000000..4af20b33eff --- /dev/null +++ b/dist/transformations/index.js @@ -0,0 +1,89 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const jscodeshift = require("jscodeshift"); +const pEachSeries = require("p-each-series"); +const PLazy = require("p-lazy"); + +const loadersTransform = require("./loaders/loaders"); +const resolveTransform = require("./resolve/resolve"); +const removeJsonLoaderTransform = require("./removeJsonLoader/removeJsonLoader"); +const uglifyJsPluginTransform = require("./uglifyJsPlugin/uglifyJsPlugin"); +const loaderOptionsPluginTransform = require("./loaderOptionsPlugin/loaderOptionsPlugin"); +const bannerPluginTransform = require("./bannerPlugin/bannerPlugin"); +const extractTextPluginTransform = require("./extractTextPlugin/extractTextPlugin"); +const removeDeprecatedPluginsTransform = require("./removeDeprecatedPlugins/removeDeprecatedPlugins"); + +const transformsObject = { + loadersTransform, + resolveTransform, + removeJsonLoaderTransform, + uglifyJsPluginTransform, + loaderOptionsPluginTransform, + bannerPluginTransform, + extractTextPluginTransform, + removeDeprecatedPluginsTransform +}; + +const transformations = Object.keys(transformsObject).reduce((res, key) => { + res[key] = (ast, source) => + transformSingleAST(ast, source, transformsObject[key]); + return res; +}, {}); + +function transformSingleAST( + ast , + source , + transformFunction +) { + return new PLazy((resolve, reject) => { + setTimeout(() => { + try { + resolve(transformFunction(jscodeshift, ast, source)); + } catch (err) { + reject(err); + } + }, 0); + }); +} + +/* + * @function transform + * + * Tranforms a given source code by applying selected transformations to the AST + * + * @param { String } source - Source file contents + * @param { Array } transformations - List of trnasformation functions in defined the + * order to apply. By default all defined transfomations. + * @param { Object } options - Reacst formatting options + * @returns { String } Transformed source code + * */ +function transform( + source , + transforms , + options +) { + const ast = jscodeshift(source); + const recastOptions = Object.assign( + { + quote: "single" + }, + options + ); + transforms = + transforms || Object.keys(transformations).map(k => transformations[k]); + return pEachSeries(transforms, f => f(ast, source)) + .then(() => { + return ast.toSource(recastOptions); + }) + .catch(err => { + console.error(err); + }); +} + +module.exports = { + transform, + transformSingleAST, + transformations +}; diff --git a/dist/transformations/index.test.js b/dist/transformations/index.test.js new file mode 100644 index 00000000000..d1a47393a81 --- /dev/null +++ b/dist/transformations/index.test.js @@ -0,0 +1,66 @@ +"use strict"; + +const transform = require("./index").transform; +const transformations = require("./index").transformations; + +const input = ` +module.exports = { + devtool: 'eval', + entry: [ + './src/index' + ], + output: { + path: path.join(__dirname, 'dist'), + filename: 'index.js' + }, + module: { + loaders: [{ + test: /.js$/, + loaders: ['babel'], + include: path.join(__dirname, 'src') + }] + }, + resolve: { + root: path.resolve('/src'), + modules: ['node_modules'] + }, + plugins: [ + new webpack.optimize.UglifyJsPlugin(), + new webpack.optimize.OccurrenceOrderPlugin() + ], + debug: true +}; +`; + +describe("transform", () => { + it("should not transform if no transformations defined", done => { + transform(input, []).then(output => { + expect(output).toEqual(input); + done(); + }); + }); + + it("should transform using all transformations", done => { + transform(input).then(output => { + expect(output).toMatchSnapshot(); + done(); + }); + }); + + it("should transform only using specified transformations", done => { + transform(input, [transformations.loadersTransform]).then(output => { + expect(output).toMatchSnapshot(); + done(); + }); + }); + + it("should respect recast options", done => { + transform(input, undefined, { + quote: "double", + trailingComma: true + }).then(output => { + expect(output).toMatchSnapshot(); + done(); + }); + }); +}); diff --git a/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-0.input.js b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-0.input.js new file mode 100644 index 00000000000..e809d6a36a9 --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-0.input.js @@ -0,0 +1,6 @@ +// Do not create LoaderOptionsPlugin is not necessary +module.exports = { + plugins: [ + new SomePlugin() + ] +} diff --git a/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-1.input.js b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-1.input.js new file mode 100644 index 00000000000..3b8ac854d12 --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-1.input.js @@ -0,0 +1,9 @@ +module.exports = { + debug: true, + plugins: [ + new webpack.optimize.UglifyJsPlugin(), + new webpack.LoaderOptionsPlugin({ + foo: 'bar' + }) + ] +} diff --git a/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-2.input.js b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-2.input.js new file mode 100644 index 00000000000..eea1c515164 --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-2.input.js @@ -0,0 +1,9 @@ +// Don't modify LoaderOptionsPlugin +module.exports = { + plugins: [ + new SomePlugin(), + new webpack.LoaderOptionsPlugin({ + foo: 'bar' + }) + ] +} diff --git a/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-3.input.js b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-3.input.js new file mode 100644 index 00000000000..2a3baa56d23 --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/__testfixtures__/loaderOptionsPlugin-3.input.js @@ -0,0 +1,17 @@ +// Don't modify LoaderOptionsPlugin + +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +module.exports = { + entry: ['./index.js'], + output: { + filename: 'bundle.js' + }, + module: { + rules: [{ + test: /\.css$/, + use: ExtractTextPlugin.extract([ + 'css-loader' + ]) + }] + }, +} diff --git a/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js b/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js new file mode 100644 index 00000000000..fff3f28a4a7 --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.js @@ -0,0 +1,41 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const isEmpty = require("lodash/isEmpty"); +const findPluginsByName = require("../utils").findPluginsByName; +const createOrUpdatePluginByName = require("../utils") + .createOrUpdatePluginByName; +const safeTraverse = require("../utils").safeTraverse; + +module.exports = function(j , ast ) { + const loaderOptions = {}; + + // If there is debug: true, set debug: true in the plugin + // TODO: remove global debug setting + // TODO: I can't figure out how to find the topmost `debug: true`. help! + if (ast.find(j.Identifier, { name: "debug" }).size()) { + loaderOptions.debug = true; + } + + // If there is UglifyJsPlugin, set minimize: true + if (findPluginsByName(j, ast, ["webpack.optimize.UglifyJsPlugin"]).size()) { + loaderOptions.minimize = true; + } + + return ast + .find(j.ArrayExpression) + .filter( + (path ) => + safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins" + ) + .forEach((path ) => { + !isEmpty(loaderOptions) && + createOrUpdatePluginByName( + j, + path, + "webpack.LoaderOptionsPlugin", + loaderOptions + ); + }); +}; diff --git a/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js b/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js new file mode 100644 index 00000000000..bb3c78de07c --- /dev/null +++ b/dist/transformations/loaderOptionsPlugin/loaderOptionsPlugin.test.js @@ -0,0 +1,8 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-0"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-1"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-2"); +defineTest(__dirname, "loaderOptionsPlugin", "loaderOptionsPlugin-3"); diff --git a/dist/transformations/loaders/__testfixtures__/loaders-0.input.js b/dist/transformations/loaders/__testfixtures__/loaders-0.input.js new file mode 100644 index 00000000000..e0d498f6506 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-0.input.js @@ -0,0 +1,65 @@ +export default [{ + module: { + loaders: [{ + test: /\.js$/, + loader: 'babel' + }] + } +}, { + module: { + loaders: [{ + test: /\.css$/, + loader: 'style!css?modules&importLoaders=1&string=test123' + }] + } +}, { + module: { + loaders: [{ + test: /\.css$/, + loaders: [{ + loader: 'style' + }, { + loader: 'css', + query: { + modules: true + } + }] + }] + } +}, { + module: { + preLoaders:[{ + test: /\.js$/, + loader: 'eslint' + }] + } +}, { + module: { + postLoaders:[{ + test: /\.js$/, + loader: 'my-post' + }] + } +}, { + module: { + preLoaders:[{ + test: /\.js$/, + loader: 'eslint-loader' + }], + loaders: [{ + test: /\.js$/, + loader: 'babel-loader' + }] + } +}, { + module: { + loaders: [{ + test: /\.js$/, + loader: 'babel-loader' + }], + postLoaders:[{ + test: /\.js$/, + loader: 'my-post-loader' + }] + } +}]; diff --git a/dist/transformations/loaders/__testfixtures__/loaders-1.input.js b/dist/transformations/loaders/__testfixtures__/loaders-1.input.js new file mode 100644 index 00000000000..eae75024e61 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-1.input.js @@ -0,0 +1,8 @@ +export default { + module: { + loaders: [{ + test: /\.css$/, + loader: 'style!css?modules&importLoaders=1&string=test123' + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-2.input.js b/dist/transformations/loaders/__testfixtures__/loaders-2.input.js new file mode 100644 index 00000000000..771404a300c --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-2.input.js @@ -0,0 +1,15 @@ +export default { + module: { + loaders: [{ + test: /\.css$/, + loaders: [{ + loader: 'style' + }, { + loader: 'css', + query: { + modules: true + } + }] + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-3.input.js b/dist/transformations/loaders/__testfixtures__/loaders-3.input.js new file mode 100644 index 00000000000..4d49e89a89b --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-3.input.js @@ -0,0 +1,8 @@ +export default { + module: { + preLoaders:[{ + test: /\.js$/, + loader: 'eslint' + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-4.input.js b/dist/transformations/loaders/__testfixtures__/loaders-4.input.js new file mode 100644 index 00000000000..cc3e076bed9 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-4.input.js @@ -0,0 +1,8 @@ +export default { + module: { + postLoaders:[{ + test: /\.js$/, + loader: 'my-post' + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-5.input.js b/dist/transformations/loaders/__testfixtures__/loaders-5.input.js new file mode 100644 index 00000000000..6fd315e4d08 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-5.input.js @@ -0,0 +1,12 @@ +export default { + module: { + preLoaders:[{ + test: /\.js$/, + loader: 'eslint-loader' + }], + loaders: [{ + test: /\.js$/, + loader: 'babel-loader' + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-6.input.js b/dist/transformations/loaders/__testfixtures__/loaders-6.input.js new file mode 100644 index 00000000000..184e4e1ad08 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-6.input.js @@ -0,0 +1,12 @@ +export default { + module: { + loaders: [{ + test: /\.js$/, + loader: 'babel-loader' + }], + postLoaders:[{ + test: /\.js$/, + loader: 'my-post-loader' + }] + } +} diff --git a/dist/transformations/loaders/__testfixtures__/loaders-7.input.js b/dist/transformations/loaders/__testfixtures__/loaders-7.input.js new file mode 100644 index 00000000000..f3c2915e2f8 --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-7.input.js @@ -0,0 +1,14 @@ +export default { + module: { + loaders: [ + { + test: /\.js$/, + exclude: /(node_modules)/, + loader: 'babel-loader', + query: { + presets: ['env'] + } + } + ] + } +}; diff --git a/dist/transformations/loaders/__testfixtures__/loaders-8.input.js b/dist/transformations/loaders/__testfixtures__/loaders-8.input.js new file mode 100644 index 00000000000..737e4515fca --- /dev/null +++ b/dist/transformations/loaders/__testfixtures__/loaders-8.input.js @@ -0,0 +1,14 @@ +module.exports = { + module: { + loaders: [ + { + test: /\.js$/, + loaders: [ + 'style', + 'css?modules&importLoaders=1&string=test123' + ], + include: path.join(__dirname, 'src') + } + ] + } +} diff --git a/dist/transformations/loaders/loaders.js b/dist/transformations/loaders/loaders.js new file mode 100644 index 00000000000..f8175344562 --- /dev/null +++ b/dist/transformations/loaders/loaders.js @@ -0,0 +1,314 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + + + + + + + + + +const utils = require("../utils"); + +module.exports = function(j , ast ) { + /** + * Creates an Array expression out of loaders string + * + * + * For syntaxes like + * + * { + * loader: 'style!css` + * } + * + * or + * + * { + * loaders: ['style', 'css'] + * } + * + * or + * + * loaders: [{ + * loader: 'style' + * }, + * { + * loader: 'css', + * }] + * + * it should generate + * + * { + * use: [{ + * loader: 'style' + * }, + * { + * loader: 'css' + * }] + * } + * @param {Node} path Must be an ObjectExpression + * @return {Node} [] + */ + const createArrayExpressionFromArray = function( + path + ) { + const value = path.value; + // Find paths with `loaders` keys in the given Object + const paths = value.properties.filter((prop ) => + prop.key.name.startsWith("loader") + ); + // For each pair of key and value + paths.forEach((pair ) => { + // Replace 'loaders' Identifier with 'use' + pair.key.name = "use"; + // If the value is an Array + if (pair.value.type === j.ArrayExpression.name) { + // replace its elements + const pairValue = pair.value; + pair.value = j.arrayExpression( + pairValue.elements.map(arrElement => { + // If items of the array are Strings + if (arrElement.type === j.Literal.name) { + // Replace with `{ loader: LOADER }` Object + return j.objectExpression([ + utils.createProperty(j, "loader", arrElement.value) + ]); + } + // otherwise keep the existing element + return arrElement; + }) + ); + // If the value is String of loaders like 'style!css' + } else if (pair.value.type === j.Literal.name) { + // Replace it with Array expression of loaders + const literalValue = pair.value; + pair.value = j.arrayExpression( + literalValue.value.split("!").map(loader => { + return j.objectExpression([ + utils.createProperty(j, "loader", loader) + ]); + }) + ); + } + }); + return path; + }; + + const createLoaderWithQuery = ( + p + ) => { + let properties = p.value.properties; + let loaderValue = properties.reduce( + (val, prop) => (prop.key.name === "loader" ? prop.value.value : val), + "" + ); + let loader = loaderValue.split("?")[0]; + let query = loaderValue.split("?")[1]; + let options = query.split("&").map(option => { + const param = option.split("="); + const key = param[0]; + const val = param[1] || true; // No value in query string means it is truthy value + return j.objectProperty(j.identifier(key), utils.createLiteral(j, val)); + }); + let loaderProp = utils.createProperty(j, "loader", loader); + let queryProp = j.property( + "init", + j.identifier("options"), + j.objectExpression(options) + ); + return j.objectExpression([loaderProp, queryProp]); + }; + + const findLoaderWithQueryString = (p ) => { + return p.value.properties.reduce((predicate, prop) => { + return ( + (utils.safeTraverse(prop, ["value", "value", "indexOf"]) && + prop.value.value.indexOf("?") > -1) || + predicate + ); + }, false); + }; + + /** + * If the path value is `loaders` and it's located in `module` object + * we assume it's the loader's section + * + * @param {Node} path [description] + * @return {Node} [description] + */ + const checkForLoader = path => + path.value.name === "loaders" && + utils.safeTraverse(path, [ + "parent", + "parent", + "parent", + "node", + "key", + "name" + ]) === "module"; + + /** + * Puts node path that is pre- or postLoader into `enforce` key + * + * @param {Node} p [] + * @returns {*} [] + */ + const fitIntoLoaders = ( + p + ) => { + let loaders; + p.value.properties.map(prop => { + const keyName = prop.key.name; + if (keyName === "loaders") { + loaders = prop.value; + } + }); + p.value.properties.map(prop => { + const keyName = prop.key.name; + if (keyName !== "loaders") { + const enforceVal = keyName === "preLoaders" ? "pre" : "post"; + prop.value.elements.map(elem => { + elem.properties.push(utils.createProperty(j, "enforce", enforceVal)); + if (loaders && loaders.type === "ArrayExpression") { + loaders.elements.push(elem); + } else { + prop.key.name = "loaders"; + } + }); + } + }); + if (loaders) { + p.value.properties = p.value.properties.filter( + prop => prop.key.name === "loaders" + ); + } + return p; + }; + + /** + * Find pre and postLoaders + * + * @param {[type]} IPath [description] + * @return {[type]} [description] + */ + const prepostLoaders = () => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"])) + .forEach(fitIntoLoaders); + + /** + * Convert top level `loaders` to `rules` + * See https://webpack.js.org/configuration/module/#module-rules + * @param {[type]} IPath [description] + * @return {[type]} [description] + */ + const loadersToRules = () => + ast + .find(j.Identifier) + .filter(checkForLoader) + .forEach((p ) => (p.value.name = "rules")); + + /** + * Converts 'loader' and 'loaders' to Array of {Rule.Use} + * + * @returns {Node} [] + */ + const loadersToArrayExpression = () => + ast + .find(j.ObjectExpression) + .filter(path => utils.findObjWithOneOfKeys(path, ["loader", "loaders"])) + .filter( + path => + utils.safeTraverse(path, [ + "parent", + "parent", + "node", + "key", + "name" + ]) === "rules" + ) + .forEach(createArrayExpressionFromArray); + + /** + * Finds loaders with options encoded as query string and replaces it with options obejct + * + * i.e. for loader like + * + * { + * loader: 'css?modules&importLoaders=1&string=test123' + * } + * + * it should generate + * { + * loader: 'css-loader', + * options: { + * modules: true, + * importLoaders: 1, + * string: 'test123' + * } + * } + * + * @type {[type]} + * @returns {Node} [] + */ + const loaderWithQueryParam = () => + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["loader"])) + .filter(findLoaderWithQueryString) + .replaceWith(createLoaderWithQuery); + + /** + * Finds nodes with `query` key and replaces it with `options` + * + * i.e. for + * { + * query: { ... } + * } + * + * it should generate + * + * { + * options: { ... } + * } + * @returns {Node} [] + */ + const loaderWithQueryProp = () => + ast + .find(j.Identifier) + .filter(p => p.value.name === "query") + .replaceWith(j.identifier("options")); + + /** + * Adds required `-loader` suffix to loader with missing suffix + * i.e. for `babel` it should generate `babel-loader` + * @returns {Node} [] + */ + const addLoaderSuffix = () => + ast.find(j.ObjectExpression).forEach(path => { + path.value.properties.forEach(prop => { + if ( + prop.key.name === "loader" && + utils.safeTraverse(prop, ["value", "value"]) && + !prop.value.value.endsWith("-loader") + ) { + prop.value = j.literal(prop.value.value + "-loader"); + } + }); + }); + + const transforms = [ + prepostLoaders, + loadersToRules, + loadersToArrayExpression, + loaderWithQueryParam, + loaderWithQueryProp, + addLoaderSuffix + ]; + transforms.forEach(t => t()); + + return ast; +}; diff --git a/dist/transformations/loaders/loaders.test.js b/dist/transformations/loaders/loaders.test.js new file mode 100644 index 00000000000..90d36acda2a --- /dev/null +++ b/dist/transformations/loaders/loaders.test.js @@ -0,0 +1,13 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "loaders", "loaders-0"); +defineTest(__dirname, "loaders", "loaders-1"); +defineTest(__dirname, "loaders", "loaders-2"); +defineTest(__dirname, "loaders", "loaders-3"); +defineTest(__dirname, "loaders", "loaders-4"); +defineTest(__dirname, "loaders", "loaders-5"); +defineTest(__dirname, "loaders", "loaders-6"); +defineTest(__dirname, "loaders", "loaders-7"); +defineTest(__dirname, "loaders", "loaders-8"); diff --git a/dist/transformations/outputPath/__testfixtures__/outputPath-0.input.js b/dist/transformations/outputPath/__testfixtures__/outputPath-0.input.js new file mode 100644 index 00000000000..085268fadbe --- /dev/null +++ b/dist/transformations/outputPath/__testfixtures__/outputPath-0.input.js @@ -0,0 +1,5 @@ +module.exports = { + output: { + path: 'dist' + } +} diff --git a/dist/transformations/outputPath/__testfixtures__/outputPath-1.input.js b/dist/transformations/outputPath/__testfixtures__/outputPath-1.input.js new file mode 100644 index 00000000000..c7a0ed58e7a --- /dev/null +++ b/dist/transformations/outputPath/__testfixtures__/outputPath-1.input.js @@ -0,0 +1,6 @@ +const path = require('path'); +module.exports = { + output: { + path: path.join(__dirname, 'dist') + } +} diff --git a/dist/transformations/outputPath/__testfixtures__/outputPath-2.input.js b/dist/transformations/outputPath/__testfixtures__/outputPath-2.input.js new file mode 100644 index 00000000000..de8436ae6c3 --- /dev/null +++ b/dist/transformations/outputPath/__testfixtures__/outputPath-2.input.js @@ -0,0 +1,6 @@ +const p = require('path'); +module.exports = { + output: { + path: 'dist' + } +} diff --git a/dist/transformations/outputPath/outputPath.js b/dist/transformations/outputPath/outputPath.js new file mode 100644 index 00000000000..0f08c6694c4 --- /dev/null +++ b/dist/transformations/outputPath/outputPath.js @@ -0,0 +1,73 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const utils = require("../utils"); + +module.exports = function(j , ast ) { + const literalOutputPath = ast + .find(j.ObjectExpression) + .filter( + (p ) => + utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) === + "output" + ) + .find(j.Property) + .filter( + (p ) => + utils.safeTraverse(p, ["value", "key", "name"]) === "path" && + utils.safeTraverse(p, ["value", "value", "type"]) === "Literal" + ); + + if (literalOutputPath) { + let pathVarName = "path"; + let isPathPresent = false; + const pathDecalaration = ast + .find(j.VariableDeclarator) + .filter( + (p ) => + utils.safeTraverse(p, ["value", "init", "callee", "name"]) === + "require" + ) + .filter( + (p ) => + utils.safeTraverse(p, ["value", "init", "arguments"]) && + p.value.init.arguments.reduce((isPresent, a) => { + return (a.type === "Literal" && a.value === "path") || isPresent; + }, false) + ); + + if (pathDecalaration) { + isPathPresent = true; + pathDecalaration.forEach(p => { + pathVarName = utils.safeTraverse(p, ["value", "id", "name"]); + }); + } + const finalPathName = (pathVarName ); + literalOutputPath + .find(j.Literal) + .replaceWith((p ) => replaceWithPath(j, p, finalPathName)); + + if (!isPathPresent) { + const pathRequire = (utils.getRequire(j, "path", "path") ); + return ast + .find(j.Program) + .replaceWith(p => + j.program([].concat(pathRequire).concat(p.value.body)) + ); + } + } + return ast; +}; + +function replaceWithPath( + j , + p , + pathVarName +) { + const convertedPath = j.callExpression( + j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false), + [j.identifier("__dirname"), p.value] + ); + return convertedPath; +} diff --git a/dist/transformations/outputPath/outputPath.test.js b/dist/transformations/outputPath/outputPath.test.js new file mode 100644 index 00000000000..1312905c074 --- /dev/null +++ b/dist/transformations/outputPath/outputPath.test.js @@ -0,0 +1,7 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "outputPath", "outputPath-0"); +defineTest(__dirname, "outputPath", "outputPath-1"); +defineTest(__dirname, "outputPath", "outputPath-2"); diff --git a/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-0.input.js b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-0.input.js new file mode 100644 index 00000000000..133c4984bfd --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-0.input.js @@ -0,0 +1,6 @@ +// Works for OccurrenceOrderPlugin +module.exports = { + plugins: [ + new webpack.optimize.OccurrenceOrderPlugin(), + ] +} diff --git a/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-1.input.js b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-1.input.js new file mode 100644 index 00000000000..a64dab79b37 --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-1.input.js @@ -0,0 +1,6 @@ +// Works for DedupePlugin +module.exports = { + plugins: [ + new webpack.optimize.DedupePlugin(), + ] +} diff --git a/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-2.input.js b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-2.input.js new file mode 100644 index 00000000000..26150117db4 --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-2.input.js @@ -0,0 +1,8 @@ +// Doesn't remove unmatched plugins +module.exports = { + plugins: [ + new webpack.optimize.OccurrenceOrderPlugin(), + new webpack.optimize.UglifyJsPlugin(), + new webpack.optimize.DedupePlugin() + ] +} diff --git a/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-3.input.js b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-3.input.js new file mode 100644 index 00000000000..1d5194460e3 --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-3.input.js @@ -0,0 +1,7 @@ +// This should throw +export default (config) => { + config.plugins.push(new webpack.optimize.UglifyJsPlugin()); + config.plugins.push(new webpack.optimize.DedupePlugin()); + config.plugins.push(new webpack.optimize.OccurrenceOrderPlugin()); + return config +} diff --git a/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-4.input.js b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-4.input.js new file mode 100644 index 00000000000..fab47caf971 --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/__testfixtures__/removeDeprecatedPlugins-4.input.js @@ -0,0 +1,8 @@ +// This should throw +const inst = new webpack.optimize.OccurrenceOrderPlugin() +export default (config) => { + config.plugins = [ + inst + ] + return config +} diff --git a/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js b/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js new file mode 100644 index 00000000000..97d101bfa44 --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.js @@ -0,0 +1,59 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const codeFrame = require("babel-code-frame"); +const chalk = require("chalk"); +const utils = require("../utils"); + +const example = `plugins: [ + new webpack.optimize.OccurrenceOrderPlugin(), + new webpack.optimize.UglifyJsPlugin(), + new webpack.optimize.DedupePlugin() +]`; + +module.exports = function(j , ast , source ) { + // List of deprecated plugins to remove + // each item refers to webpack.optimize.[NAME] construct + const deprecatedPlugingsList = [ + "webpack.optimize.OccurrenceOrderPlugin", + "webpack.optimize.DedupePlugin" + ]; + + return utils + .findPluginsByName(j, ast, deprecatedPlugingsList) + .forEach((path ) => { + // For now we only support the case there plugins are defined in an Array + const arrayPath = utils.safeTraverse(path, [ + "parent", + "value" + ]); + if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) { + // Check how many plugins are defined and + // if there is only last plugin left remove `plugins: []` node + const arrayElementsPath = utils.safeTraverse(arrayPath, ["elements"]); + if (arrayElementsPath && arrayElementsPath.length === 1) { + j(path.parent.parent).remove(); + } else { + j(path).remove(); + } + } else { + const startLoc = path.value.loc.start; + console.log(` +${chalk.red( + "Only plugins instantiated in the array can be automatically removed i.e.:" + )} + +${codeFrame(example, null, null, { highlightCode: true })} + +${chalk.red("but you use it like this:")} + +${codeFrame(source, startLoc.line, startLoc.column, { highlightCode: true })} + +${chalk.red("Please remove deprecated plugins manually. ")} +See ${chalk.underline( + "https://webpack.js.org/guides/migrating/" + )} for more information.`); + } + }); +}; diff --git a/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js b/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js new file mode 100644 index 00000000000..e029dff487d --- /dev/null +++ b/dist/transformations/removeDeprecatedPlugins/removeDeprecatedPlugins.test.js @@ -0,0 +1,9 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-0"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-1"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-2"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-3"); +defineTest(__dirname, "removeDeprecatedPlugins", "removeDeprecatedPlugins-4"); diff --git a/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-0.input.js b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-0.input.js new file mode 100644 index 00000000000..48517948142 --- /dev/null +++ b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-0.input.js @@ -0,0 +1,19 @@ +export default { + module: { + rules: [{ + test: /\.yml/, + use: [ + { + loader: 'json-loader' + }, + { + loader: 'another-loader' + }, + { + loader: 'yml-loader' + } + ] + }] + } +} + diff --git a/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-1.input.js b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-1.input.js new file mode 100644 index 00000000000..1040b5ff919 --- /dev/null +++ b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-1.input.js @@ -0,0 +1,12 @@ +export default { + module: { + rules: [{ + test: /\.yml/, + use: [{ + loader: 'json-loader' + }, { + loader: 'yml-loader' + }] + }] + } +} diff --git a/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-2.input.js b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-2.input.js new file mode 100644 index 00000000000..39b473705d0 --- /dev/null +++ b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-2.input.js @@ -0,0 +1,10 @@ +export default { + module: { + rules: [ + { + test: /\.json/, + loader: 'json-loader' + } + ] + } +} diff --git a/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-3.input.js b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-3.input.js new file mode 100644 index 00000000000..be47fd92ee2 --- /dev/null +++ b/dist/transformations/removeJsonLoader/__testfixtures__/removeJsonLoader-3.input.js @@ -0,0 +1,11 @@ +export default { + module: { + rules: [{ + test: /\.json/, + use: [{ + loader: 'json-loader' + }] + }] + } +} + diff --git a/dist/transformations/removeJsonLoader/removeJsonLoader.js b/dist/transformations/removeJsonLoader/removeJsonLoader.js new file mode 100644 index 00000000000..0867bae9fa5 --- /dev/null +++ b/dist/transformations/removeJsonLoader/removeJsonLoader.js @@ -0,0 +1,60 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + + + + + + +const utils = require("../utils"); + +module.exports = function(j , ast ) { + function removeLoaderByName(path , name ) { + const loadersNode = path.value.value; + switch (loadersNode.type) { + case j.ArrayExpression.name: { + let loaders = (loadersNode ).elements.map(p => { + return utils.safeTraverse(p, ["properties", "0", "value", "value"]); + }); + const loaderIndex = loaders.indexOf(name); + if (loaders.length && loaderIndex > -1) { + // Remove loader from the array + loaders.splice(loaderIndex, 1); + // and from AST + loadersNode.elements.splice(loaderIndex, 1); + } + + // If there are no loaders left, remove the whole Rule object + if (loaders.length === 0) { + j(path.parent).remove(); + } + break; + } + case j.Literal.name: { + // If only the loader with the matching name was used + // we can remove the whole Property node completely + if ((loadersNode ).value === name) { + j(path.parent).remove(); + } + break; + } + } + } + + function removeLoaders(ast ) { + ast + .find(j.Property, { key: { name: "use" } }) + .forEach((path ) => removeLoaderByName(path, "json-loader")); + + ast + .find(j.Property, { key: { name: "loader" } }) + .forEach((path ) => removeLoaderByName(path, "json-loader")); + } + + const transforms = [removeLoaders]; + + transforms.forEach(t => t(ast)); + + return ast; +}; diff --git a/dist/transformations/removeJsonLoader/removeJsonLoader.test.js b/dist/transformations/removeJsonLoader/removeJsonLoader.test.js new file mode 100644 index 00000000000..a448e68bf02 --- /dev/null +++ b/dist/transformations/removeJsonLoader/removeJsonLoader.test.js @@ -0,0 +1,8 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-0"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-1"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-2"); +defineTest(__dirname, "removeJsonLoader", "removeJsonLoader-3"); diff --git a/dist/transformations/resolve/__testfixtures__/resolve.input.js b/dist/transformations/resolve/__testfixtures__/resolve.input.js new file mode 100644 index 00000000000..2b83fcf26ce --- /dev/null +++ b/dist/transformations/resolve/__testfixtures__/resolve.input.js @@ -0,0 +1,20 @@ +import path from 'path'; + +export default [{ + resolve: { + root: path.resolve('/src') + } +}, { + resolve: { + root: [path.resolve('/src')] + } +}, { + resolve: { + root: [path.resolve('/src'), 'node_modules'] + } +}, { + resolve: { + root: path.resolve('/src'), + modules: ['node_modules'] + } +}]; diff --git a/dist/transformations/resolve/resolve.js b/dist/transformations/resolve/resolve.js new file mode 100644 index 00000000000..797671e83ec --- /dev/null +++ b/dist/transformations/resolve/resolve.js @@ -0,0 +1,68 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + + + + + + + +module.exports = function transformer(j , ast ) { + const getRootVal = ( + p + ) => { + return p.node.value.properties.filter(prop => prop.key.name === "root")[0]; + }; + + const getRootIndex = p => { + return p.node.value.properties.reduce((rootIndex, prop, index) => { + return prop.key.name === "root" ? index : rootIndex; + }, -1); + }; + + const isModulePresent = (p ) => { + const modules = p.node.value.properties.filter( + prop => prop.key.name === "modules" + ); + return modules.length > 0 && modules[0]; + }; + + const createModuleArray = ( + p + ) => { + const rootVal = getRootVal(p); + let modulesVal = null; + if (rootVal.value.type === "ArrayExpression") { + modulesVal = rootVal.value.elements; + } else { + modulesVal = [rootVal.value]; + } + let module = isModulePresent(p); + + if (!module) { + module = j.property( + "init", + j.identifier("modules"), + j.arrayExpression(modulesVal) + ); + p.node.value.properties = p.node.value.properties.concat([module]); + } else { + module.value.elements = module.value.elements.concat(modulesVal); + } + const rootIndex = getRootIndex(p); + p.node.value.properties.splice(rootIndex, 1); + return p; + }; + + return ast + .find(j.Property) + .filter((p ) => { + return ( + p.node.key.name === "resolve" && + p.node.value.properties.filter(prop => prop.key.name === "root") + .length === 1 + ); + }) + .forEach(createModuleArray); +}; diff --git a/dist/transformations/resolve/resolve.test.js b/dist/transformations/resolve/resolve.test.js new file mode 100644 index 00000000000..9cbd9d22957 --- /dev/null +++ b/dist/transformations/resolve/resolve.test.js @@ -0,0 +1,5 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "resolve"); diff --git a/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-0.input.js b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-0.input.js new file mode 100644 index 00000000000..900f7042075 --- /dev/null +++ b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-0.input.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + new webpack.optimize.UglifyJsPlugin() + ] +} diff --git a/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-1.input.js b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-1.input.js new file mode 100644 index 00000000000..57d7eb1c192 --- /dev/null +++ b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-1.input.js @@ -0,0 +1,6 @@ +module.exports = { + devtool: "source-map", + plugins: [ + new webpack.optimize.UglifyJsPlugin({}) + ] +} diff --git a/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-2.input.js b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-2.input.js new file mode 100644 index 00000000000..3c13f02b203 --- /dev/null +++ b/dist/transformations/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-2.input.js @@ -0,0 +1,8 @@ +module.exports = { + devtool: "cheap-source-map", + plugins: [ + new webpack.optimize.UglifyJsPlugin({ + compress: {} + }) + ] +} diff --git a/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.js b/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.js new file mode 100644 index 00000000000..cadddba29f8 --- /dev/null +++ b/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.js @@ -0,0 +1,28 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + +const findPluginsByName = require("../utils").findPluginsByName; + +module.exports = function(j , ast ) { + function createSourceMapsProperty() { + return j.property("init", j.identifier("sourceMap"), j.identifier("true")); + } + + return findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]).forEach(path => { + const args = path.value.arguments; + + if (args.length) { + // Plugin is called with object as arguments + j(path) + .find(j.ObjectExpression) + .get("properties") + .value.push(createSourceMapsProperty()); + } else { + // Plugin is called without arguments + args.push(j.objectExpression([createSourceMapsProperty()])); + } + }); +}; diff --git a/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js b/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js new file mode 100644 index 00000000000..4b43262cbdc --- /dev/null +++ b/dist/transformations/uglifyJsPlugin/uglifyJsPlugin.test.js @@ -0,0 +1,7 @@ +"use strict"; + +const defineTest = require("../defineTest"); + +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-0"); +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-1"); +defineTest(__dirname, "uglifyJsPlugin", "uglifyJsPlugin-2"); diff --git a/dist/transformations/utils.js b/dist/transformations/utils.js new file mode 100644 index 00000000000..61115bba5ae --- /dev/null +++ b/dist/transformations/utils.js @@ -0,0 +1,630 @@ +// +// eslint-disable-next-line node/no-unsupported-features + + + + + + + + + + + +function safeTraverse(obj , paths ) { + let val = obj; + let idx = 0; + + while (idx < paths.length) { + if (!val) { + return null; + } + val = val[paths[idx]]; + idx++; + } + return val; +} + +// Convert nested MemberExpressions to strings like webpack.optimize.DedupePlugin +function memberExpressionToPathString(path ) { + if (path && path.object) { + return [memberExpressionToPathString(path.object), path.property.name].join( + "." + ); + } + return path.name; +} + +// Convert Array like ['webpack', 'optimize', 'DedupePlugin'] to nested MemberExpressions +function pathsToMemberExpression(j , paths ) { + if (!paths.length) { + return null; + } else if (paths.length === 1) { + return j.identifier(paths[0]); + } else { + const first = paths.slice(0, 1); + const rest = paths.slice(1); + return j.memberExpression( + pathsToMemberExpression(j, rest), + pathsToMemberExpression(j, first) + ); + } +} + +/* +* @function findPluginsByName +* +* Find paths that match `new name.space.PluginName()` for a given array of plugin names +* +* @param j — jscodeshift API +* @param { Node } node - Node to start search from +* @param { Array } pluginNamesArray - Array of plugin names like `webpack.LoaderOptionsPlugin` +* @returns Path + * */ +function findPluginsByName( + j , + node , + pluginNamesArray +) { + return node.find(j.NewExpression).filter(path => { + return pluginNamesArray.some( + plugin => + memberExpressionToPathString(path.get("callee").value) === plugin + ); + }); +} + +/* + * @function findPluginsRootNodes + * + * Finds the path to the `plugins: []` node + * + * @param j — jscodeshift API + * @param { Node } node - Node to start search from + * @returns Path + * */ +function findPluginsRootNodes( + j , + node +) { + return node.find(j.Property, { key: { name: "plugins" } }); +} + +/* + * @function createProperty + * + * Creates an Object's property with a given key and value + * + * @param j — jscodeshift API + * @param { string | number } key - Property key + * @param { string | number | boolean } value - Property value + * @returns Node + * */ +function createProperty( + j , + key , + value +) { + return j.property( + "init", + createIdentifierOrLiteral(j, key), + createLiteral(j, value) + ); +} + +/* + * @function createLiteral + * + * Creates an appropriate literal property + * + * @param j — jscodeshift API + * @param { string | boolean | number } val + * @returns { Node } + * */ + +function createLiteral( + j , + val +) { + let literalVal = val; + // We'll need String to native type conversions + if (typeof val === "string") { + // 'true' => true + if (val === "true") literalVal = true; + // 'false' => false + if (val === "false") literalVal = false; + // '1' => 1 + if (!isNaN(Number(val))) literalVal = Number(val); + } + return j.literal(literalVal); +} + +/* + * @function createIdentifierOrLiteral + * + * Creates an appropriate identifier or literal property + * + * @param j — jscodeshift API + * @param { string | boolean | number } val + * @returns { Node } + * */ + +function createIdentifierOrLiteral(j , val ) { + // IPath | IPath doesn't work, find another way + let literalVal = val; + // We'll need String to native type conversions + if (typeof val === "string" || val.__paths) { + // 'true' => true + if (val === "true") { + literalVal = true; + return j.literal(literalVal); + } + // 'false' => false + if (val === "false") { + literalVal = false; + return j.literal(literalVal); + } + // '1' => 1 + if (!isNaN(Number(val))) { + literalVal = Number(val); + return j.literal(literalVal); + } + + if (val.__paths) { + return createExternalRegExp(j, val); + } else { + // Use identifier instead + // TODO: Check if literalVal is a valid Identifier! + return j.identifier(literalVal); + } + } + return j.literal(literalVal); +} +/* + * @function createOrUpdatePluginByName + * + * Findes or creates a node for a given plugin name string with options object + * If plugin decalaration already exist, options are merged. + * + * @param j — jscodeshift API + * @param { NodePath } rooNodePath - `plugins: []` NodePath where plugin should be added. See https://github.com/facebook/jscodeshift/wiki/jscodeshift-Documentation#nodepaths + * @param { string } pluginName - ex. `webpack.LoaderOptionsPlugin` + * @param { Object } options - plugin options + * @returns void + * */ +function createOrUpdatePluginByName( + j , + rootNodePath , + pluginName , + options +) { + const pluginInstancePath = findPluginsByName(j, j(rootNodePath), [ + pluginName + ]); + let optionsProps; + if (options) { + optionsProps = Object.keys(options).map(key => { + return createProperty(j, key, options[key]); + }); + } + + // If plugin declaration already exist + if (pluginInstancePath.size()) { + pluginInstancePath.forEach(path => { + // There are options we want to pass as argument + if (optionsProps) { + const args = path.value.arguments; + if (args.length) { + // Plugin is called with object as arguments + // we will merge those objects + let currentProps = j(path) + .find(j.ObjectExpression) + .get("properties"); + + optionsProps.forEach((opt ) => { + // Search for same keys in the existing object + const existingProps = j(currentProps) + .find(j.Identifier) + .filter(path => opt.key.value === path.value.name); + + if (existingProps.size()) { + // Replacing values for the same key + existingProps.forEach(path => { + j(path.parent).replaceWith(opt); + }); + } else { + // Adding new key:values + currentProps.value.push(opt); + } + }); + } else { + // Plugin is called without arguments + args.push(j.objectExpression(optionsProps)); + } + } + }); + } else { + let argumentsArray = []; + if (optionsProps) { + argumentsArray = [j.objectExpression(optionsProps)]; + } + const loaderPluginInstance = j.newExpression( + pathsToMemberExpression(j, pluginName.split(".").reverse()), + argumentsArray + ); + rootNodePath.value.elements.push(loaderPluginInstance); + } +} + +/* + * @function findVariableToPlugin + * + * Finds the variable to which a third party plugin is assigned to + * + * @param j — jscodeshift API + * @param { Node } rootNode - `plugins: []` Root Node. See https://github.com/facebook/jscodeshift/wiki/jscodeshift-Documentation#nodepaths + * @param { string } pluginPackageName - ex. `extract-text-plugin` + * @returns { string } variable name - ex. 'var s = require(s) gives "s"` + * */ + +function findVariableToPlugin( + j , + rootNode , + pluginPackageName +) { + const moduleVarNames = rootNode + .find(j.VariableDeclarator) + .filter(j.filters.VariableDeclarator.requiresModule(pluginPackageName)) + .nodes(); + if (moduleVarNames.length === 0) return null; + return moduleVarNames.pop().id.name; +} + +/* +* @function isType +* +* Returns true if type is given type +* @param { Node} path - pathNode +* @param { string } type - node type +* @returns {boolean} +*/ + +function isType(path , type ) { + return path.type === type; +} + +function findObjWithOneOfKeys(p , keyNames ) { + return p.value.properties.reduce((predicate, prop) => { + const name = prop.key.name; + return keyNames.indexOf(name) > -1 || predicate; + }, false); +} + +/* +* @function getRequire +* +* Returns constructed require symbol +* @param j — jscodeshift API +* @param { string } constName - Name of require +* @param { string } packagePath - path of required package +* @returns {NodePath} - the created ast +*/ + +function getRequire( + j , + constName , + packagePath +) { + return j.variableDeclaration("const", [ + j.variableDeclarator( + j.identifier(constName), + j.callExpression(j.identifier("require"), [j.literal(packagePath)]) + ) + ]); +} + +/* +* @function checkIfExistsAndAddValue +* +* If a prop exists, it overrides it, else it creates a new one +* @param j — jscodeshift API +* @param { Node } node - objectexpression to check +* @param { string } key - Key of the property +* @param { string } value - computed value of the property +* @returns - nothing +*/ + +function checkIfExistsAndAddValue( + j , + node , + key , + value +) { + const existingProp = node.value.properties.filter( + prop => prop.key.name === key + ); + let prop; + if (existingProp.length > 0) { + prop = existingProp[0]; + prop.value = value; + } else { + prop = j.property("init", j.identifier(key), value); + node.value.properties.push(prop); + } +} + +/* +* @function createEmptyArrayProperty +* +* Creates an empty array +* @param j — jscodeshift API +* @param { String } key - st name +* @returns - { Array } arr - An empty array +*/ +function createEmptyArrayProperty( + j , + key +) { + return j.property("init", j.identifier(key), j.arrayExpression([])); +} + +/* +* @function createArrayWithChildren +* +* Creates an array and iterates on an object with properties +* @param j — jscodeshift API +* @param { String } key - object name +* @param { string } subProps - computed value of the property +* @param { Boolean } shouldDropKeys - +* @returns - { Array } arr - An array with the object properties +*/ + +function createArrayWithChildren( + j , + key , + subProps , + shouldDropKeys +) { + let arr = createEmptyArrayProperty(j, key); + if (shouldDropKeys) { + subProps.forEach((subProperty ) => { + let objectOfArray = j.objectExpression([]); + if (typeof subProperty !== "string") { + loopThroughObjects(j, objectOfArray, subProperty); + arr.value.elements.push(objectOfArray); + } else { + return arr.value.elements.push( + createIdentifierOrLiteral(j, subProperty) + ); + } + }); + } else { + Object.keys(subProps[key]).forEach(subProperty => { + arr.value.elements.push( + createIdentifierOrLiteral(j, subProps[key][subProperty]) + ); + }); + } + return arr; +} + +/* +* @function loopThroughObjects +* +* Loops through an object and adds property to an object with no identifier +* @param j — jscodeshift API +* @param { Node } p - node to add value to +* @param { Object } obj - Object to loop through +* @returns - { Function|Node } - Either pushes the node, or reruns until +* nothing is left +*/ + +function loopThroughObjects( + j , + p , + obj +) { + Object.keys(obj).forEach(prop => { + if (prop.indexOf("inject") >= 0) { + // TODO to insert the type of node, identifier or literal + const propertyExpression = createIdentifierOrLiteral( + j, + obj[prop] + ); + return p.properties.push(propertyExpression); + } + // eslint-disable-next-line no-irregular-whitespace + if (typeof obj[prop] !== "object" || obj[prop] instanceof RegExp) { + p.properties.push( + createObjectWithSuppliedProperty( + j, + prop, + createIdentifierOrLiteral(j, obj[prop]) + ) + ); + } else if (Array.isArray(obj[prop])) { + let arrayProp = createArrayWithChildren(j, prop, obj[prop], true); + p.properties.push(arrayProp); + } else { + let objectBlock = j.objectExpression([]); + let propertyOfBlock = createObjectWithSuppliedProperty( + j, + prop, + objectBlock + ); + loopThroughObjects(j, objectBlock, obj[prop]); + p.properties.push(propertyOfBlock); + } + }); +} + +/* +* @function createObjectWithSuppliedProperty +* +* Creates an object with an supplied property as parameter +* @param j — jscodeshift API +* @param { String } key - object name +* @param { Node } prop - property to be added +* @returns - { Node } - An property with the supplied property +*/ + +function createObjectWithSuppliedProperty( + j , + key , + prop +) { + return j.property("init", j.identifier(key), prop); +} + +/* +* @function createExternalRegExp +* +* Finds a regexp property with an already parsed AST from the user +* @param j — jscodeshift API +* @param { String } prop - property to find the value at +* @returns - { Node } - A literal node with the found regexp +*/ + +function createExternalRegExp(j , prop ) { + let regExpProp = prop.__paths[0].value.program.body[0].expression; + return j.literal(regExpProp.value); +} + +/* +* @function pushCreateProperty +* +* Creates a property and pushes the value to a node +* @param j — jscodeshift API +* @param { Node } p - Node to push against +* @param { String } key - key used as identifier +* @param { String } val - property value +* @returns - { Node } - Returns node the pushed property +*/ + +function pushCreateProperty( + j , + p , + key , + val +) { + let property ; + if (val.hasOwnProperty("type")) { + property = val; + } else { + property = createIdentifierOrLiteral(j, val); + } + return p.value.properties.push( + createObjectWithSuppliedProperty(j, key, property) + ); +} + +/* +* @function pushObjectKeys +* +* @param j — jscodeshift API +* @param { Node } p - path to push +* @param { Object } webpackProperties - The object to loop over +* @param { String } name - Key that will be the identifier we find and add values to +* @returns - { Node/Function } Returns a function that will push a node if +*subProperty is an array, else it will invoke a function that will push a single node +*/ + +function pushObjectKeys( + j , + p , + webpackProperties , + name +) { + p.value.properties + .filter(n => safeTraverse(n, ["key", "name"]) === name) + .forEach(prop => { + Object.keys(webpackProperties).forEach(webpackProp => { + if (webpackProp.indexOf("inject") >= 0) { + return prop.value.properties.push( + createIdentifierOrLiteral(j, webpackProperties[webpackProp]) + ); + } else if (Array.isArray(webpackProperties[webpackProp])) { + const propArray = createArrayWithChildren( + j, + webpackProp, + webpackProperties[webpackProp], + true + ); + return prop.value.properties.push(propArray); + } else if ( + typeof webpackProperties[webpackProp] !== "object" || + webpackProperties[webpackProp].__paths || + webpackProperties[webpackProp] instanceof RegExp + ) { + return pushCreateProperty( + j, + prop, + webpackProp, + webpackProperties[webpackProp] + ); + } else { + pushCreateProperty(j, prop, webpackProp, j.objectExpression([])); + return pushObjectKeys( + j, + prop, + webpackProperties[webpackProp], + webpackProp + ); + } + }); + }); +} + +/* +* @function isAssignment +* +* Checks if we are at the correct node and later invokes a callback +* for the transforms to either use their own transform function or +* use pushCreateProperty if the transform doesn't expect any properties +* @param j — jscodeshift API +* @param { Node } p - Node to push against +* @param { Function } cb - callback to be invoked +* @param { String } identifier - key to use as property +* @param { Object } property - WebpackOptions that later will be converted via +* pushCreateProperty via WebpackOptions[identifier] +* @returns - { Function } cb - Returns the callback and pushes a new node +*/ + +function isAssignment( + j , + p , + cb , + identifier , + property +) { + if (p.parent.value.type === "AssignmentExpression") { + if (j) { + return cb(j, p, identifier, property); + } else { + return cb(p); + } + } +} + +module.exports = { + safeTraverse, + createProperty, + findPluginsByName, + findPluginsRootNodes, + createOrUpdatePluginByName, + findVariableToPlugin, + isType, + createLiteral, + createIdentifierOrLiteral, + findObjWithOneOfKeys, + getRequire, + checkIfExistsAndAddValue, + createArrayWithChildren, + createEmptyArrayProperty, + createObjectWithSuppliedProperty, + createExternalRegExp, + pushCreateProperty, + pushObjectKeys, + isAssignment, + loopThroughObjects +}; diff --git a/dist/transformations/utils.test.js b/dist/transformations/utils.test.js new file mode 100644 index 00000000000..a70091a40e2 --- /dev/null +++ b/dist/transformations/utils.test.js @@ -0,0 +1,358 @@ +"use strict"; + +const j = require("jscodeshift/dist/core"); +const utils = require("./utils"); + +describe("utils", () => { + describe("createProperty", () => { + it("should create properties for Boolean", () => { + const res = utils.createProperty(j, "foo", true); + expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); + }); + + it("should create properties for Number", () => { + const res = utils.createProperty(j, "foo", -1); + expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); + }); + + it("should create properties for String", () => { + const res = utils.createProperty(j, "foo", "bar"); + expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); + }); + + xit("should create properties for complex keys", () => { + const res = utils.createProperty(j, "foo-bar", "bar"); + expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); + }); + + it("should create properties for non-literal keys", () => { + const res = utils.createProperty(j, 1, "bar"); + expect(j(j.objectExpression([res])).toSource()).toMatchSnapshot(); + }); + }); + + describe("findPluginsByName", () => { + it("should find plugins in AST", () => { + const ast = j(` +{ foo: new webpack.optimize.UglifyJsPlugin() } +`); + const res = utils.findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]); + expect(res.size()).toEqual(1); + }); + + it("should find all plugins in AST", () => { + const ast = j(` +[ + new UglifyJsPlugin(), + new TestPlugin() +] +`); + const res = utils.findPluginsByName(j, ast, [ + "UglifyJsPlugin", + "TestPlugin" + ]); + expect(res.size()).toEqual(2); + }); + + it("should not find false positives", () => { + const ast = j(` +{ foo: new UglifyJsPlugin() } +`); + const res = utils.findPluginsByName(j, ast, [ + "webpack.optimize.UglifyJsPlugin" + ]); + expect(res.size()).toEqual(0); + }); + }); + + describe("findPluginsRootNodes", () => { + it("should find plugins: [] nodes", () => { + const ast = j(` +var a = { plugins: [], foo: { plugins: [] } } +`); + const res = utils.findPluginsRootNodes(j, ast); + expect(res.size()).toEqual(2); + }); + + it("should not find plugins: [] nodes", () => { + const ast = j(` +var a = { plugs: [] } +`); + const res = utils.findPluginsRootNodes(j, ast); + expect(res.size()).toEqual(0); + }); + }); + + describe("createOrUpdatePluginByName", () => { + it("should create a new plugin without arguments", () => { + const ast = j("{ plugins: [] }"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin"); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + + it("should create a new plugin with arguments", () => { + const ast = j("{ plugins: [] }"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + foo: "bar" + }); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + + it("should add an object as an argument", () => { + const ast = j("[new Plugin()]"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + foo: true + }); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + + it("should merge options objects", () => { + const ast = j("[new Plugin({ foo: true })]"); + ast.find(j.ArrayExpression).forEach(node => { + utils.createOrUpdatePluginByName(j, node, "Plugin", { + bar: "baz", + foo: false + }); + utils.createOrUpdatePluginByName(j, node, "Plugin", { + "baz-long": true + }); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + + describe("findVariableToPlugin", () => { + it("should find the variable name of a plugin", () => { + const ast = j(` + var packageName = require('package-name'); + var someOtherVar = somethingElse; + var otherPackage = require('other-package'); + `); + const foundVar = utils.findVariableToPlugin(j, ast, "other-package"); + expect(foundVar).toEqual("otherPackage"); + }); + }); + + describe("createLiteral", () => { + it("should create basic literal", () => { + const literal = utils.createLiteral(j, "stringLiteral"); + expect(j(literal).toSource()).toMatchSnapshot(); + }); + it("should create boolean", () => { + const literal = utils.createLiteral(j, "true"); + expect(j(literal).toSource()).toMatchSnapshot(); + }); + }); + + describe("createIdentifierOrLiteral", () => { + it("should create basic literal", () => { + const literal = utils.createIdentifierOrLiteral(j, "'stringLiteral'"); + expect(j(literal).toSource()).toMatchSnapshot(); + }); + it("should create boolean", () => { + const literal = utils.createIdentifierOrLiteral(j, "true"); + expect(j(literal).toSource()).toMatchSnapshot(); + }); + }); + + describe("findObjWithOneOfKeys", () => { + it("should find keys", () => { + const ast = j(` + var ab = { + a: 1, + b: 2 + } + `); + expect( + ast + .find(j.ObjectExpression) + .filter(p => utils.findObjWithOneOfKeys(p, ["a"])) + .size() + ).toEqual(1); + }); + }); + + describe("getRequire", () => { + it("should create a require statement", () => { + const require = utils.getRequire(j, "filesys", "fs"); + expect(j(require).toSource()).toMatchSnapshot(); + }); + }); + + describe("checkIfExistsAndAddValue", () => { + it("should create new prop if none exist", () => { + const ast = j(` + module.exports = { + entry: 'index.js' + } + `); + ast + .find(j.ObjectExpression) + .forEach(node => + utils.checkIfExistsAndAddValue( + j, + node, + "externals", + j.literal("React") + ) + ); + expect(ast.toSource()).toMatchSnapshot(); + }); + it("should override prop if it exists", () => { + const ast = j(` + module.exports = { + entry: 'index.js' + } + `); + ast + .find(j.ObjectExpression) + .forEach(node => + utils.checkIfExistsAndAddValue(j, node, "entry", j.literal("app.js")) + ); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("createArrayWithChildren", () => { + it("should find an prop that matches key and create an array with it", () => { + const ast = j("{}"); + let key = "react"; + let reactArr = { + react: ["'bo'"] + }; + const arr = utils.createArrayWithChildren(j, key, reactArr, false); + ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); + expect(ast.toSource()).toMatchSnapshot(); + }); + it("should add all children of an array to a new one with a supplied key", () => { + const ast = j("{}"); + let key = "myVeryOwnKey"; + let helloWorldArray = ["'hello'", "world"]; + const arr = utils.createArrayWithChildren(j, key, helloWorldArray, true); + ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("createEmptyArrayProperty", () => { + it("should create an array with no properties", () => { + const ast = j("{}"); + const arr = utils.createEmptyArrayProperty(j, "its-lit"); + ast.find(j.Program).forEach(node => j(node).replaceWith(arr)); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + + describe("createObjectWithSuppliedProperty", () => { + it("should create an object with a property supplied by us", () => { + const ast = j("{}"); + const prop = utils.createObjectWithSuppliedProperty( + j, + "its-lit", + j.objectExpression([]) + ); + ast.find(j.Program).forEach(node => j(node).replaceWith(prop)); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("createExternalRegExp", () => { + it("should create an regExp property that has been parsed by jscodeshift", () => { + const ast = j("{}"); + const reg = j("'\t'"); + const prop = utils.createExternalRegExp(j, reg); + ast.find(j.Program).forEach(node => j(node).replaceWith(prop)); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("pushCreateProperty", () => { + it("should create an object or property and push the value to a node", () => { + const ast = j(`module.exports = { + pushMe: {} + }`); + ast + .find(j.Identifier) + .filter(n => n.value.name === "pushMe") + .forEach(node => { + const heavyNodeNoSafeTraverse = node.parentPath.value; + utils.pushCreateProperty( + j, + heavyNodeNoSafeTraverse, + "just", + "pushed" + ); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("pushObjectKeys", () => { + it("should push object to an node using Object.keys", () => { + const ast = j(`module.exports = { + pushMe: {} + }`); + const webpackProperties = { + hello: { + world: { + its: "'great'" + } + } + }; + ast.find(j.ObjectExpression).forEach(node => { + utils.pushObjectKeys(j, node, webpackProperties, "pushMe"); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("loopThroughObjects", () => { + it("Use recursion and add elements to an node", () => { + const ast = j("module.exports = {}"); + const webpackProperties = { + hello: { + webpack: "cli" + } + }; + ast.find(j.ObjectExpression).forEach(node => { + return utils.loopThroughObjects(j, node.value, webpackProperties); + }); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); + describe("isAssignment", () => { + it("should invoke a callback if parent type is AssignmentExpression", () => { + const ast = j("module.exports = {}"); + const myObj = "Heyho"; + const myKey = "context"; + + ast + .find(j.ObjectExpression) + .filter(n => + utils.isAssignment(j, n, utils.pushCreateProperty, myKey, myObj) + ); + expect(ast.toSource()).toMatchSnapshot(); + }); + it("should allow custom transform functions instead of singularProperty", () => { + const ast = j("module.exports = {}"); + + function createPluginsProperty(p) { + const webpackProperties = { + plugins: ["one", "two", "three"] + }; + const pluginArray = utils.createArrayWithChildren( + j, + "plugins", + webpackProperties + ); + return p.value.properties.push(pluginArray); + } + ast + .find(j.ObjectExpression) + .filter(n => utils.isAssignment(null, n, createPluginsProperty)); + expect(ast.toSource()).toMatchSnapshot(); + }); + }); +}); diff --git a/dist/types.js b/dist/types.js new file mode 100644 index 00000000000..9d9d3eb9681 --- /dev/null +++ b/dist/types.js @@ -0,0 +1,192 @@ +// +/* eslint-disable node/no-unsupported-features */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * [IAstNodeCommentLine description] + * @type {Object} + */ + + + + + + + + + +/** + * [ILoc description] + * @type {Object} + */ + + + + + + + + + + + +/** + * [ITokenType description] + * @type {Object} + */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/utils/WebpackOptionsValidationError.js b/dist/utils/WebpackOptionsValidationError.js new file mode 100644 index 00000000000..5af67962802 --- /dev/null +++ b/dist/utils/WebpackOptionsValidationError.js @@ -0,0 +1,249 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Gajus Kuizinas @gajus +*/ +"use strict"; + +const webpackOptionsSchema = require("./webpackOptionsSchema.json"); + +const getSchemaPart = (path, parents, additionalPath) => { + parents = parents || 0; + path = path.split("/"); + path = path.slice(0, path.length - parents); + if (additionalPath) { + additionalPath = additionalPath.split("/"); + path = path.concat(additionalPath); + } + let schemaPart = webpackOptionsSchema; + for (let i = 1; i < path.length; i++) { + const inner = schemaPart[path[i]]; + if (inner) schemaPart = inner; + } + return schemaPart; +}; + +const getSchemaPartText = (schemaPart, additionalPath) => { + if (additionalPath) { + for (let i = 0; i < additionalPath.length; i++) { + const inner = schemaPart[additionalPath[i]]; + if (inner) schemaPart = inner; + } + } + while (schemaPart.$ref) schemaPart = getSchemaPart(schemaPart.$ref); + let schemaText = WebpackOptionsValidationError.formatSchema(schemaPart); + if (schemaPart.description) schemaText += `\n${schemaPart.description}`; + return schemaText; +}; + +const indent = (str, prefix, firstLine) => { + if (firstLine) { + return prefix + str.replace(/\n(?!$)/g, "\n" + prefix); + } else { + return str.replace(/\n(?!$)/g, `\n${prefix}`); + } +}; + +class WebpackOptionsValidationError extends Error { + constructor(validationErrors) { + super(); + if (Error.hasOwnProperty("captureStackTrace")) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "WebpackOptionsValidationError"; + + this.message = + "Invalid configuration object. " + + "Webpack has been initialised using a configuration object that does not match the API schema.\n" + + validationErrors + .map( + err => + " - " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n"); + this.validationErrors = validationErrors; + } + + static formatSchema(schema, prevSchemas) { + prevSchemas = prevSchemas || []; + + const formatInnerSchema = (innerSchema, addSelf) => { + if (!addSelf) + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas + ); + if (prevSchemas.indexOf(innerSchema) >= 0) return "(recursive)"; + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas.concat(schema) + ); + }; + + if (schema.type === "string") { + if (schema.minLength === 1) return "non-empty string"; + else if (schema.minLength > 1) + return `string (min length ${schema.minLength})`; + return "string"; + } else if (schema.type === "boolean") { + return "boolean"; + } else if (schema.type === "number") { + return "number"; + } else if (schema.type === "object") { + if (schema.properties) { + const required = schema.required || []; + return `object { ${Object.keys(schema.properties) + .map(property => { + if (required.indexOf(property) < 0) return property + "?"; + return property; + }) + .concat(schema.additionalProperties ? ["..."] : []) + .join(", ")} }`; + } + if (schema.additionalProperties) { + return `object { : ${formatInnerSchema( + schema.additionalProperties + )} }`; + } + return "object"; + } else if (schema.type === "array") { + return `[${formatInnerSchema(schema.items)}]`; + } + + switch (schema.instanceof) { + case "Function": + return "function"; + case "RegExp": + return "RegExp"; + } + if (schema.$ref) return formatInnerSchema(getSchemaPart(schema.$ref), true); + if (schema.allOf) return schema.allOf.map(formatInnerSchema).join(" & "); + if (schema.oneOf) return schema.oneOf.map(formatInnerSchema).join(" | "); + if (schema.anyOf) return schema.anyOf.map(formatInnerSchema).join(" | "); + if (schema.enum) + return schema.enum.map(item => JSON.stringify(item)).join(" | "); + return JSON.stringify(schema, 0, 2); + } + + static formatValidationError(err) { + const dataPath = `configuration${err.dataPath}`; + if (err.keyword === "additionalProperties") { + const baseMessage = `${dataPath} has an unknown property '${err.params + .additionalProperty}'. These properties are valid:\n${getSchemaPartText( + err.parentSchema + )}`; + if (!err.dataPath) { + switch (err.params.additionalProperty) { + case "debug": + return ( + `${baseMessage}\n` + + "The 'debug' property was removed in webpack 2.\n" + + "Loaders should be updated to allow passing this option via loader options in module.rules.\n" + + "Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n" + + "plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " debug: true\n" + + " })\n" + + "]" + ); + } + return ( + baseMessage + + "\n" + + "For typos: please correct them.\n" + + "For loader options: webpack 2 no longer allows custom properties in configuration.\n" + + " Loaders should be updated to allow passing options via loader options in module.rules.\n" + + " Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n" + + " plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " // test: /\\.xxx$/, // may apply this only for some modules\n" + + " options: {\n" + + ` ${err.params.additionalProperty}: ...\n` + + " }\n" + + " })\n" + + " ]" + ); + } + return baseMessage; + } else if (err.keyword === "oneOf" || err.keyword === "anyOf") { + if (err.children && err.children.length > 0) { + return ( + `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}\n` + + `Details:\n${err.children + .map( + err => + " * " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n")}` + ); + } + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "enum") { + if ( + err.parentSchema && + err.parentSchema.enum && + err.parentSchema.enum.length === 1 + ) { + return `${dataPath} should be ${getSchemaPartText(err.parentSchema)}`; + } + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "allOf") { + return `${dataPath} should be:\n${getSchemaPartText(err.parentSchema)}`; + } else if (err.keyword === "type") { + switch (err.params.type) { + case "object": + return `${dataPath} should be an object.`; + case "string": + return `${dataPath} should be a string.`; + case "boolean": + return `${dataPath} should be a boolean.`; + case "number": + return `${dataPath} should be a number.`; + case "array": + return `${dataPath} should be an array:\n${getSchemaPartText( + err.parentSchema + )}`; + } + return `${dataPath} should be ${err.params.type}:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "instanceof") { + return `${dataPath} should be an instance of ${getSchemaPartText( + err.parentSchema + )}.`; + } else if (err.keyword === "required") { + const missingProperty = err.params.missingProperty.replace(/^\./, ""); + return `${dataPath} misses the property '${missingProperty}'.\n${getSchemaPartText( + err.parentSchema, + ["properties", missingProperty] + )}`; + } else if (err.keyword === "minLength" || err.keyword === "minItems") { + if (err.params.limit === 1) return `${dataPath} should not be empty.`; + else return `${dataPath} ${err.message}`; + } else { + // eslint-disable-line no-fallthrough + return `${dataPath} ${err.message} (${JSON.stringify( + err, + 0, + 2 + )}).\n${getSchemaPartText(err.parentSchema)}`; + } + } +} + +module.exports = WebpackOptionsValidationError; diff --git a/dist/utils/copy-utils.js b/dist/utils/copy-utils.js new file mode 100644 index 00000000000..d161d38943d --- /dev/null +++ b/dist/utils/copy-utils.js @@ -0,0 +1,57 @@ +var path = require("path"); + +/** + * Takes in a file path in the `./templates` directory. Copies that + * file to the destination, with the `.tpl` extension stripped. + * + * @param {Generator} generator A Yeoman Generator instance + * @param {string} templateDir Absolute path to template directory + * @returns {Function} A curried function that takes a file path and copies it + */ +var generatorCopy = ( + generator, + templateDir +) => /** @param {string} filePath */ filePath => { + var sourceParts = templateDir.split(path.delimiter); + sourceParts.push.apply(sourceParts, filePath.split("/")); + var targetParts = path.dirname(filePath).split("/"); + targetParts.push(path.basename(filePath, ".tpl")); + + generator.fs.copy( + path.join.apply(null, sourceParts), + generator.destinationPath(path.join.apply(null, targetParts)) + ); +}; + +/** + * Takes in a file path in the `./templates` directory. Copies that + * file to the destination, with the `.tpl` extension and `_` prefix + * stripped. Passes `this.props` to the template. + * + * @param {Generator} generator A Yeoman Generator instance + * @param {string} templateDir Absolute path to template directory + * @param {any} templateData An object containing the data passed to + * the template files. + * @returns {Function} A curried function that takes a file path and copies it + */ +var generatorCopyTpl = ( + generator, + templateDir, + templateData +) => /** @param {string} filePath */ filePath => { + var sourceParts = templateDir.split(path.delimiter); + sourceParts.push.apply(sourceParts, filePath.split("/")); + var targetParts = path.dirname(filePath).split("/"); + targetParts.push(path.basename(filePath, ".tpl").slice(1)); + + generator.fs.copyTpl( + path.join.apply(null, sourceParts), + generator.destinationPath(path.join.apply(null, targetParts)), + templateData + ); +}; + +module.exports = { + generatorCopy, + generatorCopyTpl +}; diff --git a/dist/utils/npm-exists.js b/dist/utils/npm-exists.js new file mode 100644 index 00000000000..f8a11b8d9d4 --- /dev/null +++ b/dist/utils/npm-exists.js @@ -0,0 +1,34 @@ +"use strict"; + +const got = require("got"); +const chalk = require("chalk"); +const constant = value => () => value; + +/* +* @function npmExists +* +* Checks if the given dependency/module is registered on npm +* +* @param { String } moduleName - The dependency to be checked +* @returns { } constant - Returns either true or false, +* based on if it exists or not +*/ + +module.exports = function npmExists(moduleName) { + //eslint-disable-next-line + if (moduleName.length <= 14 || moduleName.slice(0, 14) !== "webpack-addons") { + throw new TypeError( + chalk.bold(`${moduleName} isn't a valid name.\n`) + + chalk.red( + "\nIt should be prefixed with 'webpack-addons', but have different suffix.\n" + ) + ); + } + const hostname = "https://www.npmjs.org"; + const pkgUrl = `${hostname}/package/${moduleName}`; + return got(pkgUrl, { + method: "HEAD" + }) + .then(constant(true)) + .catch(constant(false)); +}; diff --git a/dist/utils/npm-exists.spec.js b/dist/utils/npm-exists.spec.js new file mode 100644 index 00000000000..1ee26346139 --- /dev/null +++ b/dist/utils/npm-exists.spec.js @@ -0,0 +1,16 @@ +"use strict"; +const exists = require("./npm-exists"); + +describe("npm-exists", () => { + it("should sucessfully existence of a published module", () => { + exists("webpack-addons-ylvis").then(status => { + expect(status).toBe(true); + }); + }); + + it("should return false for the existence of a fake module", () => { + exists("webpack-addons-noop").then(status => { + expect(status).toBe(false); + }); + }); +}); diff --git a/dist/utils/npm-packages-exists.js b/dist/utils/npm-packages-exists.js new file mode 100644 index 00000000000..d8999771023 --- /dev/null +++ b/dist/utils/npm-packages-exists.js @@ -0,0 +1,38 @@ +"use strict"; + +const npmExists = require("./npm-exists"); +const resolvePackages = require("./resolve-packages"); + +/* +* @function npmPackagesExists +* +* Loops through an array and checks if a package is registered +* on npm and throws an error if it is not. +* +* @param { Array } pkg - Array of packages to check existence of +* @returns { Array } resolvePackages - Returns an process to install the packages +*/ + +module.exports = function npmPackagesExists(pkg) { + let acceptedPackages = []; + pkg.forEach(addon => { + npmExists(addon) + .then(moduleExists => { + if (!moduleExists) { + Error.stackTraceLimit = 0; + throw new TypeError("Package isn't registered on npm."); + } + if (moduleExists) { + acceptedPackages.push(addon); + } + }) + .catch(err => { + console.error(err.stack || err); + process.exit(0); + }) + .then(() => { + if (acceptedPackages.length === pkg.length) + return resolvePackages(acceptedPackages); + }); + }); +}; diff --git a/dist/utils/package-manager.js b/dist/utils/package-manager.js new file mode 100644 index 00000000000..57e335dfb8b --- /dev/null +++ b/dist/utils/package-manager.js @@ -0,0 +1,61 @@ +"use strict"; + +const path = require("path"); +const fs = require("fs"); +const spawn = require("cross-spawn"); +const globalPath = require("global-modules"); + +const SPAWN_FUNCTIONS = { + npm: spawnNPM, + yarn: spawnYarn +}; + +function spawnNPM(pkg, isNew) { + return spawn.sync("npm", [isNew ? "install" : "update", "-g", pkg], { + stdio: "inherit" + }); +} + +function spawnYarn(pkg, isNew) { + return spawn.sync("yarn", ["global", isNew ? "add" : "upgrade", pkg], { + stdio: "inherit" + }); +} +/* +* @function spawnChild +* +* Spawns a new process that installs the addon/dependency +* +* @param { String } pkg - The dependency to be installed +* @returns { } spawn - Installs the package +*/ + +function spawnChild(pkg) { + const pkgPath = path.resolve(globalPath, pkg); + const packageManager = getPackageManager(); + const isNew = !fs.existsSync(pkgPath); + + return SPAWN_FUNCTIONS[packageManager](pkg, isNew); +} + +/* +* @function getPackageManager +* +* Returns the name of package manager to use, +* preferring yarn over npm if available +* +* @returns { String } - The package manager name +*/ + +function getPackageManager() { + if (spawn.sync("yarn", [" --version"], { stdio: "ignore" }).error) { + return "npm"; + } + + return "yarn"; +} + +module.exports = { + getPackageManager, + spawnChild +}; diff --git a/dist/utils/package-manager.spec.js b/dist/utils/package-manager.spec.js new file mode 100644 index 00000000000..e45b920fb4a --- /dev/null +++ b/dist/utils/package-manager.spec.js @@ -0,0 +1,90 @@ +"use strict"; + +jest.mock("cross-spawn"); +jest.mock("fs"); + +describe("package-manager", () => { + const packageManager = require("./package-manager"); + const spawn = require("cross-spawn"); + const fs = require("fs"); + + const defaultSyncResult = { + pid: 1234, + output: [null, null, null], + stdout: null, + stderr: null, + signal: null, + status: 1, + error: null + }; + + function mockSpawnErrorOnce() { + spawn.sync.mockReturnValueOnce( + Object.assign({}, defaultSyncResult, { + status: null, + error: new Error() + }) + ); + } + + spawn.sync.mockReturnValue(defaultSyncResult); + + it("should return 'yarn' from getPackageManager if it's installed", () => { + expect(packageManager.getPackageManager()).toEqual("yarn"); + }); + + it("should return 'npm' from getPackageManager if yarn is not installed", () => { + mockSpawnErrorOnce(); + expect(packageManager.getPackageManager()).toEqual("npm"); + }); + + it("should spawn yarn add from spawnChild", () => { + const packageName = "some-pkg"; + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "yarn", + ["global", "add", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn yarn upgrade from spawnChild", () => { + const packageName = "some-pkg"; + + fs.existsSync.mockReturnValueOnce(true); + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "yarn", + ["global", "upgrade", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn npm install from spawnChild", () => { + const packageName = "some-pkg"; + + mockSpawnErrorOnce(); + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "npm", + ["install", "-g", packageName], + { stdio: "inherit" } + ); + }); + + it("should spawn npm update from spawnChild", () => { + const packageName = "some-pkg"; + + mockSpawnErrorOnce(); + fs.existsSync.mockReturnValueOnce(true); + + packageManager.spawnChild(packageName); + expect(spawn.sync).toHaveBeenLastCalledWith( + "npm", + ["update", "-g", packageName], + { stdio: "inherit" } + ); + }); +}); diff --git a/dist/utils/resolve-packages.js b/dist/utils/resolve-packages.js new file mode 100644 index 00000000000..00f88bf35ed --- /dev/null +++ b/dist/utils/resolve-packages.js @@ -0,0 +1,70 @@ +"use strict"; + +const path = require("path"); +const chalk = require("chalk"); +const globalPath = require("global-modules"); + +const creator = require("../creator/index").creator; + +const spawnChild = require("./package-manager").spawnChild; + +/* +* @function processPromise +* +* Attaches a promise to the installation of the package +* +* @param { Function } child - The function to attach a promise to +* @returns { } promise - Returns a promise to the installation +*/ + +function processPromise(child) { + return new Promise(function(resolve, reject) { + //eslint-disable-line + if (child.status !== 0) { + reject(); + } else { + resolve(); + } + }); +} + +/* +* @function resolvePackages +* +* Resolves and installs the packages, later sending them to @creator +* +* @param { Array } pkg - The dependencies to be installed +* @returns { } creator - Builds +* a webpack configuration through yeoman or throws an error +*/ + +module.exports = function resolvePackages(pkg) { + Error.stackTraceLimit = 30; + + let packageLocations = []; + + pkg.forEach(addon => { + processPromise(spawnChild(addon)) + .then(() => { + try { + packageLocations.push(path.resolve(globalPath, addon)); + } catch (err) { + console.log("Package wasn't validated correctly.."); + console.log("Submit an issue for", pkg, "if this persists"); + console.log("\nReason: \n"); + console.error(chalk.bold.red(err)); + process.exitCode = 1; + } + }) + .catch(err => { + console.log("Package Coudln't be installed, aborting.."); + console.log("\nReason: \n"); + console.error(chalk.bold.red(err)); + process.exitCode = 1; + }) + .then(() => { + if (packageLocations.length === pkg.length) + return creator(packageLocations); + }); + }); +}; diff --git a/dist/utils/resolve-packages.spec.js b/dist/utils/resolve-packages.spec.js new file mode 100644 index 00000000000..6b5b1392770 --- /dev/null +++ b/dist/utils/resolve-packages.spec.js @@ -0,0 +1,34 @@ +"use strict"; + +const getLoc = require("../../__mocks__/inquirer/resolve.mock"); + +describe("resolve-packages", () => { + let moduleLoc; + + afterEach(() => { + moduleLoc = null; + }); + + it("should resolve a location of a published module", () => { + moduleLoc = getLoc(["webpack-addons-ylvis"]); + expect(moduleLoc).toEqual(["../../node_modules/webpack-addons-ylvis"]); + }); + + it("should be empty if argument is blank", () => { + // normally caught before getting resolved + moduleLoc = getLoc([" "]); + expect(moduleLoc).toEqual(["../../node_modules/ "]); + }); + + it("should resolve multiple locations of published modules", () => { + /* we're testing multiple paths here. At Github this up for discussion, because if + * we validate each package on each run, we can catch and build the questions in init gradually + * while we get one filepath at the time. If not, this is a workaround. + */ + moduleLoc = getLoc(["webpack-addons-ylvis", "webpack-addons-noop"]); + expect(moduleLoc).toEqual([ + "../../node_modules/webpack-addons-ylvis", + "../../node_modules/webpack-addons-noop" + ]); + }); +}); diff --git a/dist/utils/validateSchema.js b/dist/utils/validateSchema.js new file mode 100644 index 00000000000..3a20782e68f --- /dev/null +++ b/dist/utils/validateSchema.js @@ -0,0 +1,67 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Gajus Kuizinas @gajus +*/ +"use strict"; + +/* eslint-disable */ +const Ajv = require("ajv"); +const ajv = new Ajv({ + errorDataPath: "configuration", + allErrors: true, + verbose: true +}); +require("ajv-keywords")(ajv, ["instanceof"]); +/* eslint-enable */ + +function validateSchema(schema, options) { + if (Array.isArray(options)) { + const errors = options.map(options => validateObject(schema, options)); + errors.forEach((list, idx) => { + list.forEach(function applyPrefix(err) { + err.dataPath = `[${idx}]${err.dataPath}`; + if (err.children) { + err.children.forEach(applyPrefix); + } + }); + }); + return errors.reduce((arr, items) => { + return arr.concat(items); + }, []); + } else { + return validateObject(schema, options); + } +} + +function validateObject(schema, options) { + const validate = ajv.compile(schema); + const valid = validate(options); + return valid ? [] : filterErrors(validate.errors); +} + +function filterErrors(errors) { + let newErrors = []; + errors.forEach(err => { + const dataPath = err.dataPath; + let children = []; + newErrors = newErrors.filter(oldError => { + if (oldError.dataPath.includes(dataPath)) { + if (oldError.children) { + children = children.concat(oldError.children.slice(0)); + } + oldError.children = undefined; + children.push(oldError); + return false; + } + return true; + }); + if (children.length) { + err.children = children; + } + newErrors.push(err); + }); + + return newErrors; +} + +module.exports = validateSchema; diff --git a/dist/utils/webpack-generator.js b/dist/utils/webpack-generator.js new file mode 100644 index 00000000000..561f10931f7 --- /dev/null +++ b/dist/utils/webpack-generator.js @@ -0,0 +1,77 @@ +var path = require("path"); +var mkdirp = require("mkdirp"); +var Generator = require("yeoman-generator"); +var copyUtils = require("../utils/copy-utils"); + +/** + * Creates a Yeoman Generator that generates a project conforming + * to webpack-defaults. + * + * @param {any[]} prompts An array of Yeoman prompt objects + * + * @param {string} templateDir Absolute path to template directory + * + * @param {string[]} copyFiles An array of file paths (relative to `./templates`) + * of files to be copied to the generated project. File paths should be of the + * form `path/to/file.js.tpl`. + * + * @param {string[]} copyTemplateFiles An array of file paths (relative to + * `./templates`) of files to be copied to the generated project. Template + * file paths should be of the form `path/to/_file.js.tpl`. + * + * @param {Function} templateFn A function that is passed a generator instance and + * returns an object containing data to be supplied to the template files. + * + * @returns {Generator} A class extending Generator + */ +function webpackGenerator( + prompts, + templateDir, + copyFiles, + copyTemplateFiles, + templateFn +) { + //eslint-disable-next-line + return class extends Generator { + prompting() { + return this.prompt(prompts).then(props => { + this.props = props; + }); + } + + default() { + var currentDirName = path.basename(this.destinationPath()); + if (currentDirName !== this.props.name) { + this.log(` + Your project must be inside a folder named ${this.props.name} + I will create this folder for you. + `); + mkdirp(this.props.name); + var pathToProjectDir = this.destinationPath(this.props.name); + this.destinationRoot(pathToProjectDir); + } + } + + writing() { + this.copy = copyUtils.generatorCopy(this, templateDir); + this.copyTpl = copyUtils.generatorCopyTpl( + this, + templateDir, + templateFn(this) + ); + + copyFiles.forEach(this.copy); + copyTemplateFiles.forEach(this.copyTpl); + } + + install() { + this.npmInstall(["webpack-defaults", "bluebird"], { + "save-dev": true + }).then(() => { + this.spawnCommand("npm", ["run", "webpack-defaults"]); + }); + } + }; +} + +module.exports = webpackGenerator; diff --git a/package.json b/package.json index bb90b2d574d..bc153a9174a 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "format": "prettier-eslint \"bin/**/**/*.js\" --write && prettier-eslint \"lib/**/**/*.js\" --write && prettier-eslint \"test/**/**/*.js\" --write", "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", + "prepublish": "flow-remove-types lib/ -d dist/", "postinstall": "flow-remove-types lib/ -d dist/", "pretest": "npm run lint", "test": "jest --coverage" From 2a18dfacf068b6acca64831bfd22d07336686257 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:15:45 +0200 Subject: [PATCH 15/24] 1.3.7 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74fe8ea4dbc..54cf994bd8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.6", + "version": "1.3.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bc153a9174a..46b057cf5e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.6", + "version": "1.3.7", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From 3a30f612117f51d67c388794c320f0c8c05b7aea Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:27:22 +0200 Subject: [PATCH 16/24] add propper post install --- .gitignore | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4dd5c95c1b5..798edadc1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,8 @@ yarn-error.log # Jest Coverage coverage +# Dist build +dist + # Test Compilation test/js/* diff --git a/package.json b/package.json index 46b057cf5e0..d074b6c7c9a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", "prepublish": "flow-remove-types lib/ -d dist/", - "postinstall": "flow-remove-types lib/ -d dist/", + "postinstall": "node ./node_modules/flow-remove-types/flow-remove-types lib/ -d dist/", "pretest": "npm run lint", "test": "jest --coverage" }, From 4b8796e351a52ba76ee0f844b9a916df4c6acd1f Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:27:33 +0200 Subject: [PATCH 17/24] 1.3.8 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54cf994bd8c..ae6cc44d21a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.7", + "version": "1.3.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d074b6c7c9a..05388267eec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.7", + "version": "1.3.8", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From bb59416691771bcf8dc83f5cda0d6313f7cae73f Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:31:02 +0200 Subject: [PATCH 18/24] re-add manual build step --- .gitignore | 2 -- package.json | 1 - 2 files changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 798edadc1c1..7f282805434 100644 --- a/.gitignore +++ b/.gitignore @@ -15,8 +15,6 @@ yarn-error.log # Jest Coverage coverage -# Dist build -dist # Test Compilation test/js/* diff --git a/package.json b/package.json index 05388267eec..8cf44745c97 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", "prepublish": "flow-remove-types lib/ -d dist/", - "postinstall": "node ./node_modules/flow-remove-types/flow-remove-types lib/ -d dist/", "pretest": "npm run lint", "test": "jest --coverage" }, From f9b60b71b8e8466d67c836382d3a5d41c93d4d7e Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Fri, 6 Oct 2017 00:31:22 +0200 Subject: [PATCH 19/24] 1.3.9 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae6cc44d21a..86d68ee6d0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.8", + "version": "1.3.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8cf44745c97..73b326e3ef4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.8", + "version": "1.3.9", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From 08d07e7bdfdb378979418ba248dda3e1c4d692a9 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Sun, 22 Oct 2017 23:01:44 +0200 Subject: [PATCH 20/24] refactor --- .gitignore | 2 ++ bin/webpack.js | 31 ++++++++++-------------- lib/index.js | 44 ++++++++++++++++++++++++++++++++++ lib/{initialize.js => init.js} | 0 package.json | 5 ++-- 5 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 lib/index.js rename lib/{initialize.js => init.js} (100%) diff --git a/.gitignore b/.gitignore index 7f282805434..b6ec97854f4 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ yarn-error.log # Jest Coverage coverage +# Distribution Build +dist # Test Compilation test/js/* diff --git a/bin/webpack.js b/bin/webpack.js index f1f070fb4fe..0cd85a45e81 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -9,24 +9,19 @@ var resolveCwd = require("resolve-cwd"); // Local version replace global one var localCLI = resolveCwd.silent("webpack-cli/bin/webpack"); -if (process.argv.slice(2).indexOf("init") >= 0) { - const initPkgs = - process.argv.slice(2).length === 1 ? [] : [process.argv.slice(2).pop()]; - //eslint-disable-next-line - return require("../dist/initialize")(initPkgs); -} else if (process.argv.slice(2).indexOf("migrate") >= 0) { - const filePaths = - process.argv.slice(2).length === 1 ? [] : [process.argv.slice(2).pop()]; - if (!filePaths.length) { - throw new Error("Please specify a path to your webpack config"); - } - const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); - //eslint-disable-next-line - return require("../dist/migrate.js")(inputConfigPath, inputConfigPath); -} else if (process.argv.slice(2).indexOf("generate-loader") >= 0) { - return require("../lib/generate-loader/index.js")(); -} else if (process.argv.slice(2).indexOf("generate-plugin") >= 0) { - return require("../lib/generate-plugin/index.js")(); +const NON_COMPILATION_ARGS = [ + "init", + "migrate", + "generate-loader", + "generate-plugin" +]; + +const NON_COMPILATION_CMD = process.argv.find(arg => { + return NON_COMPILATION_ARGS.find(a => a === arg); +}); + +if (NON_COMPILATION_CMD) { + return require("../dist/index")(NON_COMPILATION_CMD, process.argv); } if (localCLI && path.relative(localCLI, __filename) !== "") { diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000000..19fe632aaa8 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,44 @@ +"use strict"; + +const path = require("path"); + +/* +* @function initialize +* +* First function to be called after running a flag. This is a check, +* to match the flag with the respective require. +* +* @param { String } command - which feature to use +* @param { Object } args - arguments from the CLI +* @returns { Module } returns the module with the command +* +*/ + +module.exports = function initialize(command, args) { + const popArgs = args.slice(2).pop(); + switch (command) { + case "init": { + const initPkgs = args.slice(2).length === 1 ? [] : [popArgs]; + //eslint-disable-next-line + return require("./init.js")(initPkgs); + } + case "migrate": { + const filePaths = args.slice(2).length === 1 ? [] : [popArgs]; + if (!filePaths.length) { + throw new Error("Please specify a path to your webpack config"); + } + const inputConfigPath = path.resolve(process.cwd(), filePaths[0]); + //eslint-disable-next-line + return require("./migrate.js")(inputConfigPath, inputConfigPath); + } + case "generate-loader": { + return require("./generate-loader/index.js")(); + } + case "generate-plugin": { + return require("./generate-plugin/index.js")(); + } + default: { + throw new Error(`Unknown command ${command} found`); + } + } +}; diff --git a/lib/initialize.js b/lib/init.js similarity index 100% rename from lib/initialize.js rename to lib/init.js diff --git a/package.json b/package.json index 73b326e3ef4..e182bcd0ee2 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,15 @@ }, "main": "./bin/webpack.js", "engines": { - "node": ">=5.0.0" + "node": ">=4.0.0" }, "scripts": { "lint": "eslint \"**/*.js\"", "format": "prettier-eslint \"bin/**/**/*.js\" --write && prettier-eslint \"lib/**/**/*.js\" --write && prettier-eslint \"test/**/**/*.js\" --write", + "format:dist": "prettier-eslint \"dist/**/**/*.js\" --write", "lint:codeOnly": "eslint \"{lib,bin,__mocks__}/**/!(__testfixtures__)/*.js\" \"{lib,bin,__mocks__}/**.js\"", "precommit": "lint-staged", - "prepublish": "flow-remove-types lib/ -d dist/", + "prepublish": "flow-remove-types lib/ -d dist/ && npm run format:dist", "pretest": "npm run lint", "test": "jest --coverage" }, From 4aff633d3d3e1f9223a3a5af4d4de8c8ce20afd4 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Sun, 22 Oct 2017 23:02:18 +0200 Subject: [PATCH 21/24] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e182bcd0ee2..e17170ee8fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "1.3.9", + "version": "1.4.1", "description": "CLI for webpack & friends", "license": "MIT", "preferGlobal": true, From 6b1bb2329da0b042adc9c79d59b86fb414f29707 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Sun, 22 Oct 2017 23:06:45 +0200 Subject: [PATCH 22/24] disable published pkg --- bin/webpack.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/webpack.js b/bin/webpack.js index 0cd85a45e81..3520b6bb4cf 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -21,6 +21,7 @@ const NON_COMPILATION_CMD = process.argv.find(arg => { }); if (NON_COMPILATION_CMD) { + // eslint-disable-next-line return require("../dist/index")(NON_COMPILATION_CMD, process.argv); } From 49f33f2c8e0220cf4834bac937e37028388ebe2e Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Sun, 22 Oct 2017 23:38:08 +0200 Subject: [PATCH 23/24] add ignore patterns --- .npmignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000000..6385ca30a12 --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +test +coverage +lib +.travis.yml +.eslintrc* +.fitcommitjsrc.json +.vscode +.editorconfig +.eslintignore +__mocks__ From 78e39f109553e347033f7e57ff306d67628ff29e Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Sun, 22 Oct 2017 23:45:13 +0200 Subject: [PATCH 24/24] add more ignore patterns for npm --- .npmignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.npmignore b/.npmignore index 6385ca30a12..e5b2e46fb55 100644 --- a/.npmignore +++ b/.npmignore @@ -8,3 +8,8 @@ lib .editorconfig .eslintignore __mocks__ +__testfixtures__ +*.test.js +*.input.js +types.js +*.spec.js