diff --git a/.appveyor.yml b/.appveyor.yml index e3bba4df610..a883c4b1ad5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -22,7 +22,6 @@ test_script: - which npm - npm run appveyor:lint - npm run appveyor:test - - npm run bundlesize cache: - node_modules -> appveyor.yml,package.json,package-lock.json diff --git a/lib/generators/init-generator.js b/lib/generators/init-generator.js index 5375ee13a59..e90997b18e5 100644 --- a/lib/generators/init-generator.js +++ b/lib/generators/init-generator.js @@ -340,7 +340,8 @@ module.exports = class InitGenerator extends Generator { if (regExpForStyles) { if (this.isProd) { this.configuration.config.topScope.push(tooltip.cssPlugin()); - this.dependencies.push("extract-text-webpack-plugin"); + // TODO: Replace with regular version once v.4 is out + this.dependencies.push("extract-text-webpack-plugin@next"); if (cssBundleName.length !== 0) { this.configuration.config.webpackOptions.plugins.push( @@ -410,4 +411,7 @@ module.exports = class InitGenerator extends Generator { }); }); } + writing() { + this.config.set("configuration", this.configuration); + } }; diff --git a/lib/init/index.js b/lib/init/index.js index 8fb2b3f6140..bf03e4ae893 100644 --- a/lib/init/index.js +++ b/lib/init/index.js @@ -1,65 +1,173 @@ "use strict"; -const yeoman = require("yeoman-environment"); -const Generator = require("yeoman-generator"); const path = require("path"); -const defaultGenerator = require("../generators/init-generator"); -const runTransform = require("./transformations/index"); +const j = require("jscodeshift"); +const chalk = require("chalk"); +const pEachSeries = require("p-each-series"); + +const runPrettier = require("../utils/run-prettier"); + +const entryTransform = require("./transformations/entry/entry"); +const outputTransform = require("./transformations/output/output"); +const contextTransform = require("./transformations/context/context"); +const resolveTransform = require("./transformations/resolve/resolve"); +const devtoolTransform = require("./transformations/devtool/devtool"); +const targetTransform = require("./transformations/target/target"); +const watchTransform = require("./transformations/watch/watch"); +const watchOptionsTransform = require("./transformations/watch/watchOptions"); +const externalsTransform = require("./transformations/externals/externals"); +const nodeTransform = require("./transformations/node/node"); +const performanceTransform = require("./transformations/performance/performance"); +const statsTransform = require("./transformations/stats/stats"); +const amdTransform = require("./transformations/other/amd"); +const bailTransform = require("./transformations/other/bail"); +const cacheTransform = require("./transformations/other/cache"); +const profileTransform = require("./transformations/other/profile"); +const mergeTransform = require("./transformations/other/merge"); +const parallelismTransform = require("./transformations/other/parallelism"); +const recordsInputPathTransform = require("./transformations/other/recordsInputPath"); +const recordsOutputPathTransform = require("./transformations/other/recordsOutputPath"); +const recordsPathTransform = require("./transformations/other/recordsPath"); +const moduleTransform = require("./transformations/module/module"); +const pluginsTransform = require("./transformations/plugins/plugins"); +const topScopeTransform = require("./transformations/top-scope/top-scope"); +const devServerTransform = require("./transformations/devServer/devServer"); +const modeTransform = require("./transformations/mode/mode"); +const resolveLoaderTransform = require("./transformations/resolveLoader/resolveLoader"); + +const transformsObject = { + entryTransform, + outputTransform, + contextTransform, + resolveTransform, + devtoolTransform, + targetTransform, + watchTransform, + watchOptionsTransform, + externalsTransform, + nodeTransform, + performanceTransform, + statsTransform, + amdTransform, + bailTransform, + cacheTransform, + profileTransform, + moduleTransform, + pluginsTransform, + topScopeTransform, + mergeTransform, + devServerTransform, + modeTransform, + parallelismTransform, + recordsInputPathTransform, + recordsOutputPathTransform, + recordsPathTransform, + resolveLoaderTransform +}; /** * - * Runs yeoman and runs the transformations based on the object - * built up from an author/user + * Maps back transforms that needs to be run using the configuration + * provided. * - * @param {String} options - An path to the given generator - * @returns {Function} runTransform - Run transformations based on the finished - * yeoman instance + * @param {Object} transformObject - An Object with all transformations + * @param {Object} config - Configuration to transform + * @returns {Object} - An Object with the transformations to be run */ -function creator(options) { - let env = yeoman.createEnv("webpack", null); - 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)); - }); +function mapOptionsToTransform(transformObject, config) { + return Object.keys(transformObject) + .map(transformKey => { + const stringVal = transformKey.substr( + 0, + transformKey.indexOf("Transform") + ); + if (Object.keys(config.webpackOptions).length) { + if (config.webpackOptions[stringVal]) { + return [ + transformObject[transformKey], + config.webpackOptions[stringVal] + ]; + } else { + return [transformObject[transformKey], config[stringVal]]; + } + } else { + return [transformObject[transformKey]]; } - }; - env.registerStub(WebpackGenerator, generatorName); - } else { - env.registerStub(defaultGenerator, "webpack-default-generator"); - } + }) + .filter(e => e[1]); +} - 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")); - } +/** + * + * Runs the transformations from an object we get from yeoman + * + * @param {Object} webpackProperties - Configuration to transform + * @param {String} action - Action to be done on the given ast + * @returns {Promise} - A promise that writes each transform, runs prettier + * and writes the file + */ + +module.exports = function runTransform(webpackProperties, action) { + // webpackOptions.name sent to nameTransform if match + const webpackConfig = Object.keys(webpackProperties).filter(p => { + return p !== "configFile" && p !== "configPath"; }); -} + const initActionNotDefined = action && action !== "init" ? true : false; -/* -* @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 -*/ + webpackConfig.forEach(scaffoldPiece => { + const config = webpackProperties[scaffoldPiece]; + const transformations = mapOptionsToTransform(transformsObject, config); + const ast = j( + initActionNotDefined + ? webpackProperties.configFile + : "module.exports = {}" + ); + const transformAction = action || null; -function replaceGeneratorName(name) { - return name.replace(/(webpack-addons)?([^:]+)(:.*)?/g, "generator$2"); -} + return pEachSeries(transformations, f => { + if (!f[1]) { + return f[0](j, ast, transformAction); + } else { + return f[0](j, ast, f[1], transformAction); + } + }) + .then(_ => { + let configurationName; + if (!config.configName) { + configurationName = "webpack.config.js"; + } else { + configurationName = "webpack." + config.configName + ".js"; + } -module.exports = { - creator, - replaceGeneratorName + const outputPath = initActionNotDefined + ? webpackProperties.configPath + : path.join(process.cwd(), configurationName); + const source = ast.toSource({ + quote: "single" + }); + + runPrettier(outputPath, source); + }) + .catch(err => { + console.error(err.message ? err.message : err); + }); + }); + if (initActionNotDefined && webpackProperties.config.item) { + process.stdout.write( + "\n" + + chalk.green( + `Congratulations! ${ + webpackProperties.config.item + } has been ${action}ed!\n` + ) + ); + } else { + process.stdout.write( + "\n" + + chalk.green( + "Congratulations! Your new webpack configuration file has been created!\n" + ) + ); + } }; diff --git a/lib/init/index.test.js b/lib/init/index.test.js deleted file mode 100644 index a02620e312a..00000000000 --- a/lib/init/index.test.js +++ /dev/null @@ -1,10 +0,0 @@ -"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/lib/init/transformations/index.js b/lib/init/transformations/index.js deleted file mode 100644 index b29d1b3f865..00000000000 --- a/lib/init/transformations/index.js +++ /dev/null @@ -1,153 +0,0 @@ -"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 parallelismTransform = require("./other/parallelism"); -const recordsInputPathTransform = require("./other/recordsInputPath"); -const recordsOutputPathTransform = require("./other/recordsOutputPath"); -const recordsPathTransform = require("./other/recordsPath"); -const moduleTransform = require("./module/module"); -const pluginsTransform = require("./plugins/plugins"); -const topScopeTransform = require("./top-scope/top-scope"); -const devServerTransform = require("./devServer/devServer"); -const modeTransform = require("./mode/mode"); -const resolveLoaderTransform = require("./resolveLoader/resolveLoader"); - -/** - * - * Runs the transformations from an object we get from yeoman - * - * @param {Object} webpackProperties - Configuration to transform - * @param {String} action - Action to be done on the given ast - * @returns {Promise} - 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, - modeTransform, - parallelismTransform, - recordsInputPathTransform, - recordsOutputPathTransform, - recordsPathTransform, - resolveLoaderTransform -}; - -module.exports = function runTransform(webpackProperties, action) { - // webpackOptions.name sent to nameTransform if match - const webpackConfig = action - ? { config: webpackProperties.config } - : webpackProperties; - Object.keys(webpackConfig).forEach(scaffoldPiece => { - const config = webpackConfig[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]]; - } - }) - .filter(e => e[1]); - - const ast = j( - action && action !== "init" - ? webpackProperties.configFile - : "module.exports = {}" - ); - const transformAction = action || null; - - return pEachSeries(transformations, f => { - if (!f[1]) { - return f[0](j, ast, transformAction); - } else { - return f[0](j, ast, f[1], transformAction); - } - }) - .then(_ => { - let configurationName; - if (!config.configName && action !== "init") { - configurationName = "webpack.config.js"; - } else { - configurationName = "webpack." + config.configName + ".js"; - } - - const outputPath = - action && action !== "init" - ? webpackProperties.configPath - : path.join(process.cwd(), configurationName); - const source = ast.toSource({ - quote: "single" - }); - - runPrettier(outputPath, source); - }) - .catch(err => { - console.error(err.message ? err.message : err); - }); - }); - if (action && webpackProperties.config.item) { - process.stdout.write( - "\n" + - chalk.green( - `Congratulations! ${ - webpackProperties.config.item - } has been ${action}ed!\n` - ) - ); - } else { - process.stdout.write( - "\n" + - chalk.green( - "Congratulations! Your new webpack configuration file has been created!\n" - ) - ); - } -}; diff --git a/lib/utils/modify-config-helper.js b/lib/utils/modify-config-helper.js index 179ba0c4bbe..4f1b3685c25 100644 --- a/lib/utils/modify-config-helper.js +++ b/lib/utils/modify-config-helper.js @@ -2,8 +2,10 @@ const fs = require("fs"); const path = require("path"); +const chalk = require("chalk"); const yeoman = require("yeoman-environment"); -const runTransform = require("../init/transformations/index"); +const runTransform = require("../init/index"); +const Generator = require("yeoman-generator"); /** * @@ -15,7 +17,7 @@ const runTransform = require("../init/transformations/index"); * @returns {Function} runTransform - Returns a transformation instance */ -module.exports = function modifyHelperUtil(action, generator) { +module.exports = function modifyHelperUtil(action, generator, packages) { let configPath = path.resolve(process.cwd(), "webpack.config.js"); const webpackConfigExists = fs.existsSync(configPath); if (!webpackConfigExists) { @@ -23,15 +25,50 @@ module.exports = function modifyHelperUtil(action, generator) { } const env = yeoman.createEnv("webpack", null); const generatorName = `webpack-${action}-generator`; + + if (!generator) { + generator = class extends Generator { + initializing() { + packages.forEach(pkgPath => { + return this.composeWith(require.resolve(pkgPath)); + }); + } + }; + } env.registerStub(generator, generatorName); env.run(generatorName).on("end", () => { + let configModule; + try { + const configPath = path.resolve(process.cwd(), ".yo-rc.json"); + configModule = require(configPath); + // Change structure of the config to be transformed + let tmpConfig = {}; + Object.keys(configModule).forEach(prop => { + const configs = Object.keys(configModule[prop].configuration); + configs.forEach(config => { + tmpConfig[config] = configModule[prop].configuration[config]; + }); + }); + configModule = tmpConfig; + } catch (err) { + console.error( + chalk.red("\nCould not find a yeoman configuration file.\n") + ); + console.error( + chalk.red( + "\nPlease make sure to use 'this.config.set('configuration', this.configuration);' at the end of the generator.\n" + ) + ); + Error.stackTraceLimit = 0; + process.exitCode = -1; + } const config = Object.assign( { configFile: !configPath ? null : fs.readFileSync(configPath, "utf8"), configPath: configPath }, - env.getArgument("configuration") + configModule ); return runTransform(config, action); }); diff --git a/lib/utils/resolve-packages.js b/lib/utils/resolve-packages.js index 7ed4fb2b582..c60cf857fb8 100644 --- a/lib/utils/resolve-packages.js +++ b/lib/utils/resolve-packages.js @@ -3,7 +3,7 @@ const path = require("path"); const chalk = require("chalk"); -const creator = require("../init/index").creator; +const modifyConfigHelper = require("./modify-config-helper"); const getPathToGlobalPackages = require("./package-manager") .getPathToGlobalPackages; @@ -45,7 +45,7 @@ function resolvePackages(pkg) { function invokeGeneratorIfReady() { if (packageLocations.length === pkg.length) - return creator(packageLocations); + return modifyConfigHelper("init", null, packageLocations); } pkg.forEach(addon => { diff --git a/package-lock.json b/package-lock.json index 29d66922211..7e13ae86102 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2658,20 +2658,13 @@ "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=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.1.tgz", + "integrity": "sha512-DNNEq6JdqBFPzS29TaoqZFPNLn5Xn3XyPFqLIhyBT8Xou4lHQEWzD6FinXoJUfhIfWX3aE1JkRa3cbWCHFbt1g==", "requires": { "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "through2": "2.0.3" - }, - "dependencies": { - "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=" - } + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.5" } }, "co": { @@ -3171,6 +3164,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", + "dev": true, "requires": { "inherits": "2.0.3", "readable-stream": "2.3.5", @@ -4171,9 +4165,9 @@ "dev": true }, "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" }, "debug": { "version": "2.6.9", @@ -5015,7 +5009,8 @@ "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true }, "extend-shallow": { "version": "3.0.2", @@ -8586,8 +8581,7 @@ "json-parse-better-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", - "dev": true + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" }, "json-schema": { "version": "0.2.3", @@ -9326,6 +9320,7 @@ "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", @@ -9336,12 +9331,14 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, @@ -9636,7 +9633,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", - "dev": true, "requires": { "pify": "3.0.0" } @@ -9781,7 +9777,7 @@ "clone": "2.1.1", "clone-buffer": "1.0.0", "clone-stats": "1.0.0", - "cloneable-readable": "1.0.0", + "cloneable-readable": "1.1.1", "remove-trailing-separator": "1.1.0", "replace-ext": "1.0.0" } @@ -12566,7 +12562,8 @@ "os-shim": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "dev": true }, "os-tmpdir": { "version": "1.0.2", @@ -12710,6 +12707,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { "error-ex": "1.3.1" } @@ -12785,6 +12783,7 @@ "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" }, @@ -12792,7 +12791,8 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true } } }, @@ -13399,6 +13399,7 @@ "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", @@ -13409,6 +13410,7 @@ "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" @@ -13841,7 +13843,8 @@ "rx": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true }, "rx-lite": { "version": "4.0.8", @@ -14095,9 +14098,9 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.1.tgz", + "integrity": "sha512-YA/iYtZpzFe5HyWVGrb02FjPxc4EMCfpoU/Phg9fQoyMC72u9598OUBrsU8IrtwAKG0tO8IYaqbaLIw+k3IRGA==", "requires": { "glob": "7.1.2", "interpret": "1.1.0", @@ -14371,6 +14374,7 @@ "version": "1.0.15", "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "dev": true, "requires": { "concat-stream": "1.6.1", "os-shim": "0.1.3" @@ -15166,7 +15170,8 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "typescript": { "version": "2.7.2", @@ -15922,9 +15927,9 @@ "dev": true }, "webpack": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.1.0.tgz", - "integrity": "sha512-ZFYcAZ44kOT+xsS5MS2H1fQr0PJkwQdYem/d17wacDkkupzsAkBJ3hDShWHdPVvWluFs6pfhHWw/dVso1m0rsA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.1.1.tgz", + "integrity": "sha512-PwxKH81yLjbPyBSZvPj/Ji9pT99XOGFA0t6zipoOKOMNRZ+09N39J5Uzcx3rYKnsHgKwDnfGkvzac4MF2Taknw==", "dev": true, "requires": { "acorn": "5.5.1", @@ -16773,50 +16778,37 @@ } }, "yeoman-generator": { - "version": "github:ev1stensberg/generator#9e24fa31c85302ca1145ae34fc68b4f133251ca0", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-2.0.3.tgz", + "integrity": "sha512-mODmrZ26a94djmGZZuIiomSGlN4wULdou29ZwcySupb2e9FdvoCl7Ps2FqHFjEHio3kOl/iBeaNqrnx3C3NwWg==", "requires": { "async": "2.6.0", - "chalk": "1.1.3", + "chalk": "2.3.2", "cli-table": "0.3.1", "cross-spawn": "5.1.0", "dargs": "5.1.0", - "dateformat": "2.2.0", - "debug": "2.6.9", + "dateformat": "3.0.3", + "debug": "3.1.0", "detect-conflict": "1.0.1", "error": "7.0.2", "find-up": "2.1.0", "github-username": "4.1.0", "istextorbinary": "2.2.1", "lodash": "4.17.5", + "make-dir": "1.2.0", "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", + "read-pkg-up": "3.0.0", + "rimraf": "2.6.2", "run-async": "2.3.0", - "shelljs": "0.7.8", + "shelljs": "0.8.1", "text-table": "0.2.0", "through2": "2.0.3", - "yeoman-environment": "1.6.6" + "yeoman-environment": "2.0.5" }, "dependencies": { - "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=" - }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", @@ -16825,26 +16817,6 @@ "lodash": "4.17.5" } }, - "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" - } - }, - "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" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -16855,90 +16827,23 @@ "which": "1.3.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" - } - }, - "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.5", - "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" - } - }, - "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=", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "number-is-nan": "1.0.1" + "ms": "2.0.0" } }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "chalk": "1.1.3" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, "minimist": { @@ -16946,87 +16851,54 @@ "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=" - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" + "error-ex": "1.3.1", + "json-parse-better-errors": "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=", + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "pify": "3.0.0" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "ansi-regex": "2.1.1" + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "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=" - }, - "tmp": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "requires": { - "os-tmpdir": "1.0.2" + "find-up": "2.1.0", + "read-pkg": "3.0.0" } }, - "untildify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", - "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "os-homedir": "1.0.2" + "glob": "7.1.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.9", - "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.5", - "log-symbols": "1.0.2", - "mem-fs": "1.1.3", - "text-table": "0.2.0", - "untildify": "2.1.0" - } + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" } } } diff --git a/package.json b/package.json index beda768a69f..467582d1a79 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "webpack-addons": "^1.1.5", "yargs": "^11.0.0", "yeoman-environment": "^2.0.0", - "yeoman-generator": "github:ev1stensberg/generator#Feature-getArgument" + "yeoman-generator": "^2.0.3" }, "peerDependencies": { "webpack": "^4.0.0-beta.1" @@ -129,7 +129,7 @@ "nyc": "^11.4.1", "prettier-eslint-cli": "^4.7.1", "schema-utils": "^0.4.5", - "webpack": "^4.0.1", + "webpack": "^4.1.1", "webpack-dev-server": "^3.0.0" } }