From fa452a08564b5adf3265f707e4fc73881f2ca28a Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Mon, 14 May 2018 18:18:37 +0200 Subject: [PATCH] chore(cli): move to lerna and scoped packages (#434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(loader,plugin): fix generators path bug * cli(refactor): improve folder structure (#371) * cli(refactor): improve folder structure * chore(linting): fix linter errors * cli(filepath): use local import instead * cli(migrate): refactor error handling * chore(review): fix review comments * chore(review): fix review comments * chore(review): fix review comments * chore(version): v.2.0.14 * Add break as commit type and listed the type of commit in the documentation (#379) * docs(commits): listed the list of type of commits available * cli(init): mode support to config (#364) * cli(init): mode support to config * cli(bugfix): Allow mode "none" in CLI (#381) * cli(init): use extractMiniCSSPlugin (#363) * cli(init): skip redundant question * cli(init): use mini-css-extract-plugin * Retrieve information for CLI option from webpack schema options file (#392) * cli(refactor): fetch available modes directly from webpack options schema * cli(refactor): Retrieve information from webpackOptionSchema * cli(add): write configuration to yeoman file (#348) * misc(add): variable parity, prettify * cli(add): write config to yeoman-rc * misc(add): improve generator questions * fix(init): output file name for single output (#403) improved output filename * cli(migrate): Update migration question (#402) * cli(init): webpack4 ready (#356) * cli(init): webpack4 ready * cli(init): remove unused variable, still @next on etwp * cli(init): Allow to use default entry in `init` * cli(init): Fix typo in comment * cli(init): Optimization transform and tests * cli(init): Fix non-optimized option for splitChunks * cli(init): Add cachingGroup per entry, don't show name in prod * cli(init): Add cachingGroup's defaults, fix entry * cli(init): Add a link to where the defaults live * cli(init): Remove default caching group definition from example * Add NoEmitOnErrorsPlugin transformation (#399) * ast(migrate): handle no emit on error * ast(migrate): handle module concatenation and named modules * ast(migrate): handle module concatenation and named modules * fix(ast): checks validity of an identifier (#360) added test cases for validate identifier * cli(entry): quotes sanitization (#337) * chore: minor doc fixes * cli(entry): quotes sanitization * tests(entry): add test case for double quotes * tests(entry): update snapshots * misc(utils): entry - variable parity * misc(prop-types): sort * cli(entry): multiple entries quotes sanitization * chore(versioning): v 2.0.15 * chore(versioning): push new package version * cli(fix): remove reference to specific version during migration (#410) * fix: remove reference to specific version during migration * fix: rephrase update message * chore(docs): updated old references to the extract text plugin (#412) * chore(dev): added break to the list of type of commit * init(fix): removed references to extract text plugin * fix(commit): rollback * cli(migration): update UglifyJS transformation (#416) * cli(migration): Update UglifyJS migration file to fit webpack4 configuration * cli(migration): Add cases where require variable does not need to exist * cli(migration): Add transformation for usage of webpack.otimization.UglifyPlugin * cli(tests): Update test snapshots after updating transformation * cli(fix): fix expressionContent being null * cli(refactor): remove plugins array if empty Created function on ast-utils so every other transformation can use this. * tests: add tests for new ast-utils method * fix: fix test names and jsdoc * fix: update maxSize for utils folder * ast(cli): Recursively parse AST (#341) * ast(refactor): wip refactor * ast(refactor): wip refactor * ast(init): refactor * test(refactor): refactor test suite * tests(define): swap args * ast(parsing): refactor stuff * ast(init): refactor * ast(init): refactor tests * chore(tests): remove some unneeded tests * chore(pkg): update package.json * chore(project): clear up project structure * chore(cli): remove unneded files * chore(git): add gitignore to yeoman file * chore(deps): update pkg.json * tests(snapshots): update snapshots * tests(jest): use empty module for snapshots * tests(snap): only test one prop * chore(publishing): add semantic-release (#415) * chore(release): [WIP] add semantic-release * test(ci): wip * test(ci): add node versions * test(ci): remove extra test * tests(ci): revise * tests(ci): only push to npm on master * tests(ci): use matrix on jobs * tests(ci): revise * tests(ci): update * tests(ci): test * tests(ci): test * tests(ci): p * tests(ci): update travis.yml * chore(release): revise travis * misc(yeoman): update yeoman * chore(travis): revise travis * misc(travis): revise travis.yml * chore(travis): remove redundant code * chore(pkg): add keywords * 2.1.1 * 2.1.2 * cli(cmds): revise yargs command (#422) * use yargs.command instead of yargs.option for sub-commands * cli(node): Add node flags to CLI (#377) * feat: add support for node flags * tests: Fix node-flags test * misc: Fix test failing due to not-found webpack-cli * misc: remove comment * misc: refactor removing unecessary args * tests: add more tests to prevent argument collision * cli(cmds): remove strict * fix(node): remove node option for now * chore(lerna): refactor * chore(lerna): refactor * chore(refactor): refactor stuff * chore(package): update pkg.lock * chore(templates): Update issue templates (#432) Adds fancy templates * ast(init): add topScope prop * ast(merge): re-add merge prop * cli(lerna): refactor * chore(lerna): refactor * chore(lerna): update * chore(lint): revise * chore(refactor): refactor * chore(tests): use lerna for tests * chore(travis): don't cache me outside * chore(pkg): remove prefer global * chore(release): v.2.1.3 * chore(package.lock): update pkg.lock * fix(loader,plugin): fix generators path bug * chore(version): v.2.0.14 * Add break as commit type and listed the type of commit in the documentation (#379) * docs(commits): listed the list of type of commits available * cli(bugfix): Allow mode "none" in CLI (#381) * cli(init): use extractMiniCSSPlugin (#363) * cli(init): skip redundant question * cli(init): use mini-css-extract-plugin * Retrieve information for CLI option from webpack schema options file (#392) * cli(refactor): fetch available modes directly from webpack options schema * cli(refactor): Retrieve information from webpackOptionSchema * cli(add): write configuration to yeoman file (#348) * misc(add): variable parity, prettify * cli(add): write config to yeoman-rc * misc(add): improve generator questions * fix(init): output file name for single output (#403) improved output filename * cli(migrate): Update migration question (#402) * fix(ast): checks validity of an identifier (#360) added test cases for validate identifier * chore(versioning): v 2.0.15 * chore(versioning): push new package version * cli(fix): remove reference to specific version during migration (#410) * fix: remove reference to specific version during migration * fix: rephrase update message * chore(docs): updated old references to the extract text plugin (#412) * chore(dev): added break to the list of type of commit * init(fix): removed references to extract text plugin * fix(commit): rollback * misc(yeoman): update yeoman * cli(cmds): revise yargs command (#422) * use yargs.command instead of yargs.option for sub-commands * cli(node): Add node flags to CLI (#377) * feat: add support for node flags * tests: Fix node-flags test * misc: Fix test failing due to not-found webpack-cli * misc: remove comment * misc: refactor removing unecessary args * tests: add more tests to prevent argument collision * cli(cmds): remove strict * fix(node): remove node option for now * chore(templates): Update issue templates (#432) Adds fancy templates * cli(lerna): refactor * chore(lerna): refactor * chore(pkg): remove prefer global * chore(travis): Add encrypted private ssh key * fix(pkg): test auto setup * cli(init): revise installation steps (#441) * cli(init): revise installation steps * chore(formatting): format code * cli(tests): refactor tests * chore(travis): run lockfile cmds on tests (#444) * Update dependencies to enable Greenkeeper 🌴 (#443) chore(greenkeeper): Update dependencies to enable Greenkeeper 🌴 * chore(docs): update readme * chore(travis): add Node.js 10 (#425) * chore(travis): move npm ci to install task (#424) * chore(travis): move npm ci to install task * chore: trigger new build * chore: upgrade Node.js for Appveyor to 8 * chore: remove redundanct npm install command --- .appveyor.yml | 2 +- .cz-config.js | 1 + .eslintrc.js | 8 +- .github/ISSUE_TEMPLATE/Bug_report.md | 31 + .github/ISSUE_TEMPLATE/Feature_request.md | 17 + .npmignore | 23 + .travis.yml | 48 +- CHANGELOG.md | 24 + CONTRIBUTING.md | 11 + INIT.md | 2 +- README.md | 1 + bin/webpack.js => cli.js | 27 +- docs/AddGenerator.html | 201 - docs/InitGenerator.html | 201 - docs/LoaderGenerator.html | 181 - docs/PluginGenerator.html | 181 - docs/commands_add.js.html | 67 - docs/commands_init.js.html | 73 - docs/commands_make.js.html | 63 - docs/commands_migrate.js.html | 203 - docs/commands_remove.js.html | 67 - docs/commands_serve.js.html | 224 - docs/commands_update.js.html | 67 - docs/fonts/OpenSans-Bold-webfont.eot | Bin 19544 -> 0 bytes docs/fonts/OpenSans-Bold-webfont.svg | 1830 -- docs/fonts/OpenSans-Bold-webfont.woff | Bin 22432 -> 0 bytes docs/fonts/OpenSans-BoldItalic-webfont.eot | Bin 20133 -> 0 bytes docs/fonts/OpenSans-BoldItalic-webfont.svg | 1830 -- docs/fonts/OpenSans-BoldItalic-webfont.woff | Bin 23048 -> 0 bytes docs/fonts/OpenSans-Italic-webfont.eot | Bin 20265 -> 0 bytes docs/fonts/OpenSans-Italic-webfont.svg | 1830 -- docs/fonts/OpenSans-Italic-webfont.woff | Bin 23188 -> 0 bytes docs/fonts/OpenSans-Light-webfont.eot | Bin 19514 -> 0 bytes docs/fonts/OpenSans-Light-webfont.svg | 1831 -- docs/fonts/OpenSans-Light-webfont.woff | Bin 22248 -> 0 bytes docs/fonts/OpenSans-LightItalic-webfont.eot | Bin 20535 -> 0 bytes docs/fonts/OpenSans-LightItalic-webfont.svg | 1835 -- docs/fonts/OpenSans-LightItalic-webfont.woff | Bin 23400 -> 0 bytes docs/fonts/OpenSans-Regular-webfont.eot | Bin 19836 -> 0 bytes docs/fonts/OpenSans-Regular-webfont.svg | 1831 -- docs/fonts/OpenSans-Regular-webfont.woff | Bin 22660 -> 0 bytes docs/generate-loader_index.js.html | 68 - docs/generate-plugin_index.js.html | 68 - docs/generators_add-generator.js.html | 501 - docs/generators_init-generator.js.html | 466 - docs/generators_loader-generator.js.html | 109 - docs/generators_plugin-generator.js.html | 90 - docs/generators_utils_entry.js.html | 141 - docs/generators_utils_module.js.html | 70 - docs/generators_utils_plugins.js.html | 65 - docs/generators_utils_tooltip.js.html | 107 - docs/generators_utils_validate.js.html | 68 - docs/generators_webpack-generator.js.html | 128 - docs/global.html | 8341 --------- docs/index.html | 65 - docs/index.js.html | 111 - docs/init_index.js.html | 224 - ...it_transformations_context_context.js.html | 106 - ...ransformations_devServer_devServer.js.html | 140 - ...it_transformations_devtool_devtool.js.html | 105 - docs/init_transformations_entry_entry.js.html | 136 - ...ransformations_externals_externals.js.html | 160 - docs/init_transformations_index.js.html | 204 - docs/init_transformations_mode_mode.js.html | 106 - ...init_transformations_module_module.js.html | 124 - docs/init_transformations_node_node.js.html | 95 - docs/init_transformations_other_amd.js.html | 135 - docs/init_transformations_other_bail.js.html | 106 - docs/init_transformations_other_cache.js.html | 139 - docs/init_transformations_other_merge.js.html | 98 - ..._transformations_other_parallelism.js.html | 111 - ...init_transformations_other_profile.js.html | 139 - ...sformations_other_recordsInputPath.js.html | 151 - ...formations_other_recordsOutputPath.js.html | 151 - ..._transformations_other_recordsPath.js.html | 140 - ...init_transformations_output_output.js.html | 135 - ...formations_performance_performance.js.html | 143 - ...it_transformations_plugins_plugins.js.html | 107 - ...ations_resolveLoader_resolveLoader.js.html | 136 - ...it_transformations_resolve_resolve.js.html | 124 - docs/init_transformations_stats_stats.js.html | 135 - ...init_transformations_target_target.js.html | 106 - ...ransformations_top-scope_top-scope.js.html | 80 - docs/init_transformations_watch_watch.js.html | 136 - ...transformations_watch_watchOptions.js.html | 151 - .../migrate_bannerPlugin_bannerPlugin.js.html | 84 - ...xtractTextPlugin_extractTextPlugin.js.html | 109 - docs/migrate_index.js.html | 130 - ...rOptionsPlugin_loaderOptionsPlugin.js.html | 101 - docs/migrate_loaders_loaders.js.html | 430 - docs/migrate_outputPath_outputPath.js.html | 125 - ...tedPlugins_removeDeprecatedPlugins.js.html | 95 - ..._removeJsonLoader_removeJsonLoader.js.html | 120 - docs/migrate_resolve_resolve.js.html | 123 - ...rate_uglifyJsPlugin_uglifyJsPlugin.js.html | 84 - docs/scripts/linenumber.js | 25 - docs/scripts/prettify/Apache-License-2.0.txt | 202 - docs/scripts/prettify/lang-css.js | 2 - docs/scripts/prettify/prettify.js | 28 - docs/styles/jsdoc-default.css | 358 - docs/styles/prettify-jsdoc.css | 111 - docs/styles/prettify-tomorrow.css | 132 - docs/utils_ast-utils.js.html | 727 - docs/utils_copy-utils.js.html | 108 - docs/utils_defineTest.js.html | 156 - docs/utils_hashtable.js.html | 71 - docs/utils_is-local-path.js.html | 70 - docs/utils_modify-config-helper.js.html | 126 - docs/utils_npm-exists.js.html | 74 - docs/utils_npm-packages-exists.js.html | 114 - docs/utils_package-manager.js.html | 155 - docs/utils_prop-types.js.html | 86 - docs/utils_resolve-packages.js.html | 149 - docs/utils_run-prettier.js.html | 95 - git_deploy_key.enc | Bin 0 -> 3328 bytes lib/commands/init.js | 22 - lib/commands/migrate.js | 152 - lib/index.js | 63 - package-lock.json | 14942 ++++++++-------- package.json | 76 +- lib/commands/add.js => packages/add/index.js | 4 +- packages/add/package.json | 8 + .../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 + packages/generate-loader/index.js | 3 +- packages/generate-loader/package-lock.json | 586 + packages/generate-loader/package.json | 27 +- packages/generate-loader/src/_index.js.tpl | 25 + packages/generate-loader/src/cjs.js.tpl | 1 + .../test/fixtures/simple-file.js.tpl | 3 + .../test/functional.test.js.tpl | 21 + .../generate-loader/test/test-utils.js.tpl | 82 + .../generate-loader/test/unit.test.js.tpl | 32 + .../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 + packages/generate-plugin/index.js | 3 +- packages/generate-plugin/package-lock.json | 586 + packages/generate-plugin/package.json | 25 +- packages/generate-plugin/src/_index.js.tpl | 16 + packages/generate-plugin/src/cjs.js.tpl | 1 + .../test/fixtures/simple-file.js.tpl | 3 + .../test/functional.test.js.tpl | 10 + .../generate-plugin/test/test-utils.js.tpl | 82 + packages/generators/add-generator.js | 52 +- packages/generators/index.js | 4 + packages/generators/init-generator.js | 176 +- packages/generators/loader-generator.js | 7 +- packages/generators/loader-generator.test.js | 2 +- packages/generators/package-lock.json | 3798 ++++ packages/generators/package.json | 33 +- packages/generators/plugin-generator.js | 7 +- packages/generators/utils/entry.js | 50 +- packages/generators/utils/tooltip.js | 18 +- packages/generators/webpack-generator.js | 2 +- .../info.js => packages/info/index.js | 2 +- packages/info/package.json | 8 + packages/init/package.json | 23 +- .../make.js => packages/make/index.js | 0 packages/make/package.json | 9 + .../__snapshots__/migrate.test.js.snap | 158 + packages/migrate/bannerPlugin/bannerPlugin.js | 2 +- .../migrate/bannerPlugin/bannerPlugin.test.js | 2 +- .../extractTextPlugin/extractTextPlugin.js | 2 +- .../extractTextPlugin.test.js | 2 +- .../loaderOptionsPlugin.js | 15 +- .../loaderOptionsPlugin.test.js | 2 +- packages/migrate/loaders/loaders.js | 2 +- packages/migrate/loaders/loaders.test.js | 2 +- packages/migrate/{index.js => migrate.js} | 2 + packages/migrate/migrate.test.js | 66 + .../moduleConcatenationPlugin.test.js.snap | 31 + .../__testfixtures__/.editorconfig | 3 + .../moduleConcatenationPlugin-0.input.js | 5 + .../moduleConcatenationPlugin-1.input.js | 9 + .../moduleConcatenationPlugin-2.input.js | 9 + .../moduleConcatenationPlugin.js | 34 + .../moduleConcatenationPlugin.test.js | 19 + .../namedModulesPlugin.test.js.snap | 31 + .../__testfixtures__/.editorconfig | 3 + .../namedModulesPlugin-0.input.js | 5 + .../namedModulesPlugin-1.input.js | 9 + .../namedModulesPlugin-2.input.js | 9 + .../namedModulesPlugin/namedModulesPlugin.js | 30 + .../namedModulesPlugin.test.js | 7 + .../noEmitOnErrorsPlugin.test.js.snap | 31 + .../__testfixtures__/.editorconfig | 3 + .../noEmitOnErrorsPlugin-0.input.js | 5 + .../noEmitOnErrorsPlugin-1.input.js | 9 + .../noEmitOnErrorsPlugin-2.input.js | 9 + .../noEmitOnErrorsPlugin.js | 34 + .../noEmitOnErrorsPlugin.test.js | 7 + packages/migrate/outputPath/outputPath.js | 2 +- .../migrate/outputPath/outputPath.test.js | 2 +- packages/migrate/package-lock.json | 6551 +++++++ packages/migrate/package.json | 36 +- .../__testfixtures__/.editorconfig~HEAD | 3 + ...g~ec53c68744edef90a7889cda35f1527442a79450 | 3 + .../removeDeprecatedPlugins.js | 2 +- .../removeDeprecatedPlugins.test.js | 2 +- .../__testfixtures__/.editorconfig~HEAD | 3 + ...g~ec53c68744edef90a7889cda35f1527442a79450 | 3 + .../removeJsonLoader/removeJsonLoader.js | 2 +- .../removeJsonLoader/removeJsonLoader.test.js | 2 +- .../__testfixtures__/.editorconfig~HEAD | 3 + ...g~ec53c68744edef90a7889cda35f1527442a79450 | 3 + packages/migrate/resolve/resolve.test.js | 2 +- .../uglifyJsPlugin-3.input.js | 26 + .../uglifyJsPlugin-4.input.js | 28 + .../uglifyJsPlugin/uglifyJsPlugin.test.js | 4 +- .../remove.js => packages/remove/index.js | 4 +- packages/remove/package.json | 9 + .../serve.js => packages/serve/index.js | 3 +- packages/serve/package-lock.json | 1743 ++ packages/serve/package.json | 15 + .../update.js => packages/update/index.js | 4 +- packages/update/package.json | 9 + .../recursive-parser.test.js.snap | 23 + .../utils/__testfixtures__/fixture-0.input.js | 134 + .../utils/__testfixtures__/fixture-1.input.js | 1 + packages/utils/ast-utils.js | 5 +- packages/utils/ast-utils.test.js | 207 +- packages/utils/defineTest.js | 16 +- packages/utils/index.js | 0 packages/utils/modify-config-helper.js | 2 +- packages/utils/package-lock.json | 7372 ++++++++ packages/utils/package-manager.js | 14 +- packages/utils/package-manager.test.js | 21 +- packages/utils/package.json | 37 +- packages/utils/prop-types.js | 26 +- packages/utils/recursive-parser.js | 43 + packages/utils/recursive-parser.test.js | 28 + packages/utils/scaffold.js | 94 + packages/utils/validate-identifier.js | 613 + packages/utils/validate-identifier.test.js | 35 + test/BinTestCases.test.js | 2 +- test/binCases/mode/none/index.js | 1 + test/binCases/mode/none/stdin.js | 9 + test/binCases/mode/none/test.opts | 2 + test/binCases/no-options/none/stdin.js | 5 +- {bin => utils}/config-yargs.js | 131 +- {bin => utils}/convert-argv.js | 2 +- {bin => utils}/errorHelpers.js | 0 {bin => utils}/prepareOptions.js | 0 {bin => utils}/process-options.js | 4 +- utils/prompt-command.js | 1 + .../webpackConfigurationSchema.json | 0 250 files changed, 31084 insertions(+), 38916 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md create mode 100644 .npmignore rename bin/webpack.js => cli.js (94%) delete mode 100644 docs/AddGenerator.html delete mode 100644 docs/InitGenerator.html delete mode 100644 docs/LoaderGenerator.html delete mode 100644 docs/PluginGenerator.html delete mode 100644 docs/commands_add.js.html delete mode 100644 docs/commands_init.js.html delete mode 100644 docs/commands_make.js.html delete mode 100644 docs/commands_migrate.js.html delete mode 100644 docs/commands_remove.js.html delete mode 100644 docs/commands_serve.js.html delete mode 100644 docs/commands_update.js.html delete mode 100644 docs/fonts/OpenSans-Bold-webfont.eot delete mode 100644 docs/fonts/OpenSans-Bold-webfont.svg delete mode 100644 docs/fonts/OpenSans-Bold-webfont.woff delete mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.eot delete mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.svg delete mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.woff delete mode 100644 docs/fonts/OpenSans-Italic-webfont.eot delete mode 100644 docs/fonts/OpenSans-Italic-webfont.svg delete mode 100644 docs/fonts/OpenSans-Italic-webfont.woff delete mode 100644 docs/fonts/OpenSans-Light-webfont.eot delete mode 100644 docs/fonts/OpenSans-Light-webfont.svg delete mode 100644 docs/fonts/OpenSans-Light-webfont.woff delete mode 100644 docs/fonts/OpenSans-LightItalic-webfont.eot delete mode 100644 docs/fonts/OpenSans-LightItalic-webfont.svg delete mode 100644 docs/fonts/OpenSans-LightItalic-webfont.woff delete mode 100644 docs/fonts/OpenSans-Regular-webfont.eot delete mode 100644 docs/fonts/OpenSans-Regular-webfont.svg delete mode 100644 docs/fonts/OpenSans-Regular-webfont.woff delete mode 100644 docs/generate-loader_index.js.html delete mode 100644 docs/generate-plugin_index.js.html delete mode 100644 docs/generators_add-generator.js.html delete mode 100644 docs/generators_init-generator.js.html delete mode 100644 docs/generators_loader-generator.js.html delete mode 100644 docs/generators_plugin-generator.js.html delete mode 100644 docs/generators_utils_entry.js.html delete mode 100644 docs/generators_utils_module.js.html delete mode 100644 docs/generators_utils_plugins.js.html delete mode 100644 docs/generators_utils_tooltip.js.html delete mode 100644 docs/generators_utils_validate.js.html delete mode 100644 docs/generators_webpack-generator.js.html delete mode 100644 docs/global.html delete mode 100644 docs/index.html delete mode 100644 docs/index.js.html delete mode 100644 docs/init_index.js.html delete mode 100644 docs/init_transformations_context_context.js.html delete mode 100644 docs/init_transformations_devServer_devServer.js.html delete mode 100644 docs/init_transformations_devtool_devtool.js.html delete mode 100644 docs/init_transformations_entry_entry.js.html delete mode 100644 docs/init_transformations_externals_externals.js.html delete mode 100644 docs/init_transformations_index.js.html delete mode 100644 docs/init_transformations_mode_mode.js.html delete mode 100644 docs/init_transformations_module_module.js.html delete mode 100644 docs/init_transformations_node_node.js.html delete mode 100644 docs/init_transformations_other_amd.js.html delete mode 100644 docs/init_transformations_other_bail.js.html delete mode 100644 docs/init_transformations_other_cache.js.html delete mode 100644 docs/init_transformations_other_merge.js.html delete mode 100644 docs/init_transformations_other_parallelism.js.html delete mode 100644 docs/init_transformations_other_profile.js.html delete mode 100644 docs/init_transformations_other_recordsInputPath.js.html delete mode 100644 docs/init_transformations_other_recordsOutputPath.js.html delete mode 100644 docs/init_transformations_other_recordsPath.js.html delete mode 100644 docs/init_transformations_output_output.js.html delete mode 100644 docs/init_transformations_performance_performance.js.html delete mode 100644 docs/init_transformations_plugins_plugins.js.html delete mode 100644 docs/init_transformations_resolveLoader_resolveLoader.js.html delete mode 100644 docs/init_transformations_resolve_resolve.js.html delete mode 100644 docs/init_transformations_stats_stats.js.html delete mode 100644 docs/init_transformations_target_target.js.html delete mode 100644 docs/init_transformations_top-scope_top-scope.js.html delete mode 100644 docs/init_transformations_watch_watch.js.html delete mode 100644 docs/init_transformations_watch_watchOptions.js.html delete mode 100644 docs/migrate_bannerPlugin_bannerPlugin.js.html delete mode 100644 docs/migrate_extractTextPlugin_extractTextPlugin.js.html delete mode 100644 docs/migrate_index.js.html delete mode 100644 docs/migrate_loaderOptionsPlugin_loaderOptionsPlugin.js.html delete mode 100644 docs/migrate_loaders_loaders.js.html delete mode 100644 docs/migrate_outputPath_outputPath.js.html delete mode 100644 docs/migrate_removeDeprecatedPlugins_removeDeprecatedPlugins.js.html delete mode 100644 docs/migrate_removeJsonLoader_removeJsonLoader.js.html delete mode 100644 docs/migrate_resolve_resolve.js.html delete mode 100644 docs/migrate_uglifyJsPlugin_uglifyJsPlugin.js.html delete mode 100644 docs/scripts/linenumber.js delete mode 100644 docs/scripts/prettify/Apache-License-2.0.txt delete mode 100644 docs/scripts/prettify/lang-css.js delete mode 100644 docs/scripts/prettify/prettify.js delete mode 100644 docs/styles/jsdoc-default.css delete mode 100644 docs/styles/prettify-jsdoc.css delete mode 100644 docs/styles/prettify-tomorrow.css delete mode 100644 docs/utils_ast-utils.js.html delete mode 100644 docs/utils_copy-utils.js.html delete mode 100644 docs/utils_defineTest.js.html delete mode 100644 docs/utils_hashtable.js.html delete mode 100644 docs/utils_is-local-path.js.html delete mode 100644 docs/utils_modify-config-helper.js.html delete mode 100644 docs/utils_npm-exists.js.html delete mode 100644 docs/utils_npm-packages-exists.js.html delete mode 100644 docs/utils_package-manager.js.html delete mode 100644 docs/utils_prop-types.js.html delete mode 100644 docs/utils_resolve-packages.js.html delete mode 100644 docs/utils_run-prettier.js.html create mode 100644 git_deploy_key.enc delete mode 100644 lib/commands/init.js delete mode 100644 lib/commands/migrate.js delete mode 100644 lib/index.js rename lib/commands/add.js => packages/add/index.js (66%) create mode 100644 packages/add/package.json create mode 100644 packages/generate-loader/examples/simple/src/index.js.tpl create mode 100644 packages/generate-loader/examples/simple/src/lazy-module.js.tpl create mode 100644 packages/generate-loader/examples/simple/src/static-esm-module.js.tpl create mode 100644 packages/generate-loader/examples/simple/webpack.config.js.tpl create mode 100644 packages/generate-loader/package-lock.json create mode 100644 packages/generate-loader/src/_index.js.tpl create mode 100644 packages/generate-loader/src/cjs.js.tpl create mode 100644 packages/generate-loader/test/fixtures/simple-file.js.tpl create mode 100644 packages/generate-loader/test/functional.test.js.tpl create mode 100644 packages/generate-loader/test/test-utils.js.tpl create mode 100644 packages/generate-loader/test/unit.test.js.tpl create mode 100644 packages/generate-plugin/examples/simple/_webpack.config.js.tpl create mode 100644 packages/generate-plugin/examples/simple/src/index.js.tpl create mode 100644 packages/generate-plugin/examples/simple/src/lazy-module.js.tpl create mode 100644 packages/generate-plugin/examples/simple/src/static-esm-module.js.tpl create mode 100644 packages/generate-plugin/package-lock.json create mode 100644 packages/generate-plugin/src/_index.js.tpl create mode 100644 packages/generate-plugin/src/cjs.js.tpl create mode 100644 packages/generate-plugin/test/fixtures/simple-file.js.tpl create mode 100644 packages/generate-plugin/test/functional.test.js.tpl create mode 100644 packages/generate-plugin/test/test-utils.js.tpl create mode 100644 packages/generators/index.js create mode 100644 packages/generators/package-lock.json rename lib/commands/info.js => packages/info/index.js (87%) create mode 100644 packages/info/package.json rename lib/commands/make.js => packages/make/index.js (100%) create mode 100644 packages/make/package.json create mode 100644 packages/migrate/__snapshots__/migrate.test.js.snap rename packages/migrate/{index.js => migrate.js} (95%) create mode 100644 packages/migrate/migrate.test.js create mode 100644 packages/migrate/moduleConcatenationPlugin/__snapshots__/moduleConcatenationPlugin.test.js.snap create mode 100644 packages/migrate/moduleConcatenationPlugin/__testfixtures__/.editorconfig create mode 100644 packages/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-0.input.js create mode 100644 packages/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-1.input.js create mode 100644 packages/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-2.input.js create mode 100644 packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.js create mode 100644 packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.test.js create mode 100644 packages/migrate/namedModulesPlugin/__snapshots__/namedModulesPlugin.test.js.snap create mode 100644 packages/migrate/namedModulesPlugin/__testfixtures__/.editorconfig create mode 100644 packages/migrate/namedModulesPlugin/__testfixtures__/namedModulesPlugin-0.input.js create mode 100644 packages/migrate/namedModulesPlugin/__testfixtures__/namedModulesPlugin-1.input.js create mode 100644 packages/migrate/namedModulesPlugin/__testfixtures__/namedModulesPlugin-2.input.js create mode 100644 packages/migrate/namedModulesPlugin/namedModulesPlugin.js create mode 100644 packages/migrate/namedModulesPlugin/namedModulesPlugin.test.js create mode 100644 packages/migrate/noEmitOnErrorsPlugin/__snapshots__/noEmitOnErrorsPlugin.test.js.snap create mode 100644 packages/migrate/noEmitOnErrorsPlugin/__testfixtures__/.editorconfig create mode 100644 packages/migrate/noEmitOnErrorsPlugin/__testfixtures__/noEmitOnErrorsPlugin-0.input.js create mode 100644 packages/migrate/noEmitOnErrorsPlugin/__testfixtures__/noEmitOnErrorsPlugin-1.input.js create mode 100644 packages/migrate/noEmitOnErrorsPlugin/__testfixtures__/noEmitOnErrorsPlugin-2.input.js create mode 100644 packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.js create mode 100644 packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.test.js create mode 100644 packages/migrate/package-lock.json create mode 100644 packages/migrate/removeDeprecatedPlugins/__testfixtures__/.editorconfig~HEAD create mode 100644 packages/migrate/removeDeprecatedPlugins/__testfixtures__/.editorconfig~ec53c68744edef90a7889cda35f1527442a79450 create mode 100644 packages/migrate/removeJsonLoader/__testfixtures__/.editorconfig~HEAD create mode 100644 packages/migrate/removeJsonLoader/__testfixtures__/.editorconfig~ec53c68744edef90a7889cda35f1527442a79450 create mode 100644 packages/migrate/resolve/__testfixtures__/.editorconfig~HEAD create mode 100644 packages/migrate/resolve/__testfixtures__/.editorconfig~ec53c68744edef90a7889cda35f1527442a79450 create mode 100644 packages/migrate/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-3.input.js create mode 100644 packages/migrate/uglifyJsPlugin/__testfixtures__/uglifyJsPlugin-4.input.js rename lib/commands/remove.js => packages/remove/index.js (65%) create mode 100644 packages/remove/package.json rename lib/commands/serve.js => packages/serve/index.js (97%) create mode 100644 packages/serve/package-lock.json create mode 100644 packages/serve/package.json rename lib/commands/update.js => packages/update/index.js (65%) create mode 100644 packages/update/package.json create mode 100644 packages/utils/__snapshots__/recursive-parser.test.js.snap create mode 100644 packages/utils/__testfixtures__/fixture-0.input.js create mode 100644 packages/utils/__testfixtures__/fixture-1.input.js create mode 100644 packages/utils/index.js create mode 100644 packages/utils/package-lock.json create mode 100644 packages/utils/recursive-parser.js create mode 100644 packages/utils/recursive-parser.test.js create mode 100644 packages/utils/scaffold.js create mode 100644 packages/utils/validate-identifier.js create mode 100644 packages/utils/validate-identifier.test.js create mode 100644 test/binCases/mode/none/index.js create mode 100644 test/binCases/mode/none/stdin.js create mode 100644 test/binCases/mode/none/test.opts rename {bin => utils}/config-yargs.js (68%) rename {bin => utils}/convert-argv.js (99%) rename {bin => utils}/errorHelpers.js (100%) rename {bin => utils}/prepareOptions.js (100%) rename {bin => utils}/process-options.js (98%) create mode 100644 utils/prompt-command.js rename {schemas => utils}/webpackConfigurationSchema.json (100%) diff --git a/.appveyor.yml b/.appveyor.yml index 196ae4716d2..c7b78dc9f79 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,7 +5,7 @@ version: "{build}" environment: fast_finish: true matrix: - - nodejs_version: "6" + - nodejs_version: "8" platform: x86 build: off diff --git a/.cz-config.js b/.cz-config.js index 2eb91ccdab0..a9187cd8af8 100644 --- a/.cz-config.js +++ b/.cz-config.js @@ -19,6 +19,7 @@ module.exports = { // sort type values in asc types: [ { value: "ast", name: "ast: init, migrate, add, etc" }, + { value: "break", name: "break: changes that break the behaviour of the cli" }, { value: "chore", name: "chore: Updating deps, docs, linting, etc" }, { value: "cli", name: "cli: Core CLI things" }, { value: "docs", name: "docs: Documentation" }, diff --git a/.eslintrc.js b/.eslintrc.js index b3191395c63..bf3509f6771 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -78,7 +78,13 @@ module.exports = { { "allowModules": [ "webpack", - "webpack-dev-server" + "webpack-dev-server", + "@webpack-cli/generators", + "@webpack-cli/init", + "@webpack-cli/migrate", + "@webpack-cli/utils", + "@webpack-cli/generate-loader", + "@webpack-cli/generate-plugin" ] } ], diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 00000000000..673fb1f6a74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,31 @@ +--- +name: "[BUG]: \U0001F41EReport" +about: "Template for \U0001F98E's you encounter with webpack-cli" + +--- + +**Describe the bug** + +A 💯 way to do this is to provide your configuration via a GitHub gist and/or to use markdown when describing which commands you used when the error occurred! Be precise and clear in your description of the bug. + +**What is the current behavior?** + +This is where you elaborate on the current behavior of the cli, how it behaves normally differing from the previous version/build you did. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Please paste the results of `webpack-cli info` here, and mention other relevant information* + +**Additional context** +Add any other context about the problem here like linking to an similar issue you might think is the cause. diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 00000000000..031f28f159d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,17 @@ +--- +name: "[FEATURE]: Feature request \U0001F914" +about: "Suggest ideas you wish webpack-cli had \U0001F680" + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000000..23f336fcb99 --- /dev/null +++ b/.npmignore @@ -0,0 +1,23 @@ +test +coverage +lib +.travis.yml +.eslintrc* +.fitcommitjsrc.json +.vscode +.editorconfig +.eslintignore +__testfixtures__ +*.test.js +*.input.js +types.js +*.spec.js +docs +jsdoc.json +.appveyor.yml +.codecov.yml +*.snap +open-bot.yml +.nyc_output +git_deploy_key.enc +*.md \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index cd1d24957cf..03c59db6619 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,11 @@ +sudo: false +notifications: + email: false language: node_js +node_js: + - "8" + - "7" + - "6" matrix: include: @@ -8,6 +15,9 @@ matrix: - os: linux node_js: "stable" env: JOB_PART=integration + - os: linux + node_js: "10" + env: JOB_PART=integration - os: linux node_js: "8" env: JOB_PART=integration @@ -17,23 +27,35 @@ matrix: - os: linux node_js: "6" env: JOB_PART=integration -sudo: false - -notifications: - email: false before_install: - - npm i -g npm + # Decrypt the git_deploy_key.enc key into /tmp/git_deploy_key + - openssl aes-256-cbc -K $encrypted_04be16cef0a7_key -iv $encrypted_04be16cef0a7_iv -in git_deploy_key.enc -out /tmp/git_deploy_key -d + # Make sure only the current user can read the private key + - chmod 600 /tmp/git_deploy_key + # Create a script to return the passphrase environment variable to ssh-add + - echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass + # Start the authentication agent + - eval "$(ssh-agent -s)" + # Add the key to the authentication agent + - DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" setsid ssh-add /tmp/git_deploy_key +# 2.0.14 (2018-04-05) +[Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.13...2.0.14) + +## New Features + +* use npm ci for tests (#367) ([#368](https://github.com/webpack/webpack-cli/pull/368)) +* add envinfo as `webpack-cli info` command ([51ab19f](https://github.com/webpack/webpack-cli/commit/51ab19f)) +* --entry should override config.entry (#155) ([#358](https://github.com/webpack/webpack-cli/pull/358)) + +## Chore + +* coverage: added reporters inside package.json ([c7d80fb](https://github.com/webpack/webpack-cli/commit/c7d80fb)) +* upgrade: webpack 4.2 and other dependencies ([#362](https://github.com/webpack/webpack-cli/pull/362)) +* version: v.2.0.13 ([2222f1d](https://github.com/webpack/webpack-cli/commit/2222f1d)) + +## CLI + +* refactor: improve folder structure ([#371](https://github.com/webpack/webpack-cli/pull/371)) + +## Fix + +* loader,plugin: fix generators path bug ([b4bfafb](https://github.com/webpack/webpack-cli/commit/b4bfafb)) + # 2.0.13 (2018-03-22) [Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.12...2.0.13) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f318139e85..5c635b7302c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,6 +121,17 @@ format that includes a **type** and a **subject**: