From 68a4dd66a5a8b80d23ea431faaf9ee348150d87a Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Sat, 27 Mar 2021 18:42:48 +0300 Subject: [PATCH 001/103] chore: fix version before publish --- packages/generators/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/generators/package.json b/packages/generators/package.json index c97bd4df9bf..b204fdb1939 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/generators", - "version": "1.4.0", + "version": "2.0.0", "description": "Webpack-CLI generators", "main": "lib/index.js", "types": "lib/index.d.ts", From 9a18e7f6cdf8524ecee3cfaf09595983eebf35b9 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 28 Mar 2021 05:43:07 +0530 Subject: [PATCH 002/103] fix(generators): use correct exit code (#2569) --- packages/generators/src/init-generator.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/generators/src/init-generator.ts b/packages/generators/src/init-generator.ts index b5d0e8cbff0..77a3cb4aab0 100644 --- a/packages/generators/src/init-generator.ts +++ b/packages/generators/src/init-generator.ts @@ -47,10 +47,9 @@ export default class InitGenerator extends CustomGenerator { logger.log(`${blue('ℹ INFO ')} supplied generation path doesn't exist, required folders will be created.`); try { mkdirSync(this.resolvedGenerationPath, { recursive: true }); - } catch (err) { - logger.error('Failed to create directory'); - logger.error(err); - process.exit(1); + } catch (error) { + logger.error(`Failed to create directory.\n ${error}`); + process.exit(2); } } From 281aad3ee4961f1643453eb1a926e88e0b7f019c Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 28 Mar 2021 12:01:39 +0530 Subject: [PATCH 003/103] feat: add flag to force start finish log (#2566) --- packages/webpack-cli/lib/plugins/CLIPlugin.js | 15 ++++-- .../build/start-finish-force-log/src/index.js | 1 + .../start-finish-force-log.test.js | 50 +++++++++++++++++++ .../webpack.config.array.js | 10 ++++ .../start-finish-force-log/webpack.config.js | 3 ++ 5 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 test/build/start-finish-force-log/src/index.js create mode 100644 test/build/start-finish-force-log/start-finish-force-log.test.js create mode 100644 test/build/start-finish-force-log/webpack.config.array.js create mode 100644 test/build/start-finish-force-log/webpack.config.js diff --git a/packages/webpack-cli/lib/plugins/CLIPlugin.js b/packages/webpack-cli/lib/plugins/CLIPlugin.js index 363221e3fd6..f4c267441d5 100644 --- a/packages/webpack-cli/lib/plugins/CLIPlugin.js +++ b/packages/webpack-cli/lib/plugins/CLIPlugin.js @@ -40,14 +40,20 @@ class CLIPlugin { setupHelpfulOutput(compiler) { const pluginName = 'webpack-cli'; const getCompilationName = () => (compiler.name ? `'${compiler.name}'` : ''); + const logCompilation = (message) => { + if (process.env.WEBPACK_CLI_START_FINISH_FORCE_LOG) { + process.stderr.write(message); + } else { + this.logger.log(message); + } + }; const { configPath } = this.options; compiler.hooks.run.tap(pluginName, () => { const name = getCompilationName(); - this.logger.log(`Compiler${name ? ` ${name}` : ''} starting...`); - + logCompilation(`Compiler${name ? ` ${name}` : ''} starting... `); if (configPath) { this.logger.log(`Compiler${name ? ` ${name}` : ''} is using config: '${configPath}'`); } @@ -62,7 +68,7 @@ class CLIPlugin { const name = getCompilationName(); - this.logger.log(`Compiler${name ? ` ${name}` : ''} starting...`); + logCompilation(`Compiler${name ? ` ${name}` : ''} starting... `); if (configPath) { this.logger.log(`Compiler${name ? ` ${name}` : ''} is using config: '${configPath}'`); @@ -79,8 +85,7 @@ class CLIPlugin { (compiler.webpack ? compiler.hooks.afterDone : compiler.hooks.done).tap(pluginName, () => { const name = getCompilationName(); - this.logger.log(`Compiler${name ? ` ${name}` : ''} finished`); - + logCompilation(`Compiler${name ? ` ${name}` : ''} finished`); process.nextTick(() => { if (compiler.watchMode) { this.logger.log(`Compiler${name ? `${name}` : ''} is watching files for updates...`); diff --git a/test/build/start-finish-force-log/src/index.js b/test/build/start-finish-force-log/src/index.js new file mode 100644 index 00000000000..ca8f58ee959 --- /dev/null +++ b/test/build/start-finish-force-log/src/index.js @@ -0,0 +1 @@ +console.log("Itadori Yuuji") diff --git a/test/build/start-finish-force-log/start-finish-force-log.test.js b/test/build/start-finish-force-log/start-finish-force-log.test.js new file mode 100644 index 00000000000..3701bb95d08 --- /dev/null +++ b/test/build/start-finish-force-log/start-finish-force-log.test.js @@ -0,0 +1,50 @@ +'use strict'; + +const { run, runWatch, isWebpack5 } = require('../../utils/test-utils'); + +describe('start finish force log', () => { + it('start finish force log when env is set', () => { + const { exitCode, stderr, stdout } = run(__dirname, [], { + env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, + }); + expect(exitCode).toBe(0); + expect(stderr).toContain('Compiler starting...'); + expect(stderr).toContain('Compiler finished'); + const output = isWebpack5 ? 'compiled successfully' : 'main.js'; + expect(stdout).toContain(output); + }); + + it('should show name of the config', () => { + const { exitCode, stderr, stdout } = run(__dirname, ['--name', 'log config'], { + env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, + }); + expect(exitCode).toBe(0); + expect(stderr).toContain("Compiler 'log config' starting..."); + expect(stderr).toContain("Compiler 'log config' finished"); + const output = isWebpack5 ? 'compiled successfully' : 'main.js'; + expect(stdout).toContain(output); + }); + + it('should work with watch', async () => { + const { stderr, stdout } = await runWatch(__dirname, ['watch'], { + env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, + }); + expect(stderr).toContain('Compiler starting...'); + expect(stderr).toContain('Compiler finished'); + const output = isWebpack5 ? 'compiled successfully' : 'main.js'; + expect(stdout).toContain(output); + }); + + it('should work with multi compiler', () => { + const { exitCode, stderr, stdout } = run(__dirname, ['--config', './webpack.config.array.js'], { + env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, + }); + expect(exitCode).toBe(0); + expect(stderr).toContain("Compiler 'Gojou' starting..."); + expect(stderr).toContain("Compiler 'Satoru' starting..."); + expect(stderr).toContain("Compiler 'Gojou' finished"); + expect(stderr).toContain("Compiler 'Satoru' finished"); + const output = isWebpack5 ? 'compiled successfully' : 'main.js'; + expect(stdout).toContain(output); + }); +}); diff --git a/test/build/start-finish-force-log/webpack.config.array.js b/test/build/start-finish-force-log/webpack.config.array.js new file mode 100644 index 00000000000..14738c20f1b --- /dev/null +++ b/test/build/start-finish-force-log/webpack.config.array.js @@ -0,0 +1,10 @@ +module.exports = [ + { + name: 'Gojou', + mode: 'development', + }, + { + name: 'Satoru', + mode: 'development', + }, +]; diff --git a/test/build/start-finish-force-log/webpack.config.js b/test/build/start-finish-force-log/webpack.config.js new file mode 100644 index 00000000000..f2c3976d5d3 --- /dev/null +++ b/test/build/start-finish-force-log/webpack.config.js @@ -0,0 +1,3 @@ +module.exports = { + mode: 'development', +}; From 553464403503e04d8bc041a60dda71b4732ce40f Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 28 Mar 2021 13:06:07 +0530 Subject: [PATCH 004/103] chore: upgrade lerna to v4 (#2568) --- package.json | 2 +- yarn.lock | 3001 +++++++++++++++++++++++++------------------------- 2 files changed, 1471 insertions(+), 1532 deletions(-) diff --git a/package.json b/package.json index 06b7089d4a0..a21d62fd022 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "jest": "^26.6.1", "jest-serializer-ansi": "^1.0.3", "jest-watch-typeahead": "^0.6.1", - "lerna": "^3.22.1", + "lerna": "^4.0.0", "lint-staged": "^10.5.0", "nyc": "^15.1.0", "prettier": "^2.1.2", diff --git a/yarn.lock b/yarn.lock index f2cf96e30ec..3e8ce821376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -557,80 +557,6 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@evocateur/libnpmaccess@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845" - integrity sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - -"@evocateur/libnpmpublish@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz#55df09d2dca136afba9c88c759ca272198db9f1a" - integrity sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - semver "^5.5.1" - ssri "^6.0.1" - -"@evocateur/npm-registry-fetch@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#8c4c38766d8d32d3200fcb0a83f064b57365ed66" - integrity sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g== - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - npm-package-arg "^6.1.0" - safe-buffer "^5.1.2" - -"@evocateur/pacote@^9.6.3": - version "9.6.5" - resolved "https://registry.yarnpkg.com/@evocateur/pacote/-/pacote-9.6.5.tgz#33de32ba210b6f17c20ebab4d497efc6755f4ae5" - integrity sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - bluebird "^3.5.3" - cacache "^12.0.3" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.5.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.4.4" - npm-pick-manifest "^3.0.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.3" - safe-buffer "^5.2.0" - semver "^5.7.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -851,690 +777,676 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@lerna/add@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" - integrity sha512-vhUXXF6SpufBE1EkNEXwz1VLW03f177G9uMOFMQkp6OJ30/PWg4Ekifuz9/3YfgB2/GH8Tu4Lk3O51P2Hskg/A== - dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/bootstrap" "3.21.0" - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" +"@lerna/add@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-4.0.0.tgz#c36f57d132502a57b9e7058d1548b7a565ef183f" + integrity sha512-cpmAH1iS3k8JBxNvnMqrGTTjbY/ZAiKa1ChJzFevMYY3eeqbvhsBKnBcxjRXtdrJ6bd3dCQM+ZtK+0i682Fhng== + dependencies: + "@lerna/bootstrap" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" dedent "^0.7.0" - npm-package-arg "^6.1.0" - p-map "^2.1.0" - semver "^6.2.0" - -"@lerna/bootstrap@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.21.0.tgz#bcd1b651be5b0970b20d8fae04c864548123aed6" - integrity sha512-mtNHlXpmvJn6JTu0KcuTTPl2jLsDNud0QacV/h++qsaKbhAaJr/FElNZ5s7MwZFUM3XaDmvWzHKaszeBMHIbBw== - dependencies: - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/has-npm-version" "3.16.5" - "@lerna/npm-install" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/symlink-binary" "3.17.0" - "@lerna/symlink-dependencies" "3.17.0" - "@lerna/validation-error" "3.13.0" + npm-package-arg "^8.1.0" + p-map "^4.0.0" + pacote "^11.2.6" + semver "^7.3.4" + +"@lerna/bootstrap@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-4.0.0.tgz#5f5c5e2c6cfc8fcec50cb2fbe569a8c607101891" + integrity sha512-RkS7UbeM2vu+kJnHzxNRCLvoOP9yGNgkzRdy4UV2hNalD7EP41bLvRVOwRYQ7fhc2QcbhnKNdOBihYRL0LcKtw== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/has-npm-version" "4.0.0" + "@lerna/npm-install" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + "@lerna/validation-error" "4.0.0" dedent "^0.7.0" - get-port "^4.2.0" - multimatch "^3.0.0" - npm-package-arg "^6.1.0" + get-port "^5.1.1" + multimatch "^5.0.0" + npm-package-arg "^8.1.0" npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - read-package-tree "^5.1.6" - semver "^6.2.0" - -"@lerna/changed@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.21.0.tgz#108e15f679bfe077af500f58248c634f1044ea0b" - integrity sha512-hzqoyf8MSHVjZp0gfJ7G8jaz+++mgXYiNs9iViQGA8JlN/dnWLI5sWDptEH3/B30Izo+fdVz0S0s7ydVE3pWIw== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.21.0" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" - -"@lerna/check-working-tree@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz#b4f8ae61bb4523561dfb9f8f8d874dd46bb44baa" - integrity sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ== - dependencies: - "@lerna/collect-uncommitted" "3.16.5" - "@lerna/describe-ref" "3.16.5" - "@lerna/validation-error" "3.13.0" - -"@lerna/child-process@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.16.5.tgz#38fa3c18064aa4ac0754ad80114776a7b36a69b2" - integrity sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg== - dependencies: - chalk "^2.3.1" - execa "^1.0.0" - strong-log-transformer "^2.0.0" - -"@lerna/clean@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.21.0.tgz#c0b46b5300cc3dae2cda3bec14b803082da3856d" - integrity sha512-b/L9l+MDgE/7oGbrav6rG8RTQvRiZLO1zTcG17zgJAAuhlsPxJExMlh2DFwJEVi2les70vMhHfST3Ue1IMMjpg== - dependencies: - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - -"@lerna/cli@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.18.5.tgz#c90c461542fcd35b6d5b015a290fb0dbfb41d242" - integrity sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA== - dependencies: - "@lerna/global-options" "3.13.0" + p-map "^4.0.0" + p-map-series "^2.1.0" + p-waterfall "^2.1.1" + read-package-tree "^5.3.1" + semver "^7.3.4" + +"@lerna/changed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-4.0.0.tgz#b9fc76cea39b9292a6cd263f03eb57af85c9270b" + integrity sha512-cD+KuPRp6qiPOD+BO6S6SN5cARspIaWSOqGBpGnYzLb4uWT8Vk4JzKyYtc8ym1DIwyoFXHosXt8+GDAgR8QrgQ== + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/check-working-tree@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-4.0.0.tgz#257e36a602c00142e76082a19358e3e1ae8dbd58" + integrity sha512-/++bxM43jYJCshBiKP5cRlCTwSJdRSxVmcDAXM+1oUewlZJVSVlnks5eO0uLxokVFvLhHlC5kHMc7gbVFPHv6Q== + dependencies: + "@lerna/collect-uncommitted" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/validation-error" "4.0.0" + +"@lerna/child-process@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-4.0.0.tgz#341b96a57dffbd9705646d316e231df6fa4df6e1" + integrity sha512-XtCnmCT9eyVsUUHx6y/CTBYdV9g2Cr/VxyseTWBgfIur92/YKClfEtJTbOh94jRT62hlKLqSvux/UhxXVh613Q== + dependencies: + chalk "^4.1.0" + execa "^5.0.0" + strong-log-transformer "^2.1.0" + +"@lerna/clean@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-4.0.0.tgz#8f778b6f2617aa2a936a6b5e085ae62498e57dc5" + integrity sha512-uugG2iN9k45ITx2jtd8nEOoAtca8hNlDCUM0N3lFgU/b1mEQYAPRkqr1qs4FLRl/Y50ZJ41wUz1eazS+d/0osA== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + p-map "^4.0.0" + p-map-series "^2.1.0" + p-waterfall "^2.1.1" + +"@lerna/cli@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-4.0.0.tgz#8eabd334558836c1664df23f19acb95e98b5bbf3" + integrity sha512-Neaw3GzFrwZiRZv2g7g6NwFjs3er1vhraIniEs0jjVLPMNC4eata0na3GfE5yibkM/9d3gZdmihhZdZ3EBdvYA== + dependencies: + "@lerna/global-options" "4.0.0" dedent "^0.7.0" npmlog "^4.1.2" - yargs "^14.2.2" + yargs "^16.2.0" -"@lerna/collect-uncommitted@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz#a494d61aac31cdc7aec4bbe52c96550274132e63" - integrity sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg== +"@lerna/collect-uncommitted@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-4.0.0.tgz#855cd64612969371cfc2453b90593053ff1ba779" + integrity sha512-ufSTfHZzbx69YNj7KXQ3o66V4RC76ffOjwLX0q/ab//61bObJ41n03SiQEhSlmpP+gmFbTJ3/7pTe04AHX9m/g== dependencies: - "@lerna/child-process" "3.16.5" - chalk "^2.3.1" - figgy-pudding "^3.5.1" + "@lerna/child-process" "4.0.0" + chalk "^4.1.0" npmlog "^4.1.2" -"@lerna/collect-updates@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.20.0.tgz#62f9d76ba21a25b7d9fbf31c02de88744a564bd1" - integrity sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q== +"@lerna/collect-updates@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-4.0.0.tgz#8e208b1bafd98a372ff1177f7a5e288f6bea8041" + integrity sha512-bnNGpaj4zuxsEkyaCZLka9s7nMs58uZoxrRIPJ+nrmrZYp1V5rrd+7/NYTuunOhY2ug1sTBvTAxj3NZQ+JKnOw== dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/describe-ref" "3.16.5" + "@lerna/child-process" "4.0.0" + "@lerna/describe-ref" "4.0.0" minimatch "^3.0.4" npmlog "^4.1.2" - slash "^2.0.0" + slash "^3.0.0" -"@lerna/command@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.21.0.tgz#9a2383759dc7b700dacfa8a22b2f3a6e190121f7" - integrity sha512-T2bu6R8R3KkH5YoCKdutKv123iUgUbW8efVjdGCDnCMthAQzoentOJfDeodBwn0P2OqCl3ohsiNVtSn9h78fyQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/project" "3.21.0" - "@lerna/validation-error" "3.13.0" - "@lerna/write-log-file" "3.13.0" +"@lerna/command@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-4.0.0.tgz#991c7971df8f5bf6ae6e42c808869a55361c1b98" + integrity sha512-LM9g3rt5FsPNFqIHUeRwWXLNHJ5NKzOwmVKZ8anSp4e1SPrv2HNc1V02/9QyDDZK/w+5POXH5lxZUI1CHaOK/A== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/project" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/write-log-file" "4.0.0" clone-deep "^4.0.1" dedent "^0.7.0" - execa "^1.0.0" + execa "^5.0.0" is-ci "^2.0.0" npmlog "^4.1.2" -"@lerna/conventional-commits@3.22.0": - version "3.22.0" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.22.0.tgz#2798f4881ee2ef457bdae027ab7d0bf0af6f1e09" - integrity sha512-z4ZZk1e8Mhz7+IS8NxHr64wyklHctCJyWpJKEZZPJiLFJ8yKto/x38O80R10pIzC0rr8Sy/OsjSH4bl0TbbgqA== - dependencies: - "@lerna/validation-error" "3.13.0" - conventional-changelog-angular "^5.0.3" - conventional-changelog-core "^3.1.6" - conventional-recommended-bump "^5.0.0" - fs-extra "^8.1.0" - get-stream "^4.0.0" +"@lerna/conventional-commits@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-4.0.0.tgz#660fb2c7b718cb942ead70110df61f18c6f99750" + integrity sha512-CSUQRjJHFrH8eBn7+wegZLV3OrNc0Y1FehYfYGhjLE2SIfpCL4bmfu/ViYuHh9YjwHaA+4SX6d3hR+xkeseKmw== + dependencies: + "@lerna/validation-error" "4.0.0" + conventional-changelog-angular "^5.0.12" + conventional-changelog-core "^4.2.2" + conventional-recommended-bump "^6.1.0" + fs-extra "^9.1.0" + get-stream "^6.0.0" lodash.template "^4.5.0" - npm-package-arg "^6.1.0" + npm-package-arg "^8.1.0" npmlog "^4.1.2" - pify "^4.0.1" - semver "^6.2.0" + pify "^5.0.0" + semver "^7.3.4" -"@lerna/create-symlink@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.16.2.tgz#412cb8e59a72f5a7d9463e4e4721ad2070149967" - integrity sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw== +"@lerna/create-symlink@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-4.0.0.tgz#8c5317ce5ae89f67825443bd7651bf4121786228" + integrity sha512-I0phtKJJdafUiDwm7BBlEUOtogmu8+taxq6PtIrxZbllV9hWg59qkpuIsiFp+no7nfRVuaasNYHwNUhDAVQBig== dependencies: - "@zkochan/cmd-shim" "^3.1.0" - fs-extra "^8.1.0" + cmd-shim "^4.1.0" + fs-extra "^9.1.0" npmlog "^4.1.2" -"@lerna/create@3.22.0": - version "3.22.0" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.22.0.tgz#d6bbd037c3dc5b425fe5f6d1b817057c278f7619" - integrity sha512-MdiQQzCcB4E9fBF1TyMOaAEz9lUjIHp1Ju9H7f3lXze5JK6Fl5NYkouAvsLgY6YSIhXMY8AHW2zzXeBDY4yWkw== +"@lerna/create@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-4.0.0.tgz#b6947e9b5dfb6530321952998948c3e63d64d730" + integrity sha512-mVOB1niKByEUfxlbKTM1UNECWAjwUdiioIbRQZEeEabtjCL69r9rscIsjlGyhGWCfsdAG5wfq4t47nlDXdLLag== dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.21.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" - camelcase "^5.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" dedent "^0.7.0" - fs-extra "^8.1.0" - globby "^9.2.0" - init-package-json "^1.10.3" - npm-package-arg "^6.1.0" - p-reduce "^1.0.0" - pify "^4.0.1" - semver "^6.2.0" - slash "^2.0.0" - validate-npm-package-license "^3.0.3" + fs-extra "^9.1.0" + globby "^11.0.2" + init-package-json "^2.0.2" + npm-package-arg "^8.1.0" + p-reduce "^2.1.0" + pacote "^11.2.6" + pify "^5.0.0" + semver "^7.3.4" + slash "^3.0.0" + validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" - whatwg-url "^7.0.0" + whatwg-url "^8.4.0" + yargs-parser "20.2.4" -"@lerna/describe-ref@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.16.5.tgz#a338c25aaed837d3dc70b8a72c447c5c66346ac0" - integrity sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw== +"@lerna/describe-ref@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-4.0.0.tgz#53c53b4ea65fdceffa072a62bfebe6772c45d9ec" + integrity sha512-eTU5+xC4C5Gcgz+Ey4Qiw9nV2B4JJbMulsYJMW8QjGcGh8zudib7Sduj6urgZXUYNyhYpRs+teci9M2J8u+UvQ== dependencies: - "@lerna/child-process" "3.16.5" + "@lerna/child-process" "4.0.0" npmlog "^4.1.2" -"@lerna/diff@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.21.0.tgz#e6df0d8b9916167ff5a49fcb02ac06424280a68d" - integrity sha512-5viTR33QV3S7O+bjruo1SaR40m7F2aUHJaDAC7fL9Ca6xji+aw1KFkpCtVlISS0G8vikUREGMJh+c/VMSc8Usw== +"@lerna/diff@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-4.0.0.tgz#6d3071817aaa4205a07bf77cfc6e932796d48b92" + integrity sha512-jYPKprQVg41+MUMxx6cwtqsNm0Yxx9GDEwdiPLwcUTFx+/qKCEwifKNJ1oGIPBxyEHX2PFCOjkK39lHoj2qiag== dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.21.0" - "@lerna/validation-error" "3.13.0" + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/validation-error" "4.0.0" npmlog "^4.1.2" -"@lerna/exec@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.21.0.tgz#17f07533893cb918a17b41bcc566dc437016db26" - integrity sha512-iLvDBrIE6rpdd4GIKTY9mkXyhwsJ2RvQdB9ZU+/NhR3okXfqKc6py/24tV111jqpXTtZUW6HNydT4dMao2hi1Q== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/filter-options@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.20.0.tgz#0f0f5d5a4783856eece4204708cc902cbc8af59b" - integrity sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/filter-packages" "3.18.0" +"@lerna/exec@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-4.0.0.tgz#eb6cb95cb92d42590e9e2d628fcaf4719d4a8be6" + integrity sha512-VGXtL/b/JfY84NB98VWZpIExfhLOzy0ozm/0XaS4a2SmkAJc5CeUfrhvHxxkxiTBLkU+iVQUyYEoAT0ulQ8PCw== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + p-map "^4.0.0" + +"@lerna/filter-options@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-4.0.0.tgz#ac94cc515d7fa3b47e2f7d74deddeabb1de5e9e6" + integrity sha512-vV2ANOeZhOqM0rzXnYcFFCJ/kBWy/3OA58irXih9AMTAlQLymWAK0akWybl++sUJ4HB9Hx12TOqaXbYS2NM5uw== + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/filter-packages" "4.0.0" dedent "^0.7.0" - figgy-pudding "^3.5.1" npmlog "^4.1.2" -"@lerna/filter-packages@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.18.0.tgz#6a7a376d285208db03a82958cfb8172e179b4e70" - integrity sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ== +"@lerna/filter-packages@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-4.0.0.tgz#b1f70d70e1de9cdd36a4e50caa0ac501f8d012f2" + integrity sha512-+4AJIkK7iIiOaqCiVTYJxh/I9qikk4XjNQLhE3kixaqgMuHl1NQ99qXRR0OZqAWB9mh8Z1HA9bM5K1HZLBTOqA== dependencies: - "@lerna/validation-error" "3.13.0" - multimatch "^3.0.0" + "@lerna/validation-error" "4.0.0" + multimatch "^5.0.0" npmlog "^4.1.2" -"@lerna/get-npm-exec-opts@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5" - integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw== +"@lerna/get-npm-exec-opts@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-4.0.0.tgz#dc955be94a4ae75c374ef9bce91320887d34608f" + integrity sha512-yvmkerU31CTWS2c7DvmAWmZVeclPBqI7gPVr5VATUKNWJ/zmVcU4PqbYoLu92I9Qc4gY1TuUplMNdNuZTSL7IQ== dependencies: npmlog "^4.1.2" -"@lerna/get-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-3.16.0.tgz#1b316b706dcee86c7baa55e50b087959447852ff" - integrity sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw== +"@lerna/get-packed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-4.0.0.tgz#0989d61624ac1f97e393bdad2137c49cd7a37823" + integrity sha512-rfWONRsEIGyPJTxFzC8ECb3ZbsDXJbfqWYyeeQQDrJRPnEJErlltRLPLgC2QWbxFgFPsoDLeQmFHJnf0iDfd8w== dependencies: - fs-extra "^8.1.0" - ssri "^6.0.1" - tar "^4.4.8" + fs-extra "^9.1.0" + ssri "^8.0.1" + tar "^6.1.0" -"@lerna/github-client@3.22.0": - version "3.22.0" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-3.22.0.tgz#5d816aa4f76747ed736ae64ff962b8f15c354d95" - integrity sha512-O/GwPW+Gzr3Eb5bk+nTzTJ3uv+jh5jGho9BOqKlajXaOkMYGBELEAqV5+uARNGWZFvYAiF4PgqHb6aCUu7XdXg== +"@lerna/github-client@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-4.0.0.tgz#2ced67721363ef70f8e12ffafce4410918f4a8a4" + integrity sha512-2jhsldZtTKXYUBnOm23Lb0Fx8G4qfSXF9y7UpyUgWUj+YZYd+cFxSuorwQIgk5P4XXrtVhsUesIsli+BYSThiw== dependencies: - "@lerna/child-process" "3.16.5" + "@lerna/child-process" "4.0.0" "@octokit/plugin-enterprise-rest" "^6.0.1" - "@octokit/rest" "^16.28.4" - git-url-parse "^11.1.2" + "@octokit/rest" "^18.1.0" + git-url-parse "^11.4.4" npmlog "^4.1.2" -"@lerna/gitlab-client@3.15.0": - version "3.15.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz#91f4ec8c697b5ac57f7f25bd50fe659d24aa96a6" - integrity sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q== +"@lerna/gitlab-client@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-4.0.0.tgz#00dad73379c7b38951d4b4ded043504c14e2b67d" + integrity sha512-OMUpGSkeDWFf7BxGHlkbb35T7YHqVFCwBPSIR6wRsszY8PAzCYahtH3IaJzEJyUg6vmZsNl0FSr3pdA2skhxqA== dependencies: - node-fetch "^2.5.0" + node-fetch "^2.6.1" npmlog "^4.1.2" - whatwg-url "^7.0.0" - -"@lerna/global-options@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1" - integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ== - -"@lerna/has-npm-version@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz#ab83956f211d8923ea6afe9b979b38cc73b15326" - integrity sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q== - dependencies: - "@lerna/child-process" "3.16.5" - semver "^6.2.0" - -"@lerna/import@3.22.0": - version "3.22.0" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.22.0.tgz#1a5f0394f38e23c4f642a123e5e1517e70d068d2" - integrity sha512-uWOlexasM5XR6tXi4YehODtH9Y3OZrFht3mGUFFT3OIl2s+V85xIGFfqFGMTipMPAGb2oF1UBLL48kR43hRsOg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.21.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/validation-error" "3.13.0" + whatwg-url "^8.4.0" + +"@lerna/global-options@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-4.0.0.tgz#c7d8b0de6a01d8a845e2621ea89e7f60f18c6a5f" + integrity sha512-TRMR8afAHxuYBHK7F++Ogop2a82xQjoGna1dvPOY6ltj/pEx59pdgcJfYcynYqMkFIk8bhLJJN9/ndIfX29FTQ== + +"@lerna/has-npm-version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-4.0.0.tgz#d3fc3292c545eb28bd493b36e6237cf0279f631c" + integrity sha512-LQ3U6XFH8ZmLCsvsgq1zNDqka0Xzjq5ibVN+igAI5ccRWNaUsE/OcmsyMr50xAtNQMYMzmpw5GVLAivT2/YzCg== + dependencies: + "@lerna/child-process" "4.0.0" + semver "^7.3.4" + +"@lerna/import@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-4.0.0.tgz#bde656c4a451fa87ae41733ff8a8da60547c5465" + integrity sha512-FaIhd+4aiBousKNqC7TX1Uhe97eNKf5/SC7c5WZANVWtC7aBWdmswwDt3usrzCNpj6/Wwr9EtEbYROzxKH8ffg== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/validation-error" "4.0.0" dedent "^0.7.0" - fs-extra "^8.1.0" - p-map-series "^1.0.0" - -"@lerna/info@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.21.0.tgz#76696b676fdb0f35d48c83c63c1e32bb5e37814f" - integrity sha512-0XDqGYVBgWxUquFaIptW2bYSIu6jOs1BtkvRTWDDhw4zyEdp6q4eaMvqdSap1CG+7wM5jeLCi6z94wS0AuiuwA== - dependencies: - "@lerna/command" "3.21.0" - "@lerna/output" "3.13.0" - envinfo "^7.3.1" - -"@lerna/init@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.21.0.tgz#1e810934dc8bf4e5386c031041881d3b4096aa5c" - integrity sha512-6CM0z+EFUkFfurwdJCR+LQQF6MqHbYDCBPyhu/d086LRf58GtYZYj49J8mKG9ktayp/TOIxL/pKKjgLD8QBPOg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.21.0" - fs-extra "^8.1.0" - p-map "^2.1.0" - write-json-file "^3.2.0" + fs-extra "^9.1.0" + p-map-series "^2.1.0" -"@lerna/link@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.21.0.tgz#8be68ff0ccee104b174b5bbd606302c2f06e9d9b" - integrity sha512-tGu9GxrX7Ivs+Wl3w1+jrLi1nQ36kNI32dcOssij6bg0oZ2M2MDEFI9UF2gmoypTaN9uO5TSsjCFS7aR79HbdQ== +"@lerna/info@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-4.0.0.tgz#b9fb0e479d60efe1623603958a831a88b1d7f1fc" + integrity sha512-8Uboa12kaCSZEn4XRfPz5KU9XXoexSPS4oeYGj76s2UQb1O1GdnEyfjyNWoUl1KlJ2i/8nxUskpXIftoFYH0/Q== dependencies: - "@lerna/command" "3.21.0" - "@lerna/package-graph" "3.18.5" - "@lerna/symlink-dependencies" "3.17.0" - p-map "^2.1.0" - slash "^2.0.0" + "@lerna/command" "4.0.0" + "@lerna/output" "4.0.0" + envinfo "^7.7.4" -"@lerna/list@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.21.0.tgz#42f76fafa56dea13b691ec8cab13832691d61da2" - integrity sha512-KehRjE83B1VaAbRRkRy6jLX1Cin8ltsrQ7FHf2bhwhRHK0S54YuA6LOoBnY/NtA8bHDX/Z+G5sMY78X30NS9tg== +"@lerna/init@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-4.0.0.tgz#dadff67e6dfb981e8ccbe0e6a310e837962f6c7a" + integrity sha512-wY6kygop0BCXupzWj5eLvTUqdR7vIAm0OgyV9WHpMYQGfs1V22jhztt8mtjCloD/O0nEe4tJhdG62XU5aYmPNQ== dependencies: - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" + write-json-file "^4.3.0" -"@lerna/listable@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.18.5.tgz#e82798405b5ed8fc51843c8ef1e7a0e497388a1a" - integrity sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg== +"@lerna/link@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-4.0.0.tgz#c3a38aabd44279d714e90f2451e31b63f0fb65ba" + integrity sha512-KlvPi7XTAcVOByfaLlOeYOfkkDcd+bejpHMCd1KcArcFTwijOwXOVi24DYomIeHvy6HsX/IUquJ4PPUJIeB4+w== dependencies: - "@lerna/query-graph" "3.18.5" - chalk "^2.3.1" + "@lerna/command" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + p-map "^4.0.0" + slash "^3.0.0" + +"@lerna/list@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-4.0.0.tgz#24b4e6995bd73f81c556793fe502b847efd9d1d7" + integrity sha512-L2B5m3P+U4Bif5PultR4TI+KtW+SArwq1i75QZ78mRYxPc0U/piau1DbLOmwrdqr99wzM49t0Dlvl6twd7GHFg== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/listable@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-4.0.0.tgz#d00d6cb4809b403f2b0374fc521a78e318b01214" + integrity sha512-/rPOSDKsOHs5/PBLINZOkRIX1joOXUXEtyUs5DHLM8q6/RP668x/1lFhw6Dx7/U+L0+tbkpGtZ1Yt0LewCLgeQ== + dependencies: + "@lerna/query-graph" "4.0.0" + chalk "^4.1.0" columnify "^1.5.4" -"@lerna/log-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.16.0.tgz#f83991041ee77b2495634e14470b42259fd2bc16" - integrity sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ== +"@lerna/log-packed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-4.0.0.tgz#95168fe2e26ac6a71e42f4be857519b77e57a09f" + integrity sha512-+dpCiWbdzgMAtpajLToy9PO713IHoE6GV/aizXycAyA07QlqnkpaBNZ8DW84gHdM1j79TWockGJo9PybVhrrZQ== dependencies: - byte-size "^5.0.1" + byte-size "^7.0.0" columnify "^1.5.4" has-unicode "^2.0.1" npmlog "^4.1.2" -"@lerna/npm-conf@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.16.0.tgz#1c10a89ae2f6c2ee96962557738685300d376827" - integrity sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA== +"@lerna/npm-conf@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-4.0.0.tgz#b259fd1e1cee2bf5402b236e770140ff9ade7fd2" + integrity sha512-uS7H02yQNq3oejgjxAxqq/jhwGEE0W0ntr8vM3EfpCW1F/wZruwQw+7bleJQ9vUBjmdXST//tk8mXzr5+JXCfw== dependencies: - config-chain "^1.1.11" - pify "^4.0.1" + config-chain "^1.1.12" + pify "^5.0.0" -"@lerna/npm-dist-tag@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz#9ef9abb7c104077b31f6fab22cc73b314d54ac55" - integrity sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ== +"@lerna/npm-dist-tag@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-4.0.0.tgz#d1e99b4eccd3414142f0548ad331bf2d53f3257a" + integrity sha512-F20sg28FMYTgXqEQihgoqSfwmq+Id3zT23CnOwD+XQMPSy9IzyLf1fFVH319vXIw6NF6Pgs4JZN2Qty6/CQXGw== dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - "@lerna/otplease" "3.18.5" - figgy-pudding "^3.5.1" - npm-package-arg "^6.1.0" + "@lerna/otplease" "4.0.0" + npm-package-arg "^8.1.0" + npm-registry-fetch "^9.0.0" npmlog "^4.1.2" -"@lerna/npm-install@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.16.5.tgz#d6bfdc16f81285da66515ae47924d6e278d637d3" - integrity sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg== +"@lerna/npm-install@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-4.0.0.tgz#31180be3ab3b7d1818a1a0c206aec156b7094c78" + integrity sha512-aKNxq2j3bCH3eXl3Fmu4D54s/YLL9WSwV8W7X2O25r98wzrO38AUN6AB9EtmAx+LV/SP15et7Yueg9vSaanRWg== dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" + fs-extra "^9.1.0" + npm-package-arg "^8.1.0" npmlog "^4.1.2" - signal-exit "^3.0.2" - write-pkg "^3.1.0" - -"@lerna/npm-publish@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.18.5.tgz#240e4039959fd9816b49c5b07421e11b5cb000af" - integrity sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg== - dependencies: - "@evocateur/libnpmpublish" "^1.2.2" - "@lerna/otplease" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" + signal-exit "^3.0.3" + write-pkg "^4.0.0" + +"@lerna/npm-publish@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-4.0.0.tgz#84eb62e876fe949ae1fd62c60804423dbc2c4472" + integrity sha512-vQb7yAPRo5G5r77DRjHITc9piR9gvEKWrmfCH7wkfBnGWEqu7n8/4bFQ7lhnkujvc8RXOsYpvbMQkNfkYibD/w== + dependencies: + "@lerna/otplease" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + fs-extra "^9.1.0" + libnpmpublish "^4.0.0" + npm-package-arg "^8.1.0" npmlog "^4.1.2" - pify "^4.0.1" - read-package-json "^2.0.13" + pify "^5.0.0" + read-package-json "^3.0.0" -"@lerna/npm-run-script@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz#9c2ec82453a26c0b46edc0bb7c15816c821f5c15" - integrity sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ== +"@lerna/npm-run-script@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-4.0.0.tgz#dfebf4f4601442e7c0b5214f9fb0d96c9350743b" + integrity sha512-Jmyh9/IwXJjOXqKfIgtxi0bxi1pUeKe5bD3S81tkcy+kyng/GNj9WSqD5ZggoNP2NP//s4CLDAtUYLdP7CU9rA== dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" npmlog "^4.1.2" -"@lerna/otplease@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-3.18.5.tgz#b77b8e760b40abad9f7658d988f3ea77d4fd0231" - integrity sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog== +"@lerna/otplease@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-4.0.0.tgz#84972eb43448f8a1077435ba1c5e59233b725850" + integrity sha512-Sgzbqdk1GH4psNiT6hk+BhjOfIr/5KhGBk86CEfHNJTk9BK4aZYyJD4lpDbDdMjIV4g03G7pYoqHzH765T4fxw== dependencies: - "@lerna/prompt" "3.18.5" - figgy-pudding "^3.5.1" + "@lerna/prompt" "4.0.0" -"@lerna/output@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989" - integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg== +"@lerna/output@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-4.0.0.tgz#b1d72215c0e35483e4f3e9994debc82c621851f2" + integrity sha512-Un1sHtO1AD7buDQrpnaYTi2EG6sLF+KOPEAMxeUYG5qG3khTs2Zgzq5WE3dt2N/bKh7naESt20JjIW6tBELP0w== dependencies: npmlog "^4.1.2" -"@lerna/pack-directory@3.16.4": - version "3.16.4" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.16.4.tgz#3eae5f91bdf5acfe0384510ed53faddc4c074693" - integrity sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng== +"@lerna/pack-directory@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-4.0.0.tgz#8b617db95d20792f043aaaa13a9ccc0e04cb4c74" + integrity sha512-NJrmZNmBHS+5aM+T8N6FVbaKFScVqKlQFJNY2k7nsJ/uklNKsLLl6VhTQBPwMTbf6Tf7l6bcKzpy7aePuq9UiQ== dependencies: - "@lerna/get-packed" "3.16.0" - "@lerna/package" "3.16.0" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - npm-packlist "^1.4.4" + "@lerna/get-packed" "4.0.0" + "@lerna/package" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + npm-packlist "^2.1.4" npmlog "^4.1.2" - tar "^4.4.10" - temp-write "^3.4.0" + tar "^6.1.0" + temp-write "^4.0.0" -"@lerna/package-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.18.5.tgz#c740e2ea3578d059e551633e950690831b941f6b" - integrity sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA== +"@lerna/package-graph@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-4.0.0.tgz#16a00253a8ac810f72041481cb46bcee8d8123dd" + integrity sha512-QED2ZCTkfXMKFoTGoccwUzjHtZMSf3UKX14A4/kYyBms9xfFsesCZ6SLI5YeySEgcul8iuIWfQFZqRw+Qrjraw== dependencies: - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/validation-error" "3.13.0" - npm-package-arg "^6.1.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/validation-error" "4.0.0" + npm-package-arg "^8.1.0" npmlog "^4.1.2" - semver "^6.2.0" + semver "^7.3.4" -"@lerna/package@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.16.0.tgz#7e0a46e4697ed8b8a9c14d59c7f890e0d38ba13c" - integrity sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw== +"@lerna/package@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-4.0.0.tgz#1b4c259c4bcff45c876ee1d591a043aacbc0d6b7" + integrity sha512-l0M/izok6FlyyitxiQKr+gZLVFnvxRQdNhzmQ6nRnN9dvBJWn+IxxpM+cLqGACatTnyo9LDzNTOj2Db3+s0s8Q== dependencies: - load-json-file "^5.3.0" - npm-package-arg "^6.1.0" - write-pkg "^3.1.0" + load-json-file "^6.2.0" + npm-package-arg "^8.1.0" + write-pkg "^4.0.0" -"@lerna/prerelease-id-from-version@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz#b24bfa789f5e1baab914d7b08baae9b7bd7d83a1" - integrity sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA== +"@lerna/prerelease-id-from-version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-4.0.0.tgz#c7e0676fcee1950d85630e108eddecdd5b48c916" + integrity sha512-GQqguzETdsYRxOSmdFZ6zDBXDErIETWOqomLERRY54f4p+tk4aJjoVdd9xKwehC9TBfIFvlRbL1V9uQGHh1opg== dependencies: - semver "^6.2.0" + semver "^7.3.4" -"@lerna/profiler@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-3.20.0.tgz#0f6dc236f4ea8f9ea5f358c6703305a4f32ad051" - integrity sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg== +"@lerna/profiler@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-4.0.0.tgz#8a53ab874522eae15d178402bff90a14071908e9" + integrity sha512-/BaEbqnVh1LgW/+qz8wCuI+obzi5/vRE8nlhjPzdEzdmWmZXuCKyWSEzAyHOJWw1ntwMiww5dZHhFQABuoFz9Q== dependencies: - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" + fs-extra "^9.1.0" npmlog "^4.1.2" - upath "^1.2.0" + upath "^2.0.1" -"@lerna/project@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.21.0.tgz#5d784d2d10c561a00f20320bcdb040997c10502d" - integrity sha512-xT1mrpET2BF11CY32uypV2GPtPVm6Hgtha7D81GQP9iAitk9EccrdNjYGt5UBYASl4CIDXBRxwmTTVGfrCx82A== +"@lerna/project@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-4.0.0.tgz#ff84893935833533a74deff30c0e64ddb7f0ba6b" + integrity sha512-o0MlVbDkD5qRPkFKlBZsXZjoNTWPyuL58564nSfZJ6JYNmgAptnWPB2dQlAc7HWRZkmnC2fCkEdoU+jioPavbg== dependencies: - "@lerna/package" "3.16.0" - "@lerna/validation-error" "3.13.0" - cosmiconfig "^5.1.0" + "@lerna/package" "4.0.0" + "@lerna/validation-error" "4.0.0" + cosmiconfig "^7.0.0" dedent "^0.7.0" - dot-prop "^4.2.0" - glob-parent "^5.0.0" - globby "^9.2.0" - load-json-file "^5.3.0" + dot-prop "^6.0.1" + glob-parent "^5.1.1" + globby "^11.0.2" + load-json-file "^6.2.0" npmlog "^4.1.2" - p-map "^2.1.0" - resolve-from "^4.0.0" - write-json-file "^3.2.0" + p-map "^4.0.0" + resolve-from "^5.0.0" + write-json-file "^4.3.0" -"@lerna/prompt@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.18.5.tgz#628cd545f225887d060491ab95df899cfc5218a1" - integrity sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ== +"@lerna/prompt@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-4.0.0.tgz#5ec69a803f3f0db0ad9f221dad64664d3daca41b" + integrity sha512-4Ig46oCH1TH5M7YyTt53fT6TuaKMgqUUaqdgxvp6HP6jtdak6+amcsqB8YGz2eQnw/sdxunx84DfI9XpoLj4bQ== dependencies: - inquirer "^6.2.0" + inquirer "^7.3.3" npmlog "^4.1.2" -"@lerna/publish@3.22.1": - version "3.22.1" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.22.1.tgz#b4f7ce3fba1e9afb28be4a1f3d88222269ba9519" - integrity sha512-PG9CM9HUYDreb1FbJwFg90TCBQooGjj+n/pb3gw/eH5mEDq0p8wKdLFe0qkiqUkm/Ub5C8DbVFertIo0Vd0zcw== - dependencies: - "@evocateur/libnpmaccess" "^3.1.2" - "@evocateur/npm-registry-fetch" "^4.0.0" - "@evocateur/pacote" "^9.6.3" - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.21.0" - "@lerna/describe-ref" "3.16.5" - "@lerna/log-packed" "3.16.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/npm-dist-tag" "3.18.5" - "@lerna/npm-publish" "3.18.5" - "@lerna/otplease" "3.18.5" - "@lerna/output" "3.13.0" - "@lerna/pack-directory" "3.16.4" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - "@lerna/version" "3.22.1" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" +"@lerna/publish@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-4.0.0.tgz#f67011305adeba120066a3b6d984a5bb5fceef65" + integrity sha512-K8jpqjHrChH22qtkytA5GRKIVFEtqBF6JWj1I8dWZtHs4Jywn8yB1jQ3BAMLhqmDJjWJtRck0KXhQQKzDK2UPg== + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/log-packed" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/npm-dist-tag" "4.0.0" + "@lerna/npm-publish" "4.0.0" + "@lerna/otplease" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/pack-directory" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/version" "4.0.0" + fs-extra "^9.1.0" + libnpmaccess "^4.0.1" + npm-package-arg "^8.1.0" + npm-registry-fetch "^9.0.0" npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-pipe "^1.2.0" - semver "^6.2.0" + p-map "^4.0.0" + p-pipe "^3.1.0" + pacote "^11.2.6" + semver "^7.3.4" -"@lerna/pulse-till-done@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110" - integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA== +"@lerna/pulse-till-done@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-4.0.0.tgz#04bace7d483a8205c187b806bcd8be23d7bb80a3" + integrity sha512-Frb4F7QGckaybRhbF7aosLsJ5e9WuH7h0KUkjlzSByVycxY91UZgaEIVjS2oN9wQLrheLMHl6SiFY0/Pvo0Cxg== dependencies: npmlog "^4.1.2" -"@lerna/query-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-3.18.5.tgz#df4830bb5155273003bf35e8dda1c32d0927bd86" - integrity sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA== +"@lerna/query-graph@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-4.0.0.tgz#09dd1c819ac5ee3f38db23931143701f8a6eef63" + integrity sha512-YlP6yI3tM4WbBmL9GCmNDoeQyzcyg1e4W96y/PKMZa5GbyUvkS2+Jc2kwPD+5KcXou3wQZxSPzR3Te5OenaDdg== dependencies: - "@lerna/package-graph" "3.18.5" - figgy-pudding "^3.5.1" + "@lerna/package-graph" "4.0.0" -"@lerna/resolve-symlink@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz#37fc7095fabdbcf317c26eb74e0d0bde8efd2386" - integrity sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ== +"@lerna/resolve-symlink@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-4.0.0.tgz#6d006628a210c9b821964657a9e20a8c9a115e14" + integrity sha512-RtX8VEUzqT+uLSCohx8zgmjc6zjyRlh6i/helxtZTMmc4+6O4FS9q5LJas2uGO2wKvBlhcD6siibGt7dIC3xZA== dependencies: - fs-extra "^8.1.0" + fs-extra "^9.1.0" npmlog "^4.1.2" - read-cmd-shim "^1.0.1" + read-cmd-shim "^2.0.0" -"@lerna/rimraf-dir@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz#04316ab5ffd2909657aaf388ea502cb8c2f20a09" - integrity sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA== +"@lerna/rimraf-dir@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-4.0.0.tgz#2edf3b62d4eb0ef4e44e430f5844667d551ec25a" + integrity sha512-QNH9ABWk9mcMJh2/muD9iYWBk1oQd40y6oH+f3wwmVGKYU5YJD//+zMiBI13jxZRtwBx0vmBZzkBkK1dR11cBg== dependencies: - "@lerna/child-process" "3.16.5" + "@lerna/child-process" "4.0.0" npmlog "^4.1.2" - path-exists "^3.0.0" - rimraf "^2.6.2" + path-exists "^4.0.0" + rimraf "^3.0.2" -"@lerna/run-lifecycle@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz#67b288f8ea964db9ea4fb1fbc7715d5bbb0bce00" - integrity sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A== +"@lerna/run-lifecycle@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-4.0.0.tgz#e648a46f9210a9bcd7c391df6844498cb5079334" + integrity sha512-IwxxsajjCQQEJAeAaxF8QdEixfI7eLKNm4GHhXHrgBu185JcwScFZrj9Bs+PFKxwb+gNLR4iI5rpUdY8Y0UdGQ== dependencies: - "@lerna/npm-conf" "3.16.0" - figgy-pudding "^3.5.1" - npm-lifecycle "^3.1.2" + "@lerna/npm-conf" "4.0.0" + npm-lifecycle "^3.1.5" npmlog "^4.1.2" -"@lerna/run-topologically@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-3.18.5.tgz#3cd639da20e967d7672cb88db0f756b92f2fdfc3" - integrity sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg== - dependencies: - "@lerna/query-graph" "3.18.5" - figgy-pudding "^3.5.1" - p-queue "^4.0.0" - -"@lerna/run@3.21.0": - version "3.21.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.21.0.tgz#2a35ec84979e4d6e42474fe148d32e5de1cac891" - integrity sha512-fJF68rT3veh+hkToFsBmUJ9MHc9yGXA7LSDvhziAojzOb0AI/jBDp6cEcDQyJ7dbnplba2Lj02IH61QUf9oW0Q== - dependencies: - "@lerna/command" "3.21.0" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-run-script" "3.16.5" - "@lerna/output" "3.13.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/timer" "3.13.0" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/symlink-binary@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz#8f8031b309863814883d3f009877f82e38aef45a" - integrity sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/package" "3.16.0" - fs-extra "^8.1.0" - p-map "^2.1.0" - -"@lerna/symlink-dependencies@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz#48d6360e985865a0e56cd8b51b308a526308784a" - integrity sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/resolve-symlink" "3.16.0" - "@lerna/symlink-binary" "3.17.0" - fs-extra "^8.1.0" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" +"@lerna/run-topologically@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-4.0.0.tgz#af846eeee1a09b0c2be0d1bfb5ef0f7b04bb1827" + integrity sha512-EVZw9hGwo+5yp+VL94+NXRYisqgAlj0jWKWtAIynDCpghRxCE5GMO3xrQLmQgqkpUl9ZxQFpICgYv5DW4DksQA== + dependencies: + "@lerna/query-graph" "4.0.0" + p-queue "^6.6.2" + +"@lerna/run@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-4.0.0.tgz#4bc7fda055a729487897c23579694f6183c91262" + integrity sha512-9giulCOzlMPzcZS/6Eov6pxE9gNTyaXk0Man+iCIdGJNMrCnW7Dme0Z229WWP/UoxDKg71F2tMsVVGDiRd8fFQ== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-run-script" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/timer" "4.0.0" + "@lerna/validation-error" "4.0.0" + p-map "^4.0.0" + +"@lerna/symlink-binary@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-4.0.0.tgz#21009f62d53a425f136cb4c1a32c6b2a0cc02d47" + integrity sha512-zualodWC4q1QQc1pkz969hcFeWXOsVYZC5AWVtAPTDfLl+TwM7eG/O6oP+Rr3fFowspxo6b1TQ6sYfDV6HXNWA== + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/package" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" -"@lerna/timer@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781" - integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw== +"@lerna/symlink-dependencies@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-4.0.0.tgz#8910eca084ae062642d0490d8972cf2d98e9ebbd" + integrity sha512-BABo0MjeUHNAe2FNGty1eantWp8u83BHSeIMPDxNq0MuW2K3CiQRaeWT3EGPAzXpGt0+hVzBrA6+OT0GPn7Yuw== + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/resolve-symlink" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" + p-map-series "^2.1.0" -"@lerna/validation-error@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3" - integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA== +"@lerna/timer@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-4.0.0.tgz#a52e51bfcd39bfd768988049ace7b15c1fd7a6da" + integrity sha512-WFsnlaE7SdOvjuyd05oKt8Leg3ENHICnvX3uYKKdByA+S3g+TCz38JsNs7OUZVt+ba63nC2nbXDlUnuT2Xbsfg== + +"@lerna/validation-error@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-4.0.0.tgz#af9d62fe8304eaa2eb9a6ba1394f9aa807026d35" + integrity sha512-1rBOM5/koiVWlRi3V6dB863E1YzJS8v41UtsHgMr6gB2ncJ2LsQtMKlJpi3voqcgh41H8UsPXR58RrrpPpufyw== dependencies: npmlog "^4.1.2" -"@lerna/version@3.22.1": - version "3.22.1" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.22.1.tgz#9805a9247a47ee62d6b81bd9fa5fb728b24b59e2" - integrity sha512-PSGt/K1hVqreAFoi3zjD0VEDupQ2WZVlVIwesrE5GbrL2BjXowjCsTDPqblahDUPy0hp6h7E2kG855yLTp62+g== - dependencies: - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.21.0" - "@lerna/conventional-commits" "3.22.0" - "@lerna/github-client" "3.22.0" - "@lerna/gitlab-client" "3.15.0" - "@lerna/output" "3.13.0" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - chalk "^2.3.1" +"@lerna/version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-4.0.0.tgz#532659ec6154d8a8789c5ab53878663e244e3228" + integrity sha512-otUgiqs5W9zGWJZSCCMRV/2Zm2A9q9JwSDS7s/tlKq4mWCYriWo7+wsHEA/nPTMDyYyBO5oyZDj+3X50KDUzeA== + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/conventional-commits" "4.0.0" + "@lerna/github-client" "4.0.0" + "@lerna/gitlab-client" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + chalk "^4.1.0" dedent "^0.7.0" - load-json-file "^5.3.0" + load-json-file "^6.2.0" minimatch "^3.0.4" npmlog "^4.1.2" - p-map "^2.1.0" - p-pipe "^1.2.0" - p-reduce "^1.0.0" - p-waterfall "^1.0.0" - semver "^6.2.0" - slash "^2.0.0" - temp-write "^3.4.0" - write-json-file "^3.2.0" + p-map "^4.0.0" + p-pipe "^3.1.0" + p-reduce "^2.1.0" + p-waterfall "^2.1.1" + semver "^7.3.4" + slash "^3.0.0" + temp-write "^4.0.0" + write-json-file "^4.3.0" -"@lerna/write-log-file@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26" - integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A== +"@lerna/write-log-file@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-4.0.0.tgz#18221a38a6a307d6b0a5844dd592ad53fa27091e" + integrity sha512-XRG5BloiArpXRakcnPHmEHJp+4AtnhRtpDIHSghmXD5EichI1uD73J7FgPp30mm2pDRq3FdqB0NbwSEsJ9xFQg== dependencies: npmlog "^4.1.2" - write-file-atomic "^2.3.0" + write-file-atomic "^3.0.3" "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -1570,12 +1482,84 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== +"@npmcli/ci-detect@^1.0.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a" + integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q== + +"@npmcli/git@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.0.6.tgz#47b97e96b2eede3f38379262fa3bdfa6eae57bf2" + integrity sha512-a1MnTfeRPBaKbFY07fd+6HugY1WAkKJzdiJvlRub/9o5xz2F/JtPacZZapx5zRJUQFIzSL677vmTSxEcDMrDbg== dependencies: - "@octokit/types" "^5.0.0" + "@npmcli/promise-spawn" "^1.1.0" + lru-cache "^6.0.0" + mkdirp "^1.0.3" + npm-pick-manifest "^6.0.0" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.2" + unique-filename "^1.1.1" + which "^2.0.2" + +"@npmcli/installed-package-contents@^1.0.6": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz#ab7408c6147911b970a8abe261ce512232a3f4fa" + integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== + dependencies: + npm-bundled "^1.1.1" + npm-normalize-package-bin "^1.0.1" + +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + +"@npmcli/node-gyp@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.2.tgz#3cdc1f30e9736dbc417373ed803b42b1a0a29ede" + integrity sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg== + +"@npmcli/promise-spawn@^1.1.0", "@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz#42d4e56a8e9274fba180dabc0aea6e38f29274f5" + integrity sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg== + dependencies: + infer-owner "^1.0.4" + +"@npmcli/run-script@^1.8.2": + version "1.8.4" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-1.8.4.tgz#03ced92503a6fe948cbc0975ce39210bc5e824d6" + integrity sha512-Yd9HXTtF1JGDXZw0+SOn+mWLYS0e7bHBHVC/2C8yqs4wUrs/k8rwBSinD7rfk+3WG/MFGRZKxjyoD34Pch2E/A== + dependencies: + "@npmcli/node-gyp" "^1.0.2" + "@npmcli/promise-spawn" "^1.3.2" + infer-owner "^1.0.4" + node-gyp "^7.1.0" + read-package-json-fast "^2.0.1" + +"@octokit/auth-token@^2.4.4": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" + integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.2.3": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.3.1.tgz#c6bb6ba171ad84a5f430853a98892cfe8f93d8cd" + integrity sha512-Dc5NNQOYjgZU5S1goN6A/E500yXOfDUFRGQB8/2Tl16AcfvS3H9PudyOe3ZNE/MaVyHPIfC0htReHMJb1tMrvw== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" + universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": version "6.0.8" @@ -1586,40 +1570,45 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" +"@octokit/graphql@^4.5.8": + version "4.6.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.1.tgz#f975486a46c94b7dbe58a0ca751935edc7e32cc9" + integrity sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-6.0.0.tgz#7da8d7d5a72d3282c1a3ff9f951c8133a707480d" + integrity sha512-CnDdK7ivHkBtJYzWzZm7gEkanA7gKH6a09Eguz7flHw//GacPJLmkHA3f3N++MJmlxD1Fl+mB7B32EEpSCwztQ== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== -"@octokit/plugin-paginate-rest@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc" - integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q== +"@octokit/plugin-paginate-rest@^2.6.2": + version "2.13.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz#f0f1792230805108762d87906fb02d573b9e070a" + integrity sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg== dependencies: - "@octokit/types" "^2.0.1" + "@octokit/types" "^6.11.0" -"@octokit/plugin-request-log@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44" - integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg== +"@octokit/plugin-request-log@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" + integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== -"@octokit/plugin-rest-endpoint-methods@2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e" - integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ== +"@octokit/plugin-rest-endpoint-methods@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.0.tgz#cf2cdeb24ea829c31688216a5b165010b61f9a98" + integrity sha512-Jc7CLNUueIshXT+HWt6T+M0sySPjF32mSFQAK7UfAg8qGeRI6OM1GSBxDLwbXjkqy2NVdnqCedJcP1nC785JYg== dependencies: - "@octokit/types" "^2.0.1" + "@octokit/types" "^6.13.0" deprecation "^2.3.1" -"@octokit/request-error@^1.0.2": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801" - integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== - dependencies: - "@octokit/types" "^2.0.0" - deprecation "^2.0.0" - once "^1.4.0" - "@octokit/request-error@^2.0.0": version "2.0.2" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" @@ -1629,48 +1618,38 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.2.0": - version "5.4.9" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365" - integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA== +"@octokit/request-error@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143" + integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.3.0", "@octokit/request@^5.4.12": + version "5.4.14" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96" + integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.7.1" deprecation "^2.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.1" once "^1.4.0" universal-user-agent "^6.0.0" -"@octokit/rest@^16.28.4": - version "16.43.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.2.tgz#c53426f1e1d1044dee967023e3279c50993dd91b" - integrity sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ== - dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/plugin-paginate-rest" "^1.1.1" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "2.4.0" - "@octokit/request" "^5.2.0" - "@octokit/request-error" "^1.0.2" - atob-lite "^2.0.0" - before-after-hook "^2.0.0" - btoa-lite "^1.0.0" - deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" - once "^1.4.0" - universal-user-agent "^4.0.0" - -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.16.2" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" - integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== +"@octokit/rest@^18.1.0": + version "18.5.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.5.2.tgz#0369e554b7076e3749005147be94c661c7a5a74b" + integrity sha512-Kz03XYfKS0yYdi61BkL9/aJ0pP2A/WK5vF/syhu9/kY30J8He3P68hv9GRpn8bULFx2K0A9MEErn4v3QEdbZcw== dependencies: - "@types/node" ">= 8" + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "5.0.0" "@octokit/types@^5.0.0", "@octokit/types@^5.0.1": version "5.5.0" @@ -1679,6 +1658,13 @@ dependencies: "@types/node" ">= 8" +"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.13.0", "@octokit/types@^6.7.1": + version "6.13.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.0.tgz#779e5b7566c8dde68f2f6273861dd2f0409480d0" + integrity sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA== + dependencies: + "@octokit/openapi-types" "^6.0.0" + "@polka/url@^1.0.0-next.9": version "1.0.0-next.11" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71" @@ -1739,6 +1725,11 @@ dependencies: defer-to-connect "^2.0.0" +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.10" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.10.tgz#ca58fc195dd9734e77e57c6f2df565623636ab40" @@ -2256,16 +2247,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zkochan/cmd-shim@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" - integrity sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg== - dependencies: - is-windows "^1.0.0" - mkdirp-promise "^5.0.1" - mz "^2.5.0" - -JSONStream@^1.0.4, JSONStream@^1.2.1, JSONStream@^1.3.4, JSONStream@^1.3.5: +JSONStream@^1.0.4, JSONStream@^1.2.1, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -2324,25 +2306,25 @@ acorn@^8.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= -agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: - es6-promisify "^5.0.0" + debug "4" -agentkeepalive@^3.4.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" - integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== +agentkeepalive@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b" + integrity sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ== dependencies: + debug "^4.1.0" + depd "^1.1.2" humanize-ms "^1.2.1" aggregate-error@^3.0.0: @@ -2444,11 +2426,6 @@ any-observable@^0.3.0: resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -2472,7 +2449,7 @@ append-transform@^2.0.0: dependencies: default-require-extensions "^3.0.0" -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== @@ -2522,11 +2499,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-differ@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" - integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== - array-differ@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" @@ -2650,11 +2622,6 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -atob-lite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" - integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -2781,10 +2748,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -before-after-hook@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== +before-after-hook@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.0.tgz#09c40d92e936c64777aa385c4e9b904f8147eaf0" + integrity sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ== binary-extensions@^1.0.0: version "1.13.1" @@ -2803,11 +2770,6 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -2897,11 +2859,6 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= - buffer-from@1.x, buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -2922,10 +2879,10 @@ byline@^5.0.0: resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= -byte-size@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" - integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== +byte-size@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.1.tgz#b1daf3386de7ab9d706b941a748dbfc71130dee3" + integrity sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A== bytes@3.0.0: version "3.0.0" @@ -2937,26 +2894,28 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^12.0.0, cacache@^12.0.3: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== +cacache@^15.0.5: + version "15.0.6" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.6.tgz#65a8c580fda15b59150fb76bf3f3a8e45d583099" + integrity sha512-g1WYDMct/jzW+JdWEyjaX2zoBkZ6ZT9VpOyp2I/VMtDsNLffNat3kqPFfi1eDRSK9/SuKGyORDHcQMcPF8sQ/w== dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" unique-filename "^1.1.1" - y18n "^4.0.0" cache-base@^1.0.1: version "1.0.1" @@ -3006,25 +2965,6 @@ call-me-maybe@^1.0.1: resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -3038,15 +2978,6 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase-keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" - integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= - dependencies: - camelcase "^4.1.0" - map-obj "^2.0.0" - quick-lru "^1.0.0" - camelcase-keys@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" @@ -3061,11 +2992,6 @@ camelcase@^2.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -3117,7 +3043,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3155,11 +3081,16 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -3255,7 +3186,16 @@ cliui@^6.0.0: dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + wrap-ansi "^6.2.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" clone-buffer@^1.0.0: version "1.0.0" @@ -3302,6 +3242,13 @@ cloneable-readable@^1.0.0: process-nextick-args "^2.0.0" readable-stream "^2.3.5" +cmd-shim@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-4.1.0.tgz#b3a904a6743e9fede4148c6f3800bf2a08135bdd" + integrity sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw== + dependencies: + mkdirp-infer-owner "^2.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -3454,16 +3401,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - concat-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" @@ -3474,7 +3411,7 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -config-chain@^1.1.11: +config-chain@^1.1.12: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== @@ -3504,7 +3441,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.3: +conventional-changelog-angular@^5.0.0: version "5.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== @@ -3512,6 +3449,14 @@ conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.3: compare-func "^2.0.0" q "^1.5.1" +conventional-changelog-angular@^5.0.12: + version "5.0.12" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" + integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + dependencies: + compare-func "^2.0.0" + q "^1.5.1" + conventional-changelog-conventionalcommits@^4.3.1: version "4.5.0" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" @@ -3521,55 +3466,57 @@ conventional-changelog-conventionalcommits@^4.3.1: lodash "^4.17.15" q "^1.5.1" -conventional-changelog-core@^3.1.6: - version "3.2.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" - integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ== +conventional-changelog-core@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.2.tgz#f0897df6d53b5d63dec36b9442bd45354f8b3ce5" + integrity sha512-7pDpRUiobQDNkwHyJG7k9f6maPo9tfPzkSWbRq97GGiZqisElhnvUZSvyQH20ogfOjntB5aadvv6NNcKL1sReg== dependencies: - conventional-changelog-writer "^4.0.6" - conventional-commits-parser "^3.0.3" + add-stream "^1.0.0" + conventional-changelog-writer "^4.0.18" + conventional-commits-parser "^3.2.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" + git-raw-commits "^2.0.8" git-remote-origin-url "^2.0.0" - git-semver-tags "^2.0.3" - lodash "^4.2.1" - normalize-package-data "^2.3.5" + git-semver-tags "^4.1.1" + lodash "^4.17.15" + normalize-package-data "^3.0.0" q "^1.5.1" read-pkg "^3.0.0" read-pkg-up "^3.0.0" - through2 "^3.0.0" + shelljs "^0.8.3" + through2 "^4.0.0" -conventional-changelog-preset-loader@^2.1.1: +conventional-changelog-preset-loader@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.6: - version "4.0.17" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" - integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== +conventional-changelog-writer@^4.0.18: + version "4.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" + integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== dependencies: compare-func "^2.0.0" - conventional-commits-filter "^2.0.6" + conventional-commits-filter "^2.0.7" dateformat "^3.0.0" handlebars "^4.7.6" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^7.0.0" + meow "^8.0.0" semver "^6.0.0" split "^1.0.0" - through2 "^3.0.0" + through2 "^4.0.0" -conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" - integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== +conventional-commits-filter@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" + integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== dependencies: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.3: +conventional-commits-parser@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== @@ -3582,18 +3529,31 @@ conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.3: through2 "^3.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba" - integrity sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ== +conventional-commits-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz#ba44f0b3b6588da2ee9fd8da508ebff50d116ce2" + integrity sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + trim-off-newlines "^1.0.0" + +conventional-recommended-bump@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" + integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== dependencies: concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.1.1" - conventional-commits-filter "^2.0.2" - conventional-commits-parser "^3.0.3" - git-raw-commits "2.0.0" - git-semver-tags "^2.0.3" - meow "^4.0.0" + conventional-changelog-preset-loader "^2.3.4" + conventional-commits-filter "^2.0.7" + conventional-commits-parser "^3.2.0" + git-raw-commits "^2.0.8" + git-semver-tags "^4.1.1" + meow "^8.0.0" q "^1.5.1" convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: @@ -3613,18 +3573,6 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -3640,16 +3588,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - cosmiconfig@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" @@ -3717,11 +3655,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= - cz-customizable@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/cz-customizable/-/cz-customizable-6.3.0.tgz#1b24e5b84e1fccaa18ad837612b233b8c51d7882" @@ -3734,13 +3667,6 @@ cz-customizable@^6.3.0: temp "^0.9.0" word-wrap "^1.2.3" -dargs@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" - integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= - dependencies: - number-is-nan "^1.0.0" - dargs@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-6.1.0.tgz#1f3b9b56393ecf8caa7cbfd6c31496ffcfb9b272" @@ -3784,7 +3710,14 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@3.1.0, debug@=3.1.0: +debug@4: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +debug@=3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== @@ -3810,7 +3743,7 @@ debuglog@^1.0.1: resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= -decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: +decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= @@ -3973,7 +3906,7 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depd@~1.1.2: +depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= @@ -3998,6 +3931,11 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= +detect-indent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" + integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -4087,13 +4025,6 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -dot-prop@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" - integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== - dependencies: - is-obj "^1.0.0" - dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -4101,6 +4032,13 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" +dot-prop@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" + integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== + dependencies: + is-obj "^2.0.0" + download-stats@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/download-stats/-/download-stats-0.3.4.tgz#67ea0c32f14acd9f639da704eef509684ba2dae7" @@ -4120,16 +4058,6 @@ duplexer@^0.1.1, duplexer@^0.1.2: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -4198,14 +4126,14 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: +encoding@^0.1.12: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0: +end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -4232,15 +4160,15 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== -envinfo@^7.3.1, envinfo@^7.7.3: +envinfo@^7.7.3, envinfo@^7.7.4: version "7.7.4" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== -err-code@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" - integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== errlop@^2.0.0: version "2.2.0" @@ -4322,18 +4250,6 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -4514,12 +4430,7 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - -eventemitter3@^4.0.0: +eventemitter3@^4.0.0, eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== @@ -4792,11 +4703,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -4973,14 +4879,6 @@ flow-parser@0.*: resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.137.0.tgz#8c05612ff9344648d8bcdeaa4c58d131e875d842" integrity sha512-i3KXJZ8lhlQI0n+BoZzIeH/rv+fNvAiu1i9/s64MklBV+HuhFbycUML7367J2eng0gapLnwvYPFNaPZys8POsA== -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - follow-redirects@1.5.10: version "1.5.10" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" @@ -5037,28 +4935,11 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - fromentries@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.1.tgz#64c31665630479bc993cd800d53387920dc61b4d" integrity sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw== -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" @@ -5069,6 +4950,16 @@ fs-extra@^9.0.0: jsonfile "^6.0.1" universalify "^1.0.0" +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -5076,15 +4967,12 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.6.0" -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= +fs-minipass@^2.0.0, fs-minipass@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" + minipass "^3.0.0" fs.realpath@^1.0.0: version "1.0.0" @@ -5128,17 +5016,12 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -genfun@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" - integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== - gensync@^1.0.0-beta.1: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -5164,11 +5047,6 @@ get-pkg-repo@^1.0.0: parse-github-repo-url "^1.3.0" through2 "^2.0.0" -get-port@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" - integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== - get-port@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" @@ -5189,7 +5067,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0, get-stream@^4.1.0: +get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -5228,17 +5106,6 @@ gh-got@^5.0.0: got "^6.2.0" is-plain-obj "^1.1.0" -git-raw-commits@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" - integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== - dependencies: - dargs "^4.0.1" - lodash.template "^4.0.2" - meow "^4.0.0" - split2 "^2.0.0" - through2 "^2.0.0" - git-raw-commits@^2.0.0: version "2.0.7" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.7.tgz#02e9357727a9755efa8e14dd5e59b381c29068fb" @@ -5250,6 +5117,17 @@ git-raw-commits@^2.0.0: split2 "^2.0.0" through2 "^3.0.0" +git-raw-commits@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" + integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== + dependencies: + dargs "^7.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" @@ -5258,12 +5136,12 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34" - integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA== +git-semver-tags@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" + integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== dependencies: - meow "^4.0.0" + meow "^8.0.0" semver "^6.0.0" git-up@^4.0.0: @@ -5274,10 +5152,10 @@ git-up@^4.0.0: is-ssh "^1.3.0" parse-url "^5.0.0" -git-url-parse@^11.1.2: - version "11.4.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.0.tgz#f2bb1f2b00f05552540e95a62e31399a639a6aa6" - integrity sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ== +git-url-parse@^11.4.4: + version "11.4.4" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77" + integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw== dependencies: git-up "^4.0.0" @@ -5310,6 +5188,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -5420,6 +5305,18 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.2: + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -5497,6 +5394,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graceful-fs@^4.2.3: + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + grouped-queue@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-1.1.0.tgz#63e3f9ca90af952269d1d40879e41221eacc74cb" @@ -5638,11 +5540,18 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +hosted-git-info@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" + integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== + dependencies: + lru-cache "^6.0.0" + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -5670,12 +5579,7 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-cache-semantics@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-cache-semantics@^4.0.0: +http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== @@ -5722,13 +5626,14 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== dependencies: - agent-base "4" - debug "3.1.0" + "@tootallnate/once" "1" + agent-base "6" + debug "4" http-proxy-middleware@0.19.1: version "0.19.1" @@ -5766,13 +5671,13 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== dependencies: - agent-base "^4.3.0" - debug "^3.1.0" + agent-base "6" + debug "4" human-signals@^1.1.1: version "1.1.1" @@ -5821,12 +5726,7 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= - -ignore-walk@^3.0.1: +ignore-walk@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== @@ -5848,14 +5748,6 @@ ignore@^5.1.1, ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" @@ -5902,7 +5794,7 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infer-owner@^1.0.3, infer-owner@^1.0.4: +infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== @@ -5930,21 +5822,21 @@ ini@^1.3.2, ini@^1.3.4, ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -init-package-json@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== +init-package-json@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.2.tgz#d81a7e6775af9b618f20bba288e440b8d1ce05f3" + integrity sha512-PO64kVeArePvhX7Ff0jVWkpnE1DfGRvaWcStYrPugcJz9twQGYibagKJuIMHCX7ENcp0M6LJlcjLBuLD5KeJMg== dependencies: glob "^7.1.1" - npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" + npm-package-arg "^8.1.0" promzard "^0.3.0" read "~1.0.1" - read-package-json "1 || 2" - semver "2.x || 3.x || 4 || 5" - validate-npm-package-license "^3.0.1" + read-package-json "^3.0.0" + semver "^7.3.2" + validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" -inquirer@^6.2.0, inquirer@^6.3.1: +inquirer@^6.3.1: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== @@ -6005,7 +5897,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@1.1.5, ip@^1.1.0, ip@^1.1.5: +ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -6080,6 +5972,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -6117,11 +6016,6 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - is-docker@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" @@ -6185,6 +6079,11 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= + is-negative-zero@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" @@ -6202,7 +6101,7 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^1.0.0, is-obj@^1.0.1: +is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= @@ -6248,6 +6147,11 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= +is-plain-obj@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -6345,7 +6249,7 @@ is-utf8@^0.2.0, is-utf8@^0.2.1: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -6986,7 +6890,7 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -7028,13 +6932,6 @@ json5@2.x, json5@^2.1.2: dependencies: minimist "^1.2.5" -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" @@ -7044,7 +6941,7 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsonparse@^1.2.0: +jsonparse@^1.2.0, jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= @@ -7112,28 +7009,28 @@ lazy-cache@^2.0.1: dependencies: set-getter "^0.1.0" -lerna@^3.22.1: - version "3.22.1" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.22.1.tgz#82027ac3da9c627fd8bf02ccfeff806a98e65b62" - integrity sha512-vk1lfVRFm+UuEFA7wkLKeSF7Iz13W+N/vFd48aW2yuS7Kv0RbNm2/qcDPV863056LMfkRlsEe+QYOw3palj5Lg== - dependencies: - "@lerna/add" "3.21.0" - "@lerna/bootstrap" "3.21.0" - "@lerna/changed" "3.21.0" - "@lerna/clean" "3.21.0" - "@lerna/cli" "3.18.5" - "@lerna/create" "3.22.0" - "@lerna/diff" "3.21.0" - "@lerna/exec" "3.21.0" - "@lerna/import" "3.22.0" - "@lerna/info" "3.21.0" - "@lerna/init" "3.21.0" - "@lerna/link" "3.21.0" - "@lerna/list" "3.21.0" - "@lerna/publish" "3.22.1" - "@lerna/run" "3.21.0" - "@lerna/version" "3.22.1" - import-local "^2.0.0" +lerna@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-4.0.0.tgz#b139d685d50ea0ca1be87713a7c2f44a5b678e9e" + integrity sha512-DD/i1znurfOmNJb0OBw66NmNqiM8kF6uIrzrJ0wGE3VNdzeOhz9ziWLYiRaZDGGwgbcjOo6eIfcx9O5Qynz+kg== + dependencies: + "@lerna/add" "4.0.0" + "@lerna/bootstrap" "4.0.0" + "@lerna/changed" "4.0.0" + "@lerna/clean" "4.0.0" + "@lerna/cli" "4.0.0" + "@lerna/create" "4.0.0" + "@lerna/diff" "4.0.0" + "@lerna/exec" "4.0.0" + "@lerna/import" "4.0.0" + "@lerna/info" "4.0.0" + "@lerna/init" "4.0.0" + "@lerna/link" "4.0.0" + "@lerna/list" "4.0.0" + "@lerna/publish" "4.0.0" + "@lerna/run" "4.0.0" + "@lerna/version" "4.0.0" + import-local "^3.0.2" npmlog "^4.1.2" leven@^3.1.0: @@ -7157,6 +7054,27 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +libnpmaccess@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.1.tgz#17e842e03bef759854adf6eb6c2ede32e782639f" + integrity sha512-ZiAgvfUbvmkHoMTzdwmNWCrQRsDkOC+aM5BDfO0C9aOSwF3R1LdFDBD+Rer1KWtsoQYO35nXgmMR7OUHpDRxyA== + dependencies: + aproba "^2.0.0" + minipass "^3.1.1" + npm-package-arg "^8.0.0" + npm-registry-fetch "^9.0.0" + +libnpmpublish@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-4.0.0.tgz#ad6413914e0dfd78df868ce14ba3d3a4cc8b385b" + integrity sha512-2RwYXRfZAB1x/9udKpZmqEzSqNd7ouBRU52jyG14/xG8EF+O9A62d7/XVR3iABEQHf1iYhkm0Oq9iXjrL3tsXA== + dependencies: + normalize-package-data "^3.0.0" + npm-package-arg "^8.1.0" + npm-registry-fetch "^9.0.0" + semver "^7.1.3" + ssri "^8.0.0" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -7262,16 +7180,15 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -load-json-file@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" - integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== +load-json-file@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" + integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ== dependencies: graceful-fs "^4.1.15" - parse-json "^4.0.0" - pify "^4.0.1" - strip-bom "^3.0.0" - type-fest "^0.3.0" + parse-json "^5.0.0" + strip-bom "^4.0.0" + type-fest "^0.6.0" loader-runner@^4.2.0: version "4.2.0" @@ -7313,11 +7230,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -7333,11 +7245,6 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" - integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -7358,12 +7265,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= - -lodash@4.x, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.2.1: +lodash@4.x, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7432,13 +7334,6 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -7446,18 +7341,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -macos-release@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" - integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -7478,22 +7361,26 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" - integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== - dependencies: - agentkeepalive "^3.4.1" - cacache "^12.0.0" - http-cache-semantics "^3.8.1" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^4.0.0" - ssri "^6.0.0" +make-fetch-happen@^8.0.9: + version "8.0.14" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" + integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.0.5" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + promise-retry "^2.0.1" + socks-proxy-agent "^5.0.0" + ssri "^8.0.0" makeerror@1.0.x: version "1.0.11" @@ -7512,11 +7399,6 @@ map-obj@^1.0.0, map-obj@^1.0.1: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= -map-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" - integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= - map-obj@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" @@ -7601,21 +7483,6 @@ meow@^3.3.0: redent "^1.0.0" trim-newlines "^1.0.0" -meow@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" - integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist "^1.1.3" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - meow@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/meow/-/meow-6.1.1.tgz#1ad64c4b76b2a24dfb2f635fddcadf320d251467" @@ -7650,6 +7517,23 @@ meow@^7.0.0: type-fest "^0.13.1" yargs-parser "^18.1.3" +meow@^8.0.0: + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -7765,20 +7649,59 @@ minimist-options@4.1.0, minimist-options@^4.0.2: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist-options@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" - integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.3.tgz#34c7cea038c817a8658461bf35174551dce17a0a" + integrity sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ== + dependencies: + minipass "^3.1.0" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -7786,6 +7709,13 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -7793,21 +7723,13 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== +minizlib@^2.0.0, minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" + minipass "^3.0.0" + yallist "^4.0.0" mixin-deep@^1.2.0: version "1.3.2" @@ -7817,14 +7739,16 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= +mkdirp-infer-owner@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" + integrity sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw== dependencies: - mkdirp "*" + chownr "^2.0.0" + infer-owner "^1.0.4" + mkdirp "^1.0.3" -mkdirp@*, mkdirp@1.x, mkdirp@^1.0.0, mkdirp@^1.0.3: +mkdirp@1.x, mkdirp@^1.0.0, mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -7846,18 +7770,6 @@ moment@^2.15.1, moment@^2.24.0: resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -7886,20 +7798,21 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" -multimatch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" - integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA== +multimatch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" + integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== dependencies: - array-differ "^2.0.3" - array-union "^1.0.2" - arrify "^1.0.1" + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" minimatch "^3.0.4" -multimatch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" - integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== +multimatch@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" + integrity sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA== dependencies: "@types/minimatch" "^3.0.3" array-differ "^3.0.0" @@ -7917,15 +7830,6 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - nan@^2.12.1: version "2.14.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" @@ -7986,16 +7890,7 @@ node-dir@^0.1.17: dependencies: minimatch "^3.0.2" -node-fetch-npm@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" - integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg== - dependencies: - encoding "^0.1.11" - json-parse-better-errors "^1.0.0" - safe-buffer "^5.1.1" - -node-fetch@^2.5.0, node-fetch@^2.6.1: +node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -8022,6 +7917,22 @@ node-gyp@^5.0.2: tar "^4.4.12" which "^1.3.1" +node-gyp@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" + integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.3" + nopt "^5.0.0" + npmlog "^4.1.2" + request "^2.88.2" + rimraf "^3.0.2" + semver "^7.3.2" + tar "^6.0.2" + which "^2.0.2" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -8064,7 +7975,14 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -8074,6 +7992,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-package-data@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.2.tgz#cae5c410ae2434f9a6c1baa65d5bc3b9366c8699" + integrity sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg== + dependencies: + hosted-git-info "^4.0.1" + resolve "^1.20.0" + semver "^7.3.4" + validate-npm-package-license "^3.0.1" + normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -8108,14 +8036,21 @@ npm-api@^1.0.0: paged-request "^2.0.1" request "^2.88.0" -npm-bundled@^1.0.1: +npm-bundled@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== dependencies: npm-normalize-package-bin "^1.0.1" -npm-lifecycle@^3.1.2: +npm-install-checks@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-4.0.0.tgz#a37facc763a2fde0497ef2c6d0ac7c3fbe00d7b4" + integrity sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w== + dependencies: + semver "^7.1.1" + +npm-lifecycle@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== @@ -8134,33 +8069,48 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" - integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== +npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.2.tgz#b868016ae7de5619e729993fbd8d11dc3c52ab62" + integrity sha512-6Eem455JsSMJY6Kpd3EyWE+n5hC+g9bSyHr9K9U2zqZb7+02+hObQ2c0+8iDk/mNF+8r1MhY44WypKJAkySIYA== dependencies: - hosted-git-info "^2.7.1" - osenv "^0.1.5" - semver "^5.6.0" + hosted-git-info "^4.0.1" + semver "^7.3.4" validate-npm-package-name "^3.0.0" -npm-packlist@^1.4.4: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== +npm-packlist@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.1.5.tgz#43ef5bbb9f59b7c0ef91e0905f1dd707b4cfb33c" + integrity sha512-KCfK3Vi2F+PH1klYauoQzg81GQ8/GGjQRKYY6tRnpQUPKTs/1gBZSRWtTEd7jGdSn1LZL7gpAmJT+BcS55k2XQ== dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" + glob "^7.1.6" + ignore-walk "^3.0.3" + npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" -npm-pick-manifest@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== +npm-pick-manifest@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" + integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" + npm-install-checks "^4.0.0" + npm-normalize-package-bin "^1.0.1" + npm-package-arg "^8.1.2" + semver "^7.3.4" + +npm-registry-fetch@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" + integrity sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA== + dependencies: + "@npmcli/ci-detect" "^1.0.0" + lru-cache "^6.0.0" + make-fetch-happen "^8.0.9" + minipass "^3.1.3" + minipass-fetch "^1.3.0" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" + npm-package-arg "^8.0.0" npm-run-path@^2.0.0: version "2.0.2" @@ -8303,11 +8253,6 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -octokit-pagination-methods@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" - integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== - on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -8394,20 +8339,12 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-name@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" - integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== - dependencies: - macos-release "^2.2.0" - windows-release "^3.1.0" - os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4, osenv@^0.1.5: +osenv@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== @@ -8491,14 +8428,12 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= - dependencies: - p-reduce "^1.0.0" +p-map-series@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" + integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== -p-map@^2.0.0, p-map@^2.1.0: +p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== @@ -8517,22 +8452,23 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-pipe@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" - integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= +p-pipe@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e" + integrity sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw== -p-queue@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" - integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg== +p-queue@^6.6.2: + version "6.6.2" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" + integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== dependencies: - eventemitter3 "^3.1.0" + eventemitter3 "^4.0.4" + p-timeout "^3.2.0" -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= +p-reduce@^2.0.0, p-reduce@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" + integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== p-retry@^3.0.1: version "3.0.1" @@ -8541,6 +8477,13 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" +p-timeout@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -8551,12 +8494,12 @@ p-try@^2.0.0, p-try@^2.1.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -p-waterfall@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" - integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= +p-waterfall@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee" + integrity sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw== dependencies: - p-reduce "^1.0.0" + p-reduce "^2.0.0" package-hash@^4.0.0: version "4.0.0" @@ -8568,6 +8511,31 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" +pacote@^11.2.6: + version "11.3.1" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-11.3.1.tgz#6ce95dd230db475cbd8789fd1f986bec51b4bf7c" + integrity sha512-TymtwoAG12cczsJIrwI/euOQKtjrQHlD0k0oyt9QSmZGpqa+KdlxKdWR/YUjYizkixaVyztxt/Wsfo8bL3A6Fg== + dependencies: + "@npmcli/git" "^2.0.1" + "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/promise-spawn" "^1.2.0" + "@npmcli/run-script" "^1.8.2" + cacache "^15.0.5" + chownr "^2.0.0" + fs-minipass "^2.1.0" + infer-owner "^1.0.4" + minipass "^3.1.3" + mkdirp "^1.0.3" + npm-package-arg "^8.0.1" + npm-packlist "^2.1.4" + npm-pick-manifest "^6.0.0" + npm-registry-fetch "^9.0.0" + promise-retry "^2.0.1" + read-package-json-fast "^2.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.1.0" + paged-request@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/paged-request/-/paged-request-2.0.1.tgz#91164f042231feb68643542d2530476a518ff4de" @@ -8575,15 +8543,6 @@ paged-request@^2.0.1: dependencies: axios "^0.18.0" -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -8764,6 +8723,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" + integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -8889,13 +8853,13 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -promise-retry@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" - integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== dependencies: - err-code "^1.0.0" - retry "^0.10.0" + err-code "^2.0.2" + retry "^0.12.0" prompts@^2.0.1: version "2.4.0" @@ -8922,13 +8886,6 @@ protocols@^1.1.0, protocols@^1.4.0: resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== -protoduck@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" - integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== - dependencies: - genfun "^5.0.0" - proxy-addr@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" @@ -8947,14 +8904,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -8963,15 +8912,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -9007,11 +8947,6 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== -quick-lru@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" - integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= - quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -9057,14 +8992,20 @@ read-chunk@^3.2.0: pify "^4.0.1" with-open-file "^0.1.6" -read-cmd-shim@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" - integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== +read-cmd-shim@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" + integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== + +read-package-json-fast@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.2.tgz#2dcb24d9e8dd50fb322042c8c35a954e6cc7ac9e" + integrity sha512-5fyFUyO9B799foVk4n6ylcoAktG/FbE3jwRKxvwaeSrIunaoMc0u81dzXxjeAFKOce7O5KncdfwpGvvs6r5PsQ== dependencies: - graceful-fs "^4.1.2" + json-parse-even-better-errors "^2.3.0" + npm-normalize-package-bin "^1.0.1" -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: +read-package-json@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== @@ -9074,7 +9015,17 @@ read-cmd-shim@^1.0.1: normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" -read-package-tree@^5.1.6: +read-package-json@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-3.0.1.tgz#c7108f0b9390257b08c21e3004d2404c806744b9" + integrity sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng== + dependencies: + glob "^7.1.1" + json-parse-even-better-errors "^2.3.0" + normalize-package-data "^3.0.0" + npm-normalize-package-bin "^1.0.0" + +read-package-tree@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== @@ -9151,7 +9102,16 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -9164,15 +9124,6 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" @@ -9224,14 +9175,6 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -redent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" - integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= - dependencies: - indent-string "^3.0.0" - strip-indent "^2.0.0" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -9419,6 +9362,14 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.18.1, resolve@^1.9. is-core-module "^2.0.0" path-parse "^1.0.6" +resolve@^1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + responselike@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" @@ -9447,11 +9398,6 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" - integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= - retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -9462,7 +9408,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -9498,13 +9444,6 @@ run-parallel@^1.1.9: resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= - dependencies: - aproba "^1.1.1" - rxjs@>=6.4.0, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.3: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" @@ -9517,7 +9456,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -9601,7 +9540,7 @@ semver-regex@^3.1.2: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807" integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA== -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -9618,11 +9557,18 @@ semver@7.x, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2: dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.1.1, semver@^7.3.4: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -9735,7 +9681,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.4: +shelljs@^0.8.3, shelljs@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== @@ -9880,20 +9826,21 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -socks-proxy-agent@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" - integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== +socks-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" + integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== dependencies: - agent-base "~4.2.1" - socks "~2.3.2" + agent-base "6" + debug "4" + socks "^2.3.3" -socks@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" - integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== +socks@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.0.tgz#6b984928461d39871b3666754b9000ecf39dfac2" + integrity sha512-mNmr9owlinMplev0Wd7UHFlqI4ofnBnNzFuzrm63PPaHgbkqCFe4T5LzwKmtQ/f2tX0NTpcdVLyD/FHxFBstYw== dependencies: - ip "1.1.5" + ip "^1.1.5" smart-buffer "^4.1.0" sort-keys@^2.0.0: @@ -9903,6 +9850,13 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" +sort-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-4.2.0.tgz#6b7638cee42c506fff8c1cecde7376d21315be18" + integrity sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg== + dependencies: + is-plain-obj "^2.0.0" + source-list-map@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -10022,6 +9976,13 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -10049,12 +10010,12 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== +ssri@^8.0.0, ssri@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== dependencies: - figgy-pudding "^3.5.1" + minipass "^3.1.1" stack-utils@^2.0.2: version "2.0.2" @@ -10081,19 +10042,6 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - string-argv@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" @@ -10263,11 +10211,6 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= - strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -10280,7 +10223,7 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strong-log-transformer@^2.0.0: +strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== @@ -10348,7 +10291,7 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: +tar@^4.4.12: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -10361,22 +10304,33 @@ tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: safe-buffer "^5.1.2" yallist "^3.0.3" +tar@^6.0.2, tar@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" + integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= -temp-write@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" - integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= +temp-write@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-4.0.0.tgz#cd2e0825fc826ae72d201dc26eef3bf7e6fc9320" + integrity sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw== dependencies: - graceful-fs "^4.1.2" - is-stream "^1.1.0" - make-dir "^1.0.0" - pify "^3.0.0" + graceful-fs "^4.1.15" + is-stream "^2.0.0" + make-dir "^3.0.0" temp-dir "^1.0.0" - uuid "^3.0.1" + uuid "^3.3.2" temp@^0.8.1: version "0.8.4" @@ -10446,20 +10400,6 @@ textextensions@^2.5.0: resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" @@ -10481,6 +10421,13 @@ through2@^3.0.0, through2@^3.0.1: inherits "^2.0.4" readable-stream "2 || 3" +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -10572,13 +10519,6 @@ tough-cookie@^3.0.1: psl "^1.1.28" punycode "^2.1.1" -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - tr46@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" @@ -10591,11 +10531,6 @@ trim-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= -trim-newlines@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" - integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= - trim-newlines@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" @@ -10692,15 +10627,20 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== +type-fest@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== type-fest@^0.6.0: version "0.6.0" @@ -10776,28 +10716,21 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -universal-user-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" - integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== - dependencies: - os-name "^3.1.0" - universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - universalify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -10821,11 +10754,16 @@ unzip-response@^2.0.1: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= -upath@^1.1.1, upath@^1.2.0: +upath@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== +upath@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" + integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== + uri-js@^4.2.2: version "4.4.0" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" @@ -10890,7 +10828,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3, uuid@^3.4.0: +uuid@^3.3.2, uuid@^3.3.3, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -10914,7 +10852,7 @@ v8-to-istanbul@^7.0.0: convert-source-map "^1.6.0" source-map "^0.7.3" -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: +validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== @@ -11009,11 +10947,6 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -11168,15 +11101,6 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-url@^8.0.0: version "8.4.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" @@ -11186,6 +11110,15 @@ whatwg-url@^8.0.0: tr46 "^2.0.2" webidl-conversions "^6.1.0" +whatwg-url@^8.4.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" + integrity sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg== + dependencies: + lodash "^4.7.0" + tr46 "^2.0.2" + webidl-conversions "^6.1.0" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -11222,13 +11155,6 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== -windows-release@^3.1.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999" - integrity sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg== - dependencies: - execa "^1.0.0" - with-open-file@^0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/with-open-file/-/with-open-file-0.1.7.tgz#e2de8d974e8a8ae6e58886be4fe8e7465b58a729" @@ -11274,12 +11200,21 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: +write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: version "2.4.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== @@ -11288,7 +11223,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^3.0.0: +write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== @@ -11298,18 +11233,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write-json-file@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" - integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - pify "^3.0.0" - sort-keys "^2.0.0" - write-file-atomic "^2.0.0" - write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" @@ -11322,13 +11245,26 @@ write-json-file@^3.2.0: sort-keys "^2.0.0" write-file-atomic "^2.4.2" -write-pkg@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" - integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== +write-json-file@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-4.3.0.tgz#908493d6fd23225344af324016e4ca8f702dd12d" + integrity sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ== + dependencies: + detect-indent "^6.0.0" + graceful-fs "^4.1.15" + is-plain-obj "^2.0.0" + make-dir "^3.0.0" + sort-keys "^4.0.0" + write-file-atomic "^3.0.0" + +write-pkg@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" + integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== dependencies: sort-keys "^2.0.0" - write-json-file "^2.2.0" + type-fest "^0.4.1" + write-json-file "^3.2.0" ws@^6.2.1: version "6.2.1" @@ -11362,7 +11298,12 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + +yallist@^3.0.0, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -11377,6 +11318,11 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@20.x: version "20.2.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" @@ -11390,14 +11336,6 @@ yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -11406,6 +11344,11 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" @@ -11422,23 +11365,6 @@ yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^14.2.2: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - yargs@^15.0.2, yargs@^15.1.0, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -11456,6 +11382,19 @@ yargs@^15.0.2, yargs@^15.1.0, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yeoman-assert@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yeoman-assert/-/yeoman-assert-3.1.1.tgz#9f6fa0ecba7dd007c40f579668cb5dda18c79343" From d55a92b2ab79f62e40b1d9c6b19f6383ba9ebf39 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 28 Mar 2021 19:34:28 +0530 Subject: [PATCH 005/103] test: migrate version tests (#2562) --- .../version.test.js.snap.webpack4 | 343 ++++++++++++++++++ .../version.test.js.snap.webpack5 | 343 ++++++++++++++++++ test/version/version.test.js | 257 +++++-------- 3 files changed, 772 insertions(+), 171 deletions(-) create mode 100644 test/version/__snapshots__/version.test.js.snap.webpack4 create mode 100644 test/version/__snapshots__/version.test.js.snap.webpack5 diff --git a/test/version/__snapshots__/version.test.js.snap.webpack4 b/test/version/__snapshots__/version.test.js.snap.webpack4 new file mode 100644 index 00000000000..d8c44caf514 --- /dev/null +++ b/test/version/__snapshots__/version.test.js.snap.webpack4 @@ -0,0 +1,343 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`single version flag outputs version with b 1`] = `""`; + +exports[`single version flag outputs version with b 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with build 1`] = `""`; + +exports[`single version flag outputs version with build 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with bundle 1`] = `""`; + +exports[`single version flag outputs version with bundle 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info 1`] = `""`; + +exports[`single version flag outputs version with info 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using command alias 1`] = `""`; + +exports[`single version flag outputs version with info using command alias 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using command syntax 1`] = `""`; + +exports[`single version flag outputs version with info using command syntax 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using option alias 1`] = `""`; + +exports[`single version flag outputs version with info using option alias 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with init 1`] = `""`; + +exports[`single version flag outputs version with init 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with loader 1`] = `""`; + +exports[`single version flag outputs version with loader 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with migrate 1`] = `""`; + +exports[`single version flag outputs version with migrate 2`] = ` +"@webpack-cli/migrate x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with plugin 1`] = `""`; + +exports[`single version flag outputs version with plugin 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with serve 1`] = `""`; + +exports[`single version flag outputs version with serve 2`] = ` +"@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with the alias c for init 1`] = `""`; + +exports[`single version flag outputs version with the alias c for init 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with w 1`] = `""`; + +exports[`single version flag outputs version with w 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with watch 1`] = `""`; + +exports[`single version flag outputs version with watch 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --color using command syntax 1`] = `""`; + +exports[`single version flag outputs versions with --color using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --color using option syntax 1`] = `""`; + +exports[`single version flag outputs versions with --color using option syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --no-color using command syntax 1`] = `""`; + +exports[`single version flag outputs versions with --no-color using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --no-color using option syntax 1`] = `""`; + +exports[`single version flag outputs versions with --no-color using option syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with alias syntax 1`] = `""`; + +exports[`single version flag outputs versions with alias syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with command syntax 1`] = `""`; + +exports[`single version flag outputs versions with command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with dashed syntax 1`] = `""`; + +exports[`single version flag outputs versions with dashed syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 2`] = `""`; + +exports[`single version flag should log an error using command syntax with unknown argument #2 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with unknown argument #2 2`] = `""`; + +exports[`single version flag should log an error using command syntax with unknown argument 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with unknown argument 2`] = `""`; + +exports[`single version flag should log error when unknown command used 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used 2`] = `""`; + +exports[`single version flag should log error when unknown command used with --version flag 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used with --version flag 2`] = `""`; + +exports[`single version flag should log error when unknown command used with -v alias 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used with -v alias 2`] = `""`; + +exports[`single version flag should log error when unknown command using command syntax 1`] = ` +"[webpack-cli] Unknown command 'unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command using command syntax 2`] = `""`; + +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 1`] = ` +"[webpack-cli] Unknown command 'unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 2`] = `"@webpack-cli/info x.x.x"`; + +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 2`] = `"@webpack-cli/serve x.x.x"`; + +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 2`] = `"@webpack-cli/serve x.x.x"`; + +exports[`single version flag should not output version with help dashed 1`] = `""`; + +exports[`single version flag should not output version with help dashed 2`] = ` +"Usage: webpack version|v [commands...] + +Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`single version flag should output versions for multiple commands using command syntax 1`] = `""`; + +exports[`single version flag should output versions for multiple commands using command syntax 2`] = ` +"@webpack-cli/info x.x.x +@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should output versions with help command using command syntax 1`] = `""`; + +exports[`single version flag should output versions with help command using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work for multiple commands 1`] = `""`; + +exports[`single version flag should work for multiple commands 2`] = ` +"@webpack-cli/info x.x.x +@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work using command syntax and the "--version" argument 1`] = `""`; + +exports[`single version flag should work using command syntax and the "--version" argument 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work using command syntax with the "version" value 1`] = `""`; + +exports[`single version flag should work using command syntax with the "version" value 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag throws error if invalid option is passed with --version flag 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with --version flag 2`] = `""`; + +exports[`single version flag throws error if invalid option is passed with -v alias 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with -v alias 2`] = `""`; + +exports[`single version flag throws error if invalid option is passed with version command 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with version command 2`] = `""`; diff --git a/test/version/__snapshots__/version.test.js.snap.webpack5 b/test/version/__snapshots__/version.test.js.snap.webpack5 new file mode 100644 index 00000000000..d8c44caf514 --- /dev/null +++ b/test/version/__snapshots__/version.test.js.snap.webpack5 @@ -0,0 +1,343 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`single version flag outputs version with b 1`] = `""`; + +exports[`single version flag outputs version with b 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with build 1`] = `""`; + +exports[`single version flag outputs version with build 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with bundle 1`] = `""`; + +exports[`single version flag outputs version with bundle 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info 1`] = `""`; + +exports[`single version flag outputs version with info 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using command alias 1`] = `""`; + +exports[`single version flag outputs version with info using command alias 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using command syntax 1`] = `""`; + +exports[`single version flag outputs version with info using command syntax 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with info using option alias 1`] = `""`; + +exports[`single version flag outputs version with info using option alias 2`] = ` +"@webpack-cli/info x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with init 1`] = `""`; + +exports[`single version flag outputs version with init 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with loader 1`] = `""`; + +exports[`single version flag outputs version with loader 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with migrate 1`] = `""`; + +exports[`single version flag outputs version with migrate 2`] = ` +"@webpack-cli/migrate x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with plugin 1`] = `""`; + +exports[`single version flag outputs version with plugin 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with serve 1`] = `""`; + +exports[`single version flag outputs version with serve 2`] = ` +"@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with the alias c for init 1`] = `""`; + +exports[`single version flag outputs version with the alias c for init 2`] = ` +"@webpack-cli/generators x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with w 1`] = `""`; + +exports[`single version flag outputs version with w 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs version with watch 1`] = `""`; + +exports[`single version flag outputs version with watch 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --color using command syntax 1`] = `""`; + +exports[`single version flag outputs versions with --color using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --color using option syntax 1`] = `""`; + +exports[`single version flag outputs versions with --color using option syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --no-color using command syntax 1`] = `""`; + +exports[`single version flag outputs versions with --no-color using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with --no-color using option syntax 1`] = `""`; + +exports[`single version flag outputs versions with --no-color using option syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with alias syntax 1`] = `""`; + +exports[`single version flag outputs versions with alias syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with command syntax 1`] = `""`; + +exports[`single version flag outputs versions with command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag outputs versions with dashed syntax 1`] = `""`; + +exports[`single version flag outputs versions with dashed syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 2`] = `""`; + +exports[`single version flag should log an error using command syntax with unknown argument #2 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with unknown argument #2 2`] = `""`; + +exports[`single version flag should log an error using command syntax with unknown argument 1`] = ` +"[webpack-cli] Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log an error using command syntax with unknown argument 2`] = `""`; + +exports[`single version flag should log error when unknown command used 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used 2`] = `""`; + +exports[`single version flag should log error when unknown command used with --version flag 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used with --version flag 2`] = `""`; + +exports[`single version flag should log error when unknown command used with -v alias 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command used with -v alias 2`] = `""`; + +exports[`single version flag should log error when unknown command using command syntax 1`] = ` +"[webpack-cli] Unknown command 'unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log error when unknown command using command syntax 2`] = `""`; + +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 1`] = ` +"[webpack-cli] Unknown command 'unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 2`] = `"@webpack-cli/info x.x.x"`; + +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 2`] = `"@webpack-cli/serve x.x.x"`; + +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 1`] = ` +"[webpack-cli] Unknown command 'abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 2`] = `"@webpack-cli/serve x.x.x"`; + +exports[`single version flag should not output version with help dashed 1`] = `""`; + +exports[`single version flag should not output version with help dashed 2`] = ` +"Usage: webpack version|v [commands...] + +Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`single version flag should output versions for multiple commands using command syntax 1`] = `""`; + +exports[`single version flag should output versions for multiple commands using command syntax 2`] = ` +"@webpack-cli/info x.x.x +@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should output versions with help command using command syntax 1`] = `""`; + +exports[`single version flag should output versions with help command using command syntax 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work for multiple commands 1`] = `""`; + +exports[`single version flag should work for multiple commands 2`] = ` +"@webpack-cli/info x.x.x +@webpack-cli/serve x.x.x +webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work using command syntax and the "--version" argument 1`] = `""`; + +exports[`single version flag should work using command syntax and the "--version" argument 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag should work using command syntax with the "version" value 1`] = `""`; + +exports[`single version flag should work using command syntax with the "version" value 2`] = ` +"webpack x.x.x +webpack-cli x.x.x +webpack-dev-server x.x.x" +`; + +exports[`single version flag throws error if invalid option is passed with --version flag 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with --version flag 2`] = `""`; + +exports[`single version flag throws error if invalid option is passed with -v alias 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with -v alias 2`] = `""`; + +exports[`single version flag throws error if invalid option is passed with version command 1`] = ` +"[webpack-cli] Unknown option '--abc' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`single version flag throws error if invalid option is passed with version command 2`] = `""`; diff --git a/test/version/version.test.js b/test/version/version.test.js index de12599de27..e6331dd8fa6 100644 --- a/test/version/version.test.js +++ b/test/version/version.test.js @@ -1,421 +1,336 @@ 'use strict'; -const webpack = require('webpack'); - const { run } = require('../utils/test-utils'); -const pkgJSON = require('../../packages/webpack-cli/package.json'); -const servePkgJSON = require('../../packages/serve/package.json'); -const infoPkgJSON = require('../../packages/info/package.json'); -const generatorsPkgJSON = require('../../packages/generators/package.json'); -// eslint-disable-next-line node/no-unpublished-require -const webpackDevServerPkgJSON = require('webpack-dev-server/package.json'); + +const serializeSnapshot = (output) => { + return output.replace(/\d+.\d+.\d+/g, 'x.x.x'); +}; describe('single version flag', () => { it('outputs versions with command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with dashed syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with alias syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['-v']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with info', () => { const { exitCode, stderr, stdout } = run(__dirname, ['info', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with info using option alias', () => { const { exitCode, stderr, stdout } = run(__dirname, ['info', '-v']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with info using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with info using command alias', () => { const { exitCode, stderr, stdout } = run(__dirname, ['v', 'info']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with build', () => { const { exitCode, stderr, stdout } = run(__dirname, ['build', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with bundle', () => { const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with b', () => { const { exitCode, stderr, stdout } = run(__dirname, ['b', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with watch', () => { const { exitCode, stderr, stdout } = run(__dirname, ['watch', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with w', () => { const { exitCode, stderr, stdout } = run(__dirname, ['w', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with plugin', () => { const { exitCode, stderr, stdout } = run(__dirname, ['plugin', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/generators ${generatorsPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with loader', () => { const { exitCode, stderr, stdout } = run(__dirname, ['loader', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/generators ${generatorsPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with init', () => { const { exitCode, stderr, stdout } = run(__dirname, ['init', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/generators ${generatorsPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with serve', () => { const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/serve ${servePkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with migrate', () => { const { exitCode, stderr, stdout } = run(__dirname, ['migrate', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`@webpack-cli/migrate`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs version with the alias c for init', () => { const { exitCode, stderr, stdout } = run(__dirname, ['c', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/generators ${generatorsPkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should log error when unknown command using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should log version for known command and log error for unknown command using command syntax with multi commands', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should work for multiple commands', () => { const { exitCode, stderr, stdout } = run(__dirname, ['info', 'serve', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`@webpack-cli/serve ${servePkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should output versions for multiple commands using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'serve']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`@webpack-cli/info ${infoPkgJSON.version}`); - expect(stdout).toContain(`@webpack-cli/serve ${servePkgJSON.version}`); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should output versions with help command using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should log version for known command and log error for unknown command using the "--version" option', () => { const { exitCode, stderr, stdout } = run(__dirname, ['serve', 'abc', '--version']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toContain(`@webpack-cli/serve ${servePkgJSON.version}`); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should log version for known command and log error for unknown command using the "-v" option', () => { const { exitCode, stderr, stdout } = run(__dirname, ['serve', 'abc', '-v']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toContain(`@webpack-cli/serve ${servePkgJSON.version}`); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should not output version with help dashed', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain('webpack version|v [commands...]'); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with --color using option syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with --no-color using option syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with --color using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--color']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('outputs versions with --no-color using command syntax', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--no-color']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should log error when unknown command used', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'abc']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('throws error if invalid option is passed with version command', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--abc']); expect(exitCode).toBe(2); - expect(stderr).toContain(`Unknown option '--abc`); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should log error when unknown command used with --version flag', () => { const { exitCode, stderr, stdout } = run(__dirname, ['--version', 'abc']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('throws error if invalid option is passed with --version flag', () => { const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--abc']); expect(exitCode).toBe(2); - expect(stderr).toContain(`Unknown option '--abc'`); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should log error when unknown command used with -v alias', () => { const { exitCode, stderr, stdout } = run(__dirname, ['-v', 'abc']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command 'abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('throws error if invalid option is passed with -v alias', () => { const { exitCode, stderr, stdout } = run(__dirname, ['-v', '--abc']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown option '--abc'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should work using command syntax with the "version" value', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should work using command syntax and the "--version" argument', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`); - expect(stdout).toContain(`webpack ${webpack.version}`); - expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`); + expect(stderr).toMatchSnapshot(); + expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); it('should log an error using command syntax with unknown argument', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown option '--unknown'"); - expect(stderr).toContain(`Run 'webpack --help' to see available commands and options`); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should log an error using command syntax with unknown argument #2', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); it('should log an error using command syntax with multiple commands with unknown argument', () => { const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'serve', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(serializeSnapshot(stderr)).toMatchSnapshot(); + expect(stdout).toMatchSnapshot(); }); }); From 467f39e8df2250d84f75ed0e1217c6c7e6c72efe Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Mon, 29 Mar 2021 16:17:24 +0530 Subject: [PATCH 006/103] refactor: imports in generator (#2570) --- .../__tests__/addon-generator.test.ts | 5 ++--- .../__tests__/loader-generator.test.ts | 9 ++++++--- .../__tests__/plugin-generator.test.ts | 9 ++++++--- packages/generators/src/addon-generator.ts | 20 ++++++++++++------- packages/generators/src/index.ts | 6 +++--- packages/generators/src/init-generator.ts | 17 ++++++++-------- 6 files changed, 39 insertions(+), 27 deletions(-) diff --git a/packages/generators/__tests__/addon-generator.test.ts b/packages/generators/__tests__/addon-generator.test.ts index 16322b95e99..b10843483fc 100644 --- a/packages/generators/__tests__/addon-generator.test.ts +++ b/packages/generators/__tests__/addon-generator.test.ts @@ -3,10 +3,9 @@ jest.mock('webpack-cli/lib/utils/get-package-manager', () => jest.fn()); import fs from 'fs'; import path from 'path'; import rimraf from 'rimraf'; -import { utils } from 'webpack-cli'; import addonGenerator from '../src/addon-generator'; -const { getPackageManager } = utils; +import utils, { getPackageManager } from '../../webpack-cli/lib/utils'; describe('addon generator', () => { let gen, installMock, packageMock; @@ -25,7 +24,7 @@ describe('addon generator', () => { beforeEach(() => { const Gen = addonGenerator([], '', [], [], () => ({})); - gen = new Gen(null, null); + gen = new Gen(null, { cli: { utils } }); gen.props = { name: genName, }; diff --git a/packages/generators/__tests__/loader-generator.test.ts b/packages/generators/__tests__/loader-generator.test.ts index cf3be1e86eb..b867c024d7c 100644 --- a/packages/generators/__tests__/loader-generator.test.ts +++ b/packages/generators/__tests__/loader-generator.test.ts @@ -4,13 +4,16 @@ import { run } from 'yeoman-test'; import * as assert from 'yeoman-assert'; import { makeLoaderName } from '../src/loader-generator'; +import utils from '../../webpack-cli/lib/utils'; describe('loader generator', () => { it('generates a default loader', async () => { const loaderName = 'my-test-loader'; - const outputDir = await run(join(__dirname, '../src/loader-generator.ts')).withPrompts({ - name: loaderName, - }); + const outputDir = await run(join(__dirname, '../src/loader-generator.ts')) + .withPrompts({ + name: loaderName, + }) + .withOptions({ cli: { utils } }); const loaderDir = join(outputDir, loaderName); const srcFiles = ['cjs.js', 'index.js']; const testFiles = ['functional.test.js', 'test-utils.js', 'unit.test.js', 'fixtures/simple-file.js']; diff --git a/packages/generators/__tests__/plugin-generator.test.ts b/packages/generators/__tests__/plugin-generator.test.ts index baecf51c450..b968ae0ffc1 100644 --- a/packages/generators/__tests__/plugin-generator.test.ts +++ b/packages/generators/__tests__/plugin-generator.test.ts @@ -2,13 +2,16 @@ import { join } from 'path'; // eslint-disable-next-line node/no-extraneous-import import { run } from 'yeoman-test'; import * as assert from 'yeoman-assert'; +import utils from '../../webpack-cli/lib/utils'; describe('plugin generator', () => { it('generates a default plugin', async () => { const pluginName = 'my-test-plugin'; - const outputDir = await run(join(__dirname, '../src/plugin-generator.ts')).withPrompts({ - name: pluginName, - }); + const outputDir = await run(join(__dirname, '../src/plugin-generator.ts')) + .withPrompts({ + name: pluginName, + }) + .withOptions({ cli: { utils } }); const pluginDir = join(outputDir, pluginName); const srcFiles = ['cjs.js', 'index.js']; const testFiles = ['functional.test.js', 'test-utils.js']; diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index dee481dceec..6eff6ffee34 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -3,10 +3,6 @@ import path from 'path'; import Generator from 'yeoman-generator'; import { generatorCopy, generatorCopyTpl } from './utils/copy-utils'; -import { utils } from 'webpack-cli'; - -const { logger, getPackageManager } = utils; - /** * Creates a Yeoman Generator that generates a project conforming * to webpack-defaults. @@ -37,6 +33,16 @@ const addonGenerator = ( templateFn: (instance: any) => Record, ): Generator.GeneratorConstructor => { return class extends Generator { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public utils: any; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public constructor(args: any, opts: any) { + super(args, opts); + const { cli = {} } = opts || {}; + this.utils = cli && cli.utils; + } + public props: Generator.Question; public copy: (value: string, index: number, array: string[]) => void; public copyTpl: (value: string, index: number, array: string[]) => void; @@ -58,8 +64,8 @@ const addonGenerator = ( try { fs.mkdirSync(pathToProjectDir, { recursive: true }); } catch (error) { - logger.error('Failed to create directory'); - logger.error(error); + this.utils.logger.error('Failed to create directory'); + this.utils.logger.error(error); } this.destinationRoot(pathToProjectDir); } @@ -78,7 +84,7 @@ const addonGenerator = ( } public install(): void { - const packager = getPackageManager(); + const packager = this.utils.getPackageManager(); const opts: { dev?: boolean; 'save-dev'?: boolean; diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index 273293bac8d..83212e8ff61 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -38,7 +38,7 @@ class GeneratorsCommand { env.registerStub(initGenerator, generatorName); - env.run(generatorName, { options }, () => { + env.run(generatorName, { options, cli }, () => { logger.success('Project has been initialised with webpack!'); }); }, @@ -59,7 +59,7 @@ class GeneratorsCommand { env.registerStub(loaderGenerator, generatorName); - env.run(generatorName, () => { + env.run(generatorName, { cli }, () => { logger.success('Loader template has been successfully scaffolded.'); }); }, @@ -80,7 +80,7 @@ class GeneratorsCommand { env.registerStub(pluginGenerator, generatorName); - env.run(generatorName, () => { + env.run(generatorName, { cli }, () => { logger.success('Plugin template has been successfully scaffolded.'); }); }, diff --git a/packages/generators/src/init-generator.ts b/packages/generators/src/init-generator.ts index 77a3cb4aab0..0c82336f8bb 100644 --- a/packages/generators/src/init-generator.ts +++ b/packages/generators/src/init-generator.ts @@ -1,5 +1,4 @@ import { blue, yellow } from 'colorette'; -import { utils } from 'webpack-cli'; import path from 'path'; import * as Question from './utils/scaffold-utils'; @@ -7,8 +6,6 @@ import { CustomGenerator } from './types'; import { existsSync, mkdirSync } from 'fs'; import handlers from './handlers'; -const { logger, getPackageManager } = utils; - /** * * Generator for initializing a webpack config @@ -25,6 +22,8 @@ export default class InitGenerator extends CustomGenerator { public supportedTemplates: string[]; public answers: Record; public force: boolean; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public utils: any; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any public constructor(args: any, opts: any) { @@ -39,22 +38,24 @@ export default class InitGenerator extends CustomGenerator { this.dependencies = ['webpack', 'webpack-cli']; this.supportedTemplates = Object.keys(handlers); this.answers = {}; + const { cli } = opts; + this.utils = cli.utils; } // eslint-disable-next-line @typescript-eslint/no-explicit-any public async prompting(): Promise { if (!existsSync(this.resolvedGenerationPath)) { - logger.log(`${blue('ℹ INFO ')} supplied generation path doesn't exist, required folders will be created.`); + this.utils.logger.log(`${blue('ℹ INFO ')} supplied generation path doesn't exist, required folders will be created.`); try { mkdirSync(this.resolvedGenerationPath, { recursive: true }); } catch (error) { - logger.error(`Failed to create directory.\n ${error}`); + this.utils.logger.error(`Failed to create directory.\n ${error}`); process.exit(2); } } if (!this.supportedTemplates.includes(this.template)) { - logger.log(`${yellow(`⚠ ${this.template} is not a valid template, please select one from below`)}`); + this.utils.logger.log(`${yellow(`⚠ ${this.template} is not a valid template, please select one from below`)}`); const { selectedTemplate } = await Question.List( this, @@ -72,7 +73,7 @@ export default class InitGenerator extends CustomGenerator { } public installPlugins(): void { - const packager = getPackageManager(); + const packager = this.utils.getPackageManager(); const opts: { dev?: boolean; 'save-dev'?: boolean; @@ -82,7 +83,7 @@ export default class InitGenerator extends CustomGenerator { } public writing(): void { - logger.log(`${blue('ℹ INFO ')} Initialising project...`); + this.utils.logger.log(`${blue('ℹ INFO ')} Initialising project...`); handlers[this.template].generate(this); } } From 4e608c693b23d0562202c2ddea8187d9041d3ac6 Mon Sep 17 00:00:00 2001 From: James George Date: Mon, 29 Mar 2021 16:22:05 +0530 Subject: [PATCH 007/103] test: init generator throws if the path is not writable (#2574) --- test/init/init.test.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/init/init.test.js b/test/init/init.test.js index b845df84655..ba114582eec 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -2,7 +2,7 @@ const { mkdirSync, existsSync, readFileSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { run, runPromptWithAnswers } = require('../utils/test-utils'); +const { isWindows, run, runPromptWithAnswers } = require('../utils/test-utils'); const assetsPath = resolve(__dirname, './test-assets'); const ENTER = '\x0D'; @@ -336,4 +336,16 @@ describe('init command', () => { // Check if the generated webpack configuration matches the snapshot expect(readFromWebpackConfig(assetsPath)).toMatchSnapshot(); }); + + it('should throw if the current path is not writable', async () => { + const projectPath = join(assetsPath, 'non-writable-path'); + mkdirSync(projectPath, 0o500); + const { exitCode, stderr } = await run(projectPath, ['init', 'my-app'], { reject: false }); + + if (isWindows) { + return; + } + expect(exitCode).toBe(2); + expect(stderr).toContain('Failed to create directory'); + }); }); From 67eeaaf66ed5b6b3b705c2b595e3923f2cb725e6 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Mon, 29 Mar 2021 16:26:55 +0530 Subject: [PATCH 008/103] feat: make extention case insensitive (#2572) --- .../default/webpack.configjs.tpl | 8 +++--- .../__snapshots__/init.test.js.snap.webpack4 | 28 +++++++++---------- .../__snapshots__/init.test.js.snap.webpack5 | 28 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index e28bd23cb96..5c4198abf11 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -23,11 +23,11 @@ module.exports = { module: { rules: [<% if (langType == "ES6") { %> { - test: /\\.(js|jsx)$/, + test: /\\.(js|jsx)$/i, loader: 'babel-loader', },<% } %><% if (langType == "Typescript") { %> { - test: /\\.(ts|tsx)$/, + test: /\\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], },<% } %><% if (isCSS && !isPostCSS) { %> @@ -44,7 +44,7 @@ module.exports = { use: [<% if (isPostCSS) { %>'style-loader', 'css-loader', 'postcss-loader', <% } %>'less-loader'], },<% } %><% if (cssType == 'Stylus') { %> { - test: /\.styl$/, + test: /\.styl$/i, use: [<% if (isPostCSS) { %>'style-loader', 'css-loader', 'postcss-loader', <% } %>'stylus-loader'], },<% } %><% if (isPostCSS && isCSS) { %> { @@ -52,7 +52,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader'], },<% } %> { - test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 83dad4cd983..503c5158017 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -62,7 +62,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -121,7 +121,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -174,7 +174,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -224,11 +224,11 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(js|jsx)$/, + test: /\\\\\\\\.(js|jsx)$/i, loader: 'babel-loader', }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -340,12 +340,12 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(ts|tsx)$/, + test: /\\\\\\\\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -401,7 +401,7 @@ module.exports = { use: ['less-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -434,7 +434,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -496,7 +496,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -549,7 +549,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'sass-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -605,7 +605,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -654,11 +654,11 @@ module.exports = { module: { rules: [ { - test: /\\\\.styl$/, + test: /\\\\.styl$/i, use: ['stylus-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 83dad4cd983..503c5158017 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -62,7 +62,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -121,7 +121,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -174,7 +174,7 @@ module.exports = { module: { rules: [ { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -224,11 +224,11 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(js|jsx)$/, + test: /\\\\\\\\.(js|jsx)$/i, loader: 'babel-loader', }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -340,12 +340,12 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(ts|tsx)$/, + test: /\\\\\\\\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -401,7 +401,7 @@ module.exports = { use: ['less-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -434,7 +434,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -496,7 +496,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -549,7 +549,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'sass-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -605,7 +605,7 @@ module.exports = { use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, @@ -654,11 +654,11 @@ module.exports = { module: { rules: [ { - test: /\\\\.styl$/, + test: /\\\\.styl$/i, use: ['stylus-loader'], }, { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/, + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: 'asset', }, From 177dca7c20fff0708721426598fcd5a89384eb8e Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 29 Mar 2021 18:57:28 +0530 Subject: [PATCH 009/103] fix: correct webpack config for `babel-loader` and `ts-loader` (#2577) --- .../generators/init-template/default/webpack.configjs.tpl | 4 ++-- test/init/__snapshots__/init.test.js.snap.webpack4 | 4 ++-- test/init/__snapshots__/init.test.js.snap.webpack5 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index 5c4198abf11..e20b6e37961 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -23,11 +23,11 @@ module.exports = { module: { rules: [<% if (langType == "ES6") { %> { - test: /\\.(js|jsx)$/i, + test: /\.(js|jsx)$/i, loader: 'babel-loader', },<% } %><% if (langType == "Typescript") { %> { - test: /\\.(ts|tsx)$/i, + test: /\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], },<% } %><% if (isCSS && !isPostCSS) { %> diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 503c5158017..5e0cc7483ad 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -224,7 +224,7 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(js|jsx)$/i, + test: /\\\\.(js|jsx)$/i, loader: 'babel-loader', }, { @@ -340,7 +340,7 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(ts|tsx)$/i, + test: /\\\\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], }, diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 503c5158017..5e0cc7483ad 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -224,7 +224,7 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(js|jsx)$/i, + test: /\\\\.(js|jsx)$/i, loader: 'babel-loader', }, { @@ -340,7 +340,7 @@ module.exports = { module: { rules: [ { - test: /\\\\\\\\.(ts|tsx)$/i, + test: /\\\\.(ts|tsx)$/i, loader: 'ts-loader', exclude: ['/node_modules/'], }, From 3d6ae4db9b5d720209c9f92dc47d2573864ffabd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 14:39:56 +0300 Subject: [PATCH 010/103] chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.19.0 to 4.20.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.20.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 82 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3e8ce821376..7d8787ed61f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2018,12 +2018,12 @@ "@types/yeoman-generator" "*" "@typescript-eslint/eslint-plugin@^4.14.1": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz#56f8da9ee118fe9763af34d6a526967234f6a7f0" - integrity sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw== + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.20.0.tgz#9d8794bd99aad9153092ad13c96164e3082e9a92" + integrity sha512-sw+3HO5aehYqn5w177z2D82ZQlqHCwcKSMboueo7oE4KU9QiC0SAgfS/D4z9xXvpTc8Bt41Raa9fBR8T2tIhoQ== dependencies: - "@typescript-eslint/experimental-utils" "4.19.0" - "@typescript-eslint/scope-manager" "4.19.0" + "@typescript-eslint/experimental-utils" "4.20.0" + "@typescript-eslint/scope-manager" "4.20.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -2031,15 +2031,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz#9ca379919906dc72cb0fcd817d6cb5aa2d2054c6" - integrity sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA== +"@typescript-eslint/experimental-utils@4.20.0": + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz#a8ab2d7b61924f99042b7d77372996d5f41dc44b" + integrity sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.19.0" - "@typescript-eslint/types" "4.19.0" - "@typescript-eslint/typescript-estree" "4.19.0" + "@typescript-eslint/scope-manager" "4.20.0" + "@typescript-eslint/types" "4.20.0" + "@typescript-eslint/typescript-estree" "4.20.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -2061,11 +2061,24 @@ "@typescript-eslint/types" "4.19.0" "@typescript-eslint/visitor-keys" "4.19.0" +"@typescript-eslint/scope-manager@4.20.0": + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca" + integrity sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ== + dependencies: + "@typescript-eslint/types" "4.20.0" + "@typescript-eslint/visitor-keys" "4.20.0" + "@typescript-eslint/types@4.19.0": version "4.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.19.0.tgz#5181d5d2afd02e5b8f149ebb37ffc8bd7b07a568" integrity sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA== +"@typescript-eslint/types@4.20.0": + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" + integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== + "@typescript-eslint/typescript-estree@4.19.0": version "4.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz#8a709ffa400284ab72df33376df085e2e2f61147" @@ -2079,6 +2092,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.20.0": + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" + integrity sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA== + dependencies: + "@typescript-eslint/types" "4.20.0" + "@typescript-eslint/visitor-keys" "4.20.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.19.0": version "4.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz#cbea35109cbd9b26e597644556be4546465d8f7f" @@ -2087,6 +2113,14 @@ "@typescript-eslint/types" "4.19.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.20.0": + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" + integrity sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A== + dependencies: + "@typescript-eslint/types" "4.20.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" @@ -3710,7 +3744,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -3731,13 +3765,6 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -9550,10 +9577,10 @@ semver@7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@7.x, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== +semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" @@ -9562,13 +9589,6 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.1, semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" From f7251217c541026e1c7f0b26d0cb34d7019903f5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 14:40:05 +0300 Subject: [PATCH 011/103] chore(deps): [security] bump y18n from 4.0.0 to 4.0.1 (#2580) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.** - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7d8787ed61f..d1d055f6e68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11314,9 +11314,9 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== y18n@^5.0.5: version "5.0.5" From 4dc7a418582b638b2e6957ca2c5935d048d36563 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 18:26:00 +0300 Subject: [PATCH 012/103] chore(deps-dev): bump @typescript-eslint/parser Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.19.0 to 4.20.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.20.0/packages/parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 46 ++++++---------------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/yarn.lock b/yarn.lock index d1d055f6e68..4ca024ef71e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2044,23 +2044,15 @@ eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.14.1": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.19.0.tgz#4ae77513b39f164f1751f21f348d2e6cb2d11128" - integrity sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA== + version "4.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.20.0.tgz#8dd403c8b4258b99194972d9799e201b8d083bdd" + integrity sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA== dependencies: - "@typescript-eslint/scope-manager" "4.19.0" - "@typescript-eslint/types" "4.19.0" - "@typescript-eslint/typescript-estree" "4.19.0" + "@typescript-eslint/scope-manager" "4.20.0" + "@typescript-eslint/types" "4.20.0" + "@typescript-eslint/typescript-estree" "4.20.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz#5e0b49eca4df7684205d957c9856f4e720717a4f" - integrity sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g== - dependencies: - "@typescript-eslint/types" "4.19.0" - "@typescript-eslint/visitor-keys" "4.19.0" - "@typescript-eslint/scope-manager@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca" @@ -2069,29 +2061,11 @@ "@typescript-eslint/types" "4.20.0" "@typescript-eslint/visitor-keys" "4.20.0" -"@typescript-eslint/types@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.19.0.tgz#5181d5d2afd02e5b8f149ebb37ffc8bd7b07a568" - integrity sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA== - "@typescript-eslint/types@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== -"@typescript-eslint/typescript-estree@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz#8a709ffa400284ab72df33376df085e2e2f61147" - integrity sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA== - dependencies: - "@typescript-eslint/types" "4.19.0" - "@typescript-eslint/visitor-keys" "4.19.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" @@ -2105,14 +2079,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz#cbea35109cbd9b26e597644556be4546465d8f7f" - integrity sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A== - dependencies: - "@typescript-eslint/types" "4.19.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" From c8f702ac399252b8e5da899e6014a2832321caa3 Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 31 Mar 2021 22:44:02 +0530 Subject: [PATCH 013/103] feat: add --template flag for addon generator (#2576) * feat: add --template flag for addon generator * test: fix failing tests * chore: handle invalid template * refactor: leverage logger helper * test: add unit test to ensure template falls back to the default value --- README.md | 4 +-- .../__tests__/addon-generator.test.ts | 4 +-- .../__tests__/loader-generator.test.ts | 32 +++++++++++++++++- .../__tests__/plugin-generator.test.ts | 32 +++++++++++++++++- .../examples/simple/src/index.js.tpl | 0 .../examples/simple/src/lazy-module.js.tpl | 0 .../simple/src/static-esm-module.js.tpl | 0 .../examples/simple/webpack.config.js.tpl | 0 .../{ => default}/src/_index.js.tpl | 0 .../{ => default}/src/cjs.js.tpl | 0 .../test/fixtures/simple-file.js.tpl | 0 .../{ => default}/test/functional.test.js.tpl | 0 .../{ => default}/test/test-utils.js.tpl | 0 .../{ => default}/test/unit.test.js.tpl | 0 .../examples/simple/_webpack.config.js.tpl | 0 .../examples/simple/src/index.js.tpl | 0 .../examples/simple/src/lazy-module.js.tpl | 0 .../simple/src/static-esm-module.js.tpl | 0 .../{ => default}/src/_index.js.tpl | 0 .../{ => default}/src/cjs.js.tpl | 0 .../test/fixtures/simple-file.js.tpl | 0 .../{ => default}/test/functional.test.js.tpl | 0 .../{ => default}/test/test-utils.js.tpl | 0 packages/generators/src/addon-generator.ts | 33 ++++++++++++++++--- packages/generators/src/index.ts | 30 ++++++++++++----- .../__snapshots__/help.test.js.snap.webpack4 | 28 +++++++++------- .../__snapshots__/help.test.js.snap.webpack5 | 28 +++++++++------- test/loader/loader.test.js | 5 +++ test/plugin/plugin.test.js | 5 +++ 29 files changed, 161 insertions(+), 40 deletions(-) rename packages/generators/loader-template/{ => default}/examples/simple/src/index.js.tpl (100%) rename packages/generators/loader-template/{ => default}/examples/simple/src/lazy-module.js.tpl (100%) rename packages/generators/loader-template/{ => default}/examples/simple/src/static-esm-module.js.tpl (100%) rename packages/generators/loader-template/{ => default}/examples/simple/webpack.config.js.tpl (100%) rename packages/generators/loader-template/{ => default}/src/_index.js.tpl (100%) rename packages/generators/loader-template/{ => default}/src/cjs.js.tpl (100%) rename packages/generators/loader-template/{ => default}/test/fixtures/simple-file.js.tpl (100%) rename packages/generators/loader-template/{ => default}/test/functional.test.js.tpl (100%) rename packages/generators/loader-template/{ => default}/test/test-utils.js.tpl (100%) rename packages/generators/loader-template/{ => default}/test/unit.test.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/examples/simple/_webpack.config.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/examples/simple/src/index.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/examples/simple/src/lazy-module.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/examples/simple/src/static-esm-module.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/src/_index.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/src/cjs.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/test/fixtures/simple-file.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/test/functional.test.js.tpl (100%) rename packages/generators/plugin-template/{ => default}/test/test-utils.js.tpl (100%) diff --git a/README.md b/README.md index 31ee39461c3..eb83e891637 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ Thus, webpack CLI provides different commands for many common tasks. - [`init|c [generation-path] [options]`](./INIT.md#webpack-cli-init) - Create a new webpack project. - [`info|i [options]`](./packages/info/README.md#webpack-cli-info) - Returns information related to the local environment. - [`migrate|m [new-config-path]`](https://www.npmjs.com/package/@webpack-cli/migrate) - Migrate project from one version to another. -- [`plugin|p [output-path]`](./packages/generators#generators) - Initiate new plugin project. -- [`loader|l [output-path]`](./packages/generators#generators) - Initiate new loader project. +- [`plugin|p [output-path] [options]`](./packages/generators#generators) - Initiate new plugin project. +- [`loader|l [output-path] [options]`](./packages/generators#generators) - Initiate new loader project. - [`serve|s [entries...] [options]`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading. - `version|v [commands...]` - Output the version number of `webpack`, `webpack-cli`, `webpack-dev-server`, and commands - `watch|w [entries...] [options]` - Run webpack and watch for files changes. diff --git a/packages/generators/__tests__/addon-generator.test.ts b/packages/generators/__tests__/addon-generator.test.ts index b10843483fc..9e428dfee27 100644 --- a/packages/generators/__tests__/addon-generator.test.ts +++ b/packages/generators/__tests__/addon-generator.test.ts @@ -22,9 +22,9 @@ describe('addon generator', () => { }); beforeEach(() => { - const Gen = addonGenerator([], '', [], [], () => ({})); + const Gen = addonGenerator([], path.join(__dirname, '..', 'loader-template'), [], [], () => ({})); - gen = new Gen(null, { cli: { utils } }); + gen = new Gen(null, { cli: { utils }, options: { template: 'default' } }); gen.props = { name: genName, }; diff --git a/packages/generators/__tests__/loader-generator.test.ts b/packages/generators/__tests__/loader-generator.test.ts index b867c024d7c..cfc104d9b99 100644 --- a/packages/generators/__tests__/loader-generator.test.ts +++ b/packages/generators/__tests__/loader-generator.test.ts @@ -13,7 +13,7 @@ describe('loader generator', () => { .withPrompts({ name: loaderName, }) - .withOptions({ cli: { utils } }); + .withOptions({ cli: { utils }, options: { template: 'default' } }); const loaderDir = join(outputDir, loaderName); const srcFiles = ['cjs.js', 'index.js']; const testFiles = ['functional.test.js', 'test-utils.js', 'unit.test.js', 'fixtures/simple-file.js']; @@ -38,6 +38,36 @@ describe('loader generator', () => { // higher timeout so travis has enough time to execute }, 10000); + + it('generates a default loader assuming the default template', async () => { + const loaderName = 'my-test-loader'; + const outputDir = await run(join(__dirname, '../src/loader-generator.ts')) + .withPrompts({ + name: loaderName, + }) + .withOptions({ cli: { utils }, options: {} }); + const loaderDir = join(outputDir, loaderName); + const srcFiles = ['cjs.js', 'index.js']; + const testFiles = ['functional.test.js', 'test-utils.js', 'unit.test.js', 'fixtures/simple-file.js']; + const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; + + // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem + // assert for src files + assert.file(srcFiles.map((file) => join(loaderDir, 'src', file))); + + // assert for test files + assert.file(testFiles.map((file) => join(loaderDir, 'test', file))); + + // assert for example files + assert.file(exampleFiles.map((file) => join(loaderDir, 'examples/simple', file))); + + // Check the contents of the webpack config and loader file + assert.fileContent([ + [join(loaderDir, 'examples/simple/webpack.config.js'), /resolveLoader: {/], + [join(loaderDir, 'src/index.js'), /module.exports = function loader\(source\) {/], + [join(loaderDir, 'package.json'), new RegExp(loaderName)], + ]); + }, 10000); }); describe('makeLoaderName', () => { diff --git a/packages/generators/__tests__/plugin-generator.test.ts b/packages/generators/__tests__/plugin-generator.test.ts index b968ae0ffc1..a754dd1ca78 100644 --- a/packages/generators/__tests__/plugin-generator.test.ts +++ b/packages/generators/__tests__/plugin-generator.test.ts @@ -11,7 +11,7 @@ describe('plugin generator', () => { .withPrompts({ name: pluginName, }) - .withOptions({ cli: { utils } }); + .withOptions({ cli: { utils }, options: { template: 'default' } }); const pluginDir = join(outputDir, pluginName); const srcFiles = ['cjs.js', 'index.js']; const testFiles = ['functional.test.js', 'test-utils.js']; @@ -36,4 +36,34 @@ describe('plugin generator', () => { // higher timeout so travis has enough time to execute }, 10000); + + it('generates a default plugin assuming the default template', async () => { + const pluginName = 'my-test-plugin'; + const outputDir = await run(join(__dirname, '../src/plugin-generator.ts')) + .withPrompts({ + name: pluginName, + }) + .withOptions({ cli: { utils }, options: {} }); + const pluginDir = join(outputDir, pluginName); + const srcFiles = ['cjs.js', 'index.js']; + const testFiles = ['functional.test.js', 'test-utils.js']; + const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; + + // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem + // assert for src files + assert.file(srcFiles.map((file) => join(pluginDir, 'src', file))); + + // assert for test files + assert.file(testFiles.map((file) => join(pluginDir, 'test', file))); + + // assert for example files + assert.file(exampleFiles.map((file) => join(pluginDir, 'examples/simple', file))); + + // Check the contents of the webpack config and loader file + assert.fileContent([ + [join(pluginDir, 'examples/simple/webpack.config.js'), /new MyTestPlugin\(\)/], + [join(pluginDir, 'src/index.js'), /compiler\.hooks\.done\.tap/], + [join(pluginDir, 'package.json'), new RegExp(pluginName)], + ]); + }, 10000); }); diff --git a/packages/generators/loader-template/examples/simple/src/index.js.tpl b/packages/generators/loader-template/default/examples/simple/src/index.js.tpl similarity index 100% rename from packages/generators/loader-template/examples/simple/src/index.js.tpl rename to packages/generators/loader-template/default/examples/simple/src/index.js.tpl diff --git a/packages/generators/loader-template/examples/simple/src/lazy-module.js.tpl b/packages/generators/loader-template/default/examples/simple/src/lazy-module.js.tpl similarity index 100% rename from packages/generators/loader-template/examples/simple/src/lazy-module.js.tpl rename to packages/generators/loader-template/default/examples/simple/src/lazy-module.js.tpl diff --git a/packages/generators/loader-template/examples/simple/src/static-esm-module.js.tpl b/packages/generators/loader-template/default/examples/simple/src/static-esm-module.js.tpl similarity index 100% rename from packages/generators/loader-template/examples/simple/src/static-esm-module.js.tpl rename to packages/generators/loader-template/default/examples/simple/src/static-esm-module.js.tpl diff --git a/packages/generators/loader-template/examples/simple/webpack.config.js.tpl b/packages/generators/loader-template/default/examples/simple/webpack.config.js.tpl similarity index 100% rename from packages/generators/loader-template/examples/simple/webpack.config.js.tpl rename to packages/generators/loader-template/default/examples/simple/webpack.config.js.tpl diff --git a/packages/generators/loader-template/src/_index.js.tpl b/packages/generators/loader-template/default/src/_index.js.tpl similarity index 100% rename from packages/generators/loader-template/src/_index.js.tpl rename to packages/generators/loader-template/default/src/_index.js.tpl diff --git a/packages/generators/loader-template/src/cjs.js.tpl b/packages/generators/loader-template/default/src/cjs.js.tpl similarity index 100% rename from packages/generators/loader-template/src/cjs.js.tpl rename to packages/generators/loader-template/default/src/cjs.js.tpl diff --git a/packages/generators/loader-template/test/fixtures/simple-file.js.tpl b/packages/generators/loader-template/default/test/fixtures/simple-file.js.tpl similarity index 100% rename from packages/generators/loader-template/test/fixtures/simple-file.js.tpl rename to packages/generators/loader-template/default/test/fixtures/simple-file.js.tpl diff --git a/packages/generators/loader-template/test/functional.test.js.tpl b/packages/generators/loader-template/default/test/functional.test.js.tpl similarity index 100% rename from packages/generators/loader-template/test/functional.test.js.tpl rename to packages/generators/loader-template/default/test/functional.test.js.tpl diff --git a/packages/generators/loader-template/test/test-utils.js.tpl b/packages/generators/loader-template/default/test/test-utils.js.tpl similarity index 100% rename from packages/generators/loader-template/test/test-utils.js.tpl rename to packages/generators/loader-template/default/test/test-utils.js.tpl diff --git a/packages/generators/loader-template/test/unit.test.js.tpl b/packages/generators/loader-template/default/test/unit.test.js.tpl similarity index 100% rename from packages/generators/loader-template/test/unit.test.js.tpl rename to packages/generators/loader-template/default/test/unit.test.js.tpl diff --git a/packages/generators/plugin-template/examples/simple/_webpack.config.js.tpl b/packages/generators/plugin-template/default/examples/simple/_webpack.config.js.tpl similarity index 100% rename from packages/generators/plugin-template/examples/simple/_webpack.config.js.tpl rename to packages/generators/plugin-template/default/examples/simple/_webpack.config.js.tpl diff --git a/packages/generators/plugin-template/examples/simple/src/index.js.tpl b/packages/generators/plugin-template/default/examples/simple/src/index.js.tpl similarity index 100% rename from packages/generators/plugin-template/examples/simple/src/index.js.tpl rename to packages/generators/plugin-template/default/examples/simple/src/index.js.tpl diff --git a/packages/generators/plugin-template/examples/simple/src/lazy-module.js.tpl b/packages/generators/plugin-template/default/examples/simple/src/lazy-module.js.tpl similarity index 100% rename from packages/generators/plugin-template/examples/simple/src/lazy-module.js.tpl rename to packages/generators/plugin-template/default/examples/simple/src/lazy-module.js.tpl diff --git a/packages/generators/plugin-template/examples/simple/src/static-esm-module.js.tpl b/packages/generators/plugin-template/default/examples/simple/src/static-esm-module.js.tpl similarity index 100% rename from packages/generators/plugin-template/examples/simple/src/static-esm-module.js.tpl rename to packages/generators/plugin-template/default/examples/simple/src/static-esm-module.js.tpl diff --git a/packages/generators/plugin-template/src/_index.js.tpl b/packages/generators/plugin-template/default/src/_index.js.tpl similarity index 100% rename from packages/generators/plugin-template/src/_index.js.tpl rename to packages/generators/plugin-template/default/src/_index.js.tpl diff --git a/packages/generators/plugin-template/src/cjs.js.tpl b/packages/generators/plugin-template/default/src/cjs.js.tpl similarity index 100% rename from packages/generators/plugin-template/src/cjs.js.tpl rename to packages/generators/plugin-template/default/src/cjs.js.tpl diff --git a/packages/generators/plugin-template/test/fixtures/simple-file.js.tpl b/packages/generators/plugin-template/default/test/fixtures/simple-file.js.tpl similarity index 100% rename from packages/generators/plugin-template/test/fixtures/simple-file.js.tpl rename to packages/generators/plugin-template/default/test/fixtures/simple-file.js.tpl diff --git a/packages/generators/plugin-template/test/functional.test.js.tpl b/packages/generators/plugin-template/default/test/functional.test.js.tpl similarity index 100% rename from packages/generators/plugin-template/test/functional.test.js.tpl rename to packages/generators/plugin-template/default/test/functional.test.js.tpl diff --git a/packages/generators/plugin-template/test/test-utils.js.tpl b/packages/generators/plugin-template/default/test/test-utils.js.tpl similarity index 100% rename from packages/generators/plugin-template/test/test-utils.js.tpl rename to packages/generators/plugin-template/default/test/test-utils.js.tpl diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index 6eff6ffee34..9a2e417f451 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -1,7 +1,9 @@ import fs from 'fs'; import path from 'path'; import Generator from 'yeoman-generator'; + import { generatorCopy, generatorCopyTpl } from './utils/copy-utils'; +import { List } from './utils/scaffold-utils'; /** * Creates a Yeoman Generator that generates a project conforming @@ -33,21 +35,44 @@ const addonGenerator = ( templateFn: (instance: any) => Record, ): Generator.GeneratorConstructor => { return class extends Generator { + public template: string; + public resolvedTemplatePath: string; + public supportedTemplates: string[]; // eslint-disable-next-line @typescript-eslint/no-explicit-any public utils: any; // eslint-disable-next-line @typescript-eslint/no-explicit-any public constructor(args: any, opts: any) { super(args, opts); - const { cli = {} } = opts || {}; + + const { cli = {}, options } = opts || {}; + this.utils = cli && cli.utils; + this.template = options.template; + this.supportedTemplates = fs.readdirSync(templateDir); } public props: Generator.Question; public copy: (value: string, index: number, array: string[]) => void; public copyTpl: (value: string, index: number, array: string[]) => void; - public prompting(): Promise { + public async prompting(): Promise { + if (!this.supportedTemplates.includes(this.template)) { + this.utils.logger.warn(`⚠ ${this.template} is not a valid template, please select one from below`); + + const { selectedTemplate } = await List( + this, + 'selectedTemplate', + 'Select a valid template from below:', + this.supportedTemplates, + 'default', + false, + ); + + this.template = selectedTemplate; + } + this.resolvedTemplatePath = path.join(templateDir, this.template); + return this.prompt(prompts).then((props: Generator.Question): void => { this.props = props; }); @@ -76,8 +101,8 @@ const addonGenerator = ( // eslint-disable-next-line @typescript-eslint/no-var-requires this.fs.extendJSON(this.destinationPath('package.json'), require(packageJsonTemplatePath)(this.props.name)); - this.copy = generatorCopy(this, templateDir); - this.copyTpl = generatorCopyTpl(this, templateDir, templateFn(this)); + this.copy = generatorCopy(this, this.resolvedTemplatePath); + this.copyTpl = generatorCopyTpl(this, this.resolvedTemplatePath, templateFn(this)); copyFiles.forEach(this.copy); copyTemplateFiles.forEach(this.copyTpl); diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index 83212e8ff61..0b46ef4b20c 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -38,7 +38,7 @@ class GeneratorsCommand { env.registerStub(initGenerator, generatorName); - env.run(generatorName, { options, cli }, () => { + env.run(generatorName, { cli, options }, () => { logger.success('Project has been initialised with webpack!'); }); }, @@ -49,17 +49,24 @@ class GeneratorsCommand { name: 'loader [output-path]', alias: 'l', description: 'Scaffold a loader.', - usage: '[output-path]', + usage: '[output-path] [options]', pkg: '@webpack-cli/generators', }, - [], - async (outputPath) => { + [ + { + name: 'template', + configs: [{ type: 'string' }], + description: 'Type of template', + defaultValue: 'default', + }, + ], + async (outputPath, options) => { const env = yeoman.createEnv([], { cwd: outputPath }); const generatorName = 'webpack-loader-generator'; env.registerStub(loaderGenerator, generatorName); - env.run(generatorName, { cli }, () => { + env.run(generatorName, { cli, options }, () => { logger.success('Loader template has been successfully scaffolded.'); }); }, @@ -73,14 +80,21 @@ class GeneratorsCommand { usage: '[output-path]', pkg: '@webpack-cli/generators', }, - [], - async (outputPath) => { + [ + { + name: 'template', + configs: [{ type: 'string' }], + description: 'Type of template', + defaultValue: 'default', + }, + ], + async (outputPath, options) => { const env = yeoman.createEnv([], { cwd: outputPath }); const generatorName = 'webpack-plugin-generator'; env.registerStub(pluginGenerator, generatorName); - env.run(generatorName, { cli }, () => { + env.run(generatorName, { cli, options }, () => { logger.success('Plugin template has been successfully scaffolded.'); }); }, diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index f53799dc9c0..e71a7e96d78 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -98,9 +98,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -151,9 +151,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -204,9 +204,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -334,10 +334,13 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'loader' command using the "--help" option 1`] = ` -"Usage: webpack loader|l [output-path] +"Usage: webpack loader|l [output-path] [options] Scaffold a loader. +Options: + --template Type of template (default: \\"default\\") + Global options: --color Enable colors on console. --no-color Disable colors on console. @@ -376,6 +379,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Options: + --template Type of template (default: \\"default\\") + Global options: --color Enable colors on console. --no-color Disable colors on console. @@ -557,9 +563,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -610,9 +616,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 61e8d1048bc..80b0cd34b91 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -100,9 +100,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -155,9 +155,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -210,9 +210,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -342,10 +342,13 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'loader' command using the "--help" option 1`] = ` -"Usage: webpack loader|l [output-path] +"Usage: webpack loader|l [output-path] [options] Scaffold a loader. +Options: + --template Type of template (default: \\"default\\") + Global options: --color Enable colors on console. --no-color Disable colors on console. @@ -384,6 +387,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Options: + --template Type of template (default: \\"default\\") + Global options: --color Enable colors on console. --no-color Disable colors on console. @@ -571,9 +577,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -626,9 +632,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 6a447c51d60..f04648384cd 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -134,4 +134,9 @@ describe('loader command', () => { ({ stdout } = run(path, [], false)); expect(stdout).toContain('test-loader'); }); + + it('should prompt on supplying an invalid template', () => { + const { stderr } = run(__dirname, ['loader', '--template=unknown']); + expect(stderr).toContain('unknown is not a valid template'); + }); }); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 9852cadec5c..35c6c9ad2aa 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -130,4 +130,9 @@ describe('plugin command', () => { stdout = run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false).stdout; expect(stdout).toContain('Hello World!'); }); + + it('should prompt on supplying an invalid template', () => { + const { stderr } = run(__dirname, ['plugin', '--template=unknown']); + expect(stderr).toContain('unknown is not a valid template'); + }); }); From cb78e6672a7e31f45b334f80fe888246fe5c9873 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 2 Apr 2021 14:07:13 +0300 Subject: [PATCH 014/103] chore(deps-dev): bump webpack from 5.28.0 to 5.30.0 (#2586) Bumps [webpack](https://github.com/webpack/webpack) from 5.28.0 to 5.30.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.28.0...v5.30.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ca024ef71e..c563b6e7433 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5382,12 +5382,7 @@ got@^6.2.0: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.2.3: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== @@ -11033,9 +11028,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.25.0: - version "5.28.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.28.0.tgz#0de8bcd706186b26da09d4d1e8cbd3e4025a7c2f" - integrity sha512-1xllYVmA4dIvRjHzwELgW4KjIU1fW4PEuEnjsylz7k7H5HgPOctIq7W1jrt3sKH9yG5d72//XWzsHhfoWvsQVg== + version "5.30.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.30.0.tgz#07d87c182a060e0c2491062f3dc0edc85a29d884" + integrity sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From f82a25683a3181359d2182869c7526dac14fab81 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Fri, 2 Apr 2021 17:30:38 +0300 Subject: [PATCH 015/103] test: refactor on async (#2583) --- test/build/analyze/analyze-flag.test.js | 10 +- test/build/basic/basic.test.js | 50 +++-- test/build/build-errors/errors.test.js | 36 ++-- .../build-variable/build-variable.test.js | 4 +- test/build/build-warnings/warnings.test.js | 37 ++-- .../bundle-variable/bundle-variable.test.js | 2 +- test/build/cache/cache.test.js | 36 ++-- test/build/colors/colors.test.js | 62 ++++--- .../build/config-format/coffee/coffee.test.js | 8 +- .../commonjs-default/commonjs-default.test.js | 4 +- .../config-format/commonjs/commonjs.test.js | 4 +- .../config-format/failure/failure.test.js | 4 +- test/build/config-format/mjs/mjs.test.js | 4 +- .../typescript/typescript.test.js | 4 +- .../custom-name/custom-name.test.js | 8 +- .../dotfolder-array/dotfolder-array.test.js | 4 +- .../dotfolder-single/dotfolder-single.test.js | 4 +- .../relative/basic-config.test.js | 8 +- test/build/config-name/config-name.test.js | 40 ++-- .../build/config/absent/config-absent.test.js | 4 +- test/build/config/basic/basic-config.test.js | 4 +- .../basic-config/default-js-config.test.js | 4 +- .../cjs-config/default-cjs-config.test.js | 4 +- .../multiple-location-config.test.js | 4 +- .../dev-none-config.test.js | 4 +- .../mjs-config/default-mjs-config.test.js | 4 +- .../with-mode/multiple-config.test.js | 4 +- .../config/empty-array/empty-array.test.js | 4 +- .../empty-function/empty-function.test.js | 4 +- .../empty-promise/empty-promise.test.js | 4 +- test/build/config/empty/empty.test.js | 4 +- .../error-array/config-array-error.test.js | 4 +- .../error-commonjs/config-error.test.js | 8 +- .../config/error-mjs/config-error.test.js | 8 +- .../config/function/functional-config.test.js | 8 +- .../invalid-export/invalid-export.test.js | 4 +- .../config/invalid-path/invalid-path.test.js | 4 +- .../multiple-with-one-compilation.test.js | 4 +- .../config/multiple/multiple-config.test.js | 8 +- .../no-config-array/no-config-array.test.js | 4 +- .../no-config-object/no-config-object.test.js | 4 +- .../function-with-argv.test.js | 4 +- .../array-function-with-env.test.js | 4 +- .../array-functions/array-functions.test.js | 4 +- .../array-promises/array-promises.test.js | 4 +- test/build/config/type/array/array.test.js | 8 +- .../function-array/function-array.test.js | 4 +- .../function-async/function-async.test.js | 4 +- .../function-promise/function-promise.test.js | 4 +- .../function-with-argv.test.js | 4 +- .../function-with-env.test.js | 61 ++++--- .../config/type/function/function.test.js | 4 +- .../type/promise-array/promise-array.test.js | 4 +- .../promise-function/promise-function.test.js | 4 +- .../build/config/type/promise/promise.test.js | 4 +- test/build/core-flags/amd-flag.test.js | 4 +- test/build/core-flags/bail-flag.test.js | 8 +- test/build/core-flags/cache-flags.test.js | 73 ++++---- test/build/core-flags/context-flag.test.js | 8 +- .../core-flags/dependencies-flag.test.js | 8 +- test/build/core-flags/devtool-flag.test.js | 12 +- .../build/core-flags/entry-reset-flag.test.js | 8 +- .../build/core-flags/experiments-flag.test.js | 8 +- test/build/core-flags/externals-flags.test.js | 24 +-- .../ignore-warnings-flag.test.js | 12 +- .../core-flags/infrastructure-logging.test.js | 12 +- test/build/core-flags/invalid-flag.test.js | 4 +- test/build/core-flags/module-flags.test.js | 94 +++++----- test/build/core-flags/node-flags.test.js | 12 +- .../core-flags/optimization-flags.test.js | 32 ++-- test/build/core-flags/output-flags.test.js | 52 +++--- .../build/core-flags/parallelism-flag.test.js | 8 +- .../core-flags/performance-flags.test.js | 12 +- test/build/core-flags/profile-flag.test.js | 8 +- test/build/core-flags/records-flag.test.js | 12 +- test/build/core-flags/resolve-flags.test.js | 16 +- test/build/core-flags/snapshot-flags.test.js | 8 +- test/build/core-flags/stats-flags.test.js | 24 +-- test/build/core-flags/watch-flags.test.js | 18 +- .../custom-webpack/custom-webpack.test.js | 8 +- test/build/defaults/output-defaults.test.js | 12 +- .../devtool/array/source-map-array.test.js | 41 +++-- .../devtool/object/source-map-object.test.js | 30 +-- .../entry-with-config.test.js | 4 +- .../entry-with-config.test.js | 4 +- .../defaults-empty/entry-single-arg.test.js | 4 +- .../defaults-index/entry-multi-args.test.js | 8 +- .../entry/flag-entry/entry-with-flag.test.js | 35 ++-- .../multiple-entries/multi-entries.test.js | 24 ++- test/build/entry/scss/scss.test.js | 2 +- test/build/env/array/array-env.test.js | 4 +- test/build/env/object/object-env.test.js | 4 +- .../invalid-schema/invalid-schema.test.js | 48 ++--- test/build/hot/hot-flag.test.js | 16 +- test/build/import-local/import-local.test.js | 4 +- test/build/json/json.test.js | 140 ++++++++------ .../config-absent/merge-config-absent.test.js | 4 +- test/build/merge/config/merge-config.test.js | 16 +- .../mode-single-arg/mode-single-arg.test.js | 24 +-- .../mode-with-config/mode-with-config.test.js | 96 ++++++---- test/build/name/name.test.js | 4 +- test/build/node-env/node-env.test.js | 24 +-- .../build/output/output-named-bundles.test.js | 20 +- test/build/prefetch/prefetch.test.js | 17 +- test/build/progress/progress-flag.test.js | 16 +- .../start-finish-force-log.test.js | 12 +- .../config-no/no-stats-with-config.test.js | 8 +- test/build/stats/config/stats.test.js | 8 +- test/build/stats/flags/stats.test.js | 16 +- .../target/flag-test/target-flag.test.js | 32 ++-- test/build/target/node/node-test.test.js | 4 +- test/build/unknown/unknown.test.js | 88 ++++----- .../entry-absent/zero-config.test.js | 4 +- .../entry-present/zero-config.test.js | 4 +- .../with-config-path/with-config-path.test.js | 20 +- .../without-config-path.test.js | 4 +- .../without-config-path-error.test.js | 4 +- ...ut-config-path-multi-compiler-mode.test.js | 4 +- ...thout-config-path-no-configuration.test.js | 4 +- .../without-config-path.test.js | 4 +- test/help/help.test.js | 172 +++++++++--------- test/info/info-output.test.js | 20 +- test/info/info-unknown.test.js | 4 +- test/init/init.test.js | 63 ++++--- test/loader/error-test/loader-error.test.js | 4 +- test/loader/loader.test.js | 75 +++++--- .../warning-test/loader-warning.test.js | 4 +- test/plugin/plugin.test.js | 82 +++++---- .../invalid-schema/invalid-schema.test.js | 8 +- test/utils/cli-plugin-test/plugin.test.js | 4 +- test/utils/test-utils.js | 80 +++++++- test/utils/test-utils.test.js | 12 +- test/version/version.test.js | 164 ++++++++--------- test/watch/analyze/analyze-flag.test.js | 4 +- 134 files changed, 1377 insertions(+), 1171 deletions(-) diff --git a/test/build/analyze/analyze-flag.test.js b/test/build/analyze/analyze-flag.test.js index 7b2fd9915bc..6807d6c6e3c 100644 --- a/test/build/analyze/analyze-flag.test.js +++ b/test/build/analyze/analyze-flag.test.js @@ -1,14 +1,14 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); +const { run, normalizeStdout } = require('../../utils/test-utils'); describe('"analyze" option', () => { - it('should not load webpack-bundle-analyzer plugin twice with --analyze flag and plugin', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './analyze.config.js', '--analyze']); + it('should not load webpack-bundle-analyzer plugin twice with --analyze flag and plugin', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './analyze.config.js', '--analyze']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain('Webpack Bundle Analyzer saved report to'); - expect(stdout.match(/Webpack Bundle Analyzer saved report to/g)).toHaveLength(1); + expect(normalizeStdout(stdout)).toContain('Webpack Bundle Analyzer saved report to'); + expect(normalizeStdout(stdout).match(/Webpack Bundle Analyzer saved report to/g)).toHaveLength(1); }); }); diff --git a/test/build/basic/basic.test.js b/test/build/basic/basic.test.js index 11b49da017d..355b8084f57 100644 --- a/test/build/basic/basic.test.js +++ b/test/build/basic/basic.test.js @@ -5,7 +5,7 @@ const { run } = require('../../utils/test-utils'); describe('bundle command', () => { it('should work without command (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -13,7 +13,7 @@ describe('bundle command', () => { }); it('should work without command and options (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -21,7 +21,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['./src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -29,7 +29,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['./src/index.js', './src/other.js', '--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -37,7 +37,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options #2 (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development', './src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development', './src/index.js', './src/other.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -45,7 +45,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options #3 (default command)', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['./src/index.js', './src/other.js', '--entry', './src/again.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--entry', './src/again.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -53,7 +53,11 @@ describe('bundle command', () => { }); it('should work with and override entries from the configuration', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['./src/index.js', './src/other.js', '--config', './entry.config.js'], false); + const { exitCode, stderr, stdout } = await run( + __dirname, + ['./src/index.js', './src/other.js', '--config', './entry.config.js'], + false, + ); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -61,7 +65,7 @@ describe('bundle command', () => { }); it('should work with the "build" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -69,7 +73,7 @@ describe('bundle command', () => { }); it('should work with "bundle" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -77,7 +81,7 @@ describe('bundle command', () => { }); it('should work with the "b" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['b'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -85,7 +89,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "build" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -93,7 +97,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "bundle" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', './src/index.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -101,7 +105,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "b" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['b', './src/index.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -109,7 +113,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', './src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js', './src/other.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -117,7 +121,11 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias and options', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', './src/index.js', './src/other.js', '--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run( + __dirname, + ['build', './src/index.js', './src/other.js', '--mode', 'development'], + false, + ); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -125,7 +133,11 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias and options', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', '--mode', 'development', './src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run( + __dirname, + ['build', '--mode', 'development', './src/index.js', './src/other.js'], + false, + ); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -133,7 +145,7 @@ describe('bundle command', () => { }); it('should log error and suggest right name on the "buil" command', async () => { - const { exitCode, stderr, stdout } = run(__dirname, ['buil'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['buil'], false); expect(exitCode).toBe(2); expect(stderr).toContain("Unknown command or entry 'buil'"); @@ -142,8 +154,8 @@ describe('bundle command', () => { expect(stdout).toBeFalsy(); }); - it('should log supplied config when logging level is log', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './log.config.js']); + it('should log supplied config when logging level is log', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './log.config.js']); const configPath = resolve(__dirname, './log.config.js'); expect(exitCode).toBe(0); diff --git a/test/build/build-errors/errors.test.js b/test/build/build-errors/errors.test.js index 66c0368c5e0..68d91e234b3 100644 --- a/test/build/build-errors/errors.test.js +++ b/test/build/build-errors/errors.test.js @@ -1,12 +1,11 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); -const { readFile } = require('fs'); +const { run, readFile } = require('../../utils/test-utils'); const { resolve } = require('path'); describe('errors', () => { - it('should output by default', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('should output by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); @@ -14,8 +13,8 @@ describe('errors', () => { expect(stdout).toMatch(/Error: Can't resolve/); }); - it('should output JSON with the "json" flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json']); + it('should output JSON with the "json" flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json']); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); @@ -29,25 +28,28 @@ describe('errors', () => { expect(json['errors'][0].message ? json['errors'][0].message : json['errors'][0]).toMatch(/Can't resolve/); }); - it('should store json to a file', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json']); + it('should store json to a file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json']); expect(exitCode).toBe(1); expect(stderr).toContain('stats are successfully stored as json to stats.json'); expect(stdout).toBeFalsy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (error, data) => { + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { expect(error).toBe(null); - expect(() => JSON.parse(data)).not.toThrow(); + } - const json = JSON.parse(data); + expect(() => JSON.parse(data)).not.toThrow(); - expect(json['hash']).toBeDefined(); - expect(json['errors']).toHaveLength(1); - // `message` for `webpack@5` - expect(json['errors'][0].message ? json['errors'][0].message : json['errors'][0]).toMatch(/Can't resolve/); + const json = JSON.parse(data); - done(); - }); + expect(json['hash']).toBeDefined(); + expect(json['errors']).toHaveLength(1); + // `message` for `webpack@5` + expect(json['errors'][0].message ? json['errors'][0].message : json['errors'][0]).toMatch(/Can't resolve/); }); }); diff --git a/test/build/build-variable/build-variable.test.js b/test/build/build-variable/build-variable.test.js index 8458e95e483..fb00f67d745 100644 --- a/test/build/build-variable/build-variable.test.js +++ b/test/build/build-variable/build-variable.test.js @@ -2,9 +2,9 @@ const { run } = require('../../utils/test-utils'); -describe('bundle variable', () => { +describe('bundle variable', async () => { it('compiles without flags and export variable', async () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/build-warnings/warnings.test.js b/test/build/build-warnings/warnings.test.js index 9af8b476fb8..d4cf196b324 100644 --- a/test/build/build-warnings/warnings.test.js +++ b/test/build/build-warnings/warnings.test.js @@ -1,12 +1,12 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); -const { existsSync, readFile } = require('fs'); +const { run, readFile } = require('../../utils/test-utils'); +const { existsSync } = require('fs'); const { resolve } = require('path'); describe('warnings', () => { - it('should output by default', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('should output by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -14,8 +14,8 @@ describe('warnings', () => { expect(stdout).toMatch(/Error: Can't resolve/); }); - it('should output JSON with the "json" flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json']); + it('should output JSON with the "json" flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -30,26 +30,29 @@ describe('warnings', () => { expect(json['warnings'][0].message ? json['warnings'][0].message : json['warnings'][0]).toMatch(/Can't resolve/); }); - it('should store json to a file', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json']); + it('should store json to a file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json']); expect(exitCode).toBe(0); expect(stderr).toContain('stats are successfully stored as json to stats.json'); expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (error, data) => { + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { expect(error).toBe(null); - expect(() => JSON.parse(data)).not.toThrow(); + } - const json = JSON.parse(data); + expect(() => JSON.parse(data)).not.toThrow(); - expect(json['hash']).toBeDefined(); - expect(json['warnings']).toHaveLength(2); - // `message` for `webpack@5` - expect(json['warnings'][0].message ? json['warnings'][0].message : json['warnings'][0]).toMatch(/Can't resolve/); + const json = JSON.parse(data); - done(); - }); + expect(json['hash']).toBeDefined(); + expect(json['warnings']).toHaveLength(2); + // `message` for `webpack@5` + expect(json['warnings'][0].message ? json['warnings'][0].message : json['warnings'][0]).toMatch(/Can't resolve/); }); }); diff --git a/test/build/bundle-variable/bundle-variable.test.js b/test/build/bundle-variable/bundle-variable.test.js index 8458e95e483..9dc9e29a6df 100644 --- a/test/build/bundle-variable/bundle-variable.test.js +++ b/test/build/bundle-variable/bundle-variable.test.js @@ -4,7 +4,7 @@ const { run } = require('../../utils/test-utils'); describe('bundle variable', () => { it('compiles without flags and export variable', async () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/cache/cache.test.js b/test/build/cache/cache.test.js index 94ce20c4cf0..254254b6ce6 100644 --- a/test/build/cache/cache.test.js +++ b/test/build/cache/cache.test.js @@ -6,10 +6,10 @@ const rimraf = require('rimraf'); const { run, isWebpack5 } = require('../../utils/test-utils'); describe('cache', () => { - it('should work', () => { + it('should work', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-default-development')); - let { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js']); + let { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toEqual(0); @@ -20,7 +20,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js'])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'])); expect(exitCode).toEqual(0); @@ -33,11 +33,11 @@ describe('cache', () => { } }); - it('should work in multi compiler mode', () => { + it('should work in multi compiler mode', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-first-development')); rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-second-development')); - let { exitCode, stderr, stdout } = run(__dirname, ['-c', './multi.config.js']); + let { exitCode, stderr, stdout } = await run(__dirname, ['-c', './multi.config.js']); expect(exitCode).toEqual(0); @@ -49,7 +49,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, ['-c', './multi.config.js'])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['-c', './multi.config.js'])); expect(exitCode).toEqual(0); @@ -62,10 +62,10 @@ describe('cache', () => { } }); - it('should work in multi compiler mode with the `--config-name` argument', () => { + it('should work in multi compiler mode with the `--config-name` argument', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-third-development')); - let { exitCode, stderr, stdout } = run(__dirname, [ + let { exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '--config-name', @@ -83,7 +83,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, [ + ({ exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '--config-name', @@ -103,10 +103,10 @@ describe('cache', () => { } }); - it('should work with the `--merge` argument', () => { + it('should work with the `--merge` argument', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-fourth-development')); - let { exitCode, stderr, stdout } = run(__dirname, [ + let { exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '-c', @@ -125,7 +125,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, [ + ({ exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '-c', @@ -146,10 +146,10 @@ describe('cache', () => { } }); - it('should work with the `--config-name` and `--merge` argument', () => { + it('should work with the `--config-name` and `--merge` argument', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-fifth-development')); - let { exitCode, stderr, stdout } = run(__dirname, [ + let { exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '-c', @@ -172,7 +172,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, [ + ({ exitCode, stderr, stdout } = await run(__dirname, [ '-c', './multi.config.js', '-c', @@ -197,10 +197,10 @@ describe('cache', () => { } }); - it('should work with autoloading configuration', () => { + it('should work with autoloading configuration', async () => { rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-test-autoloading-development')); - let { exitCode, stderr, stdout } = run(__dirname, ['--name', 'cache-test-autoloading']); + let { exitCode, stderr, stdout } = await run(__dirname, ['--name', 'cache-test-autoloading']); expect(exitCode).toEqual(0); @@ -211,7 +211,7 @@ describe('cache', () => { expect(stdout).toBeTruthy(); } - ({ exitCode, stderr, stdout } = run(__dirname, ['--name', 'cache-test-autoloading'])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['--name', 'cache-test-autoloading'])); expect(exitCode).toEqual(0); diff --git a/test/build/colors/colors.test.js b/test/build/colors/colors.test.js index 5c5b969edd4..0e92a35c0ac 100644 --- a/test/build/colors/colors.test.js +++ b/test/build/colors/colors.test.js @@ -4,8 +4,8 @@ const { run, isWebpack5 } = require('../../utils/test-utils'); const { resolve } = require('path'); describe('colors', () => { - it('should output by default', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { env: { FORCE_COLOR: true } }); + it('should output by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -13,8 +13,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from flags', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats=verbose'], { env: { FORCE_COLOR: true } }); + it('should work with the "stats" option from flags', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats=verbose'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -22,8 +22,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from flags and from configuration', () => { - const { exitCode, stderr, stdout } = run( + it('should work with the "stats" option from flags and from configuration', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['--stats=verbose', `--config=${resolve(__dirname, './no-stats.webpack.config.js')}`], { env: { FORCE_COLOR: true } }, @@ -35,8 +35,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from flags and from configuration #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats=verbose', '--config=stats-string.webpack.config.js'], { + it('should work with the "stats" option from flags and from configuration #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats=verbose', '--config=stats-string.webpack.config.js'], { env: { FORCE_COLOR: true }, }); @@ -46,8 +46,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option and --color flags', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats=verbose', '--color']); + it('should work with the "stats" option and --color flags', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats=verbose', '--color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -55,8 +55,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should disable colored output with --no-color', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats=verbose', '--no-color']); + it('should disable colored output with --no-color', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats=verbose', '--no-color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -65,8 +65,10 @@ describe('colors', () => { expect(stdout).toContain(output); }); - it('should work with the "stats" option from the configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=stats-string.webpack.config.js'], { env: { FORCE_COLOR: true } }); + it('should work with the "stats" option from the configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=stats-string.webpack.config.js'], { + env: { FORCE_COLOR: true }, + }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -74,8 +76,10 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from the configuration #1', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=stats-boolean.webpack.config.js'], { env: { FORCE_COLOR: true } }); + it('should work with the "stats" option from the configuration #1', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=stats-boolean.webpack.config.js'], { + env: { FORCE_COLOR: true }, + }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -83,8 +87,10 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from the configuration #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=no-stats.webpack.config.js'], { env: { FORCE_COLOR: true } }); + it('should work with the "stats" option from the configuration #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=no-stats.webpack.config.js'], { + env: { FORCE_COLOR: true }, + }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -92,8 +98,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from the configuration #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=colors-true.webpack.config.js']); + it('should work with the "stats" option from the configuration #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=colors-true.webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -101,8 +107,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should work with the "stats" option from the configuration #4', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=colors-false.webpack.config.js']); + it('should work with the "stats" option from the configuration #4', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=colors-false.webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -111,8 +117,8 @@ describe('colors', () => { expect(stdout).toContain(output); }); - it('should prioritize --color over colors in config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=colors-false.webpack.config.js', '--color']); + it('should prioritize --color over colors in config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=colors-false.webpack.config.js', '--color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -120,8 +126,8 @@ describe('colors', () => { expect(stdout).toContain(`\u001b[1m\u001b[32m${output}\u001b[39m\u001b[22m`); }); - it('should prioritize --no-color over colors in config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=colors-true.webpack.config.js', '--no-color']); + it('should prioritize --no-color over colors in config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=colors-true.webpack.config.js', '--no-color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -130,8 +136,8 @@ describe('colors', () => { expect(stdout).toContain(output); }); - it('should work in multi compiler mode', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config=multiple-configs.js', '--color']); + it('should work in multi compiler mode', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config=multiple-configs.js', '--color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/coffee/coffee.test.js b/test/build/config-format/coffee/coffee.test.js index e6ebc64884c..0ac85cd3956 100644 --- a/test/build/config-format/coffee/coffee.test.js +++ b/test/build/config-format/coffee/coffee.test.js @@ -1,16 +1,16 @@ const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { - it('should support coffeescript file as flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.coffee']); + it('should support coffeescript file as flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.coffee']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should load coffeescript file by default', () => { - const { exitCode, stderr, stdout } = run(__dirname, []); + it('should load coffeescript file by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/commonjs-default/commonjs-default.test.js b/test/build/config-format/commonjs-default/commonjs-default.test.js index ffdb55e3c52..d829c878407 100644 --- a/test/build/config-format/commonjs-default/commonjs-default.test.js +++ b/test/build/config-format/commonjs-default/commonjs-default.test.js @@ -1,8 +1,8 @@ const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { - it('should support CommonJS file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.cjs'], false); + it('should support CommonJS file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/commonjs/commonjs.test.js b/test/build/config-format/commonjs/commonjs.test.js index ffdb55e3c52..d829c878407 100644 --- a/test/build/config-format/commonjs/commonjs.test.js +++ b/test/build/config-format/commonjs/commonjs.test.js @@ -1,8 +1,8 @@ const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { - it('should support CommonJS file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.cjs'], false); + it('should support CommonJS file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/failure/failure.test.js b/test/build/config-format/failure/failure.test.js index 6b4367dab1c..b102fef11f0 100644 --- a/test/build/config-format/failure/failure.test.js +++ b/test/build/config-format/failure/failure.test.js @@ -3,8 +3,8 @@ const path = require('path'); const { run } = require('../../../utils/test-utils'); describe('failure', () => { - it('should log error on not installed registers', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.iced']); + it('should log error on not installed registers', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.iced']); expect(exitCode).toBe(2); expect(stderr).toContain(`Unable load '${path.resolve(__dirname, './webpack.config.iced')}'`); diff --git a/test/build/config-format/mjs/mjs.test.js b/test/build/config-format/mjs/mjs.test.js index a7cf4faeef8..f6956861d71 100644 --- a/test/build/config-format/mjs/mjs.test.js +++ b/test/build/config-format/mjs/mjs.test.js @@ -1,8 +1,8 @@ const { run, isWindows } = require('../../../utils/test-utils'); describe('webpack cli', () => { - it('should support mjs config format', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.mjs'], { + it('should support mjs config format', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.mjs'], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, }); diff --git a/test/build/config-format/typescript/typescript.test.js b/test/build/config-format/typescript/typescript.test.js index 55b371696b9..50b8f555179 100644 --- a/test/build/config-format/typescript/typescript.test.js +++ b/test/build/config-format/typescript/typescript.test.js @@ -3,8 +3,8 @@ const { existsSync } = require('fs'); const { resolve } = require('path'); describe('webpack cli', () => { - it('should support typescript file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.ts']); + it('should support typescript file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.ts']); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/build/config-lookup/custom-name/custom-name.test.js b/test/build/config-lookup/custom-name/custom-name.test.js index 52c1ccb89d6..ae244393528 100644 --- a/test/build/config-lookup/custom-name/custom-name.test.js +++ b/test/build/config-lookup/custom-name/custom-name.test.js @@ -4,16 +4,16 @@ const { resolve } = require('path'); const { run, isWindows } = require('../../../utils/test-utils'); describe('custom config file', () => { - it('should work with cjs format', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', resolve(__dirname, 'config.webpack.js')]); + it('should work with cjs format', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', resolve(__dirname, 'config.webpack.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should work with esm format', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', resolve(__dirname, 'config.webpack.mjs')], { + it('should work with esm format', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', resolve(__dirname, 'config.webpack.mjs')], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, }); diff --git a/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js b/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js index 4ef4c54b247..c1f0f2b4ce6 100644 --- a/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js +++ b/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('dotfolder array config lookup', () => { - it('should find a webpack array configuration in a dotfolder', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('should find a webpack array configuration in a dotfolder', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js b/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js index 34a0c7e62ef..f209bf6d0bc 100644 --- a/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js +++ b/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js @@ -6,8 +6,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('dotfolder single config lookup', () => { - it('should find a webpack configuration in a dotfolder', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('should find a webpack configuration in a dotfolder', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-lookup/relative/basic-config.test.js b/test/build/config-lookup/relative/basic-config.test.js index e26faa49de0..6e4332131e1 100644 --- a/test/build/config-lookup/relative/basic-config.test.js +++ b/test/build/config-lookup/relative/basic-config.test.js @@ -3,16 +3,16 @@ const { run } = require('../../../utils/test-utils'); describe('relative path to config', () => { - it('should work', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.js', '--output-path', './binary/a'], false); + it('should work', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.js', '--output-path', './binary/a'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should work #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js', '--output-path', './binary/b'], false); + it('should work #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js', '--output-path', './binary/b'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-name/config-name.test.js b/test/build/config-name/config-name.test.js index 8371195141f..ffc8237e51d 100644 --- a/test/build/config-name/config-name.test.js +++ b/test/build/config-name/config-name.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe('--config-name flag', () => { - it('should select only the config whose name is passed with --config-name', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config-name', 'first'], false); + it('should select only the config whose name is passed with --config-name', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -13,8 +13,8 @@ describe('--config-name flag', () => { expect(stdout).not.toContain('third'); }); - it('should work with multiple values for --config-name', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config-name', 'first', '--config-name', 'third'], false); + it('should work with multiple values for --config-name', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first', '--config-name', 'third'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -23,8 +23,8 @@ describe('--config-name flag', () => { expect(stdout).toContain('third'); }); - it('should work with multiple values for --config-name and multiple configurations', () => { - const { exitCode, stderr, stdout } = run( + it('should work with multiple values for --config-name and multiple configurations', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', './function-config.js', '-c', './single-other-config.js', '--config-name', 'first', '--config-name', 'four'], false, @@ -38,24 +38,24 @@ describe('--config-name flag', () => { expect(stdout).toContain('four'); }); - it('should log error if invalid config name is provided', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config-name', 'test'], false); + it('should log error if invalid config name is provided', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); expect(stdout).toBeFalsy(); }); - it('should log error if multiple configurations are not found', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config-name', 'test', '-c', 'single-config.js'], false); + it('should log error if multiple configurations are not found', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test', '-c', 'single-config.js'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); expect(stdout).toBeFalsy(); }); - it('should log error if multiple configurations are not found #1', () => { - const { exitCode, stderr, stdout } = run( + it('should log error if multiple configurations are not found #1', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['--config-name', 'test', '--config-name', 'bar', '-c', 'single-config.js'], false, @@ -67,8 +67,8 @@ describe('--config-name flag', () => { expect(stdout).toBeFalsy(); }); - it('should log error if multiple configurations are not found #2', () => { - const { exitCode, stderr, stdout } = run( + it('should log error if multiple configurations are not found #2', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['--config-name', 'first', '--config-name', 'bar', '-c', 'single-config.js'], false, @@ -79,8 +79,8 @@ describe('--config-name flag', () => { expect(stdout).toBeFalsy(); }); - it('should work with config as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', 'function-config.js', '--config-name', 'first'], false); + it('should work with config as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'first'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -89,8 +89,8 @@ describe('--config-name flag', () => { expect(stdout).not.toContain('third'); }); - it('should work with multiple values for --config-name when the config is a function', () => { - const { exitCode, stderr, stdout } = run( + it('should work with multiple values for --config-name when the config is a function', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['--config', 'function-config.js', '--config-name', 'first', '--config-name', 'third'], false, @@ -103,8 +103,8 @@ describe('--config-name flag', () => { expect(stdout).toContain('third'); }); - it('should log error if invalid config name is provided ', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', 'function-config.js', '--config-name', 'test'], false); + it('should log error if invalid config name is provided ', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'test'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); diff --git a/test/build/config/absent/config-absent.test.js b/test/build/config/absent/config-absent.test.js index 948815478da..a3c8ef9c72d 100644 --- a/test/build/config/absent/config-absent.test.js +++ b/test/build/config/absent/config-absent.test.js @@ -4,8 +4,8 @@ const path = require('path'); const { run } = require('../../../utils/test-utils'); describe('Config:', () => { - it('supplied config file is absent', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', path.resolve(__dirname, 'webpack.config.js')], false); + it('supplied config file is absent', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'webpack.config.js')], false); // should throw with correct exit code expect(exitCode).toBe(2); diff --git a/test/build/config/basic/basic-config.test.js b/test/build/config/basic/basic-config.test.js index 9ebd2135a69..e3f88f4115d 100644 --- a/test/build/config/basic/basic-config.test.js +++ b/test/build/config/basic/basic-config.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { - it('is able to understand and parse a very basic configuration file', () => { - const { exitCode, stderr, stdout } = run( + it('is able to understand and parse a very basic configuration file', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', './binary'], false, diff --git a/test/build/config/defaults/basic-config/default-js-config.test.js b/test/build/config/defaults/basic-config/default-js-config.test.js index 8f4193f07a9..a4e51558084 100644 --- a/test/build/config/defaults/basic-config/default-js-config.test.js +++ b/test/build/config/defaults/basic-config/default-js-config.test.js @@ -3,8 +3,8 @@ const path = require('path'); const { run, isWebpack5 } = require('../../../../utils/test-utils'); describe('Zero Config', () => { - it('runs when config is present but not supplied via flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('runs when config is present but not supplied via flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/defaults/cjs-config/default-cjs-config.test.js b/test/build/config/defaults/cjs-config/default-cjs-config.test.js index 176be601895..90ac1debc57 100644 --- a/test/build/config/defaults/cjs-config/default-cjs-config.test.js +++ b/test/build/config/defaults/cjs-config/default-cjs-config.test.js @@ -3,8 +3,8 @@ const path = require('path'); const { run, isWebpack5 } = require('../../../../utils/test-utils'); describe('Default Config:', () => { - it('Should be able to pick cjs config by default', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('Should be able to pick cjs config by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js b/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js index f4071c3639c..3bf4009af22 100644 --- a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('multiple dev config files with webpack.config.js', () => { - it('Uses webpack.config.development.js', () => { - const { stdout, stderr, exitCode } = run(__dirname, [], false); + it('Uses webpack.config.development.js', async () => { + const { stdout, stderr, exitCode } = await run(__dirname, [], false); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js b/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js index 31db7d2c98e..7faab90db07 100644 --- a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('multiple config files', () => { - it('Uses dev config when both dev and none are present', () => { - const { stdout, stderr, exitCode } = run(__dirname, [], false); + it('Uses dev config when both dev and none are present', async () => { + const { stdout, stderr, exitCode } = await run(__dirname, [], false); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/defaults/mjs-config/default-mjs-config.test.js b/test/build/config/defaults/mjs-config/default-mjs-config.test.js index 9fd4732947a..5941a959d9c 100644 --- a/test/build/config/defaults/mjs-config/default-mjs-config.test.js +++ b/test/build/config/defaults/mjs-config/default-mjs-config.test.js @@ -3,8 +3,8 @@ const path = require('path'); const { run, isWebpack5, isWindows } = require('../../../../utils/test-utils'); describe('Default Config:', () => { - it('Should be able to pick mjs config by default', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true } }); + it('Should be able to pick mjs config by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true } }); if (/Error: Not supported/.test(stderr)) { expect(exitCode).toEqual(2); diff --git a/test/build/config/defaults/with-mode/multiple-config.test.js b/test/build/config/defaults/with-mode/multiple-config.test.js index adcb602f526..4cc5101fc1c 100644 --- a/test/build/config/defaults/with-mode/multiple-config.test.js +++ b/test/build/config/defaults/with-mode/multiple-config.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('multiple config files', () => { - it('Uses dev config when development mode is supplied', () => { - const { stdout, stderr, exitCode } = run(__dirname, ['--mode', 'development'], false); + it('Uses dev config when development mode is supplied', async () => { + const { stdout, stderr, exitCode } = await run(__dirname, ['--mode', 'development'], false); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/empty-array/empty-array.test.js b/test/build/config/empty-array/empty-array.test.js index 834cb574393..6433ec506c0 100644 --- a/test/build/config/empty-array/empty-array.test.js +++ b/test/build/config/empty-array/empty-array.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('config flag with empty config file', () => { - it('should throw error with no configuration or index file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with no configuration or index file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/empty-function/empty-function.test.js b/test/build/config/empty-function/empty-function.test.js index 834cb574393..6433ec506c0 100644 --- a/test/build/config/empty-function/empty-function.test.js +++ b/test/build/config/empty-function/empty-function.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('config flag with empty config file', () => { - it('should throw error with no configuration or index file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with no configuration or index file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/empty-promise/empty-promise.test.js b/test/build/config/empty-promise/empty-promise.test.js index 834cb574393..6433ec506c0 100644 --- a/test/build/config/empty-promise/empty-promise.test.js +++ b/test/build/config/empty-promise/empty-promise.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('config flag with empty config file', () => { - it('should throw error with no configuration or index file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with no configuration or index file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/empty/empty.test.js b/test/build/config/empty/empty.test.js index 834cb574393..6433ec506c0 100644 --- a/test/build/config/empty/empty.test.js +++ b/test/build/config/empty/empty.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('config flag with empty config file', () => { - it('should throw error with no configuration or index file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with no configuration or index file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/error-array/config-array-error.test.js b/test/build/config/error-array/config-array-error.test.js index d2aa251b980..d17d8453295 100644 --- a/test/build/config/error-array/config-array-error.test.js +++ b/test/build/config/error-array/config-array-error.test.js @@ -2,8 +2,8 @@ const { run } = require('../../../utils/test-utils'); describe('array config error', () => { - it('should throw syntax error and exit with non-zero exit code when even 1 object has syntax error', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js']); + it('should throw syntax error and exit with non-zero exit code when even 1 object has syntax error', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(2); expect(stderr).toContain('SyntaxError: Unexpected token'); expect(stdout).toBeFalsy(); diff --git a/test/build/config/error-commonjs/config-error.test.js b/test/build/config/error-commonjs/config-error.test.js index 02a694e3bd6..8ab2a66de0c 100644 --- a/test/build/config/error-commonjs/config-error.test.js +++ b/test/build/config/error-commonjs/config-error.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('config error', () => { - it('should throw error with invalid configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with invalid configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object'); @@ -12,8 +12,8 @@ describe('config error', () => { expect(stdout).toBeFalsy(); }); - it('should throw syntax error and exit with non-zero exit code', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'syntax-error.js')]); + it('should throw syntax error and exit with non-zero exit code', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'syntax-error.js')]); expect(exitCode).toBe(2); expect(stderr).toContain('SyntaxError: Unexpected token'); diff --git a/test/build/config/error-mjs/config-error.test.js b/test/build/config/error-mjs/config-error.test.js index 16eec5c7744..2e5a108a6a1 100644 --- a/test/build/config/error-mjs/config-error.test.js +++ b/test/build/config/error-mjs/config-error.test.js @@ -11,8 +11,8 @@ describe('config error', () => { return; } - it('should throw error with invalid configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.mjs')], { + it('should throw error with invalid configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.mjs')], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, }); @@ -26,8 +26,8 @@ describe('config error', () => { expect(stdout).toBeFalsy(); }); - it('should throw syntax error and exit with non-zero exit code', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'syntax-error.mjs')], { + it('should throw syntax error and exit with non-zero exit code', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'syntax-error.mjs')], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, }); diff --git a/test/build/config/function/functional-config.test.js b/test/build/config/function/functional-config.test.js index c47de4e85a6..1d6dca4c3c7 100644 --- a/test/build/config/function/functional-config.test.js +++ b/test/build/config/function/functional-config.test.js @@ -5,8 +5,8 @@ const { existsSync } = require('fs'); const { run } = require('../../../utils/test-utils'); describe('functional config', () => { - it('should work as expected in case of single config', () => { - const { stderr, stdout, exitCode } = run(__dirname, ['--config', resolve(__dirname, 'single-webpack.config.js')]); + it('should work as expected in case of single config', async () => { + const { stderr, stdout, exitCode } = await run(__dirname, ['--config', resolve(__dirname, 'single-webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -14,8 +14,8 @@ describe('functional config', () => { expect(existsSync(resolve(__dirname, './dist/dist-single.js'))).toBeTruthy(); }); - it('should work as expected in case of multiple config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', resolve(__dirname, 'multi-webpack.config.js')]); + it('should work as expected in case of multiple config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', resolve(__dirname, 'multi-webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/invalid-export/invalid-export.test.js b/test/build/config/invalid-export/invalid-export.test.js index 0c5c09f0561..c38a21e3f51 100644 --- a/test/build/config/invalid-export/invalid-export.test.js +++ b/test/build/config/invalid-export/invalid-export.test.js @@ -3,8 +3,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('invalid export', () => { - it('should throw error with no configuration or index file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); + it('should throw error with no configuration or index file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(2); expect(stderr).toContain(`Invalid configuration in '${resolve(__dirname, 'webpack.config.js')}'`); diff --git a/test/build/config/invalid-path/invalid-path.test.js b/test/build/config/invalid-path/invalid-path.test.js index ef6efeac01e..5366ecc35ca 100644 --- a/test/build/config/invalid-path/invalid-path.test.js +++ b/test/build/config/invalid-path/invalid-path.test.js @@ -3,8 +3,8 @@ const path = require('path'); const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { - it('is able to understand and parse a very basic configuration file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', path.resolve(__dirname, 'invalid-webpack.config.js')], false); + it('is able to understand and parse a very basic configuration file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'invalid-webpack.config.js')], false); expect(exitCode).toBe(2); expect(stderr).toContain(`Failed to load '${path.resolve(__dirname, 'invalid-webpack.config.js')}' config`); diff --git a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js index 9ebd2135a69..e3f88f4115d 100644 --- a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js +++ b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { - it('is able to understand and parse a very basic configuration file', () => { - const { exitCode, stderr, stdout } = run( + it('is able to understand and parse a very basic configuration file', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', './binary'], false, diff --git a/test/build/config/multiple/multiple-config.test.js b/test/build/config/multiple/multiple-config.test.js index cb1448fbb1b..086d37c1e8a 100644 --- a/test/build/config/multiple/multiple-config.test.js +++ b/test/build/config/multiple/multiple-config.test.js @@ -3,8 +3,12 @@ const { run } = require('../../../utils/test-utils'); describe('Multiple config flag: ', () => { - it('spawns multiple compilers for multiple configs', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', 'webpack1.config.js', '--config', 'webpack2.config.js'], false); + it('spawns multiple compilers for multiple configs', async () => { + const { exitCode, stderr, stdout } = await run( + __dirname, + ['--config', 'webpack1.config.js', '--config', 'webpack2.config.js'], + false, + ); // Should contain the correct exit code expect(exitCode).toEqual(0); diff --git a/test/build/config/no-config-array/no-config-array.test.js b/test/build/config/no-config-array/no-config-array.test.js index 2af343af67a..a486a59e1b5 100644 --- a/test/build/config/no-config-array/no-config-array.test.js +++ b/test/build/config/no-config-array/no-config-array.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('no configs in array', () => { - it('is able to understand and parse a very basic configuration file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand and parse a very basic configuration file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/no-config-object/no-config-object.test.js b/test/build/config/no-config-object/no-config-object.test.js index e3044b3b9b3..c9f3753e8f6 100644 --- a/test/build/config/no-config-object/no-config-object.test.js +++ b/test/build/config/no-config-object/no-config-object.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('empty config', () => { - it('should work', () => { - const { exitCode, stderr, stdout } = run( + it('should work', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--mode', 'development'], false, diff --git a/test/build/config/type/array-function-with-argv/function-with-argv.test.js b/test/build/config/type/array-function-with-argv/function-with-argv.test.js index 47073e109b7..75845d00462 100644 --- a/test/build/config/type/array-function-with-argv/function-with-argv.test.js +++ b/test/build/config/type/array-function-with-argv/function-with-argv.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('array of function with args', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development'], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-function-with-env/array-function-with-env.test.js b/test/build/config/type/array-function-with-env/array-function-with-env.test.js index f3ca6567641..b9d7f7678f2 100644 --- a/test/build/config/type/array-function-with-env/array-function-with-env.test.js +++ b/test/build/config/type/array-function-with-env/array-function-with-env.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('array of functions with env', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development'], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-functions/array-functions.test.js b/test/build/config/type/array-functions/array-functions.test.js index eefea34cfc8..b3fefc51e80 100644 --- a/test/build/config/type/array-functions/array-functions.test.js +++ b/test/build/config/type/array-functions/array-functions.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('array of functions', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-promises/array-promises.test.js b/test/build/config/type/array-promises/array-promises.test.js index 936244c7200..9956bf43022 100644 --- a/test/build/config/type/array-promises/array-promises.test.js +++ b/test/build/config/type/array-promises/array-promises.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('array of promises', () => { - it('is able to understand a configuration file as a promise', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js'], false); + it('is able to understand a configuration file as a promise', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array/array.test.js b/test/build/config/type/array/array.test.js index 37de8910d43..9f6cb55866a 100644 --- a/test/build/config/type/array/array.test.js +++ b/test/build/config/type/array/array.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('array config', () => { - it('is able to understand a configuration file in array format', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file in array format', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -14,8 +14,8 @@ describe('array config', () => { expect(existsSync(resolve(__dirname, './dist/dist-amd.js'))).toBeTruthy(); }); - it('respect cli args with config as an array', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats', 'none'], false); + it('respect cli args with config as an array', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', 'none'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-array/function-array.test.js b/test/build/config/type/function-array/function-array.test.js index 984e486633c..d7932f3e7c5 100644 --- a/test/build/config/type/function-array/function-array.test.js +++ b/test/build/config/type/function-array/function-array.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('function array', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-async/function-async.test.js b/test/build/config/type/function-async/function-async.test.js index e43099d6bfb..f8bf9f10c40 100644 --- a/test/build/config/type/function-async/function-async.test.js +++ b/test/build/config/type/function-async/function-async.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('function async', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-promise/function-promise.test.js b/test/build/config/type/function-promise/function-promise.test.js index 5005616ba2f..60e5dbe6a17 100644 --- a/test/build/config/type/function-promise/function-promise.test.js +++ b/test/build/config/type/function-promise/function-promise.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('function promise', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-with-argv/function-with-argv.test.js b/test/build/config/type/function-with-argv/function-with-argv.test.js index d9f79a0c5ed..c2a0c5c7fb0 100644 --- a/test/build/config/type/function-with-argv/function-with-argv.test.js +++ b/test/build/config/type/function-with-argv/function-with-argv.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('function configuration', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development'], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-with-env/function-with-env.test.js b/test/build/config/type/function-with-env/function-with-env.test.js index 56ff6c1db7a..b31b2e546ad 100644 --- a/test/build/config/type/function-with-env/function-with-env.test.js +++ b/test/build/config/type/function-with-env/function-with-env.test.js @@ -1,19 +1,19 @@ 'use strict'; -const { existsSync, readFile } = require('fs'); +const { existsSync } = require('fs'); const { resolve } = require('path'); -const { run } = require('../../../../utils/test-utils'); +const { run, readFile } = require('../../../../utils/test-utils'); describe('function configuration', () => { - it('should throw when env is not supplied', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--env']); + it('should throw when env is not supplied', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Option '--env ' argument missing"); expect(stdout).toBeFalsy(); }); - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--env', 'isProd']); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', 'isProd']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -22,8 +22,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/prod.js'))).toBeTruthy(); }); - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--env', 'isDev']); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', 'isDev']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -32,8 +32,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/dev.js'))).toBeTruthy(); }); - it('Supports passing string in env', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('Supports passing string in env', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--env', 'environment=production', '--env', @@ -49,8 +49,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/Luffy.js'))).toBeTruthy(); }); - it('Supports long nested values in env', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('Supports long nested values in env', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--env', 'file.name.is.this=Atsumu', '--env', @@ -66,8 +66,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/Atsumu.js'))).toBeTruthy(); }); - it('Supports multiple equal in a string', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('Supports multiple equal in a string', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--env', 'file=name=is=Eren', '--env', @@ -83,8 +83,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/name=is=Eren.js'))).toBeTruthy(); }); - it('Supports dot at the end', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('Supports dot at the end', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--env', 'name.=Hisoka', '--env', @@ -100,8 +100,15 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/Hisoka.js'))).toBeTruthy(); }); - it('Supports dot at the end', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--env', 'name.', '--env', 'environment=dot', '-c', 'webpack.env.config.js']); + it('Supports dot at the end', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ + '--env', + 'name.', + '--env', + 'environment=dot', + '-c', + 'webpack.env.config.js', + ]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -110,8 +117,8 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/true.js'))).toBeTruthy(); }); - it('is able to understand multiple env flags', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--env', 'isDev', '--env', 'verboseStats', '--env', 'envMessage']); + it('is able to understand multiple env flags', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', 'isDev', '--env', 'verboseStats', '--env', 'envMessage']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -119,11 +126,15 @@ describe('function configuration', () => { // check that the verbose env is respected expect(stdout).toContain('LOG from webpack'); + let data; + + try { + data = await readFile(resolve(__dirname, './dist/dev.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + // check if the values from DefinePlugin make it to the compiled code - readFile(resolve(__dirname, './dist/dev.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('env message present'); - done(); - }); + expect(data).toContain('env message present'); }); }); diff --git a/test/build/config/type/function/function.test.js b/test/build/config/type/function/function.test.js index 959c85d168a..9b24eba0faf 100644 --- a/test/build/config/type/function/function.test.js +++ b/test/build/config/type/function/function.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('function', () => { - it('is able to understand a configuration file as a function', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + it('is able to understand a configuration file as a function', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/promise-array/promise-array.test.js b/test/build/config/type/promise-array/promise-array.test.js index 4b23b7c18cb..ae8aaf52a29 100644 --- a/test/build/config/type/promise-array/promise-array.test.js +++ b/test/build/config/type/promise-array/promise-array.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('promise array', () => { - it('is able to understand a configuration file as a promise', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js'], false); + it('is able to understand a configuration file as a promise', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); expect(exitCode).toBe(0); expect(stdout).toBeTruthy(); diff --git a/test/build/config/type/promise-function/promise-function.test.js b/test/build/config/type/promise-function/promise-function.test.js index c3892236cbb..1d1801492e4 100644 --- a/test/build/config/type/promise-function/promise-function.test.js +++ b/test/build/config/type/promise-function/promise-function.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('promise function', () => { - it('is able to understand a configuration file as a promise', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js'], false); + it('is able to understand a configuration file as a promise', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/promise/promise.test.js b/test/build/config/type/promise/promise.test.js index 6ffb9b2c58a..238eb10b01a 100644 --- a/test/build/config/type/promise/promise.test.js +++ b/test/build/config/type/promise/promise.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('promise', () => { - it('is able to understand a configuration file as a promise', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js'], false); + it('is able to understand a configuration file as a promise', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/amd-flag.test.js b/test/build/core-flags/amd-flag.test.js index 04a4e32f0ce..e8702f51fcb 100644 --- a/test/build/core-flags/amd-flag.test.js +++ b/test/build/core-flags/amd-flag.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe('--no-amd flag', () => { - it('should accept --no-amd', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-amd']); + it('should accept --no-amd', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-amd']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/bail-flag.test.js b/test/build/core-flags/bail-flag.test.js index b9f4d2819d7..d0166e8b759 100644 --- a/test/build/core-flags/bail-flag.test.js +++ b/test/build/core-flags/bail-flag.test.js @@ -3,16 +3,16 @@ const { run } = require('../../utils/test-utils'); describe('--bail flag', () => { - it('should set bail to true', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--bail']); + it('should set bail to true', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--bail']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('bail: true'); }); - it('should set bail to false', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-bail']); + it('should set bail to false', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-bail']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/cache-flags.test.js b/test/build/core-flags/cache-flags.test.js index d77c14b288c..297c1a77152 100644 --- a/test/build/core-flags/cache-flags.test.js +++ b/test/build/core-flags/cache-flags.test.js @@ -8,40 +8,40 @@ const { existsSync, writeFileSync, unlinkSync } = require('fs'); const { resolve } = require('path'); describe('cache related flags from core', () => { - it('should be successful with --cache ', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--cache']); + it('should be successful with --cache ', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--cache']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`type: 'memory'`); }); - it('should be successful with --no-cache ', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-cache']); + it('should be successful with --no-cache ', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-cache']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('cache: false'); }); - it('should set cache.type', () => { + it('should set cache.type', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-type'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', cacheLocation]); + const { exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', cacheLocation]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`type: 'filesystem'`); }); - it('should set cache.cacheDirectory with --cache-cache-directory', () => { + it('should set cache.cacheDirectory with --cache-cache-directory', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-cache-directory'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '--cache-cache-directory', @@ -56,12 +56,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain('test-cache-path'); }); - it('should set cache.cacheLocation with --cache-cache-locations', () => { + it('should set cache.cacheLocation with --cache-cache-locations', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-cache-location'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', cacheLocation]); + const { exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', cacheLocation]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -70,12 +70,12 @@ describe('cache related flags from core', () => { expect(existsSync(cacheLocation)).toBeTruthy(); }); - it('should set cache.hashAlgorithm with --cache-hash-algorithm', () => { + it('should set cache.hashAlgorithm with --cache-hash-algorithm', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-hash-algorithm'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '--cache-hash-algorithm', @@ -90,12 +90,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain(`hashAlgorithm: 'sha256'`); }); - it('should set cache.name with --cache-name', () => { + it('should set cache.name with --cache-name', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-name'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '--cache-name', @@ -110,12 +110,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain(`name: 'cli-test'`); }); - it('should set cache.store with --cache-store', () => { + it('should set cache.store with --cache-store', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-store'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '--cache-store', @@ -130,12 +130,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain(`store: 'pack'`); }); - it('should set cache.version with --cache-version', () => { + it('should set cache.version with --cache-version', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-version'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '--cache-version', @@ -150,12 +150,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain(`version: '1.1.3'`); }); - it('should assign cache build dependencies correctly when cache type is filesystem', () => { + it('should assign cache build dependencies correctly when cache type is filesystem', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies'); rimraf.sync(cacheLocation); - let { stderr, stdout, exitCode } = run(__dirname, [ + let { stderr, stdout, exitCode } = await run(__dirname, [ '--cache-type', 'filesystem', '-c', @@ -172,7 +172,7 @@ describe('cache related flags from core', () => { expect(stdout).not.toContain('[cached]'); // Run again to check for cache - ({ exitCode, stderr, stdout } = run(__dirname, [ + ({ exitCode, stderr, stdout } = await run(__dirname, [ '--cache-type', 'filesystem', '-c', @@ -186,7 +186,7 @@ describe('cache related flags from core', () => { expect(stdout).toContain('[cached]'); }); - it('should assign cache build dependencies correctly when cache type is filesystem in config', () => { + it('should assign cache build dependencies correctly when cache type is filesystem in config', async () => { const cacheLocation = path.resolve( __dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies-in-config', @@ -194,7 +194,12 @@ describe('cache related flags from core', () => { rimraf.sync(cacheLocation); - let { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.cache.config.js', '--cache-cache-location', cacheLocation]); + let { exitCode, stderr, stdout } = await run(__dirname, [ + '-c', + './webpack.cache.config.js', + '--cache-cache-location', + cacheLocation, + ]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -203,17 +208,17 @@ describe('cache related flags from core', () => { // expect(stdout).toContain(`'${path.join(__dirname, './webpack.cache.config.js')}'`); // Run again to check for cache - ({ exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.cache.config.js', '--cache-cache-location', cacheLocation])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.cache.config.js', '--cache-cache-location', cacheLocation])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('[cached]'); }); - it('should assign cache build dependencies with multiple configs', () => { + it('should assign cache build dependencies with multiple configs', async () => { rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/config-cache')); - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js']); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -223,10 +228,10 @@ describe('cache related flags from core', () => { expect(stdout).not.toContain(`'${resolve(__dirname, 'webpack.config.js')}'`); }); - it('should assign cache build dependencies with default config', () => { + it('should assign cache build dependencies with default config', async () => { rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-development')); - const { exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--name', 'cache-core-flag-test']); + const { exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '--name', 'cache-core-flag-test']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -235,12 +240,12 @@ describe('cache related flags from core', () => { expect(stdout).toContain("type: 'filesystem'"); }); - it('should assign cache build dependencies with merged configs', () => { + it('should assign cache build dependencies with merged configs', async () => { const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-merge'); rimraf.sync(cacheLocation); - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ '-c', './webpack.cache.config.js', '-c', @@ -259,21 +264,21 @@ describe('cache related flags from core', () => { }); // TODO: fix it later - it.skip('should invalidate cache when config changes', () => { + it.skip('should invalidate cache when config changes', async () => { rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/default-development')); rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/default-production')); // Creating a temporary webpack config writeFileSync(resolve(__dirname, './webpack.test.config.js'), 'module.exports = {mode: "development"}'); - let { exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js']); + let { exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).not.toContain('[cached]'); // Running again should use the cache - ({ exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js'])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js'])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -282,7 +287,7 @@ describe('cache related flags from core', () => { // Change config to invalidate cache writeFileSync(resolve(__dirname, './webpack.test.config.js'), 'module.exports = {mode: "production"}'); - ({ exitCode, stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js'])); + ({ exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js'])); unlinkSync(resolve(__dirname, './webpack.test.config.js')); diff --git a/test/build/core-flags/context-flag.test.js b/test/build/core-flags/context-flag.test.js index 380fce2eb72..9e0784cb95c 100644 --- a/test/build/core-flags/context-flag.test.js +++ b/test/build/core-flags/context-flag.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run, isWindows } = require('../../utils/test-utils'); describe('--context flag', () => { - it('should allow to set context', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--context', './']); + it('should allow to set context', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--context', './']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -18,8 +18,8 @@ describe('--context flag', () => { } }); - it('should throw module not found error for invalid context', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--context', '/invalid-context-path']); + it('should throw module not found error for invalid context', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--context', '/invalid-context-path']); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/dependencies-flag.test.js b/test/build/core-flags/dependencies-flag.test.js index 61d75ac28fe..2dbfdcff15f 100644 --- a/test/build/core-flags/dependencies-flag.test.js +++ b/test/build/core-flags/dependencies-flag.test.js @@ -3,16 +3,16 @@ const { run } = require('../../utils/test-utils'); describe('--dependencies and related flags', () => { - it('should allow to set dependencies option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--dependencies', 'lodash']); + it('should allow to set dependencies option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--dependencies', 'lodash']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`dependencies: [ 'lodash' ]`); }); - it('should reset dependencies option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--dependencies-reset']); + it('should reset dependencies option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--dependencies-reset']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/devtool-flag.test.js b/test/build/core-flags/devtool-flag.test.js index 1ec9c19056e..ee3697a52b1 100644 --- a/test/build/core-flags/devtool-flag.test.js +++ b/test/build/core-flags/devtool-flag.test.js @@ -3,24 +3,24 @@ const { run } = require('../../utils/test-utils'); describe('--devtool flag', () => { - it('should set devtool option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--devtool', 'source-map']); + it('should set devtool option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--devtool', 'source-map']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`devtool: 'source-map'`); }); - it('should set devtool option to false', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-devtool']); + it('should set devtool option to false', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-devtool']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`devtool: false`); }); - it('should log error for invalid config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--devtool', 'invalid']); + it('should log error for invalid config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--devtool', 'invalid']); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object'); diff --git a/test/build/core-flags/entry-reset-flag.test.js b/test/build/core-flags/entry-reset-flag.test.js index 19f99e4767c..140cce8cff8 100644 --- a/test/build/core-flags/entry-reset-flag.test.js +++ b/test/build/core-flags/entry-reset-flag.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe('--entry-reset flag', () => { - it('should reset entry correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry-reset', '--entry', './src/entry.js']); + it('should reset entry correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry-reset', '--entry', './src/entry.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -12,8 +12,8 @@ describe('--entry-reset flag', () => { expect(stdout).not.toContain('src/main.js'); }); - it('should throw error if entry is an empty array', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry-reset']); + it('should throw error if entry is an empty array', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry-reset']); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object'); diff --git a/test/build/core-flags/experiments-flag.test.js b/test/build/core-flags/experiments-flag.test.js index 0796732220d..c87cf9b037b 100644 --- a/test/build/core-flags/experiments-flag.test.js +++ b/test/build/core-flags/experiments-flag.test.js @@ -24,8 +24,8 @@ describe('experiments option related flag', () => { } if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -37,8 +37,8 @@ describe('experiments option related flag', () => { } }); - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/externals-flags.test.js b/test/build/core-flags/externals-flags.test.js index 3d08dec8d17..cf2758d7e90 100644 --- a/test/build/core-flags/externals-flags.test.js +++ b/test/build/core-flags/externals-flags.test.js @@ -7,32 +7,32 @@ const cli = new CLI(); const externalsPresetsFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('externals-presets-')); describe('externals related flag', () => { - it('should set externals properly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--externals', './main.js']); + it('should set externals properly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--externals', './main.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`externals: [ './main.js' ]`); }); - it('should set externalsType properly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--externals', 'var']); + it('should set externalsType properly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--externals', 'var']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`externalsType: 'var'`); }); - it('should accept --external-type values', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--externals-type', 'var']); + it('should accept --external-type values', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--externals-type', 'var']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`externalsType: 'var'`); }); - it('should reset externals', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--externals-reset']); + it('should reset externals', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--externals-reset']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -44,16 +44,16 @@ describe('externals related flag', () => { const property = flag.name.split('externals-presets-')[1]; const propName = hyphenToUpperCase(property); - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: true`); }); - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/ignore-warnings/ignore-warnings-flag.test.js b/test/build/core-flags/ignore-warnings/ignore-warnings-flag.test.js index b9c449c74f9..5dd613568d6 100644 --- a/test/build/core-flags/ignore-warnings/ignore-warnings-flag.test.js +++ b/test/build/core-flags/ignore-warnings/ignore-warnings-flag.test.js @@ -3,8 +3,8 @@ const { run } = require('../../../utils/test-utils'); describe('ignore-warnings', () => { - it('should ignore the warning emitted', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--ignore-warnings', /Generated Warning/]); + it('should ignore the warning emitted', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--ignore-warnings', /Generated Warning/]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -12,8 +12,8 @@ describe('ignore-warnings', () => { expect(stdout).not.toContain('Generated Warning'); }); - it('should reset options.ignoreWarnings', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--ignore-warnings', /Generated Warning/, '--ignore-warnings-reset']); + it('should reset options.ignoreWarnings', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--ignore-warnings', /Generated Warning/, '--ignore-warnings-reset']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -21,8 +21,8 @@ describe('ignore-warnings', () => { expect(stdout).toContain('Generated Warning'); }); - it('should throw error for an invalid value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--ignore-warnings', 'abc']); + it('should throw error for an invalid value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--ignore-warnings', 'abc']); expect(exitCode).toBe(2); expect(stderr).toContain(`Invalid value 'abc' for the '--ignore-warnings' option`); diff --git a/test/build/core-flags/infrastructure-logging.test.js b/test/build/core-flags/infrastructure-logging.test.js index b87470f8394..25aed04c93d 100644 --- a/test/build/core-flags/infrastructure-logging.test.js +++ b/test/build/core-flags/infrastructure-logging.test.js @@ -3,24 +3,24 @@ const { run } = require('../../utils/test-utils'); describe('infrastructure logging related flag', () => { - it('should set infrastructureLogging.debug properly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--infrastructure-logging-debug', 'myPlugin']); + it('should set infrastructureLogging.debug properly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--infrastructure-logging-debug', 'myPlugin']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`debug: [ 'myPlugin' ]`); }); - it('should reset infrastructureLogging.debug to []', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--infrastructure-logging-debug-reset']); + it('should reset infrastructureLogging.debug to []', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--infrastructure-logging-debug-reset']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`debug: []`); }); - it('should set infrastructureLogging.level properly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--infrastructure-logging-level', 'log']); + it('should set infrastructureLogging.level properly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--infrastructure-logging-level', 'log']); expect(exitCode).toBe(0); expect(stderr).toContain("Compiler 'compiler' starting..."); diff --git a/test/build/core-flags/invalid-flag.test.js b/test/build/core-flags/invalid-flag.test.js index ffaa9198cac..3a06b2784b0 100644 --- a/test/build/core-flags/invalid-flag.test.js +++ b/test/build/core-flags/invalid-flag.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe('invalid flag value', () => { - it('should throw an error for the invalid value passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-script-type', 'unknown']); + it('should throw an error for the invalid value passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-script-type', 'unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Invalid value 'unknown' for the '--output-script-type' option"); diff --git a/test/build/core-flags/module-flags.test.js b/test/build/core-flags/module-flags.test.js index 5116074943e..d1c6d33ea65 100644 --- a/test/build/core-flags/module-flags.test.js +++ b/test/build/core-flags/module-flags.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); +const { run, hyphenToUpperCase, normalizeStdout } = require('../../utils/test-utils'); const CLI = require('../../../packages/webpack-cli/lib/index'); const cli = new CLI(); @@ -22,50 +22,50 @@ describe('module config related flag', () => { !flag.name.includes('module-no-parse') && !flag.name.includes('module-parser-') ) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name.includes('-reset')) { - const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + const { stderr, stdout } = await run(__dirname, [`--${flag.name}`]); const option = propName.split('Reset')[0]; expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${option}: []`); + expect(normalizeStdout(stdout)).toContain(`${option}: []`); } else if (flag.name.includes('rules-')) { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("sideEffects: 'flag'"); + expect(normalizeStdout(stdout)).toContain("sideEffects: 'flag'"); } else if (flag.name.startsWith('module-generator-')) { - const { exitCode, stderr, stdout } = run(__dirname, [ + const { exitCode, stderr, stdout } = await run(__dirname, [ `--module-generator-asset-emit`, '--module-generator-asset-resource-emit', ]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("generator: { asset: { emit: true }, 'asset/resource': { emit: true } }"); + expect(normalizeStdout(stdout)).toContain("generator: { asset: { emit: true }, 'asset/resource': { emit: true } }"); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${propName}: true`); + expect(normalizeStdout(stdout)).toContain(`${propName}: true`); } }); if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); if (flag.name.includes('rules-')) { - expect(stdout).toContain('sideEffects: false'); + expect(normalizeStdout(stdout)).toContain('sideEffects: false'); } else if (flag.name.startsWith('module-generator-')) { - expect(stdout).toContain('emit: false'); + expect(normalizeStdout(stdout)).toContain('emit: false'); } else { - expect(stdout).toContain(`${propName}: false`); + expect(normalizeStdout(stdout)).toContain(`${propName}: false`); } }); } @@ -75,47 +75,47 @@ describe('module config related flag', () => { flag.configs.filter((config) => config.type === 'string').length > 0 && !(flag.name.includes('module-parser-') || flag.name.startsWith('module-generator')) ) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name === 'module-no-parse') { - let { stderr, stdout, exitCode } = run(__dirname, [`--${flag.name}`, 'value']); + let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`, 'value']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain('value'); + expect(normalizeStdout(stdout)).toContain('value'); } else if (flag.name.includes('reg-exp')) { - let { stdout, stderr, exitCode } = run(__dirname, [`--${flag.name}`, '/ab?c*/']); + let { stdout, stderr, exitCode } = await run(__dirname, [`--${flag.name}`, '/ab?c*/']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${propName}: /ab?c*/`); + expect(normalizeStdout(stdout)).toContain(`${propName}: /ab?c*/`); } else if (flag.name.includes('module-rules-')) { if (propName === 'use' || propName === 'type') { - let { stdout } = run(__dirname, [`--${flag.name}`, 'javascript/auto']); + let { stdout } = await run(__dirname, [`--${flag.name}`, 'javascript/auto']); - expect(stdout).toContain(`${propName}: 'javascript/auto'`); + expect(normalizeStdout(stdout)).toContain(`${propName}: 'javascript/auto'`); } else if (property.includes('use-')) { - let stdout = run(__dirname, ['--module-rules-use-loader', 'myLoader']).stdout; - expect(stdout).toContain(`use: [Object]`); + let { stdout } = await run(__dirname, ['--module-rules-use-loader', 'myLoader']); + expect(normalizeStdout(stdout)).toContain(`use: [Object]`); } else if (propName === 'enforce') { - let stdout = run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']).stdout; - expect(stdout).toContain(`${propName}: 'pre'`); + let { stdout } = await run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']); + expect(normalizeStdout(stdout)).toContain(`${propName}: 'pre'`); } else { - let stdout = run(__dirname, [`--${flag.name}`, '/rules-value']).stdout; - expect(stdout).toContain('rules-value'); + let { stdout } = await run(__dirname, [`--${flag.name}`, '/rules-value']); + expect(normalizeStdout(stdout)).toContain('rules-value'); } } else { - let { stderr, stdout, exitCode } = run(__dirname, [`--${flag.name}`, 'value']); + let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`, 'value']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${propName}: 'value'`); + expect(normalizeStdout(stdout)).toContain(`${propName}: 'value'`); } }); } }); - it('should config module.generator flags coorectly', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('should config module.generator flags coorectly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--module-generator-asset-data-url-encoding', 'base64', '--module-generator-asset-data-url-mimetype', @@ -124,11 +124,11 @@ describe('module config related flag', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`generator: { asset: { dataUrl: [Object] } }`); + expect(normalizeStdout(stdout)).toContain(`generator: { asset: { dataUrl: [Object] } }`); }); - it('should config module.parser flags correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it('should config module.parser flags correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--module-parser-javascript-browserify', '--module-parser-javascript-commonjs', '--module-parser-javascript-harmony', @@ -139,27 +139,27 @@ describe('module config related flag', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain('browserify: true'); - expect(stdout).toContain('commonjs: true'); - expect(stdout).toContain('harmony: true'); - expect(stdout).toContain('import: true'); - expect(stdout).toContain('node: false'); + expect(normalizeStdout(stdout)).toContain('browserify: true'); + expect(normalizeStdout(stdout)).toContain('commonjs: true'); + expect(normalizeStdout(stdout)).toContain('harmony: true'); + expect(normalizeStdout(stdout)).toContain('import: true'); + expect(normalizeStdout(stdout)).toContain('node: false'); }); - it('should accept --module-parser-javascript-url=relative', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--module-parser-javascript-url', 'relative']); + it('should accept --module-parser-javascript-url=relative', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--module-parser-javascript-url', 'relative']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`url: 'relative'`); + expect(normalizeStdout(stdout)).toContain(`url: 'relative'`); }); - it('should throw an error for an invalid value of --module-parser-javascript-url', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--module-parser-javascript-url', 'test']); + it('should throw an error for an invalid value of --module-parser-javascript-url', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--module-parser-javascript-url', 'test']); expect(exitCode).toBe(2); - expect(stderr).toContain(`Invalid value 'test' for the '--module-parser-javascript-url' option`); - expect(stderr).toContain(`Expected: 'relative'`); + expect(normalizeStdout(stderr)).toContain(`Invalid value 'test' for the '--module-parser-javascript-url' option`); + expect(normalizeStdout(stderr)).toContain(`Expected: 'relative'`); expect(stdout).toBeFalsy(); }); }); diff --git a/test/build/core-flags/node-flags.test.js b/test/build/core-flags/node-flags.test.js index 423dbfc7ff4..c70338cd011 100644 --- a/test/build/core-flags/node-flags.test.js +++ b/test/build/core-flags/node-flags.test.js @@ -3,24 +3,24 @@ const { run } = require('../../utils/test-utils'); describe('node option related flags', () => { - it('should config node option to false', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-node']); + it('should config node option to false', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('node: false'); }); - it('should set node.filename correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-filename', 'mock']); + it('should set node.filename correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-filename', 'mock']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`__filename: 'mock'`); }); - it('should set node.filename correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-dirname', 'mock']); + it('should set node.filename correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-dirname', 'mock']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/optimization-flags.test.js b/test/build/core-flags/optimization-flags.test.js index 97fc8b5debc..98cd85a7ef8 100644 --- a/test/build/core-flags/optimization-flags.test.js +++ b/test/build/core-flags/optimization-flags.test.js @@ -22,26 +22,26 @@ describe('optimization config related flag', () => { } if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name === 'optimization-split-chunks') { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`splitChunks: false`); } else if (flag.name.includes('reset')) { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: []`); } else if (flag.name === 'optimization-runtime-chunk') { - const { exitCode, stderr } = run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -50,8 +50,8 @@ describe('optimization config related flag', () => { }); if (!flag.name.includes('reset')) { - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -72,39 +72,39 @@ describe('optimization config related flag', () => { !flag.name.includes('runtime-') && !flag.name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name === 'optimization-split-chunks-chunks') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'initial']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'initial']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`chunks: 'initial'`); } else if (flag.name === 'optimization-mangle-exports') { - const { exitCode, stderr, stdout } = run(__dirname, ['--optimization-mangle-exports', 'size']); + const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-mangle-exports', 'size']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mangleExports: 'size'`); } else if (flag.name === 'optimization-used-exports') { - const { exitCode, stderr, stdout } = run(__dirname, ['--optimization-used-exports', 'global']); + const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-used-exports', 'global']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`usedExports: 'global'`); } else if (flag.name === 'optimization-split-chunks-default-size-types') { - const { exitCode, stderr, stdout } = run(__dirname, ['--optimization-split-chunks-default-size-types', 'global']); + const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-split-chunks-default-size-types', 'global']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`defaultSizeTypes: [Array]`); } else if (flag.name === 'optimization-side-effects') { - const { exitCode, stderr, stdout } = run(__dirname, ['--optimization-side-effects', 'flag']); + const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-side-effects', 'flag']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'flag'`); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'named']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'named']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -114,8 +114,8 @@ describe('optimization config related flag', () => { } if (flag.configs.filter((config) => config.type === 'number').length > 0 && !flag.name.includes('fallback-')) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/output-flags.test.js b/test/build/core-flags/output-flags.test.js index 80b16b54532..849d3f813e8 100644 --- a/test/build/core-flags/output-flags.test.js +++ b/test/build/core-flags/output-flags.test.js @@ -20,18 +20,18 @@ describe('output config related flag', () => { const propName = hyphenToUpperCase(property); if (flag.configs.filter((config) => config.type === 'boolean').length > 0 && !flag.name.includes('output-library')) { - it(`should config --${flag.name} correctly`, () => { - let { stderr, stdout, exitCode } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`]); if (flag.name === 'output-module') { //'output.module: true' is only allowed when 'experiments.outputModule' is enabled - ({ exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '--experiments-output-module'])); + ({ exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '--experiments-output-module'])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('module: true'); } else if (flag.name === 'output-strict-module-error-handling') { - ({ exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '--hot'])); + ({ exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '--hot'])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -50,8 +50,8 @@ describe('output config related flag', () => { }); if (!flag.name.endsWith('-reset') && !flag.name.includes('output-strict-module-error-handling')) { - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -61,8 +61,8 @@ describe('output config related flag', () => { } if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -71,81 +71,81 @@ describe('output config related flag', () => { } if (flag.configs.filter((config) => config.type === 'string').length > 0 && !flag.name.includes('output-library')) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name === 'output-cross-origin-loading') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'anonymous']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'anonymous']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'anonymous'`); } else if (flag.name === 'output-chunk-format') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'commonjs']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'commonjs']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'commonjs'`); } else if (flag.name === 'output-chunk-loading') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'jsonp']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'jsonp']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'jsonp'`); } else if (flag.name === 'output-enabled-chunk-loading-types' || flag.name === 'output-enabled-wasm-loading-types') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'async-node']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: [ 'async-node' ]`); } else if (flag.name === 'output-enabled-library-type') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'amd']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'amd']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'amd'`); } else if (flag.name === 'output-hash-function') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'sha256']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'sha256']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`hashFunction: 'sha256'`); } else if (flag.name === 'output-script-type') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'module']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'module']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'module'`); } else if (flag.name === 'output-enabled-library-types') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'var']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'var']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: [ 'var' ]`); } else if (flag.name === 'output-path') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'test']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'test']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('test'); } else if (flag.name === 'output-pathinfo') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'verbose']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`pathinfo: 'verbose'`); } else if (flag.name === 'output-worker-chunk-loading') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'async-node']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'async-node'`); } else if (flag.name.includes('wasm')) { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'async-node']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'async-node'`); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'test']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'test']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -155,8 +155,8 @@ describe('output config related flag', () => { } }); - it(`should config name, type and export correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it(`should config name, type and export correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--output-library-name', 'myLibrary', '--output-library-type', @@ -177,8 +177,8 @@ describe('output config related flag', () => { expect(stdout).toContain('umdNamedDefine: true'); }); - it('should be succesful with --output-library-reset correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-library-reset', '--output-library', 'newLibrary']); + it('should be succesful with --output-library-reset correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-library-reset', '--output-library', 'newLibrary']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/parallelism-flag.test.js b/test/build/core-flags/parallelism-flag.test.js index a3b371f2cd9..48c711a267b 100644 --- a/test/build/core-flags/parallelism-flag.test.js +++ b/test/build/core-flags/parallelism-flag.test.js @@ -3,16 +3,16 @@ const { run } = require('../../utils/test-utils'); describe('--parallelism flag', () => { - it('should set parallelism to the value passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--parallelism', '50']); + it('should set parallelism to the value passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--parallelism', '50']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('parallelism: 50'); }); - it('should throw error for invalid parallelism value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--parallelism', '0']); + it('should throw error for invalid parallelism value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--parallelism', '0']); expect(exitCode).toBe(2); expect(stderr).toContain('configuration.parallelism should be >= 1'); diff --git a/test/build/core-flags/performance-flags.test.js b/test/build/core-flags/performance-flags.test.js index c312a6c9d56..0e7d2ef92ad 100644 --- a/test/build/core-flags/performance-flags.test.js +++ b/test/build/core-flags/performance-flags.test.js @@ -7,8 +7,8 @@ const cli = new CLI(); const performanceFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('performance-')); describe('module config related flag', () => { - it(`should config --performance option correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-performance`]); + it(`should config --performance option correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-performance`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -21,8 +21,8 @@ describe('module config related flag', () => { const propName = hyphenToUpperCase(property); if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -31,8 +31,8 @@ describe('module config related flag', () => { } if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'warning']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'warning']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/profile-flag.test.js b/test/build/core-flags/profile-flag.test.js index 78077a68c77..84148ead247 100644 --- a/test/build/core-flags/profile-flag.test.js +++ b/test/build/core-flags/profile-flag.test.js @@ -3,16 +3,16 @@ const { run } = require('../../utils/test-utils'); describe('--profile flag', () => { - it('should set profile to true', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--profile']); + it('should set profile to true', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--profile']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('profile: true'); }); - it('should set profile to false', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-profile']); + it('should set profile to false', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-profile']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/records-flag.test.js b/test/build/core-flags/records-flag.test.js index 52d9e4fee81..21d89336160 100644 --- a/test/build/core-flags/records-flag.test.js +++ b/test/build/core-flags/records-flag.test.js @@ -3,24 +3,24 @@ const { run } = require('../../utils/test-utils'); describe('module config related flag', () => { - it('should config records-path correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--records-path', './bin/records.json']); + it('should config records-path correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--records-path', './bin/records.json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('records.json'); }); - it('should config records-input-path correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--records-input-path', './bin/records.json']); + it('should config records-input-path correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--records-input-path', './bin/records.json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('records.json'); }); - it('should config records-output-path correctly', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--records-output-path', './bin/records.json']); + it('should config records-output-path correctly', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--records-output-path', './bin/records.json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/resolve-flags.test.js b/test/build/core-flags/resolve-flags.test.js index 31d3ed4241c..920d9e281d7 100644 --- a/test/build/core-flags/resolve-flags.test.js +++ b/test/build/core-flags/resolve-flags.test.js @@ -22,8 +22,8 @@ describe('resolve config related flags', () => { !flag.name.includes('alias-') && !flag.name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, () => { - const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { stderr, stdout } = await run(__dirname, [`--${flag.name}`]); // expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -42,8 +42,8 @@ describe('resolve config related flags', () => { !flag.name.includes('alias-') && !flag.name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, () => { - const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'browser']); + it(`should config --${flag.name} correctly`, async () => { + const { stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'browser']); // expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -57,8 +57,8 @@ describe('resolve config related flags', () => { } if (flag.name.includes('alias-') || flag.name.includes('fallback-')) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ `--resolve-alias-alias`, 'alias', '--resolve-alias-name', @@ -94,8 +94,8 @@ describe('resolve config related flags', () => { }); if (flag.name.includes('reset')) { - it(`should config --${flag.name} alias-reset flags correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [ + it(`should config --${flag.name} alias-reset flags correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ '--resolve-alias-reset', '--resolve-fallback-reset', '--resolve-alias-fields-reset', diff --git a/test/build/core-flags/snapshot-flags.test.js b/test/build/core-flags/snapshot-flags.test.js index 5aa61e8ad07..3f768bf2a27 100644 --- a/test/build/core-flags/snapshot-flags.test.js +++ b/test/build/core-flags/snapshot-flags.test.js @@ -13,8 +13,8 @@ describe('snapshot config related flags', () => { const propName = hyphenToUpperCase(property); if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -31,8 +31,8 @@ describe('snapshot config related flags', () => { } if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, './mock/mock.js']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, './mock/mock.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/stats-flags.test.js b/test/build/core-flags/stats-flags.test.js index 6be8e91fa25..ab64ff57be7 100644 --- a/test/build/core-flags/stats-flags.test.js +++ b/test/build/core-flags/stats-flags.test.js @@ -13,8 +13,8 @@ describe('stats config related flag', () => { const propName = hyphenToUpperCase(property); if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -28,8 +28,8 @@ describe('stats config related flag', () => { }); if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -39,8 +39,8 @@ describe('stats config related flag', () => { } if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -51,34 +51,34 @@ describe('stats config related flag', () => { if (flag.configs.filter((config) => config.type === 'string').length > 0) { const acceptsSingleValue = ['preset', 'modulesSort', 'logging', 'chunksSort', 'assetsSort']; - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (flag.name.includes('stats-colors')) { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'u001b[32m']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'u001b[32m']); const option = flag.name.split('stats-colors-')[1]; expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`colors: { ${option}: 'u001b[32m' }`); } else if (acceptsSingleValue.includes(propName)) { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'log']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'log'`); } else if (flag.name === 'stats-context') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'log']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('log'); } else if (flag.name === 'stats-entrypoints' || flag.name === 'stats-error-details') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'auto']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'auto']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'auto'`); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'log']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/core-flags/watch-flags.test.js b/test/build/core-flags/watch-flags.test.js index 8e957d4f2cf..5ea212d446d 100644 --- a/test/build/core-flags/watch-flags.test.js +++ b/test/build/core-flags/watch-flags.test.js @@ -17,8 +17,8 @@ describe('watch config related flag', () => { } if (flag.configs.filter((config) => config.type === 'boolean').length > 0 && flag.name !== 'watch') { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`]); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); console.log(stdout); console.log(stderr); @@ -34,8 +34,8 @@ describe('watch config related flag', () => { }); if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -45,8 +45,8 @@ describe('watch config related flag', () => { } if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + it(`should config --${flag.name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -55,15 +55,15 @@ describe('watch config related flag', () => { } if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, () => { + it(`should config --${flag.name} correctly`, async () => { if (propName === 'poll') { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, '200']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '200']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`watchOptions: { ${propName}: 200 }`); } else { - const { exitCode, stderr, stdout } = run(__dirname, [`--${flag.name}`, 'ignore.js']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'ignore.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/custom-webpack/custom-webpack.test.js b/test/build/custom-webpack/custom-webpack.test.js index d0df8919ceb..ec57011ef31 100644 --- a/test/build/custom-webpack/custom-webpack.test.js +++ b/test/build/custom-webpack/custom-webpack.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../utils/test-utils'); describe('custom-webpack', () => { - it('should use custom-webpack.js', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { + it('should use custom-webpack.js', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_PACKAGE: resolve(__dirname, './custom-webpack.js') }, }); @@ -14,8 +14,8 @@ describe('custom-webpack', () => { expect(stdout).toContain('main.js'); }); - it('should throw an error for invalid-webpack.js', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { + it('should throw an error for invalid-webpack.js', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_PACKAGE: resolve(__dirname, './invalid-webpack.js') }, }); diff --git a/test/build/defaults/output-defaults.test.js b/test/build/defaults/output-defaults.test.js index 9a996b03463..1fa0c532862 100644 --- a/test/build/defaults/output-defaults.test.js +++ b/test/build/defaults/output-defaults.test.js @@ -5,8 +5,8 @@ const { resolve } = require('path'); const { run } = require('../../utils/test-utils'); describe('output flag defaults', () => { - it('should create default file for a given directory', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './a.js', '--output-path', './binary'], false); + it('should create default file for a given directory', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path', './binary'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -16,8 +16,8 @@ describe('output flag defaults', () => { expect(existsSync(resolve(__dirname, './binary/main.js'))).toBeTruthy(); }); - it('set default output directory on no output flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './a.js'], false); + it('set default output directory on no output flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -25,8 +25,8 @@ describe('output flag defaults', () => { expect(existsSync(resolve(__dirname, './binary/main.js'))).toBeTruthy(); }); - it('throw error on empty output flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './a.js', '--output-path'], false); + it('throw error on empty output flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path'], false); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Option '-o, --output-path ' argument missing"); diff --git a/test/build/devtool/array/source-map-array.test.js b/test/build/devtool/array/source-map-array.test.js index 5dd04ffeb69..441fc66912f 100644 --- a/test/build/devtool/array/source-map-array.test.js +++ b/test/build/devtool/array/source-map-array.test.js @@ -1,33 +1,42 @@ 'use strict'; -const { readdir } = require('fs'); + const { resolve } = require('path'); -const { run } = require('../../../utils/test-utils'); +const { run, readdir } = require('../../../utils/test-utils'); describe('source-map object', () => { - it('should treat source-map settings right', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('should treat source-map settings right', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - readdir(resolve(__dirname, 'dist'), (err, files) => { - expect(err).toBe(null); - expect(files.length).toBe(3); - done(); - }); + let files; + + try { + files = await readdir(resolve(__dirname, 'dist')); + } catch (error) { + expect(error).toBe(null); + } + + expect(files.length).toBe(3); }); - it('should override entire array on flag', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--devtool', 'source-map', '--output-path', './binary'], false); + + it('should override entire array on flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--devtool', 'source-map', '--output-path', './binary'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - readdir(resolve(__dirname, 'binary'), (err, files) => { - expect(err).toBe(null); - expect(files.length).toBe(4); - done(); - }); + let files; + + try { + files = await readdir(resolve(__dirname, 'binary')); + } catch (error) { + expect(error).toBe(null); + } + + expect(files.length).toBe(4); }); }); diff --git a/test/build/devtool/object/source-map-object.test.js b/test/build/devtool/object/source-map-object.test.js index a15c4e2fe61..f89652c6c90 100644 --- a/test/build/devtool/object/source-map-object.test.js +++ b/test/build/devtool/object/source-map-object.test.js @@ -1,25 +1,29 @@ 'use strict'; -const { readdir, existsSync } = require('fs'); +const { existsSync } = require('fs'); const { resolve } = require('path'); -const { run } = require('../../../utils/test-utils'); +const { run, readdir } = require('../../../utils/test-utils'); describe('source-map object', () => { - it('should not write a source map for obj config', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.eval.config.js']); + it('should not write a source map for obj config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.eval.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - readdir(resolve(__dirname, 'dist'), (err, files) => { - expect(files.length).toBeGreaterThanOrEqual(1); - expect(err).toBe(null); - done(); - }); + let files; + + try { + files = await readdir(resolve(__dirname, 'dist')); + } catch (error) { + expect(error).toBe(null); + } + + expect(files.length).toBeGreaterThanOrEqual(1); }); - it('should write a sourcemap file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.source.config.js'], false); + it('should write a sourcemap file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.source.config.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -27,8 +31,8 @@ describe('source-map object', () => { expect(existsSync(resolve(__dirname, 'dist/dist-amd.js.map'))).toBeTruthy(); }); - it('should override config with source-map', () => { - const { exitCode, stderr, stdout } = run( + it('should override config with source-map', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', './webpack.eval.config.js', '--devtool', 'source-map', '-o', './binary'], false, diff --git a/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js b/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js index 99ecbf58132..124cae7a33c 100644 --- a/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js +++ b/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../../../utils/test-utils'); describe('default entry and config entry all exist', () => { - it('should use config entry if config entry existed', () => { - const { stdout, stderr, exitCode } = run(__dirname, ['-c', '../1.js'], false); + it('should use config entry if config entry existed', async () => { + const { stdout, stderr, exitCode } = await run(__dirname, ['-c', '../1.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js b/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js index 897b2c668d0..c99baab22dd 100644 --- a/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js +++ b/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js @@ -3,8 +3,8 @@ const { run } = require('../../../../utils/test-utils'); describe('default entry and config entry all exist', () => { - it('should use config entry if config entry existed', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('should use config entry if config entry existed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/defaults-empty/entry-single-arg.test.js b/test/build/entry/defaults-empty/entry-single-arg.test.js index b72d95c7737..a4c944ff67a 100644 --- a/test/build/entry/defaults-empty/entry-single-arg.test.js +++ b/test/build/entry/defaults-empty/entry-single-arg.test.js @@ -3,8 +3,8 @@ const { run } = require('../../../utils/test-utils'); describe('single entry flag empty project', () => { - it('sets default entry, compiles but throw missing module error', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('sets default entry, compiles but throw missing module error', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/defaults-index/entry-multi-args.test.js b/test/build/entry/defaults-index/entry-multi-args.test.js index 63e51588085..b99ecd35aad 100644 --- a/test/build/entry/defaults-index/entry-multi-args.test.js +++ b/test/build/entry/defaults-index/entry-multi-args.test.js @@ -6,8 +6,8 @@ const { resolve } = require('path'); const { run } = require('../../../utils/test-utils'); describe('single entry flag index present', () => { - it('finds default index file and compiles successfully', () => { - const { stderr, stdout, exitCode } = run(__dirname); + it('finds default index file and compiles successfully', async () => { + const { stderr, stdout, exitCode } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -15,8 +15,8 @@ describe('single entry flag index present', () => { expect(stdout).toBeTruthy(); }); - it('finds default index file, compiles and overrides with flags successfully', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-path', 'bin']); + it('finds default index file, compiles and overrides with flags successfully', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path', 'bin']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/flag-entry/entry-with-flag.test.js b/test/build/entry/flag-entry/entry-with-flag.test.js index 5f13c1492eb..0a75a5d3dad 100644 --- a/test/build/entry/flag-entry/entry-with-flag.test.js +++ b/test/build/entry/flag-entry/entry-with-flag.test.js @@ -1,41 +1,46 @@ 'use strict'; -const { run } = require('../../../utils/test-utils'); -const { existsSync, readFile } = require('fs'); +const { run, readFile } = require('../../../utils/test-utils'); +const { existsSync } = require('fs'); const { resolve } = require('path'); describe('entry flag', () => { - it('should resolve the path to src/index.cjs', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './src/index.cjs', '-o', './dist/']); + it('should resolve the path to src/index.cjs', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './src/index.cjs', '-o', './dist/']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should load ./src/a.js as entry', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './src/a.js']); + it('should load ./src/a.js as entry', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './src/a.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should resolve the path to /src/a.js as ./src/a.js', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', '/src/a.js']); + it('should resolve the path to /src/a.js as ./src/a.js', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', '/src/a.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); - readFile(resolve(__dirname, './dist/main.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('Hello from a.js'); - done(); - }); + + let data; + + try { + data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(data).toContain('Hello from a.js'); }); - it('should throw error for invalid entry file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './src/test.js']); + it('should throw error for invalid entry file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './src/test.js']); expect(exitCode).toEqual(1); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/multiple-entries/multi-entries.test.js b/test/build/entry/multiple-entries/multi-entries.test.js index b1729bbdd04..5d70b2666c0 100644 --- a/test/build/entry/multiple-entries/multi-entries.test.js +++ b/test/build/entry/multiple-entries/multi-entries.test.js @@ -1,23 +1,27 @@ 'use strict'; -const { run } = require('../../../utils/test-utils'); -const { existsSync, readFile } = require('fs'); +const { run, readFile } = require('../../../utils/test-utils'); +const { existsSync } = require('fs'); const { resolve } = require('path'); describe(' multiple entries', () => { - it('should allow multiple entry flags', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entry', './src/a.js', '--entry', './src/b.js']); + it('should allow multiple entry flags', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './src/a.js', '--entry', './src/b.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); - readFile(resolve(__dirname, './dist/main.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('Hello from a.js'); - expect(data).toContain('Hello from b.js'); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(data).toContain('Hello from a.js'); + expect(data).toContain('Hello from b.js'); }); }); diff --git a/test/build/entry/scss/scss.test.js b/test/build/entry/scss/scss.test.js index b76210ca504..f8d1ef7b66e 100644 --- a/test/build/entry/scss/scss.test.js +++ b/test/build/entry/scss/scss.test.js @@ -5,7 +5,7 @@ describe('entry point', () => { it('should support SCSS files', async () => { await runInstall(__dirname); - const { stdout } = run(__dirname); + const { stdout } = await run(__dirname); expect(stdout).toBeTruthy(); expect(stdout).toContain('home.scss'); diff --git a/test/build/env/array/array-env.test.js b/test/build/env/array/array-env.test.js index 97d7f86fe3d..17c94642010 100644 --- a/test/build/env/array/array-env.test.js +++ b/test/build/env/array/array-env.test.js @@ -11,8 +11,8 @@ const devFile = path.join(__dirname, './dist/dev.js'); const prodFile = path.join(__dirname, './dist/prod.js'); describe('env array', () => { - it('is able to set two different environments for an array configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('is able to set two different environments for an array configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/env/object/object-env.test.js b/test/build/env/object/object-env.test.js index d1a2be17724..cb100ee74fd 100644 --- a/test/build/env/object/object-env.test.js +++ b/test/build/env/object/object-env.test.js @@ -8,8 +8,8 @@ const { sync: spawnSync } = execa; const { run, isWebpack5 } = require('../../../utils/test-utils'); describe('env object', () => { - it('is able to set env for an object', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('is able to set env for an object', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/error/invalid-schema/invalid-schema.test.js b/test/build/error/invalid-schema/invalid-schema.test.js index a4a88c0c672..f54291cb7be 100644 --- a/test/build/error/invalid-schema/invalid-schema.test.js +++ b/test/build/error/invalid-schema/invalid-schema.test.js @@ -2,40 +2,40 @@ const { run, isWebpack5 } = require('../../../utils/test-utils'); describe('invalid schema', () => { - it('should log error on invalid config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './webpack.mock.config.js']); + it('should log error on invalid config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './webpack.mock.config.js']); expect(exitCode).toEqual(2); expect(stderr).toContain('Invalid configuration object'); expect(stdout).toBeFalsy(); }); - it('should log error on invalid plugin options', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './webpack.plugin-mock.config.js']); + it('should log error on invalid plugin options', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './webpack.plugin-mock.config.js']); expect(exitCode).toEqual(2); expect(stderr).toContain(isWebpack5 ? 'Invalid options object' : 'Invalid Options'); expect(stdout).toBeFalsy(); }); - it('should log error on invalid config using the "bundle" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--config', './webpack.mock.config.js']); + it('should log error on invalid config using the "bundle" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--config', './webpack.mock.config.js']); expect(exitCode).toEqual(2); expect(stderr).toContain('Invalid configuration object'); expect(stdout).toBeFalsy(); }); - it('should log error on invalid config using the "serve" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--config', './webpack.mock.config.js']); + it('should log error on invalid config using the "serve" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--config', './webpack.mock.config.js']); expect(exitCode).toEqual(2); expect(stderr).toContain('Invalid configuration object'); expect(stdout).toBeFalsy(); }); - it('should log error on invalid option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'Yukihira']); + it('should log error on invalid option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -49,8 +49,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "build" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', '--mode', 'Yukihira']); + it('should log error on invalid option using "build" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['build', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -64,8 +64,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "bundle" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--mode', 'Yukihira']); + it('should log error on invalid option using "bundle" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -79,8 +79,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "b" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b', '--mode', 'Yukihira']); + it('should log error on invalid option using "b" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -94,8 +94,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "watch" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['watch', '--mode', 'Yukihira']); + it('should log error on invalid option using "watch" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['watch', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -109,8 +109,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "w" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['w', '--mode', 'Yukihira']); + it('should log error on invalid option using "w" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['w', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -124,8 +124,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "server" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--mode', 'Yukihira']); + it('should log error on invalid option using "server" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); @@ -139,8 +139,8 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); - it('should log error on invalid option using "s" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['s', '--mode', 'Yukihira']); + it('should log error on invalid option using "s" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['s', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); diff --git a/test/build/hot/hot-flag.test.js b/test/build/hot/hot-flag.test.js index fd99d5ed0e0..721772eecc5 100644 --- a/test/build/hot/hot-flag.test.js +++ b/test/build/hot/hot-flag.test.js @@ -4,8 +4,8 @@ const { readFileSync } = require('fs'); const { resolve } = require('path'); describe('--hot flag', () => { - it('should be successful when --hot is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--hot']); + it('should be successful when --hot is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--hot']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -13,8 +13,8 @@ describe('--hot flag', () => { expect(readFileSync(resolve(__dirname, './dist/main.js')).toString()).toContain('webpackHotUpdate'); }); - it('should be successful when --hot=only is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--hot', 'only']); + it('should be successful when --hot=only is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--hot', 'only']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -22,16 +22,16 @@ describe('--hot flag', () => { expect(readFileSync(resolve(__dirname, './dist/main.js')).toString()).toContain('webpackHotUpdate'); }); - it('should throw an error for invalid value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--hot', 'unknown']); + it('should throw an error for invalid value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--hot', 'unknown']); expect(exitCode).toBe(2); expect(stderr).toContain(`[webpack-cli] 'unknown' is an invalid value for the --hot option. Use 'only' instead.`); expect(stdout).toBeFalsy(); }); - it('should be successful when --no-hot is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-hot']); + it('should be successful when --no-hot is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-hot']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/import-local/import-local.test.js b/test/build/import-local/import-local.test.js index afbb3d90a9e..06536e7173a 100644 --- a/test/build/import-local/import-local.test.js +++ b/test/build/import-local/import-local.test.js @@ -9,8 +9,8 @@ describe('import local', () => { beforeEach(() => { importLocalMock.mockClear(); }); - it('should skip import local when supplied', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { + it('should skip import local when supplied', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_CLI_SKIP_IMPORT_LOCAL: true }, }); expect(importLocalMock).toHaveBeenCalledTimes(0); diff --git a/test/build/json/json.test.js b/test/build/json/json.test.js index 6930694172c..f45d86e96b3 100644 --- a/test/build/json/json.test.js +++ b/test/build/json/json.test.js @@ -1,14 +1,14 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); -const { existsSync, readFile } = require('fs'); +const { run, readFile } = require('../../utils/test-utils'); +const { existsSync } = require('fs'); const { resolve } = require('path'); const successMessage = 'stats are successfully stored as json to stats.json'; describe('json', () => { - it('should work and output json stats', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json']); + it('should work and output json stats', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -16,44 +16,52 @@ describe('json', () => { expect(JSON.parse(stdout)['hash']).toBeDefined(); }); - it('should work and store json to a file', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json']); + it('should work and store json to a file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json']); expect(exitCode).toBe(0); expect(stderr).toContain(successMessage); expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(JSON.parse(data)['hash']).toBeTruthy(); - expect(JSON.parse(data)['version']).toBeTruthy(); - expect(JSON.parse(data)['time']).toBeTruthy(); - expect(() => JSON.parse(data)).not.toThrow(); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(JSON.parse(data)['hash']).toBeTruthy(); + expect(JSON.parse(data)['version']).toBeTruthy(); + expect(JSON.parse(data)['time']).toBeTruthy(); + expect(() => JSON.parse(data)).not.toThrow(); }); - it('should work and store json to a file and respect --color flag', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json', '--color'], { env: { FORCE_COLOR: true } }); + it('should work and store json to a file and respect --color flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toContain(`\u001b[32m${successMessage}`); expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(JSON.parse(data)['hash']).toBeTruthy(); - expect(JSON.parse(data)['version']).toBeTruthy(); - expect(JSON.parse(data)['time']).toBeTruthy(); - expect(() => JSON.parse(data)).not.toThrow(); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(JSON.parse(data)['hash']).toBeTruthy(); + expect(JSON.parse(data)['version']).toBeTruthy(); + expect(JSON.parse(data)['time']).toBeTruthy(); + expect(() => JSON.parse(data)).not.toThrow(); }); - it('should work and store json to a file and respect --no-color', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json', '--no-color']); + it('should work and store json to a file and respect --no-color', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json', '--no-color']); expect(exitCode).toBe(0); expect(stderr).not.toContain(`\u001b[32m${successMessage}`); @@ -61,18 +69,22 @@ describe('json', () => { expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(JSON.parse(data)['hash']).toBeTruthy(); - expect(JSON.parse(data)['version']).toBeTruthy(); - expect(JSON.parse(data)['time']).toBeTruthy(); - expect(() => JSON.parse(data)).not.toThrow(); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(JSON.parse(data)['hash']).toBeTruthy(); + expect(JSON.parse(data)['version']).toBeTruthy(); + expect(JSON.parse(data)['time']).toBeTruthy(); + expect(() => JSON.parse(data)).not.toThrow(); }); - it('should work using the "-j" option (alias)', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-j']); + it('should work using the "-j" option (alias)', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-j']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -80,8 +92,8 @@ describe('json', () => { expect(JSON.parse(stdout)['hash']).toBeDefined(); }); - it('should work and output json stats with the "--progress" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', '--progress']); + it('should work and output json stats with the "--progress" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', '--progress']); expect(exitCode).toBe(0); expect(stderr).toContain('webpack.Progress'); @@ -89,8 +101,8 @@ describe('json', () => { expect(JSON.parse(stdout)['hash']).toBeDefined(); }); - it('should work and store json to a file with the "--progress" option', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json', '--progress']); + it('should work and store json to a file with the "--progress" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json', '--progress']); expect(exitCode).toBe(0); expect(stderr).toContain('webpack.Progress'); @@ -98,18 +110,22 @@ describe('json', () => { expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(JSON.parse(data)['hash']).toBeTruthy(); - expect(JSON.parse(data)['version']).toBeTruthy(); - expect(JSON.parse(data)['time']).toBeTruthy(); - expect(() => JSON.parse(data)).not.toThrow(); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(JSON.parse(data)['hash']).toBeTruthy(); + expect(JSON.parse(data)['version']).toBeTruthy(); + expect(JSON.parse(data)['time']).toBeTruthy(); + expect(() => JSON.parse(data)).not.toThrow(); }); - it('should work and output json stats with cli logs', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', '--config', 'logging.config.js']); + it('should work and output json stats with cli logs', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', '--config', 'logging.config.js']); expect(exitCode).toBe(0); expect(stderr).toContain('Compiler starting...'); @@ -118,8 +134,8 @@ describe('json', () => { expect(JSON.parse(stdout)['hash']).toBeDefined(); }); - it('should work and store json to a file with cli logs', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--json', 'stats.json', '--config', 'logging.config.js']); + it('should work and store json to a file with cli logs', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--json', 'stats.json', '--config', 'logging.config.js']); expect(exitCode).toBe(0); expect(stderr).toContain('Compiler starting...'); @@ -128,13 +144,17 @@ describe('json', () => { expect(stdout).toBeFalsy(); expect(existsSync(resolve(__dirname, './stats.json'))).toBeTruthy(); - readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(JSON.parse(data)['hash']).toBeTruthy(); - expect(JSON.parse(data)['version']).toBeTruthy(); - expect(JSON.parse(data)['time']).toBeTruthy(); - expect(() => JSON.parse(data)).not.toThrow(); - done(); - }); + let data; + + try { + data = await readFile(resolve(__dirname, 'stats.json'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(JSON.parse(data)['hash']).toBeTruthy(); + expect(JSON.parse(data)['version']).toBeTruthy(); + expect(JSON.parse(data)['time']).toBeTruthy(); + expect(() => JSON.parse(data)).not.toThrow(); }); }); diff --git a/test/build/merge/config-absent/merge-config-absent.test.js b/test/build/merge/config-absent/merge-config-absent.test.js index 0e6a43a4eba..2aa164ade24 100644 --- a/test/build/merge/config-absent/merge-config-absent.test.js +++ b/test/build/merge/config-absent/merge-config-absent.test.js @@ -5,9 +5,9 @@ const path = require('path'); const { run } = require('../../../utils/test-utils'); describe('merge flag configuration', () => { - it('Show warning message when the merge config is absent', () => { + it('Show warning message when the merge config is absent', async () => { // 2.js doesn't exist, let's try merging with it - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); expect(exitCode).toEqual(2); // Since the process will exit, nothing on stdout diff --git a/test/build/merge/config/merge-config.test.js b/test/build/merge/config/merge-config.test.js index 1c65db0d637..6b7f8e50f87 100644 --- a/test/build/merge/config/merge-config.test.js +++ b/test/build/merge/config/merge-config.test.js @@ -3,8 +3,8 @@ const { run } = require('../../../utils/test-utils'); describe('merge flag configuration', () => { - it('merges two configurations together', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); + it('merges two configurations together', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -12,8 +12,8 @@ describe('merge flag configuration', () => { expect(stdout).toContain('second-output.js'); // from 2.js }); - it('merges more than two configurations together', () => { - const { exitCode, stderr, stdout } = run( + it('merges more than two configurations together', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['--config', './1.js', '--config', './2.js', '--config', './3.js', '--merge'], false, @@ -26,8 +26,8 @@ describe('merge flag configuration', () => { expect(stdout).toContain('third-output.js'); // from 3.js }); - it('merges two configurations together with flag alias', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './1.js', '--config', './2.js', '-m'], false); + it('merges two configurations together with flag alias', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '-m'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -35,8 +35,8 @@ describe('merge flag configuration', () => { expect(stdout).toContain('second-output.js'); // from 2.js }); - it('fails when there are less than 2 configurations to merge', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './1.js', '--merge'], false); + it('fails when there are less than 2 configurations to merge', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--merge'], false); expect(exitCode).toBe(2); expect(stderr).toContain('At least two configurations are required for merge.'); diff --git a/test/build/mode/mode-single-arg/mode-single-arg.test.js b/test/build/mode/mode-single-arg/mode-single-arg.test.js index ab066dd2298..c7bafa5670d 100644 --- a/test/build/mode/mode-single-arg/mode-single-arg.test.js +++ b/test/build/mode/mode-single-arg/mode-single-arg.test.js @@ -3,8 +3,8 @@ const { run, isWebpack5 } = require('../../../utils/test-utils'); describe('mode flags', () => { - it('should not set mode=production by default', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('should not set mode=production by default', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -12,40 +12,40 @@ describe('mode flags', () => { expect(stdout).toContain(`The 'mode' option has not been set, webpack will fallback to 'production' for this value.`); }); - it('should load a development config when --mode=development is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development']); + it('should load a development config when --mode=development is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'development'`); }); - it('should load a production config when --mode=production is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'production']); + it('should load a production config when --mode=production is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'production']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'production'`); }); - it('should load a none config when --mode=none is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'none']); + it('should load a none config when --mode=none is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'none'`); }); - it('should pick mode form NODE_ENV', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { env: { NODE_ENV: 'development' } }); + it('should pick mode form NODE_ENV', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { NODE_ENV: 'development' } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'development'`); }); - it('should throw error when --mode=abcd is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'abcd']); + it('should throw error when --mode=abcd is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'abcd']); expect(exitCode).toBe(2); diff --git a/test/build/mode/mode-with-config/mode-with-config.test.js b/test/build/mode/mode-with-config/mode-with-config.test.js index ba31c75829d..5a6f1c45bb8 100644 --- a/test/build/mode/mode-with-config/mode-with-config.test.js +++ b/test/build/mode/mode-with-config/mode-with-config.test.js @@ -1,12 +1,12 @@ 'use strict'; -const { existsSync, readFile } = require('fs'); +const { existsSync } = require('fs'); const { resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require -const { run } = require('../../../utils/test-utils'); +const { run, readFile } = require('../../../utils/test-utils'); describe('mode flags with config', () => { - it('should run in production mode when --mode=production is passed', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'production', '--config', './webpack.config.js']); + it('should run in production mode when --mode=production is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'production', '--config', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -16,16 +16,21 @@ describe('mode flags with config', () => { expect(existsSync(resolve(__dirname, './dist/main.js.OTHER.LICENSE.txt'))).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - // Correct mode should be propagated to the compiler - readFile(resolve(__dirname, './dist/main.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('"production mode"'); - done(); - }); + + let data; + + try { + // Correct mode should be propagated to the compiler + data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(data).toContain('"production mode"'); }); - it('should run in development mode when --mode=development is passed', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'development', '--config', './webpack.config.js']); + it('should run in development mode when --mode=development is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development', '--config', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -36,16 +41,20 @@ describe('mode flags with config', () => { expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - // Correct mode should be propagated to the compiler - readFile(resolve(__dirname, './dist/main.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('development mode'); - done(); - }); + let data; + + try { + // Correct mode should be propagated to the compiler + data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(data).toContain('development mode'); }); - it('should run in none mode when --mode=none is passed', (done) => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'none', '--config', './webpack.config.js']); + it('should run in none mode when --mode=none is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none', '--config', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -57,24 +66,28 @@ describe('mode flags with config', () => { expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - // Correct mode should be propagated to the compiler - readFile(resolve(__dirname, './dist/main.js'), 'utf-8', (err, data) => { - expect(err).toBe(null); - expect(data).toContain('none mode'); - done(); - }); + let data; + + try { + // Correct mode should be propagated to the compiler + data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); + } catch (error) { + expect(error).toBe(null); + } + + expect(data).toContain('none mode'); }); - it('should use mode flag over config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'production', '-c', 'webpack.config2.js']); + it('should use mode flag over config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'production', '-c', 'webpack.config2.js']); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'production'`); }); - it('should use mode from flag over NODE_ENV', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'none', '-c', 'webpack.config2.js'], false, [], { + it('should use mode from flag over NODE_ENV', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none', '-c', 'webpack.config2.js'], false, [], { NODE_ENV: 'production', }); @@ -83,16 +96,16 @@ describe('mode flags with config', () => { expect(stdout).toContain(`mode: 'none'`); }); - it('should use mode from config over NODE_ENV', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config2.js']); + it('should use mode from config over NODE_ENV', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config2.js']); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mode: 'development'`); }); - it('should use mode from config when multiple config are supplied', () => { - const { exitCode, stdout, stderr } = run(__dirname, ['-c', 'webpack.config3.js', '-c', 'webpack.config2.js']); + it('should use mode from config when multiple config are supplied', async () => { + const { exitCode, stdout, stderr } = await run(__dirname, ['-c', 'webpack.config3.js', '-c', 'webpack.config2.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -100,8 +113,15 @@ describe('mode flags with config', () => { expect(stdout.match(new RegExp("mode: 'development'", 'g')).length).toEqual(1); }); - it('mode flag should apply to all configs', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--mode', 'none', '-c', './webpack.config3.js', '-c', './webpack.config2.js']); + it('mode flag should apply to all configs', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ + '--mode', + 'none', + '-c', + './webpack.config3.js', + '-c', + './webpack.config2.js', + ]); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); @@ -109,8 +129,8 @@ describe('mode flags with config', () => { expect(stdout.match(new RegExp("mode: 'none'", 'g')).length).toEqual(2); }); - it('only config where mode is absent pick up from NODE_ENV', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config3.js', '-c', './webpack.config2.js'], { + it('only config where mode is absent pick up from NODE_ENV', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config3.js', '-c', './webpack.config2.js'], { env: { NODE_ENV: 'production', }, diff --git a/test/build/name/name.test.js b/test/build/name/name.test.js index 48481d381c1..7ada2e24c26 100644 --- a/test/build/name/name.test.js +++ b/test/build/name/name.test.js @@ -2,8 +2,8 @@ const { run } = require('../../utils/test-utils'); describe('name flag', () => { - it('should set the flag in the config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--name', 'config-name'], false); + it('should set the flag in the config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--name', 'config-name'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/node-env/node-env.test.js b/test/build/node-env/node-env.test.js index 09858e31cf9..9d4869d4053 100644 --- a/test/build/node-env/node-env.test.js +++ b/test/build/node-env/node-env.test.js @@ -3,48 +3,48 @@ const { run } = require('../../utils/test-utils'); describe('--node-env flag', () => { - it('should set "process.env.NODE_ENV" to "development"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'development']); + it('should set "process.env.NODE_ENV" to "development"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain("mode: 'development'"); }); - it('should set "process.env.NODE_ENV" to "production"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'production']); + it('should set "process.env.NODE_ENV" to "production"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'production']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain("mode: 'production'"); }); - it('should set "process.env.NODE_ENV" to "none"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'none']); + it('should set "process.env.NODE_ENV" to "none"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'none']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain("mode: 'none'"); }); - it('should set "process.env.NODE_ENV" and the "mode" option to "development"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'development', '--config', './auto-mode.config.js']); + it('should set "process.env.NODE_ENV" and the "mode" option to "development"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'development', '--config', './auto-mode.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain("mode: 'development'"); }); - it('should set "process.env.NODE_ENV" and the "mode" option to "production"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'production', '--config', './auto-mode.config.js']); + it('should set "process.env.NODE_ENV" and the "mode" option to "production"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'production', '--config', './auto-mode.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain("mode: 'production'"); }); - it('should set "process.env.NODE_ENV" and the "mode" option to "none"', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--node-env', 'none', '--config', './auto-mode.config.js']); + it('should set "process.env.NODE_ENV" and the "mode" option to "none"', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--node-env', 'none', '--config', './auto-mode.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/output/output-named-bundles.test.js b/test/build/output/output-named-bundles.test.js index 854b2cb34c8..6669bcca452 100644 --- a/test/build/output/output-named-bundles.test.js +++ b/test/build/output/output-named-bundles.test.js @@ -4,8 +4,8 @@ const { resolve } = require('path'); const { run } = require('../../utils/test-utils'); describe('output flag named bundles', () => { - it('should output file given as flag instead of in configuration', () => { - const { exitCode, stderr, stdout } = run( + it('should output file given as flag instead of in configuration', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', './binary'], false, @@ -16,8 +16,8 @@ describe('output flag named bundles', () => { expect(stdout).toBeTruthy(); }); - it('should resolve the path to binary/a.bundle.js as ./binary/a.bundle.js', () => { - const { exitCode, stderr, stdout } = run( + it('should resolve the path to binary/a.bundle.js as ./binary/a.bundle.js', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', 'binary'], false, @@ -28,8 +28,8 @@ describe('output flag named bundles', () => { expect(stdout).toBeTruthy(); }); - it('should create multiple bundles with an overriding flag', () => { - const { exitCode, stderr, stdout } = run( + it('should create multiple bundles with an overriding flag', async () => { + const { exitCode, stderr, stdout } = await run( __dirname, ['-c', resolve(__dirname, 'webpack.single.config.js'), '--output-path', './bin'], false, @@ -40,16 +40,16 @@ describe('output flag named bundles', () => { expect(stdout).toBeTruthy(); }); - it('should successfully compile multiple entries', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', resolve(__dirname, 'webpack.multiple.config.js')], false); + it('should successfully compile multiple entries', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.multiple.config.js')], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); - it('should output file in bin directory using default webpack config with warning for empty output value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-path'], false); + it('should output file in bin directory using default webpack config with warning for empty output value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path'], false); expect(exitCode).toEqual(2); expect(stderr).toContain("Error: Option '-o, --output-path ' argument missing"); diff --git a/test/build/prefetch/prefetch.test.js b/test/build/prefetch/prefetch.test.js index 2be909f8df9..efb749899fe 100644 --- a/test/build/prefetch/prefetch.test.js +++ b/test/build/prefetch/prefetch.test.js @@ -1,8 +1,7 @@ 'use strict'; -const fs = require('fs'); const { join } = require('path'); -const { run } = require('../../utils/test-utils'); +const { run, readFile } = require('../../utils/test-utils'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); @@ -11,20 +10,20 @@ describe('prefetch', () => { rimraf.sync(join(__dirname, 'dist')); }); - it('should load the prefetched file', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--prefetch', './src/p.js', '--mode', 'development'], false); + it('should load the prefetched file', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/p.js', '--mode', 'development'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - const content = fs.readFileSync(join(__dirname, '/dist/main.js'), 'utf-8'); + const content = await readFile(join(__dirname, '/dist/main.js'), 'utf-8'); expect(content).not.toContain('// no prefetching'); }); - it('should log error when the prefetched file is absent', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--prefetch', './src/somefile.js'], false); + it('should log error when the prefetched file is absent', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/somefile.js'], false); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); @@ -32,8 +31,8 @@ describe('prefetch', () => { expect(stdout).toContain(`Error: Can't resolve './src/somefile.js'`); }); - it('should log error when flag value is not supplied', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--prefetch'], false); + it('should log error when flag value is not supplied', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch'], false); expect(exitCode).toBe(2); expect(stderr).toContain(`Error: Option '--prefetch ' argument missing`); diff --git a/test/build/progress/progress-flag.test.js b/test/build/progress/progress-flag.test.js index 89b560860cc..8a008e7b01f 100644 --- a/test/build/progress/progress-flag.test.js +++ b/test/build/progress/progress-flag.test.js @@ -3,8 +3,8 @@ const { run, isWebpack5 } = require('../../utils/test-utils'); describe('progress flag', () => { - it('should show progress', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--progress']); + it('should show progress', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--progress']); expect(exitCode).toBe(0); expect(stderr).not.toMatch(/\[webpack\.Progress] \d+ ms setup/); @@ -12,8 +12,8 @@ describe('progress flag', () => { expect(stdout).toContain('main.js'); }); - it('should support the "profile" value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--progress=profile']); + it('should support the "profile" value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--progress=profile']); expect(exitCode).toBe(0); @@ -25,16 +25,16 @@ describe('progress flag', () => { expect(stdout).toContain('main.js'); }); - it('should not support invalid value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--progress=unknown']); + it('should not support invalid value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--progress=unknown']); expect(exitCode).toBe(2); expect(stderr).toContain(`'unknown' is an invalid value for the --progress option. Only 'profile' is allowed.`); expect(stdout).toBeFalsy(); }); - it('should not add duplicate plugins', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.progress.config.js', '--progress']); + it('should not add duplicate plugins', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.progress.config.js', '--progress']); expect(exitCode).toEqual(0); expect(stderr).not.toMatch(/\[webpack\.Progress] \d+ ms setup/); diff --git a/test/build/start-finish-force-log/start-finish-force-log.test.js b/test/build/start-finish-force-log/start-finish-force-log.test.js index 3701bb95d08..a91d5510f31 100644 --- a/test/build/start-finish-force-log/start-finish-force-log.test.js +++ b/test/build/start-finish-force-log/start-finish-force-log.test.js @@ -3,8 +3,8 @@ const { run, runWatch, isWebpack5 } = require('../../utils/test-utils'); describe('start finish force log', () => { - it('start finish force log when env is set', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], { + it('start finish force log when env is set', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, }); expect(exitCode).toBe(0); @@ -14,8 +14,8 @@ describe('start finish force log', () => { expect(stdout).toContain(output); }); - it('should show name of the config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--name', 'log config'], { + it('should show name of the config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--name', 'log config'], { env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, }); expect(exitCode).toBe(0); @@ -35,8 +35,8 @@ describe('start finish force log', () => { expect(stdout).toContain(output); }); - it('should work with multi compiler', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--config', './webpack.config.array.js'], { + it('should work with multi compiler', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './webpack.config.array.js'], { env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, }); expect(exitCode).toBe(0); diff --git a/test/build/stats/config-no/no-stats-with-config.test.js b/test/build/stats/config-no/no-stats-with-config.test.js index fe2d3c3ccb4..3b4d28c7343 100644 --- a/test/build/stats/config-no/no-stats-with-config.test.js +++ b/test/build/stats/config-no/no-stats-with-config.test.js @@ -3,8 +3,8 @@ const { run, isWebpack5 } = require('../../../utils/test-utils'); describe('stats flag', () => { - it(`should use stats 'detailed' as defined in webpack config`, () => { - const { exitCode, stderr, stdout } = run(__dirname, []); + it(`should use stats 'detailed' as defined in webpack config`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -18,8 +18,8 @@ describe('stats flag', () => { } }); - it(`should use --no-stats and override value in config`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-stats']); + it(`should use --no-stats and override value in config`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-stats']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/stats/config/stats.test.js b/test/build/stats/config/stats.test.js index 3fe240bf70f..9fb653bbe01 100644 --- a/test/build/stats/config/stats.test.js +++ b/test/build/stats/config/stats.test.js @@ -10,8 +10,8 @@ if (isWebpack5) { } describe('stats flag with config', () => { - it('should compile without stats flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, []); + it('should compile without stats flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -24,8 +24,8 @@ describe('stats flag with config', () => { }); for (const preset of statsPresets) { - it(`should override 'noramal' value in config with "${preset}"`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats', `${preset}`]); + it(`should override 'noramal' value in config with "${preset}"`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', `${preset}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/stats/flags/stats.test.js b/test/build/stats/flags/stats.test.js index 32db35893f0..8394dd70ac9 100644 --- a/test/build/stats/flags/stats.test.js +++ b/test/build/stats/flags/stats.test.js @@ -10,8 +10,8 @@ if (isWebpack5) { describe('stats flag', () => { for (const preset of presets) { - it(`should accept --stats "${preset}"`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats', `${preset}`]); + it(`should accept --stats "${preset}"`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', `${preset}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -53,8 +53,8 @@ describe('stats flag', () => { }); } - it('should accept stats as boolean', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats']); + it('should accept stats as boolean', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -66,8 +66,8 @@ describe('stats flag', () => { } }); - it('should accept --no-stats as boolean', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--no-stats']); + it('should accept --no-stats as boolean', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--no-stats']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -79,8 +79,8 @@ describe('stats flag', () => { } }); - it('should log error when an unknown flag stats value is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--stats', 'foo']); + it('should log error when an unknown flag stats value is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', 'foo']); expect(exitCode).toEqual(2); diff --git a/test/build/target/flag-test/target-flag.test.js b/test/build/target/flag-test/target-flag.test.js index 05a07a57753..d547fba2300 100644 --- a/test/build/target/flag-test/target-flag.test.js +++ b/test/build/target/flag-test/target-flag.test.js @@ -5,8 +5,8 @@ const targetValues = ['web', 'webworker', 'node', 'async-node', 'node-webkit', ' describe('--target flag', () => { targetValues.forEach((val) => { - it(`should accept ${val} with --target flag`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target', `${val}`]); + it(`should accept ${val} with --target flag`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target', `${val}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -18,8 +18,8 @@ describe('--target flag', () => { } }); - it(`should accept ${val} with -t alias`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-t', `${val}`]); + it(`should accept ${val} with -t alias`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-t', `${val}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -32,8 +32,8 @@ describe('--target flag', () => { }); }); - it(`should throw error with invalid value for --target`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target', 'invalid']); + it(`should throw error with invalid value for --target`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'invalid']); expect(exitCode).toBe(2); @@ -47,40 +47,40 @@ describe('--target flag', () => { }); if (isWebpack5) { - it('should allow multiple targets', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target', 'node', '--target', 'async-node']); + it('should allow multiple targets', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'node', '--target', 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`target: [ 'node', 'async-node' ]`); }); - it('should throw an error for invalid target in multiple syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target', 'node', '--target', 'invalid']); + it('should throw an error for invalid target in multiple syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'node', '--target', 'invalid']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown target 'invalid'"); expect(stdout).toBeFalsy(); }); - it('should throw an error for incompatible multiple targets', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target', 'node', '--target', 'web']); + it('should throw an error for incompatible multiple targets', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'node', '--target', 'web']); expect(exitCode).toBe(2); expect(stderr).toContain('Error: Universal Chunk Loading is not implemented yet'); expect(stdout).toBeFalsy(); }); - it('should reset target from node to async-node with --target-reset', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target-reset', '--target', 'async-node']); + it('should reset target from node to async-node with --target-reset', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target-reset', '--target', 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`target: [ 'async-node' ]`); }); - it('should throw error if target is an empty array', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--target-reset']); + it('should throw error if target is an empty array', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--target-reset']); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object'); diff --git a/test/build/target/node/node-test.test.js b/test/build/target/node/node-test.test.js index 6fb93c00660..74b0d831136 100644 --- a/test/build/target/node/node-test.test.js +++ b/test/build/target/node/node-test.test.js @@ -2,8 +2,8 @@ const { run } = require('../../../utils/test-utils'); describe('Node target', () => { - it('should emit the correct code', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-c', './webpack.config.js']); + it('should emit the correct code', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/unknown/unknown.test.js b/test/build/unknown/unknown.test.js index 9b93b016aaa..a4896531460 100644 --- a/test/build/unknown/unknown.test.js +++ b/test/build/unknown/unknown.test.js @@ -3,8 +3,8 @@ const { run, isWebpack5 } = require('../../utils/test-utils'); describe('unknown behaviour', () => { - it('should log an error if an unknown flag is passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--unknown']); + it('should log an error if an unknown flag is passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -12,8 +12,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-u']); + it('should log an error if an unknown flag is passed #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-u']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '-u'"); @@ -21,8 +21,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-u', '--unknown']); + it('should log an error if an unknown flag is passed #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-u', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '-u'"); @@ -30,8 +30,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed #4', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-u', '-u']); + it('should log an error if an unknown flag is passed #4', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-u', '-u']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '-u'"); @@ -39,8 +39,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed #5', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-u', 'foo']); + it('should log an error if an unknown flag is passed #5', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-u', 'foo']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '-u'"); @@ -48,8 +48,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "bundle" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--unknown']); + it('should log an error if an unknown flag is passed using "bundle" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -57,8 +57,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "b" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b', '--unknown']); + it('should log an error if an unknown flag is passed using "b" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -66,8 +66,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "bundle" command #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--unknown', 'bundle']); + it('should log an error if an unknown flag is passed using "bundle" command #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', 'bundle']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -75,8 +75,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "info" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--unknown']); + it('should log an error if an unknown flag is passed using "info" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -84,8 +84,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "i" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['i', '--unknown']); + it('should log an error if an unknown flag is passed using "i" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['i', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -93,8 +93,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed using "i" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--unknown', 'i']); + it('should log an error if an unknown flag is passed using "i" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', 'i']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -102,8 +102,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log error and respect --color flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--unknown', '--color'], { env: { FORCE_COLOR: true } }); + it('should log error and respect --color flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); @@ -111,8 +111,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log error for unknown flag and respect --no-color', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--unknown', '--no-color'], { env: { FORCE_COLOR: true } }); + it('should log error for unknown flag and respect --no-color', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(2); expect(stderr).not.toContain(`\u001b[31mError: Unknown option '--unknown'`); @@ -121,8 +121,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--entyr', './a.js']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--entyr', './a.js']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--entyr'"); @@ -131,8 +131,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-fileneme', '[name].js']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-fileneme', '[name].js']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--output-fileneme'"); @@ -145,8 +145,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--output-library-auxiliary-comment-commnjs']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-library-auxiliary-comment-commnjs']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--output-library-auxiliary-comment-commnjs'"); @@ -160,8 +160,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--entyr', './a.js']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--entyr', './a.js']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--entyr'"); @@ -170,8 +170,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b', '--entyr', './a.js']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--entyr', './a.js']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--entyr'"); @@ -180,8 +180,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--outpyt']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--outpyt']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--outpyt'"); @@ -190,8 +190,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['i', '--outpyt']); + it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['i', '--outpyt']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--outpyt'"); @@ -200,8 +200,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log error if an unknown command passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['qqq'], true, [], { TERM_PROGRAM: false }); + it('should log error if an unknown command passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['qqq'], true, [], { TERM_PROGRAM: false }); expect(exitCode).toBe(2); expect(stderr).toContain("Unknown command or entry 'qqq'"); @@ -209,8 +209,8 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); - it('should log error and provide suggestion if an unknown command passed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['server'], true, [], { TERM_PROGRAM: false }); + it('should log error and provide suggestion if an unknown command passed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['server'], true, [], { TERM_PROGRAM: false }); expect(exitCode).toBe(2); expect(stderr).toContain("Unknown command or entry 'server'"); diff --git a/test/build/zero-config/entry-absent/zero-config.test.js b/test/build/zero-config/entry-absent/zero-config.test.js index 44215a73ac0..bec0f508022 100644 --- a/test/build/zero-config/entry-absent/zero-config.test.js +++ b/test/build/zero-config/entry-absent/zero-config.test.js @@ -3,8 +3,8 @@ const { run } = require('../../../utils/test-utils'); describe('Zero Config tests', () => { - it('runs when config and entry are both absent', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('runs when config and entry are both absent', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); diff --git a/test/build/zero-config/entry-present/zero-config.test.js b/test/build/zero-config/entry-present/zero-config.test.js index 5072a3e100f..3457bfce3b5 100644 --- a/test/build/zero-config/entry-present/zero-config.test.js +++ b/test/build/zero-config/entry-present/zero-config.test.js @@ -1,8 +1,8 @@ const { run } = require('../../../utils/test-utils'); describe('Zero Config tests', () => { - it('runs when no config is supplied but entry is present', () => { - const { exitCode, stderr, stdout } = run(__dirname, [], false); + it('runs when no config is supplied but entry is present', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/configtest/with-config-path/with-config-path.test.js b/test/configtest/with-config-path/with-config-path.test.js index ca2ae90524a..45bd9ce001a 100644 --- a/test/configtest/with-config-path/with-config-path.test.js +++ b/test/configtest/with-config-path/with-config-path.test.js @@ -5,8 +5,8 @@ const path = require('path'); const { run } = require('../../utils/test-utils'); describe("'configtest' command with the configuration path option", () => { - it('should validate webpack config successfully', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest', './basic.config.js'], false); + it('should validate webpack config successfully', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './basic.config.js'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -14,8 +14,8 @@ describe("'configtest' command with the configuration path option", () => { expect(stdout).toContain('There are no validation errors in the given webpack configuration.'); }); - it('should throw validation error', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest', './error.config.js'], false); + it('should throw validation error', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './error.config.js'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object.'); @@ -23,16 +23,16 @@ describe("'configtest' command with the configuration path option", () => { expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'error.config.js')}'.`); }); - it('should throw syntax error', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest', './syntax-error.config.js'], false); + it('should throw syntax error', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './syntax-error.config.js'], false); expect(exitCode).toBe(2); expect(stderr).toContain(`SyntaxError: Unexpected token ';'`); expect(stdout).toBeFalsy(); }); - it(`should validate the config with alias 't'`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['t', './error.config.js'], false); + it(`should validate the config with alias 't'`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['t', './error.config.js'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object.'); @@ -40,8 +40,8 @@ describe("'configtest' command with the configuration path option", () => { expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'error.config.js')}'.`); }); - it('should throw error if configuration does not exist', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest', './a.js'], false); + it('should throw error if configuration does not exist', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './a.js'], false); expect(exitCode).toBe(2); expect(stderr).toContain(`Failed to load '${path.resolve(__dirname, './a.js')}' config`); diff --git a/test/configtest/without-config-path-custom-extension/without-config-path.test.js b/test/configtest/without-config-path-custom-extension/without-config-path.test.js index f4c5218d134..3402386ea81 100644 --- a/test/configtest/without-config-path-custom-extension/without-config-path.test.js +++ b/test/configtest/without-config-path-custom-extension/without-config-path.test.js @@ -5,8 +5,8 @@ const path = require('path'); const { run } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { - it.only('should validate default configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest'], false); + it.only('should validate default configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/configtest/without-config-path-error/without-config-path-error.test.js b/test/configtest/without-config-path-error/without-config-path-error.test.js index 1ddb9c1a3d4..616393eaf2b 100644 --- a/test/configtest/without-config-path-error/without-config-path-error.test.js +++ b/test/configtest/without-config-path-error/without-config-path-error.test.js @@ -5,8 +5,8 @@ const path = require('path'); const { run } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { - it.only('should validate default configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest'], false); + it.only('should validate default configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); expect(exitCode).toBe(2); expect(stderr).toContain('Invalid configuration object.'); diff --git a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js index 9a96a77506a..fd8787e50a0 100644 --- a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js +++ b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js @@ -5,8 +5,8 @@ const path = require('path'); const { run } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { - it.only('should validate default configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest'], false); + it.only('should validate default configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js index 167da4490fe..accb31fc287 100644 --- a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js +++ b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { - it.only('should validate default configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest'], false); + it.only('should validate default configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); expect(exitCode).toBe(2); expect(stderr).toContain('No configuration found.'); diff --git a/test/configtest/without-config-path/without-config-path.test.js b/test/configtest/without-config-path/without-config-path.test.js index 9a96a77506a..fd8787e50a0 100644 --- a/test/configtest/without-config-path/without-config-path.test.js +++ b/test/configtest/without-config-path/without-config-path.test.js @@ -5,8 +5,8 @@ const path = require('path'); const { run } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { - it.only('should validate default configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['configtest'], false); + it.only('should validate default configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/help/help.test.js b/test/help/help.test.js index 99fd90632e3..0800341fbe2 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -9,31 +9,31 @@ const isMacOS = process.platform === 'darwin'; describe('help', () => { expect.addSnapshotSerializer(serializer); - it('should show help information using the "--help" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help']); + it('should show help information using the "--help" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it.skip('should show help information using the "--help" option with the "verbose" value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', 'verbose']); + it.skip('should show help information using the "--help" option with the "verbose" value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it.skip('should show help information using the "--help" option with the "verbose" value #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help=verbose']); + it.skip('should show help information using the "--help" option with the "verbose" value #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help=verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help']); + it('should show help information using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -41,11 +41,13 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show the same information using the "--help" option and command syntax', () => { - const { exitCode: exitCodeFromOption, stderr: stderrFromOption, stdout: stdoutFromOption } = run(__dirname, ['--help']); - const { exitCode: exitCodeFromCommandSyntax, stderr: stderrFromCommandSyntax, stdout: stdoutFromCommandSyntax } = run(__dirname, [ - 'help', - ]); + it('should show the same information using the "--help" option and command syntax', async () => { + const { exitCode: exitCodeFromOption, stderr: stderrFromOption, stdout: stdoutFromOption } = await run(__dirname, ['--help']); + const { + exitCode: exitCodeFromCommandSyntax, + stderr: stderrFromCommandSyntax, + stdout: stdoutFromCommandSyntax, + } = await run(__dirname, ['help']); expect(exitCodeFromOption).toBe(0); expect(exitCodeFromCommandSyntax).toBe(0); @@ -57,8 +59,8 @@ describe('help', () => { } }); - it('should show help information and respect the "--color" flag using the "--help" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', '--color'], { env: { FORCE_COLOR: true } }); + it('should show help information and respect the "--color" flag using the "--help" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -67,8 +69,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information and respect the "--no-color" flag using the "--help" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', '--no-color'], { env: { FORCE_COLOR: true } }); + it('should show help information and respect the "--no-color" flag using the "--help" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -125,8 +127,8 @@ describe('help', () => { ]; commands.forEach(({ name, alias, helpOutput }) => { - it(`should show help information for '${name}' command using the "--help" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [name, '--help']); + it(`should show help information for '${name}' command using the "--help" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -134,48 +136,48 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it(`should show help information for '${name}' command using the "--help verbose" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [name, '--help', 'verbose']); + it(`should show help information for '${name}' command using the "--help verbose" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', 'verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(helpOutput); }); - it(`should show help information for '${name}' command using command syntax`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', name]); + it(`should show help information for '${name}' command using command syntax`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', name]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(helpOutput); }); - it(`should show help information for '${alias}' command using the "--help" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [alias, '--help']); + it(`should show help information for '${alias}' command using the "--help" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(helpOutput); }); - it(`should show help information for '${alias}' command using the "--help verbose" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [alias, '--help', 'verbose']); + it(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help', 'verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(helpOutput); }); - it(`should show help information for '${alias}' command using command syntax`, () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', alias]); + it(`should show help information for '${alias}' command using command syntax`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', alias]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(helpOutput); }); - it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [name, '--help', '--color'], { env: { FORCE_COLOR: true } }); + it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -187,8 +189,8 @@ describe('help', () => { } }); - it(`should show help information for '${name}' and respect the "--no-color" flag using the "--help" option`, () => { - const { exitCode, stderr, stdout } = run(__dirname, [name, '--help', '--no-color'], { env: { FORCE_COLOR: true } }); + it(`should show help information for '${name}' and respect the "--no-color" flag using the "--help" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -201,8 +203,8 @@ describe('help', () => { }); }); - it('should show help information with options for sub commands', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--help']); + it('should show help information with options for sub commands', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--help']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -210,8 +212,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information and taking precedence when "--help" and "--version" option using together', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', '--version']); + it('should show help information and taking precedence when "--help" and "--version" option using together', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--version']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -219,32 +221,32 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --mode" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--mode']); + it('should show help information using the "help --mode" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --target" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--target']); + it('should show help information using the "help --target" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--target']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --stats" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--stats']); + it('should show help information using the "help --stats" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--stats']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --no-stats" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--no-stats']); + it('should show help information using the "help --no-stats" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--no-stats']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -252,8 +254,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --mode" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--mode']); + it('should show help information using the "help --mode" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -261,8 +263,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help serve --mode" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'serve', '--mode']); + it('should show help information using the "help serve --mode" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--mode']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -270,8 +272,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --color" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--color'], { env: { FORCE_COLOR: true } }); + it('should show help information using the "help --color" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -280,16 +282,16 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --no-color" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--no-color'], { env: { FORCE_COLOR: true } }); + it('should show help information using the "help --no-color" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help serve --color" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'serve', '--color'], { env: { FORCE_COLOR: true } }); + it('should show help information using the "help serve --color" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -298,16 +300,16 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help serve --no-color" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'serve', '--no-color']); + it('should show help information using the "help serve --no-color" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--no-color']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help --version" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--version']); + it('should show help information using the "help --version" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--version']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -315,8 +317,8 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should show help information using the "help -v" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '-v']); + it('should show help information using the "help -v" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '-v']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -324,96 +326,96 @@ describe('help', () => { expect(stdout).toMatchSnapshot(); }); - it('should log error for invalid command using the "--help" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', 'myCommand']); + it('should log error for invalid command using the "--help" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'myCommand']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid command using the "--help" option #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--flag', '--help']); + it('should log error for invalid command using the "--help" option #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--flag', '--help']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid command using the "--help" option #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--flag', '--help']); + it('should log error for invalid command using the "--help" option #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--flag', '--help']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for unknown command using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'myCommand']); + it('should log error for unknown command using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'myCommand']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for unknown command using command syntax #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'verbose']); + it('should log error for unknown command using command syntax #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'verbose']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for unknown option using command syntax #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--made']); + it('should log error for unknown option using command syntax #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--made']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for unknown option using command syntax #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'serve', '--made']); + it('should log error for unknown option using command syntax #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--made']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for unknown option using command syntax #4', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'bui', '--mode']); + it('should log error for unknown option using command syntax #4', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'bui', '--mode']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid command using command syntax #3', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', '--mode', 'serve']); + it('should log error for invalid command using command syntax #3', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode', 'serve']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid command using command syntax #4', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['help', 'serve', '--mode', '--mode']); + it('should log error for invalid command using command syntax #4', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--mode', '--mode']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid flag with the "--help" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', '--my-flag']); + it('should log error for invalid flag with the "--help" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--my-flag']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); - it('should log error for invalid flag with the "--help" option #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--help', 'init', 'info']); + it('should log error for invalid flag with the "--help" option #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'init', 'info']); expect(exitCode).toBe(2); expect(stderr).toMatchSnapshot(); diff --git a/test/info/info-output.test.js b/test/info/info-output.test.js index 88f420f4f7e..e720bd21446 100644 --- a/test/info/info-output.test.js +++ b/test/info/info-output.test.js @@ -4,8 +4,8 @@ const { join } = require('path'); const { run } = require('../utils/test-utils'); describe('basic info usage', () => { - it('gets info without flags', () => { - const { exitCode, stdout, stderr } = run(__dirname, ['info'], false); + it('gets info without flags', async () => { + const { exitCode, stdout, stderr } = await run(__dirname, ['info'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -15,8 +15,8 @@ describe('basic info usage', () => { expect(stdout).toContain('Yarn'); }); - it('gets more info in project root', () => { - const { exitCode, stderr, stdout } = run(join(__dirname, '../../'), ['info'], false); + it('gets more info in project root', async () => { + const { exitCode, stderr, stdout } = await run(join(__dirname, '../../'), ['info'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -28,8 +28,8 @@ describe('basic info usage', () => { expect(stdout).toContain('Yarn'); }); - it('gets info as json', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--output=json'], false); + it('gets info as json', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output=json'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -46,16 +46,16 @@ describe('basic info usage', () => { expect(parse).not.toThrow(); }); - it('gets info as markdown', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--output', 'markdown'], false); + it('gets info as markdown', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'markdown'], false); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('## System:'); }); - it('shows a warning if an invalid value is supplied', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--output', 'unknown'], false); + it('shows a warning if an invalid value is supplied', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'unknown'], false); expect(exitCode).toBe(2); expect(stderr).toContain(`'unknown' is not a valid value for output`); diff --git a/test/info/info-unknown.test.js b/test/info/info-unknown.test.js index 4846b8f9d7a..e3be8a73e08 100644 --- a/test/info/info-unknown.test.js +++ b/test/info/info-unknown.test.js @@ -1,8 +1,8 @@ const { run } = require('../utils/test-utils'); describe('should handle unknown args', () => { - it('shows an appropriate warning on supplying unknown args', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--unknown'], false); + it('shows an appropriate warning on supplying unknown args', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--unknown'], false); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); diff --git a/test/init/init.test.js b/test/init/init.test.js index ba114582eec..57d62560cf7 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -1,10 +1,11 @@ +const path = require('path'); const { mkdirSync, existsSync, readFileSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { isWindows, run, runPromptWithAnswers } = require('../utils/test-utils'); +const { isWindows, run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest } = require('../utils/test-utils'); -const assetsPath = resolve(__dirname, './test-assets'); +const rootAssetsPath = resolve(__dirname, './test-assets'); const ENTER = '\x0D'; const DOWN = '\x1B\x5B\x42'; @@ -25,24 +26,17 @@ const readFromPkgJSON = (path) => { const readFromWebpackConfig = (path) => readFileSync(join(path, 'webpack.config.js'), 'utf8'); describe('init command', () => { - beforeEach(async () => { - await new Promise((resolve) => { - const interval = setInterval(() => { - if (!existsSync(assetsPath)) { - clearInterval(interval); - resolve(); - } - }, 1000); - }); - mkdirSync(assetsPath); + beforeAll(async () => { + await mkdir(rootAssetsPath); }); - afterEach(() => { - rimraf.sync(assetsPath); + afterAll(() => { + rimraf.sync(rootAssetsPath); }); - it('should generate default project when nothing is passed', () => { - const { stdout, stderr } = run(assetsPath, ['init', '--force']); + it('should generate default project when nothing is passed', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(assetsPath, ['init', '--force']); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -55,8 +49,10 @@ describe('init command', () => { // Check if the generated package.json file content matches the snapshot expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); }); - it('should generate project when generationPath is supplied', () => { - const { stdout, stderr } = run(__dirname, ['init', assetsPath, '--force']); + + it('should generate project when generationPath is supplied', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -70,9 +66,9 @@ describe('init command', () => { expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); }); - it('should generate folders if non existing generation path is given', () => { - rimraf.sync(assetsPath); - const { stdout, stderr } = run(__dirname, ['init', assetsPath, '--force']); + it('should generate folders if non existing generation path is given', async () => { + const assetsPath = path.resolve(rootAssetsPath, 'nonExistingDir'); + const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); expect(stdout).toContain("generation path doesn't exist, required folders will be created."); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -87,9 +83,9 @@ describe('init command', () => { expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); }); - it('should configure assets modules by default', () => { - rimraf.sync(assetsPath); - const { stdout, stderr } = run(__dirname, ['init', assetsPath, '--force']); + it('should configure assets modules by default', async () => { + const assetsPath = path.resolve(rootAssetsPath, 'nonExistingDir2'); + const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); expect(stdout).toContain("generation path doesn't exist, required folders will be created."); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -108,6 +104,7 @@ describe('init command', () => { }); it('should ask question when wrong template is supplied', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init', '--force', '--template=apple'], [`${ENTER}`]); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stdout).toContain('apple is not a valid template, please select one from below'); @@ -124,6 +121,7 @@ describe('init command', () => { }); it('should generate typescript project correctly', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -147,6 +145,7 @@ describe('init command', () => { }); it('should generate ES6 project correctly', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -170,6 +169,7 @@ describe('init command', () => { }); it('should use sass in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -192,6 +192,7 @@ describe('init command', () => { }); it('should use sass with postcss in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -214,6 +215,7 @@ describe('init command', () => { }); it('should use sass and css with postcss in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -236,6 +238,7 @@ describe('init command', () => { }); it('should use less in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -258,6 +261,7 @@ describe('init command', () => { }); it('should use stylus in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -280,6 +284,7 @@ describe('init command', () => { }); it('should configure WDS as opted', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init'], [ENTER, ENTER, `n${ENTER}`, ENTER]); expect(stdout).toContain('Do you want to use webpack-dev-server?'); expect(stdout).toContain('Project has been initialised with webpack!'); @@ -299,6 +304,7 @@ describe('init command', () => { }); it('should use postcss in project when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], @@ -319,6 +325,7 @@ describe('init command', () => { }); it('should configure html-webpack-plugin as opted', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init'], [ENTER, `n${ENTER}`, ENTER, ENTER]); expect(stdout).toContain('Do you want to simplify the creation of HTML files for your bundle?'); expect(stdout).toContain('Project has been initialised with webpack!'); @@ -338,13 +345,15 @@ describe('init command', () => { }); it('should throw if the current path is not writable', async () => { + if (isWindows) { + return; + } + + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const projectPath = join(assetsPath, 'non-writable-path'); mkdirSync(projectPath, 0o500); const { exitCode, stderr } = await run(projectPath, ['init', 'my-app'], { reject: false }); - if (isWindows) { - return; - } expect(exitCode).toBe(2); expect(stderr).toContain('Failed to create directory'); }); diff --git a/test/loader/error-test/loader-error.test.js b/test/loader/error-test/loader-error.test.js index 359d2bfb3f0..36b700de781 100644 --- a/test/loader/error-test/loader-error.test.js +++ b/test/loader/error-test/loader-error.test.js @@ -4,10 +4,10 @@ const { run } = require('../../utils/test-utils'); describe('loader error regression test for #1581', () => { - it(`should not ignore loader's error produce a failing build`, () => { + it(`should not ignore loader's error produce a failing build`, async () => { // Ignoring assertion on stderr because ts-loader is producing depreciation warnings // with webpack@v5.0.0-beta.24 -> https://github.com/TypeStrong/ts-loader/issues/1169 - const { stdout, exitCode } = run(__dirname, []); + const { stdout, exitCode } = await run(__dirname, []); expect(exitCode).not.toEqual(0); expect(stdout).toContain('[1 error]'); expect(stdout).toContain(`Cannot assign to 'foobar' because it is a constant`); diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index f04648384cd..88e87be8800 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -1,37 +1,46 @@ 'use strict'; -const { existsSync, mkdirSync } = require('fs'); +const { existsSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { run, runPromptWithAnswers } = require('../utils/test-utils'); +const { run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const firstPrompt = '? Loader name (my-loader)'; const ENTER = '\x0D'; -const loaderName = 'test-loader'; -const loaderPath = join(__dirname, loaderName); -const defaultLoaderPath = join(__dirname, 'my-loader'); -const genPath = join(__dirname, 'test-assets'); -const customLoaderPath = join(genPath, loaderName); +const rootAssetsPath = resolve(__dirname, './test-assets'); +const dataForTests = (rootAssetsPath) => ({ + loaderName: 'test-loader', + loaderPath: join(rootAssetsPath, 'test-loader'), + defaultLoaderPath: join(rootAssetsPath, 'my-loader'), + genPath: join(rootAssetsPath, 'test-assets'), + customLoaderPath: join(rootAssetsPath, 'test-assets', 'loaderName'), +}); describe('loader command', () => { - beforeEach(() => { - rimraf.sync(defaultLoaderPath); - rimraf.sync(loaderPath); - rimraf.sync(genPath); + beforeAll(async () => { + await mkdir(rootAssetsPath); + }); + + afterAll(() => { + rimraf.sync(rootAssetsPath); }); - it('should ask the loader name when invoked', () => { - const { stdout, stderr } = run(__dirname, ['loader'], false); + it('should ask the loader name when invoked', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['loader']); + expect(stdout).toBeTruthy(); expect(stderr).toBeFalsy(); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); }); it('should scaffold loader with default name if no loader name provided', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['loader'], [`${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { defaultLoaderPath } = dataForTests(assetsPath); + let { stdout } = await runPromptWithAnswers(assetsPath, ['loader'], [`${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails if (!existsSync(resolve(defaultLoaderPath, './yarn.lock'))) { @@ -50,14 +59,16 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './my-loader/examples/simple/'); - ({ stdout } = run(path, [], false)); + ({ stdout } = await run(path, [], false)); expect(stdout).toContain('my-loader'); }); it('should scaffold loader template with a given name', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['loader'], [`${loaderName}${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { loaderName, loaderPath } = dataForTests(assetsPath); + let { stdout } = await runPromptWithAnswers(assetsPath, ['loader'], [`${loaderName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails if (!existsSync(resolve(loaderPath, './yarn.lock'))) { @@ -76,14 +87,16 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './test-loader/examples/simple/'); - ({ stdout } = run(path, [], false)); + ({ stdout } = await run(path, [], false)); expect(stdout).toContain('test-loader'); }); it('should scaffold loader template in the specified path', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['loader', 'test-assets'], [`${loaderName}${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { loaderName, customLoaderPath } = dataForTests(assetsPath); + let { stdout } = await runPromptWithAnswers(assetsPath, ['loader', 'test-assets'], [`${loaderName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails if (!existsSync(resolve(customLoaderPath, './yarn.lock'))) { @@ -102,17 +115,17 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); - ({ stdout } = run(path, [], false)); + ({ stdout } = await run(path, [], false)); expect(stdout).toContain('test-loader'); }); it('should scaffold loader template in the current directory', async () => { - // Create test-assets directory - mkdirSync(genPath); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { loaderName, customLoaderPath } = dataForTests(assetsPath); - let { stdout } = await runPromptWithAnswers(genPath, ['loader', './'], [`${loaderName}${ENTER}`]); + let { stdout } = await runPromptWithAnswers(assetsPath, ['loader', './'], [`${loaderName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails if (!existsSync(resolve(customLoaderPath, './yarn.lock'))) { @@ -131,12 +144,14 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); - ({ stdout } = run(path, [], false)); + ({ stdout } = await run(path, [], false)); expect(stdout).toContain('test-loader'); }); - it('should prompt on supplying an invalid template', () => { - const { stderr } = run(__dirname, ['loader', '--template=unknown']); + it('should prompt on supplying an invalid template', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stderr } = await runPromptWithAnswers(assetsPath, ['loader', '--template=unknown']); + expect(stderr).toContain('unknown is not a valid template'); }); }); diff --git a/test/loader/warning-test/loader-warning.test.js b/test/loader/warning-test/loader-warning.test.js index ce69e697f09..317eadb8005 100644 --- a/test/loader/warning-test/loader-warning.test.js +++ b/test/loader/warning-test/loader-warning.test.js @@ -3,8 +3,8 @@ const { run } = require('../../utils/test-utils'); describe('loader warning test', () => { - it(`should not ignore loader's warning and exit with a non zero exit code`, () => { - const { stdout, exitCode } = run(__dirname, [], false); + it(`should not ignore loader's warning and exit with a non zero exit code`, async () => { + const { stdout, exitCode } = await run(__dirname, [], false); expect(stdout).toContain('[1 warning]'); expect(stdout).toContain('This is a warning'); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 35c6c9ad2aa..09c18f82990 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -1,37 +1,43 @@ -const { existsSync, mkdirSync } = require('fs'); +const { existsSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { run, runPromptWithAnswers } = require('../utils/test-utils'); +const { run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const ENTER = '\x0D'; const firstPrompt = '? Plugin name'; -const pluginName = 'test-plugin'; - -const pluginPath = join(__dirname, pluginName); -const defaultPluginPath = join(__dirname, 'my-webpack-plugin'); -const genPath = join(__dirname, 'test-assets'); -const customPluginPath = join(genPath, pluginName); +const rootAssetsPath = resolve(__dirname, './test-assets'); +const dataForTests = (rootAssetsPath) => ({ + pluginName: 'test-plugin', + pluginPath: join(rootAssetsPath, 'test-plugin'), + defaultPluginPath: join(rootAssetsPath, 'my-webpack-plugin'), + genPath: join(rootAssetsPath, 'test-assets'), + customPluginPath: join(rootAssetsPath, 'test-assets', 'test-plugin'), +}); describe('plugin command', () => { - beforeEach(() => { - rimraf.sync(defaultPluginPath); - rimraf.sync(pluginPath); - rimraf.sync(genPath); + beforeAll(async () => { + await mkdir(rootAssetsPath); + }); + + afterAll(() => { + rimraf.sync(rootAssetsPath); }); - it('should ask the plugin name when invoked', () => { - const { stdout, stderr } = run(__dirname, ['plugin'], false); + it('should ask the plugin name when invoked', async () => { + const { stdout, stderr } = await runPromptWithAnswers(__dirname, ['plugin']); expect(stdout).toBeTruthy(); expect(stderr).toBeFalsy(); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); }); it('should scaffold plugin with default name if no plugin name provided', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['plugin'], [`${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { defaultPluginPath } = dataForTests(assetsPath); + const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin'], [`${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Check if the output directory exists with the appropriate plugin name expect(existsSync(defaultPluginPath)).toBeTruthy(); @@ -49,14 +55,16 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - stdout = run(__dirname, ['--config', './my-webpack-plugin/examples/simple/webpack.config.js'], false).stdout; - expect(stdout).toContain('Hello World!'); + const { stdout: stdout2 } = await run(__dirname, ['--config', './my-webpack-plugin/examples/simple/webpack.config.js'], false); + expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); it('should scaffold plugin template with a given name', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['plugin'], [`${pluginName}${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { pluginName, pluginPath } = dataForTests(assetsPath); + const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin'], [`${pluginName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Check if the output directory exists with the appropriate plugin name expect(existsSync(pluginPath)).toBeTruthy(); @@ -74,14 +82,16 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - stdout = run(__dirname, ['--config', './test-plugin/examples/simple/webpack.config.js'], false).stdout; - expect(stdout).toContain('Hello World!'); + const { stdout: stdout2 } = await run(__dirname, ['--config', './test-plugin/examples/simple/webpack.config.js'], false); + expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); it('should scaffold plugin template in the specified path', async () => { - let { stdout } = await runPromptWithAnswers(__dirname, ['plugin', 'test-assets'], [`${pluginName}${ENTER}`]); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { pluginName, customPluginPath } = dataForTests(assetsPath); + const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin', 'test-assets'], [`${pluginName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Check if the output directory exists with the appropriate plugin name expect(existsSync(customPluginPath)).toBeTruthy(); @@ -99,17 +109,19 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - stdout = run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false).stdout; - expect(stdout).toContain('Hello World!'); + const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false); + expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); it('should scaffold plugin template in the current directory', async () => { - // Create test-assets directory - mkdirSync(genPath); + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { genPath, customPluginPath, pluginName } = dataForTests(assetsPath); + + await mkdir(genPath); let { stdout } = await runPromptWithAnswers(genPath, ['plugin', './'], [`${pluginName}${ENTER}`]); - expect(stdout).toContain(firstPrompt); + expect(normalizeStdout(stdout)).toContain(firstPrompt); // Check if the output directory exists with the appropriate plugin name expect(existsSync(customPluginPath)).toBeTruthy(); @@ -127,12 +139,14 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - stdout = run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false).stdout; - expect(stdout).toContain('Hello World!'); + const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false); + expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); - it('should prompt on supplying an invalid template', () => { - const { stderr } = run(__dirname, ['plugin', '--template=unknown']); + it('should prompt on supplying an invalid template', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stderr } = await runPromptWithAnswers(assetsPath, ['plugin', '--template=unknown']); + expect(stderr).toContain('unknown is not a valid template'); }); }); diff --git a/test/serve/invalid-schema/invalid-schema.test.js b/test/serve/invalid-schema/invalid-schema.test.js index 36134fe6818..90e29bf4b44 100644 --- a/test/serve/invalid-schema/invalid-schema.test.js +++ b/test/serve/invalid-schema/invalid-schema.test.js @@ -2,16 +2,16 @@ const { run, isWebpack5 } = require('../../utils/test-utils'); describe('invalid schema', () => { - it('should log webpack error and exit process on invalid config', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--config', './webpack.config.mock.js']); + it('should log webpack error and exit process on invalid config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--config', './webpack.config.mock.js']); expect(exitCode).toEqual(2); expect(stderr).toContain('Invalid configuration object'); expect(stdout).toBeFalsy(); }); - it('should log webpack error and exit process on invalid flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--mode', 'Yukihira']); + it('should log webpack error and exit process on invalid flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); diff --git a/test/utils/cli-plugin-test/plugin.test.js b/test/utils/cli-plugin-test/plugin.test.js index f4add985907..c7510abe361 100644 --- a/test/utils/cli-plugin-test/plugin.test.js +++ b/test/utils/cli-plugin-test/plugin.test.js @@ -3,8 +3,8 @@ const { cli } = require('webpack'); const { run } = require('../test-utils'); describe('webpack-cli-test-plugin Test', () => { - it('should log the webpack configuration', () => { - const { exitCode, stderr, stdout } = run(__dirname); + it('should log the webpack configuration', async () => { + const { exitCode, stderr, stdout } = await run(__dirname); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 9ed92f7ed36..fb0cc8dcb74 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -1,11 +1,13 @@ /* eslint-disable node/no-unpublished-require */ 'use strict'; + +const stripAnsi = require('strip-ansi'); const path = require('path'); const fs = require('fs'); const execa = require('execa'); const { exec } = require('child_process'); -const { sync: spawnSync, node: execaNode } = execa; +const { node: execaNode } = execa; const { Writable } = require('readable-stream'); const concat = require('concat-stream'); const { version } = require('webpack'); @@ -40,21 +42,20 @@ const hyphenToUpperCase = (name) => { * @param {String} testCase The path to folder that contains the webpack.config.js * @param {Array} args Array of arguments to pass to webpack * @param {Object} options Boolean that decides if a default output path will be set or not - * @returns {Object} The webpack output or Promise when nodeOptions are present + * @returns {Promise} */ -const run = (testCase, args = [], options = {}) => { +const run = async (testCase, args = [], options = {}) => { const cwd = path.resolve(testCase); const { nodeOptions = [] } = options; - const processExecutor = nodeOptions.length ? execaNode : spawnSync; - const result = processExecutor(WEBPACK_PATH, args, { + const processExecutor = nodeOptions.length ? execaNode : execa; + + return processExecutor(WEBPACK_PATH, args, { cwd, reject: false, stdio: ENABLE_LOG_COMPILATION ? 'inherit' : 'pipe', maxBuffer: Infinity, ...options, }); - - return result; }; /** @@ -141,7 +142,13 @@ const runPromptWithAnswers = (location, args, answers, waitForOutput = true) => if (waitForOutput) { let currentAnswer = 0; - const writeAnswer = () => { + const writeAnswer = (output) => { + if (!answers) { + runner.stdin.write(output); + runner.kill(); + return; + } + if (currentAnswer < answers.length) { runner.stdin.write(answers[currentAnswer]); currentAnswer++; @@ -158,7 +165,9 @@ const runPromptWithAnswers = (location, args, answers, waitForOutput = true) => } // we must receive new stdout, then have 2 seconds // without any stdout before writing the next answer - outputTimeout = setTimeout(writeAnswer, delay); + outputTimeout = setTimeout(() => { + writeAnswer(output); + }, delay); } callback(); @@ -255,6 +264,54 @@ const runInstall = async (cwd) => { }); }; +const readFile = (path, options = {}) => + new Promise((resolve, reject) => { + fs.readFile(path, options, (err, stats) => { + if (err) { + reject(err); + } + resolve(stats); + }); + }); + +const readdir = (path) => + new Promise((resolve, reject) => { + fs.readdir(path, (err, stats) => { + if (err) { + reject(err); + } + resolve(stats); + }); + }); + +const mkdir = (path) => { + if (fs.existsSync(path)) { + return path; + } + + new Promise((resolve) => { + const interval = setInterval(() => { + if (!fs.existsSync(path)) { + clearInterval(interval); + resolve(); + } + }, 1000); + }); + fs.mkdirSync(path); +}; + +const uniqueDirectoryForTest = async (assetsPath) => { + const localDir = Date.now().toString(); + + const result = path.resolve(assetsPath, localDir); + + await mkdir(result); + + return result; +}; + +const normalizeStdout = (string) => stripAnsi(string); + module.exports = { run, runWatch, @@ -264,6 +321,11 @@ module.exports = { copyFileAsync, runInstall, hyphenToUpperCase, + readFile, + readdir, + mkdir, + uniqueDirectoryForTest, + normalizeStdout, isWebpack5, isDevServer4, isWindows, diff --git a/test/utils/test-utils.test.js b/test/utils/test-utils.test.js index 64bfe489a13..c8877365887 100644 --- a/test/utils/test-utils.test.js +++ b/test/utils/test-utils.test.js @@ -39,8 +39,8 @@ describe('appendFile', () => { }); describe('run function', () => { - it('should work correctly by default', () => { - const { command, stdout, stderr } = run(__dirname); + it('should work correctly by default', async () => { + const { command, stdout, stderr } = await run(__dirname); expect(stderr).toBeFalsy(); // Executes the correct command @@ -49,8 +49,8 @@ describe('run function', () => { expect(stdout).toBeTruthy(); }); - it('executes cli with passed commands and params', () => { - const { stdout, stderr, command } = run(__dirname, ['info', '--output', 'markdown'], false); + it('executes cli with passed commands and params', async () => { + const { stdout, stderr, command } = await run(__dirname, ['info', '--output', 'markdown'], false); // execution command contains info command expect(command).toContain('info'); @@ -63,8 +63,8 @@ describe('run function', () => { expect(stderr).toBeFalsy(); }); - it('uses default output when output param is false', () => { - const { stdout, stderr, command } = run(__dirname, [], false); + it('uses default output when output param is false', async () => { + const { stdout, stderr, command } = await run(__dirname, [], false); // execution command contains info command expect(command).not.toContain('--output-path'); diff --git a/test/version/version.test.js b/test/version/version.test.js index e6331dd8fa6..9c6966aac58 100644 --- a/test/version/version.test.js +++ b/test/version/version.test.js @@ -7,327 +7,327 @@ const serializeSnapshot = (output) => { }; describe('single version flag', () => { - it('outputs versions with command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version']); + it('outputs versions with command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with dashed syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--version']); + it('outputs versions with dashed syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with alias syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-v']); + it('outputs versions with alias syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-v']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with info', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '--version']); + it('outputs version with info', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with info using option alias', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', '-v']); + it('outputs version with info using option alias', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '-v']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with info using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info']); + it('outputs version with info using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with info using command alias', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['v', 'info']); + it('outputs version with info using command alias', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['v', 'info']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with build', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['build', '--version']); + it('outputs version with build', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['build', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with bundle', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['bundle', '--version']); + it('outputs version with bundle', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with b', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['b', '--version']); + it('outputs version with b', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with watch', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['watch', '--version']); + it('outputs version with watch', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['watch', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with w', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['w', '--version']); + it('outputs version with w', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['w', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with plugin', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['plugin', '--version']); + it('outputs version with plugin', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['plugin', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with loader', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['loader', '--version']); + it('outputs version with loader', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['loader', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with init', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['init', '--version']); + it('outputs version with init', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['init', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with serve', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', '--version']); + it('outputs version with serve', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with migrate', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['migrate', '--version']); + it('outputs version with migrate', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['migrate', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs version with the alias c for init', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['c', '--version']); + it('outputs version with the alias c for init', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['c', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should log error when unknown command using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'unknown']); + it('should log error when unknown command using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'unknown']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should log version for known command and log error for unknown command using command syntax with multi commands', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'unknown']); + it('should log version for known command and log error for unknown command using command syntax with multi commands', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'unknown']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should work for multiple commands', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['info', 'serve', '--version']); + it('should work for multiple commands', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['info', 'serve', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should output versions for multiple commands using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'serve']); + it('should output versions for multiple commands using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'serve']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should output versions with help command using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'help']); + it('should output versions with help command using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'help']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should log version for known command and log error for unknown command using the "--version" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', 'abc', '--version']); + it('should log version for known command and log error for unknown command using the "--version" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', 'abc', '--version']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should log version for known command and log error for unknown command using the "-v" option', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['serve', 'abc', '-v']); + it('should log version for known command and log error for unknown command using the "-v" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', 'abc', '-v']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should not output version with help dashed', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--help']); + it('should not output version with help dashed', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--help']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with --color using option syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--color'], { env: { FORCE_COLOR: true } }); + it('outputs versions with --color using option syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with --no-color using option syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--no-color'], { env: { FORCE_COLOR: true } }); + it('outputs versions with --no-color using option syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with --color using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--color']); + it('outputs versions with --color using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--color']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('outputs versions with --no-color using command syntax', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--no-color']); + it('outputs versions with --no-color using command syntax', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--no-color']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should log error when unknown command used', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'abc']); + it('should log error when unknown command used', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('throws error if invalid option is passed with version command', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--abc']); + it('throws error if invalid option is passed with version command', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should log error when unknown command used with --version flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--version', 'abc']); + it('should log error when unknown command used with --version flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--version', 'abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('throws error if invalid option is passed with --version flag', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['--version', '--abc']); + it('throws error if invalid option is passed with --version flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should log error when unknown command used with -v alias', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-v', 'abc']); + it('should log error when unknown command used with -v alias', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-v', 'abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('throws error if invalid option is passed with -v alias', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['-v', '--abc']); + it('throws error if invalid option is passed with -v alias', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['-v', '--abc']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should work using command syntax with the "version" value', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'version']); + it('should work using command syntax with the "version" value', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should work using command syntax and the "--version" argument', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--version']); + it('should work using command syntax and the "--version" argument', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--version']); expect(exitCode).toBe(0); expect(stderr).toMatchSnapshot(); expect(serializeSnapshot(stdout)).toMatchSnapshot(); }); - it('should log an error using command syntax with unknown argument', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', '--unknown']); + it('should log an error using command syntax with unknown argument', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--unknown']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should log an error using command syntax with unknown argument #2', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', '--unknown']); + it('should log an error using command syntax with unknown argument #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', '--unknown']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); }); - it('should log an error using command syntax with multiple commands with unknown argument', () => { - const { exitCode, stderr, stdout } = run(__dirname, ['version', 'info', 'serve', '--unknown']); + it('should log an error using command syntax with multiple commands with unknown argument', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'serve', '--unknown']); expect(exitCode).toBe(2); expect(serializeSnapshot(stderr)).toMatchSnapshot(); diff --git a/test/watch/analyze/analyze-flag.test.js b/test/watch/analyze/analyze-flag.test.js index 1f0fe30a9f1..f199ec7a68b 100644 --- a/test/watch/analyze/analyze-flag.test.js +++ b/test/watch/analyze/analyze-flag.test.js @@ -1,13 +1,13 @@ 'use strict'; -const { runAndGetWatchProc } = require('../../utils/test-utils'); +const { runAndGetWatchProc, normalizeStdout } = require('../../utils/test-utils'); describe('"analyze" option', () => { it('should load webpack-bundle-analyzer plugin with --analyze flag', (done) => { const proc = runAndGetWatchProc(__dirname, ['--analyze'], false, '', true); proc.stdout.on('data', (chunk) => { - const data = chunk.toString(); + const data = normalizeStdout(chunk.toString()); if (data.includes('Webpack Bundle Analyzer is started at')) { expect(data).toContain('Webpack Bundle Analyzer is started at'); From dc3e1a385d10558b6d9a72d9cffa3d3b8ba9c878 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Fri, 2 Apr 2021 17:31:31 +0300 Subject: [PATCH 016/103] test: fix test on windows (#2587) --- test/serve/basic/serve-basic.test.js | 10 ---------- test/serve/serve-variable/serve-basic.test.js | 10 ---------- .../serve/with-custom-port/serve-custom-config.test.js | 10 ---------- 3 files changed, 30 deletions(-) diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index c7335b254e3..e57bff2edfc 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -14,16 +14,6 @@ describe('basic serve usage', () => { port = await getPort(); }); - const isWindows = process.platform === 'win32'; - - // TODO fix me on windows - if (isWindows) { - it('TODO: Fix on windows', () => { - expect(true).toBe(true); - }); - return; - } - it('should work', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); diff --git a/test/serve/serve-variable/serve-basic.test.js b/test/serve/serve-variable/serve-basic.test.js index 1486e2b7022..19bc9e4f208 100644 --- a/test/serve/serve-variable/serve-basic.test.js +++ b/test/serve/serve-variable/serve-basic.test.js @@ -14,16 +14,6 @@ describe('serve variable', () => { port = await getPort(); }); - const isWindows = process.platform === 'win32'; - - // TODO fix me on windows - if (isWindows) { - it('TODO: Fix on windows', () => { - expect(true).toBe(true); - }); - return; - } - it('compiles without flags and export variable', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); diff --git a/test/serve/with-custom-port/serve-custom-config.test.js b/test/serve/with-custom-port/serve-custom-config.test.js index 02f76b39c44..6a38afe18f8 100644 --- a/test/serve/with-custom-port/serve-custom-config.test.js +++ b/test/serve/with-custom-port/serve-custom-config.test.js @@ -14,16 +14,6 @@ describe('serve with devServer in config', () => { port = await getPort(); }); - const isWindows = process.platform === 'win32'; - - // TODO fix me on windows - if (isWindows) { - it('TODO: Fix on windows', () => { - expect(true).toBe(true); - }); - return; - } - it('Should pick up the host and port from config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve']); From 6664e11b740bb187ccf457ae4e649f2b134eba6a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 2 Apr 2021 22:07:18 +0300 Subject: [PATCH 017/103] chore(deps-dev): bump jest-watch-typeahead Bumps [jest-watch-typeahead](https://github.com/jest-community/jest-watch-typeahead) from 0.6.1 to 0.6.2. - [Release notes](https://github.com/jest-community/jest-watch-typeahead/releases) - [Changelog](https://github.com/jest-community/jest-watch-typeahead/blob/master/CHANGELOG.md) - [Commits](https://github.com/jest-community/jest-watch-typeahead/compare/v0.6.1...v0.6.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 70 ++++--------------------------------------------------- 1 file changed, 5 insertions(+), 65 deletions(-) diff --git a/yarn.lock b/yarn.lock index c563b6e7433..2b34405ec7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -573,18 +573,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.1.tgz#6a19eaac4aa8687b4db9130495817c65aec3d34e" - integrity sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g== - dependencies: - "@jest/types" "^26.6.1" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^26.6.1" - jest-util "^26.6.1" - slash "^3.0.0" - "@jest/console@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" @@ -703,16 +691,6 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.1.tgz#d75698d8a06aa663e8936663778c831512330cc1" - integrity sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg== - dependencies: - "@jest/console" "^26.6.1" - "@jest/types" "^26.6.1" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - "@jest/test-result@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" @@ -755,17 +733,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^26.6.1": - version "26.6.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.1.tgz#2638890e8031c0bc8b4681e0357ed986e2f866c5" - integrity sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -6544,20 +6511,6 @@ jest-matcher-utils@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-message-util@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.1.tgz#d62c20c0fe7be10bfd6020b675abb9b5fa933ff3" - integrity sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.1" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.2" - slash "^3.0.0" - stack-utils "^2.0.2" - jest-message-util@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" @@ -6712,7 +6665,7 @@ jest-snapshot@^26.6.2: pretty-format "^26.6.2" semver "^7.3.2" -jest-util@^26.1.0, jest-util@^26.6.1, jest-util@^26.6.2: +jest-util@^26.1.0, jest-util@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== @@ -6737,9 +6690,9 @@ jest-validate@^26.6.2: pretty-format "^26.6.2" jest-watch-typeahead@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.1.tgz#45221b86bb6710b7e97baaa1640ae24a07785e63" - integrity sha512-ITVnHhj3Jd/QkqQcTqZfRgjfyRhDFM/auzgVo2RKvSwi18YMvh0WvXDJFoFED6c7jd/5jxtu4kSOb9PTu2cPVg== + version "0.6.2" + resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.2.tgz#f3ea6518a2a497baad09a8d39f658140e6778e26" + integrity sha512-JKcDGEKWjhXo+/+RZMhtCsCA7J6KfbRXb7AbnQqoG9SH8AOGAkJFx8dHd80uIbkSxSVGEwI4ub62pET7a5BRPg== dependencies: ansi-escapes "^4.3.1" chalk "^4.0.0" @@ -6749,20 +6702,7 @@ jest-watch-typeahead@^0.6.1: string-length "^4.0.1" strip-ansi "^6.0.0" -jest-watcher@^26.3.0: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.1.tgz#debfa34e9c5c3e735593403794fe53d2955bfabc" - integrity sha512-0LBIPPncNi9CaLKK15bnxyd2E8OMl4kJg0PTiNOI+MXztXw1zVdtX/x9Pr6pXaQYps+eS/ts43O4+HByZ7yJSw== - dependencies: - "@jest/test-result" "^26.6.1" - "@jest/types" "^26.6.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - jest-util "^26.6.1" - string-length "^4.0.1" - -jest-watcher@^26.6.2: +jest-watcher@^26.3.0, jest-watcher@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== From 954f01c81b530b82577ac5074e88e45eff3de5d1 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 3 Apr 2021 07:06:35 +0530 Subject: [PATCH 018/103] chore: remove version logging in each test (#2588) --- scripts/snapshotResolver.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/snapshotResolver.js b/scripts/snapshotResolver.js index 30ff9708a25..585ff4f3424 100644 --- a/scripts/snapshotResolver.js +++ b/scripts/snapshotResolver.js @@ -5,8 +5,6 @@ const webpack = require('webpack'); const [webpackVersion] = webpack.version; const snapshotExtension = `.snap.webpack${webpackVersion}`; -console.log('Current webpack version:', webpackVersion); - module.exports = { resolveSnapshotPath: (testPath) => path.join(path.dirname(testPath), '__snapshots__', `${path.basename(testPath)}${snapshotExtension}`), resolveTestPath: (snapshotPath) => snapshotPath.replace(`${path.sep}__snapshots__`, '').slice(0, -snapshotExtension.length), From ed201c0744d08dc376a234ddafe32f6b5fe60082 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sat, 3 Apr 2021 11:12:42 +0530 Subject: [PATCH 019/103] feat: add support for mini-css-extract-plugin on demand (#2571) * chore: add extract question * chore: configure template * chore: update tests * chore: fix template * chore: update v4 snapshots * chore: update v5 snapshots * chore: update snapshots --- .../default/webpack.configjs.tpl | 15 +++-- packages/generators/src/handlers/default.ts | 16 ++++- .../__snapshots__/init.test.js.snap.webpack4 | 67 +++++++++++++++++-- .../__snapshots__/init.test.js.snap.webpack5 | 67 +++++++++++++++++-- test/init/init.test.js | 34 ++++++++-- 5 files changed, 175 insertions(+), 24 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index e20b6e37961..065ee95e0fd 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -1,6 +1,7 @@ // Generated using webpack-cli http://github.com/webpack-cli const path = require('path');<% if (htmlWebpackPlugin) { %> -const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %> +const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (isExtractPlugin) { %> +const MiniCssExtractPlugin = require('mini-css-extract-plugin');<% } %> module.exports = { mode: 'development', @@ -16,6 +17,8 @@ module.exports = { new HtmlWebpackPlugin({ template: 'index.html', }), +<% } %><% if (isExtractPlugin) { %> + new MiniCssExtractPlugin(), <% } %> // Add your plugins here // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ @@ -33,23 +36,23 @@ module.exports = { },<% } %><% if (isCSS && !isPostCSS) { %> { test: /\.css$/i, - use: ['style-loader','css-loader'], + use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>,'css-loader'], },<% } %><% if (cssType == 'SASS') { %> { test: /\.s[ac]ss$/i, - use: ['style-loader', 'css-loader', <% if (isPostCSS) { %>'postcss-loader', <% } %>'sass-loader'], + use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', <% if (isPostCSS) { %>'postcss-loader', <% } %>'sass-loader'], },<% } %><% if (cssType == 'LESS') { %> { test: /\.less$/i, - use: [<% if (isPostCSS) { %>'style-loader', 'css-loader', 'postcss-loader', <% } %>'less-loader'], + use: [<% if (isPostCSS) { %><% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader', <% } %>'less-loader'], },<% } %><% if (cssType == 'Stylus') { %> { test: /\.styl$/i, - use: [<% if (isPostCSS) { %>'style-loader', 'css-loader', 'postcss-loader', <% } %>'stylus-loader'], + use: [<% if (isPostCSS) { %><% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader', <% } %>'stylus-loader'], },<% } %><% if (isPostCSS && isCSS) { %> { test: /\.css$/i, - use: ['style-loader', 'css-loader', 'postcss-loader'], + use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader'], },<% } %> { test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, diff --git a/packages/generators/src/handlers/default.ts b/packages/generators/src/handlers/default.ts index 588f4b2db1e..33ccc4cab6f 100644 --- a/packages/generators/src/handlers/default.ts +++ b/packages/generators/src/handlers/default.ts @@ -65,7 +65,7 @@ export async function questions(self: CustomGenerator, Question: Record { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -196,7 +196,7 @@ describe('init command', () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `y${ENTER}`], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `y${ENTER}`, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -214,12 +214,34 @@ describe('init command', () => { expect(readFromWebpackConfig(assetsPath)).toMatchSnapshot(); }); + it('should use mini-css-extract-plugin when selected', async () => { + const { stdout, stderr } = await runPromptWithAnswers( + assetsPath, + ['init'], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `y${ENTER}`], + ); + expect(stdout).toContain('Project has been initialised with webpack!'); + expect(stderr).toContain('webpack.config.js'); + + // Test files + const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + + // Check if the generated webpack configuration matches the snapshot + expect(readFromWebpackConfig(assetsPath)).toMatchSnapshot(); + }); + it('should use sass and css with postcss in project when selected', async () => { const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `y${ENTER}`, `y${ENTER}`], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `y${ENTER}`, `y${ENTER}`, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -242,7 +264,7 @@ describe('init command', () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -265,7 +287,7 @@ describe('init command', () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -308,7 +330,7 @@ describe('init command', () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], - [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${ENTER}`, ENTER], + [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${ENTER}`, ENTER, `n${ENTER}`], ); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); From 4bb752cd114095ffabf1fe8e1cfbd8f94bda00f7 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 3 Apr 2021 15:32:18 +0530 Subject: [PATCH 020/103] chore: fix CI (#2590) --- test/build/build-variable/build-variable.test.js | 2 +- test/init/init.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/build/build-variable/build-variable.test.js b/test/build/build-variable/build-variable.test.js index fb00f67d745..9dc9e29a6df 100644 --- a/test/build/build-variable/build-variable.test.js +++ b/test/build/build-variable/build-variable.test.js @@ -2,7 +2,7 @@ const { run } = require('../../utils/test-utils'); -describe('bundle variable', async () => { +describe('bundle variable', () => { it('compiles without flags and export variable', async () => { const { exitCode, stderr, stdout } = await run(__dirname, [], false); diff --git a/test/init/init.test.js b/test/init/init.test.js index 25f6706db12..706f34fe766 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -215,6 +215,7 @@ describe('init command', () => { }); it('should use mini-css-extract-plugin when selected', async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], From 2bf24ddaeac22782767efefef4c5b49737faed00 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Sat, 3 Apr 2021 16:59:47 +0300 Subject: [PATCH 021/103] test: resolve todos (#2591) --- test/build/cache/cache.test.js | 3 +- test/build/config-format/mjs/mjs.test.js | 7 +---- .../custom-name/custom-name.test.js | 7 +---- .../mjs-config/default-mjs-config.test.js | 7 +---- .../config/error-mjs/config-error.test.js | 10 +----- test/build/core-flags/cache-flags.test.js | 31 +++++++++---------- test/build/node/node.test.js | 3 -- 7 files changed, 20 insertions(+), 48 deletions(-) diff --git a/test/build/cache/cache.test.js b/test/build/cache/cache.test.js index 254254b6ce6..409652657fd 100644 --- a/test/build/cache/cache.test.js +++ b/test/build/cache/cache.test.js @@ -43,8 +43,7 @@ describe('cache', () => { if (isWebpack5) { expect(stderr.match(/No pack exists at/g)).toHaveLength(2); - // TODO buggy - // expect(stderr.match(/Stored pack/g)).toHaveLength(2); + expect(stderr.match(/Stored pack/g)).toHaveLength(2); expect(stderr).toBeTruthy(); expect(stdout).toBeTruthy(); } diff --git a/test/build/config-format/mjs/mjs.test.js b/test/build/config-format/mjs/mjs.test.js index f6956861d71..a8775c8193e 100644 --- a/test/build/config-format/mjs/mjs.test.js +++ b/test/build/config-format/mjs/mjs.test.js @@ -1,4 +1,4 @@ -const { run, isWindows } = require('../../../utils/test-utils'); +const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { it('should support mjs config format', async () => { @@ -10,11 +10,6 @@ describe('webpack cli', () => { expect(exitCode).toBe(2); expect(stdout).toBeFalsy(); } else { - // TODO: fix for windows - if (isWindows) { - expect(true).toBe(true); - return; - } expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/build/config-lookup/custom-name/custom-name.test.js b/test/build/config-lookup/custom-name/custom-name.test.js index ae244393528..e03c561c5d3 100644 --- a/test/build/config-lookup/custom-name/custom-name.test.js +++ b/test/build/config-lookup/custom-name/custom-name.test.js @@ -1,7 +1,7 @@ 'use strict'; const { resolve } = require('path'); -const { run, isWindows } = require('../../../utils/test-utils'); +const { run } = require('../../../utils/test-utils'); describe('custom config file', () => { it('should work with cjs format', async () => { @@ -21,11 +21,6 @@ describe('custom config file', () => { expect(exitCode).toBe(2); expect(stdout).toBeFalsy(); } else { - // TODO: fix for windows - if (isWindows) { - expect(true).toBe(true); - return; - } expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/build/config/defaults/mjs-config/default-mjs-config.test.js b/test/build/config/defaults/mjs-config/default-mjs-config.test.js index 5941a959d9c..3e96d4388a3 100644 --- a/test/build/config/defaults/mjs-config/default-mjs-config.test.js +++ b/test/build/config/defaults/mjs-config/default-mjs-config.test.js @@ -1,6 +1,6 @@ const fs = require('fs'); const path = require('path'); -const { run, isWebpack5, isWindows } = require('../../../../utils/test-utils'); +const { run, isWebpack5 } = require('../../../../utils/test-utils'); describe('Default Config:', () => { it('Should be able to pick mjs config by default', async () => { @@ -10,11 +10,6 @@ describe('Default Config:', () => { expect(exitCode).toEqual(2); expect(stdout).toBeFalsy(); } else { - // TODO: fix for windows - if (isWindows) { - expect(true).toBe(true); - return; - } expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); // default entry should be used diff --git a/test/build/config/error-mjs/config-error.test.js b/test/build/config/error-mjs/config-error.test.js index 2e5a108a6a1..c31d02ea66d 100644 --- a/test/build/config/error-mjs/config-error.test.js +++ b/test/build/config/error-mjs/config-error.test.js @@ -1,16 +1,8 @@ 'use strict'; const { resolve } = require('path'); -const { run, isWindows } = require('../../../utils/test-utils'); +const { run } = require('../../../utils/test-utils'); describe('config error', () => { - // TODO fix on windows - if (isWindows) { - it('TODO: ix on windows', () => { - expect(true).toBe(true); - }); - return; - } - it('should throw error with invalid configuration', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.mjs')], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, diff --git a/test/build/core-flags/cache-flags.test.js b/test/build/core-flags/cache-flags.test.js index 297c1a77152..1ca65eb7b88 100644 --- a/test/build/core-flags/cache-flags.test.js +++ b/test/build/core-flags/cache-flags.test.js @@ -25,7 +25,7 @@ describe('cache related flags from core', () => { }); it('should set cache.type', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-type'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-type'); rimraf.sync(cacheLocation); @@ -37,7 +37,7 @@ describe('cache related flags from core', () => { }); it('should set cache.cacheDirectory with --cache-cache-directory', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-cache-directory'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-cache-directory'); rimraf.sync(cacheLocation); @@ -57,7 +57,7 @@ describe('cache related flags from core', () => { }); it('should set cache.cacheLocation with --cache-cache-locations', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-cache-location'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-cache-location'); rimraf.sync(cacheLocation); @@ -71,7 +71,7 @@ describe('cache related flags from core', () => { }); it('should set cache.hashAlgorithm with --cache-hash-algorithm', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-hash-algorithm'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-hash-algorithm'); rimraf.sync(cacheLocation); @@ -91,7 +91,7 @@ describe('cache related flags from core', () => { }); it('should set cache.name with --cache-name', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-name'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-name'); rimraf.sync(cacheLocation); @@ -111,7 +111,7 @@ describe('cache related flags from core', () => { }); it('should set cache.store with --cache-store', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-store'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-store'); rimraf.sync(cacheLocation); @@ -131,7 +131,7 @@ describe('cache related flags from core', () => { }); it('should set cache.version with --cache-version', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-version'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-version'); rimraf.sync(cacheLocation); @@ -151,7 +151,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies correctly when cache type is filesystem', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies'); rimraf.sync(cacheLocation); @@ -189,7 +189,7 @@ describe('cache related flags from core', () => { it('should assign cache build dependencies correctly when cache type is filesystem in config', async () => { const cacheLocation = path.resolve( __dirname, - '../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies-in-config', + '../../../node_modules/.cache/webpack/cache-core-flag-test-build-dependencies-in-config', ); rimraf.sync(cacheLocation); @@ -216,7 +216,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies with multiple configs', async () => { - rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/config-cache')); + rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/config-cache')); const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js']); @@ -229,7 +229,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies with default config', async () => { - rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-development')); + rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-development')); const { exitCode, stderr, stdout } = await run(__dirname, ['--cache-type', 'filesystem', '--name', 'cache-core-flag-test']); @@ -241,7 +241,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies with merged configs', async () => { - const cacheLocation = path.resolve(__dirname, '../../node_modules/.cache/webpack/cache-core-flag-test-merge'); + const cacheLocation = path.resolve(__dirname, '../../../node_modules/.cache/webpack/cache-core-flag-test-merge'); rimraf.sync(cacheLocation); @@ -263,10 +263,9 @@ describe('cache related flags from core', () => { // expect(stdout).toContain(`'${path.join(__dirname, './webpack.config.js')}'`); }); - // TODO: fix it later - it.skip('should invalidate cache when config changes', async () => { - rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/default-development')); - rimraf.sync(path.join(__dirname, '../../node_modules/.cache/webpack/default-production')); + it('should invalidate cache when config changes', async () => { + rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/default-development')); + rimraf.sync(path.join(__dirname, '../../../node_modules/.cache/webpack/default-production')); // Creating a temporary webpack config writeFileSync(resolve(__dirname, './webpack.test.config.js'), 'module.exports = {mode: "development"}'); diff --git a/test/build/node/node.test.js b/test/build/node/node.test.js index e6de4d4a156..a062d06656b 100644 --- a/test/build/node/node.test.js +++ b/test/build/node/node.test.js @@ -2,9 +2,6 @@ const { resolve } = require('path'); const { run } = require('../../utils/test-utils'); -// TODO - We pass node args to `nodeOptions` in execa, -// passing via NODE_OPTIONS= in env in execa -// throws different error from what we manually see describe('node flags', () => { it('is able to pass the options flags to node js', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path', './bin'], { From 46170509b4d242028197c857e903aaa55ce50bfb Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Mon, 5 Apr 2021 17:39:26 +0530 Subject: [PATCH 022/103] test: ts esnext (#2584) --- .../config-format/typescript-esnext/main.ts | 1 + .../typescript-esnext/package.json | 3 ++ .../typescript-esnext/tsconfig.json | 6 ++++ .../typescript-esnext/typescript.test.js | 30 +++++++++++++++++++ .../typescript-esnext/webpack.config.ts | 13 ++++++++ 5 files changed, 53 insertions(+) create mode 100644 test/build/config-format/typescript-esnext/main.ts create mode 100644 test/build/config-format/typescript-esnext/package.json create mode 100644 test/build/config-format/typescript-esnext/tsconfig.json create mode 100644 test/build/config-format/typescript-esnext/typescript.test.js create mode 100644 test/build/config-format/typescript-esnext/webpack.config.ts diff --git a/test/build/config-format/typescript-esnext/main.ts b/test/build/config-format/typescript-esnext/main.ts new file mode 100644 index 00000000000..6b4ec5de3a4 --- /dev/null +++ b/test/build/config-format/typescript-esnext/main.ts @@ -0,0 +1 @@ +console.log('Rimuru Tempest'); diff --git a/test/build/config-format/typescript-esnext/package.json b/test/build/config-format/typescript-esnext/package.json new file mode 100644 index 00000000000..3dbc1ca591c --- /dev/null +++ b/test/build/config-format/typescript-esnext/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/build/config-format/typescript-esnext/tsconfig.json b/test/build/config-format/typescript-esnext/tsconfig.json new file mode 100644 index 00000000000..e0ba2dc7a46 --- /dev/null +++ b/test/build/config-format/typescript-esnext/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "esnext", + "allowSyntheticDefaultImports": true + } +} diff --git a/test/build/config-format/typescript-esnext/typescript.test.js b/test/build/config-format/typescript-esnext/typescript.test.js new file mode 100644 index 00000000000..683640ffd58 --- /dev/null +++ b/test/build/config-format/typescript-esnext/typescript.test.js @@ -0,0 +1,30 @@ +// eslint-disable-next-line node/no-unpublished-require +const { run, isWebpack5 } = require('../../../utils/test-utils'); +const { existsSync } = require('fs'); +const { resolve } = require('path'); + +describe('webpack cli', () => { + it('should support typescript esnext file', async () => { + const isMacOS = process.platform === 'darwin'; + const majorNodeVersion = process.version.slice(1, 3); + if (majorNodeVersion < 14) { + expect(true).toBe(true); + + return; + } + + if (isMacOS && !isWebpack5) { + expect(true).toBe(true); + + return; + } + + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.ts'], { + nodeOptions: ['--loader=ts-node/esm'], + }); + expect(stderr).not.toBeFalsy(); + expect(stdout).toBeTruthy(); + expect(exitCode).toBe(0); + expect(existsSync(resolve(__dirname, 'dist/foo.bundle.js'))).toBeTruthy(); + }); +}); diff --git a/test/build/config-format/typescript-esnext/webpack.config.ts b/test/build/config-format/typescript-esnext/webpack.config.ts new file mode 100644 index 00000000000..f382c1724f1 --- /dev/null +++ b/test/build/config-format/typescript-esnext/webpack.config.ts @@ -0,0 +1,13 @@ +/* eslint-disable node/no-unsupported-features/es-syntax */ +import * as path from 'path'; + +const config = { + mode: 'production', + entry: './main.ts', + output: { + path: path.resolve('dist'), + filename: 'foo.bundle.js', + }, +}; + +export default config; From 9d07d67faf147cbaf0dddb95038403963e5f2afb Mon Sep 17 00:00:00 2001 From: James George Date: Mon, 5 Apr 2021 19:47:02 +0530 Subject: [PATCH 023/103] fix: update usage info (#2594) --- OPTIONS.md | 4 +-- packages/generators/src/index.ts | 2 +- packages/webpack-cli/README.md | 4 +-- .../__snapshots__/help.test.js.snap.webpack4 | 2 +- .../__snapshots__/help.test.js.snap.webpack5 | 2 +- test/help/help.test.js | 34 +++++++++---------- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/OPTIONS.md b/OPTIONS.md index d0ddda43f04..d69cb2e2787 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -859,9 +859,9 @@ Commands: help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index 0b46ef4b20c..4d862c0cebe 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -77,7 +77,7 @@ class GeneratorsCommand { name: 'plugin [output-path]', alias: 'p', description: 'Scaffold a plugin.', - usage: '[output-path]', + usage: '[output-path] [options]', pkg: '@webpack-cli/generators', }, [ diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 3b9bb4d0810..938112cb981 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -68,9 +68,9 @@ npx webpack-cli --help verbose help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. + loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. + plugin|p [output-path] [options] Scaffold a plugin. serve|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index e71a7e96d78..c90d98a555c 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -375,7 +375,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'plugin' command using the "--help" option 1`] = ` -"Usage: webpack plugin|p [output-path] +"Usage: webpack plugin|p [output-path] [options] Scaffold a plugin. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 80b0cd34b91..57f13f638c0 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -383,7 +383,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'plugin' command using the "--help" option 1`] = ` -"Usage: webpack plugin|p [output-path] +"Usage: webpack plugin|p [output-path] [options] Scaffold a plugin. diff --git a/test/help/help.test.js b/test/help/help.test.js index 0800341fbe2..979d900452e 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -82,51 +82,51 @@ describe('help', () => { { name: 'init', alias: 'c', - helpOutput: 'webpack init|c [generation-path] [options]', + usage: 'webpack init|c [generation-path] [options]', }, { name: 'info', alias: 'i', - helpOutput: 'webpack info|i [options]', + usage: 'webpack info|i [options]', }, { name: 'loader', alias: 'l', - helpOutput: 'webpack loader|l [output-path]', + usage: 'webpack loader|l [output-path] [options]', }, { name: 'migrate', alias: 'm', - helpOutput: 'webpack migrate|m [new-config-path]', + usage: 'webpack migrate|m [new-config-path]', }, { name: 'plugin', alias: 'p', - helpOutput: 'webpack plugin|p [output-path]', + usage: 'webpack plugin|p [output-path] [options]', }, { name: 'configtest', alias: 't', - helpOutput: 'webpack configtest|t [config-path]', + usage: 'webpack configtest|t [config-path]', }, { name: 'watch', alias: 'w', - helpOutput: 'webpack watch|w [entries...] [options]', + usage: 'webpack watch|w [entries...] [options]', }, { name: 'serve', alias: 's', - helpOutput: 'webpack serve|s [entries...] [options]', + usage: 'webpack serve|s [entries...] [options]', }, { name: 'build', alias: 'b', - helpOutput: 'webpack build|bundle|b [entries...] [options]', + usage: 'webpack build|bundle|b [entries...] [options]', }, ]; - commands.forEach(({ name, alias, helpOutput }) => { + commands.forEach(({ name, alias, usage }) => { it(`should show help information for '${name}' command using the "--help" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help']); @@ -141,7 +141,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); }); it(`should show help information for '${name}' command using command syntax`, async () => { @@ -149,7 +149,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); }); it(`should show help information for '${alias}' command using the "--help" option`, async () => { @@ -157,7 +157,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); }); it(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { @@ -165,7 +165,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); }); it(`should show help information for '${alias}' command using command syntax`, async () => { @@ -173,7 +173,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); }); it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, async () => { @@ -182,7 +182,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); if (!isMacOS) { expect(stdout).toContain('Made with ♥ by the webpack team'); @@ -195,7 +195,7 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).not.toContain('\x1b[1m'); - expect(stdout).toContain(helpOutput); + expect(stdout).toContain(usage); if (!isMacOS) { expect(stdout).toContain('Made with ♥ by the webpack team'); From f5bb85c6298967f0e66e984b1c711b9fba7af465 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 5 Apr 2021 20:41:50 +0530 Subject: [PATCH 024/103] test: add assertion for exit code (#2593) --- test/serve/basic/serve-basic.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index e57bff2edfc..53880fc7921 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -315,16 +315,18 @@ describe('basic serve usage', () => { }); it("should log error on using '--watch' flag with serve", async () => { - const { stdout, stderr } = await runWatch(testPath, ['serve', '--watch']); + const { exitCode, stdout, stderr } = await runWatch(testPath, ['serve', '--watch']); + expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--watch'"); expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); expect(stdout).toBeFalsy(); }); it("should log error on using '-w' alias with serve", async () => { - const { stdout, stderr } = await runWatch(testPath, ['serve', '-w']); + const { exitCode, stdout, stderr } = await runWatch(testPath, ['serve', '-w']); + expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '-w'"); expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); expect(stdout).toBeFalsy(); From 31d0aba5518cc9cca57513fc3c1147cfb7eaf703 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Mon, 5 Apr 2021 21:41:22 +0530 Subject: [PATCH 025/103] test: enable skipped help tests (#2567) --- .../__snapshots__/help.test.js.snap.webpack4 | 114 ++ .../__snapshots__/help.test.js.snap.webpack5 | 1754 +++++++++++++++++ test/help/help.test.js | 33 +- 3 files changed, 1873 insertions(+), 28 deletions(-) diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index c90d98a555c..5794067bd7b 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -630,6 +630,120 @@ CLI documentation: https://webpack.js.org/api/cli/. Made with ♥ by the webpack team." `; +exports[`help should show help information using the "--help" option with the "verbose" value #2 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + -h, --hot [value] Enables Hot Module Replacement + --no-hot Disables Hot Module Replacement. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + --prefetch Prefetch this request. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|c [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option with the "verbose" value 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + -h, --hot [value] Enables Hot Module Replacement + --no-hot Disables Hot Module Replacement. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + --prefetch Prefetch this request. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|c [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + exports[`help should show help information using the "help --color" option 1`] = ` "Usage: webpack --color Description: Enable colors on console. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 57f13f638c0..0c7e5b2000a 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -646,6 +646,1760 @@ CLI documentation: https://webpack.js.org/api/cli/. Made with ♥ by the webpack team." `; +exports[`help should show help information using the "--help" option with the "verbose" value #2 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + -h, --hot [value] Enables Hot Module Replacement + --no-hot Disables Hot Module Replacement. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + --prefetch Prefetch this request. + -j, --json [value] Prints result as JSON or store it in a file. + --no-amd Negative 'amd' option. + --bail Report the first error as a hard error instead of tolerating it. + --no-bail Negative 'bail' option. + --cache Enable in memory caching. Disable caching. + --no-cache Negative 'cache' option. + --cache-type In memory caching. Filesystem caching. + --cache-cache-directory Base directory for the cache (defaults to node_modules/.cache/webpack). + --cache-cache-location Locations for the cache (defaults to cacheDirectory / name). + --cache-hash-algorithm Algorithm used for generation the hash (see node.js crypto package). + --cache-idle-timeout Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle'). + --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle'). + --cache-immutable-paths A path to a immutable directory (usually a package manager cache directory). + --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. + --cache-managed-paths A path to a managed directory (usually a node_modules directory). + --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. + --cache-name Name for the cache. Different names will lead to different coexisting caches. + --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). + --cache-version Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. + --context The base directory (absolute path!) for resolving the \`entry\` option. If \`output.pathinfo\` is set, the included pathinfo is shortened to this directory. + --dependencies References to another configuration to depend on. + --dependencies-reset Clear all items provided in configuration. References to other configurations to depend on. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --entry-reset Clear all items provided in configuration. All modules are loaded upon startup. The last one is exported. + --experiments-asset Allow module type 'asset' to generate assets. + --no-experiments-asset Negative 'experiments-asset' option. + --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. + --no-experiments-async-web-assembly Negative 'experiments-async-web-assembly' option. + --experiments-layers Enable module and chunk layers. + --no-experiments-layers Negative 'experiments-layers' option. + --experiments-lazy-compilation Compile entrypoints and import()s only when they are accessed. + --no-experiments-lazy-compilation Negative 'experiments-lazy-compilation' option. + --experiments-lazy-compilation-client A custom client. + --experiments-lazy-compilation-entries Enable/disable lazy compilation for entries. + --no-experiments-lazy-compilation-entries Negative 'experiments-lazy-compilation-entries' option. + --experiments-lazy-compilation-imports Enable/disable lazy compilation for import() modules. + --no-experiments-lazy-compilation-imports Negative 'experiments-lazy-compilation-imports' option. + --experiments-lazy-compilation-test Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name. + --experiments-output-module Allow output javascript files as module source type. + --no-experiments-output-module Negative 'experiments-output-module' option. + --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). + --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. + --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. + --no-experiments-top-level-await Negative 'experiments-top-level-await' option. + --externals Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency. + --externals-reset Clear all items provided in configuration. Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on \`output.libraryTarget\`. + --externals-presets-electron Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron Negative 'externals-presets-electron' option. + --externals-presets-electron-main Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-main Negative 'externals-presets-electron-main' option. + --externals-presets-electron-preload Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-preload Negative 'externals-presets-electron-preload' option. + --externals-presets-electron-renderer Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-renderer Negative 'externals-presets-electron-renderer' option. + --externals-presets-node Treat node.js built-in modules like fs, path or vm as external and load them via require() when used. + --no-externals-presets-node Negative 'externals-presets-node' option. + --externals-presets-nwjs Treat NW.js legacy nw.gui module as external and load it via require() when used. + --no-externals-presets-nwjs Negative 'externals-presets-nwjs' option. + --externals-presets-web Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk). + --no-externals-presets-web Negative 'externals-presets-web' option. + --externals-presets-web-async Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution). + --no-externals-presets-web-async Negative 'externals-presets-web-async' option. + --externals-type Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value). + --ignore-warnings A RegExp to select the warning message. + --ignore-warnings-file A RegExp to select the origin file for the warning. + --ignore-warnings-message A RegExp to select the warning message. + --ignore-warnings-module A RegExp to select the origin module for the warning. + --ignore-warnings-reset Clear all items provided in configuration. Ignore specific warnings. + --infrastructure-logging-debug [value...] Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers. + --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. + --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific loggers. + --infrastructure-logging-level Log level. + --mode Defines the mode to pass to webpack. + --module-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-expr-context-critical Negative 'module-expr-context-critical' option. + --module-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'. + --no-module-expr-context-recursive Negative 'module-expr-context-recursive' option. + --module-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'. + --no-module-expr-context-reg-exp Negative 'module-expr-context-reg-exp' option. + --module-expr-context-request Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'. + --module-generator-asset-data-url-encoding Asset encoding (defaults to base64). + --no-module-generator-asset-data-url-encoding Negative 'module-generator-asset-data-url-encoding' option. + --module-generator-asset-data-url-mimetype Asset mimetype (getting from file extension by default). + --module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. + --no-module-generator-asset-emit Negative 'module-generator-asset-emit' option. + --module-generator-asset-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --module-generator-asset-inline-data-url-encoding Asset encoding (defaults to base64). + --no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option. + --module-generator-asset-inline-data-url-mimetype Asset mimetype (getting from file extension by default). + --module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. + --no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option. + --module-generator-asset-resource-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-resource-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --module-no-parse A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed. + --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's matched against the full resolved request. + --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. + --no-module-parser-javascript-amd Negative 'module-parser-javascript-amd' option. + --module-parser-javascript-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-browserify Negative 'module-parser-javascript-browserify' option. + --module-parser-javascript-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-commonjs Negative 'module-parser-javascript-commonjs' option. + --module-parser-javascript-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option. + --module-parser-javascript-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-expr-context-critical Negative 'module-parser-javascript-expr-context-critical' option. + --module-parser-javascript-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-expr-context-recursive Negative 'module-parser-javascript-expr-context-recursive' option. + --module-parser-javascript-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-expr-context-reg-exp Negative 'module-parser-javascript-expr-context-reg-exp' option. + --module-parser-javascript-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-harmony Negative 'module-parser-javascript-harmony' option. + --module-parser-javascript-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-import Negative 'module-parser-javascript-import' option. + --no-module-parser-javascript-node Negative 'module-parser-javascript-node' option. + --module-parser-javascript-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-node-dirname Negative 'module-parser-javascript-node-dirname' option. + --module-parser-javascript-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-node-filename Negative 'module-parser-javascript-node-filename' option. + --module-parser-javascript-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-node-global Negative 'module-parser-javascript-node-global' option. + --module-parser-javascript-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-require-context Negative 'module-parser-javascript-require-context' option. + --module-parser-javascript-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-require-ensure Negative 'module-parser-javascript-require-ensure' option. + --module-parser-javascript-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-require-include Negative 'module-parser-javascript-require-include' option. + --module-parser-javascript-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-require-js Negative 'module-parser-javascript-require-js' option. + --module-parser-javascript-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-strict-export-presence Negative 'module-parser-javascript-strict-export-presence' option. + --module-parser-javascript-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-strict-this-context-on-imports Negative 'module-parser-javascript-strict-this-context-on-imports' option. + --module-parser-javascript-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-system Negative 'module-parser-javascript-system' option. + --module-parser-javascript-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-critical Negative 'module-parser-javascript-unknown-context-critical' option. + --module-parser-javascript-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-recursive Negative 'module-parser-javascript-unknown-context-recursive' option. + --module-parser-javascript-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-reg-exp Negative 'module-parser-javascript-unknown-context-reg-exp' option. + --module-parser-javascript-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-url Negative 'module-parser-javascript-url' option. + --module-parser-javascript-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-worker Negative 'module-parser-javascript-worker' option. + --module-parser-javascript-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-wrapped-context-critical Negative 'module-parser-javascript-wrapped-context-critical' option. + --module-parser-javascript-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-wrapped-context-recursive Negative 'module-parser-javascript-wrapped-context-recursive' option. + --module-parser-javascript-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-auto-amd Negative 'module-parser-javascript-auto-amd' option. + --module-parser-javascript-auto-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-auto-browserify Negative 'module-parser-javascript-auto-browserify' option. + --module-parser-javascript-auto-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-auto-commonjs Negative 'module-parser-javascript-auto-commonjs' option. + --module-parser-javascript-auto-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option. + --module-parser-javascript-auto-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-critical Negative 'module-parser-javascript-auto-expr-context-critical' option. + --module-parser-javascript-auto-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-recursive Negative 'module-parser-javascript-auto-expr-context-recursive' option. + --module-parser-javascript-auto-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-reg-exp Negative 'module-parser-javascript-auto-expr-context-reg-exp' option. + --module-parser-javascript-auto-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-auto-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-auto-harmony Negative 'module-parser-javascript-auto-harmony' option. + --module-parser-javascript-auto-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-auto-import Negative 'module-parser-javascript-auto-import' option. + --no-module-parser-javascript-auto-node Negative 'module-parser-javascript-auto-node' option. + --module-parser-javascript-auto-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-auto-node-dirname Negative 'module-parser-javascript-auto-node-dirname' option. + --module-parser-javascript-auto-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-auto-node-filename Negative 'module-parser-javascript-auto-node-filename' option. + --module-parser-javascript-auto-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-auto-node-global Negative 'module-parser-javascript-auto-node-global' option. + --module-parser-javascript-auto-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-auto-require-context Negative 'module-parser-javascript-auto-require-context' option. + --module-parser-javascript-auto-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-auto-require-ensure Negative 'module-parser-javascript-auto-require-ensure' option. + --module-parser-javascript-auto-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-auto-require-include Negative 'module-parser-javascript-auto-require-include' option. + --module-parser-javascript-auto-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-auto-require-js Negative 'module-parser-javascript-auto-require-js' option. + --module-parser-javascript-auto-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-auto-strict-export-presence Negative 'module-parser-javascript-auto-strict-export-presence' option. + --module-parser-javascript-auto-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-auto-strict-this-context-on-imports Negative 'module-parser-javascript-auto-strict-this-context-on-imports' option. + --module-parser-javascript-auto-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-auto-system Negative 'module-parser-javascript-auto-system' option. + --module-parser-javascript-auto-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-critical Negative 'module-parser-javascript-auto-unknown-context-critical' option. + --module-parser-javascript-auto-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-recursive Negative 'module-parser-javascript-auto-unknown-context-recursive' option. + --module-parser-javascript-auto-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-reg-exp Negative 'module-parser-javascript-auto-unknown-context-reg-exp' option. + --module-parser-javascript-auto-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-auto-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-auto-url Negative 'module-parser-javascript-auto-url' option. + --module-parser-javascript-auto-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-auto-worker Negative 'module-parser-javascript-auto-worker' option. + --module-parser-javascript-auto-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-auto-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-auto-wrapped-context-critical Negative 'module-parser-javascript-auto-wrapped-context-critical' option. + --module-parser-javascript-auto-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-auto-wrapped-context-recursive Negative 'module-parser-javascript-auto-wrapped-context-recursive' option. + --module-parser-javascript-auto-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-amd Negative 'module-parser-javascript-dynamic-amd' option. + --module-parser-javascript-dynamic-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-dynamic-browserify Negative 'module-parser-javascript-dynamic-browserify' option. + --module-parser-javascript-dynamic-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-dynamic-commonjs Negative 'module-parser-javascript-dynamic-commonjs' option. + --module-parser-javascript-dynamic-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option. + --module-parser-javascript-dynamic-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-critical Negative 'module-parser-javascript-dynamic-expr-context-critical' option. + --module-parser-javascript-dynamic-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-recursive Negative 'module-parser-javascript-dynamic-expr-context-recursive' option. + --module-parser-javascript-dynamic-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-reg-exp Negative 'module-parser-javascript-dynamic-expr-context-reg-exp' option. + --module-parser-javascript-dynamic-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-dynamic-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-dynamic-harmony Negative 'module-parser-javascript-dynamic-harmony' option. + --module-parser-javascript-dynamic-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-dynamic-import Negative 'module-parser-javascript-dynamic-import' option. + --no-module-parser-javascript-dynamic-node Negative 'module-parser-javascript-dynamic-node' option. + --module-parser-javascript-dynamic-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-dynamic-node-dirname Negative 'module-parser-javascript-dynamic-node-dirname' option. + --module-parser-javascript-dynamic-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-dynamic-node-filename Negative 'module-parser-javascript-dynamic-node-filename' option. + --module-parser-javascript-dynamic-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-dynamic-node-global Negative 'module-parser-javascript-dynamic-node-global' option. + --module-parser-javascript-dynamic-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-dynamic-require-context Negative 'module-parser-javascript-dynamic-require-context' option. + --module-parser-javascript-dynamic-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-dynamic-require-ensure Negative 'module-parser-javascript-dynamic-require-ensure' option. + --module-parser-javascript-dynamic-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-dynamic-require-include Negative 'module-parser-javascript-dynamic-require-include' option. + --module-parser-javascript-dynamic-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-dynamic-require-js Negative 'module-parser-javascript-dynamic-require-js' option. + --module-parser-javascript-dynamic-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-dynamic-strict-export-presence Negative 'module-parser-javascript-dynamic-strict-export-presence' option. + --module-parser-javascript-dynamic-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-dynamic-strict-this-context-on-imports Negative 'module-parser-javascript-dynamic-strict-this-context-on-imports' option. + --module-parser-javascript-dynamic-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-dynamic-system Negative 'module-parser-javascript-dynamic-system' option. + --module-parser-javascript-dynamic-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-critical Negative 'module-parser-javascript-dynamic-unknown-context-critical' option. + --module-parser-javascript-dynamic-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-recursive Negative 'module-parser-javascript-dynamic-unknown-context-recursive' option. + --module-parser-javascript-dynamic-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-reg-exp Negative 'module-parser-javascript-dynamic-unknown-context-reg-exp' option. + --module-parser-javascript-dynamic-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-dynamic-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-dynamic-url Negative 'module-parser-javascript-dynamic-url' option. + --module-parser-javascript-dynamic-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-dynamic-worker Negative 'module-parser-javascript-dynamic-worker' option. + --module-parser-javascript-dynamic-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-dynamic-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-wrapped-context-critical Negative 'module-parser-javascript-dynamic-wrapped-context-critical' option. + --module-parser-javascript-dynamic-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-wrapped-context-recursive Negative 'module-parser-javascript-dynamic-wrapped-context-recursive' option. + --module-parser-javascript-dynamic-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-esm-amd Negative 'module-parser-javascript-esm-amd' option. + --module-parser-javascript-esm-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-esm-browserify Negative 'module-parser-javascript-esm-browserify' option. + --module-parser-javascript-esm-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-esm-commonjs Negative 'module-parser-javascript-esm-commonjs' option. + --module-parser-javascript-esm-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option. + --module-parser-javascript-esm-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-critical Negative 'module-parser-javascript-esm-expr-context-critical' option. + --module-parser-javascript-esm-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-recursive Negative 'module-parser-javascript-esm-expr-context-recursive' option. + --module-parser-javascript-esm-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-reg-exp Negative 'module-parser-javascript-esm-expr-context-reg-exp' option. + --module-parser-javascript-esm-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-esm-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-esm-harmony Negative 'module-parser-javascript-esm-harmony' option. + --module-parser-javascript-esm-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-esm-import Negative 'module-parser-javascript-esm-import' option. + --no-module-parser-javascript-esm-node Negative 'module-parser-javascript-esm-node' option. + --module-parser-javascript-esm-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-esm-node-dirname Negative 'module-parser-javascript-esm-node-dirname' option. + --module-parser-javascript-esm-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-esm-node-filename Negative 'module-parser-javascript-esm-node-filename' option. + --module-parser-javascript-esm-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-esm-node-global Negative 'module-parser-javascript-esm-node-global' option. + --module-parser-javascript-esm-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-esm-require-context Negative 'module-parser-javascript-esm-require-context' option. + --module-parser-javascript-esm-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-esm-require-ensure Negative 'module-parser-javascript-esm-require-ensure' option. + --module-parser-javascript-esm-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-esm-require-include Negative 'module-parser-javascript-esm-require-include' option. + --module-parser-javascript-esm-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-esm-require-js Negative 'module-parser-javascript-esm-require-js' option. + --module-parser-javascript-esm-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-esm-strict-export-presence Negative 'module-parser-javascript-esm-strict-export-presence' option. + --module-parser-javascript-esm-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-esm-strict-this-context-on-imports Negative 'module-parser-javascript-esm-strict-this-context-on-imports' option. + --module-parser-javascript-esm-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-esm-system Negative 'module-parser-javascript-esm-system' option. + --module-parser-javascript-esm-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-critical Negative 'module-parser-javascript-esm-unknown-context-critical' option. + --module-parser-javascript-esm-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-recursive Negative 'module-parser-javascript-esm-unknown-context-recursive' option. + --module-parser-javascript-esm-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-reg-exp Negative 'module-parser-javascript-esm-unknown-context-reg-exp' option. + --module-parser-javascript-esm-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-esm-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-esm-url Negative 'module-parser-javascript-esm-url' option. + --module-parser-javascript-esm-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-esm-worker Negative 'module-parser-javascript-esm-worker' option. + --module-parser-javascript-esm-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-esm-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-esm-wrapped-context-critical Negative 'module-parser-javascript-esm-wrapped-context-critical' option. + --module-parser-javascript-esm-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-esm-wrapped-context-recursive Negative 'module-parser-javascript-esm-wrapped-context-recursive' option. + --module-parser-javascript-esm-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --module-rules-compiler Match the child compiler name. + --module-rules-dependency Match dependency type. + --module-rules-enforce Enforce this rule as pre or post step. + --module-rules-exclude Shortcut for resource.exclude. + --module-rules-include Shortcut for resource.include. + --module-rules-issuer Match the issuer of the module (The module pointing to this module). + --module-rules-issuer-layer Match layer of the issuer of this module (The module pointing to this module). + --module-rules-layer Specifies the layer in which the module should be placed in. + --module-rules-loader A loader request. + --module-rules-mimetype Match module mimetype when load from Data URI. + --module-rules-real-resource Match the real resource path of the module. + --module-rules-resource Match the resource path of the module. + --module-rules-resource-fragment Match the resource fragment of the module. + --module-rules-resource-query Match the resource query of the module. + --module-rules-side-effects Flags a module as with or without side effects. + --no-module-rules-side-effects Negative 'module-rules-side-effects' option. + --module-rules-test Shortcut for resource.test. + --module-rules-type Module type to use for the module. + --module-rules-use-ident Unique loader options identifier. + --module-rules-use-loader A loader request. + --module-rules-use-options Options passed to a loader. + --module-rules-use A loader request. + --module-rules-reset Clear all items provided in configuration. A list of rules. + --module-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'. + --no-module-strict-export-presence Negative 'module-strict-export-presence' option. + --module-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'. + --no-module-strict-this-context-on-imports Negative 'module-strict-this-context-on-imports' option. + --module-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'. + --no-module-unknown-context-critical Negative 'module-unknown-context-critical' option. + --module-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'. + --no-module-unknown-context-recursive Negative 'module-unknown-context-recursive' option. + --module-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'. + --no-module-unknown-context-reg-exp Negative 'module-unknown-context-reg-exp' option. + --module-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'. + --module-unsafe-cache Cache the resolving of module requests. + --no-module-unsafe-cache Negative 'module-unsafe-cache' option. + --module-wrapped-context-critical Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'. + --no-module-wrapped-context-critical Negative 'module-wrapped-context-critical' option. + --module-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'. + --no-module-wrapped-context-recursive Negative 'module-wrapped-context-recursive' option. + --module-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'. + --name Name of the configuration. Used when loading multiple configurations. + --no-node Negative 'node' option. + --node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-node-dirname Negative 'node-dirname' option. + --node-filename [value] Include a polyfill for the '__filename' variable. + --no-node-filename Negative 'node-filename' option. + --node-global Include a polyfill for the 'global' variable. + --no-node-global Negative 'node-global' option. + --optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM. + --no-optimization-check-wasm-types Negative 'optimization-check-wasm-types' option. + --optimization-chunk-ids Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin). + --no-optimization-chunk-ids Negative 'optimization-chunk-ids' option. + --optimization-concatenate-modules Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. + --no-optimization-concatenate-modules Negative 'optimization-concatenate-modules' option. + --optimization-emit-on-errors Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime. + --no-optimization-emit-on-errors Negative 'optimization-emit-on-errors' option. + --optimization-flag-included-chunks Also flag chunks as loaded which contain a subset of the modules. + --no-optimization-flag-included-chunks Negative 'optimization-flag-included-chunks' option. + --optimization-inner-graph Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection. + --no-optimization-inner-graph Negative 'optimization-inner-graph' option. + --optimization-mangle-exports [value] Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names). + --no-optimization-mangle-exports Negative 'optimization-mangle-exports' option. + --optimization-mangle-wasm-imports Reduce size of WASM by changing imports to shorter strings. + --no-optimization-mangle-wasm-imports Negative 'optimization-mangle-wasm-imports' option. + --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. + --no-optimization-merge-duplicate-chunks Negative 'optimization-merge-duplicate-chunks' option. + --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. + --no-optimization-minimize Negative 'optimization-minimize' option. + --optimization-module-ids Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin). + --no-optimization-module-ids Negative 'optimization-module-ids' option. + --optimization-node-env Set process.env.NODE_ENV to a specific value. + --no-optimization-node-env Negative 'optimization-node-env' option. + --optimization-portable-records Generate records with relative paths to be able to move the context folder. + --no-optimization-portable-records Negative 'optimization-portable-records' option. + --optimization-provided-exports Figure out which exports are provided by modules to generate more efficient code. + --no-optimization-provided-exports Negative 'optimization-provided-exports' option. + --optimization-real-content-hash Use real [contenthash] based on final content of the assets. + --no-optimization-real-content-hash Negative 'optimization-real-content-hash' option. + --optimization-remove-available-modules Removes modules from chunks when these modules are already included in all parents. + --no-optimization-remove-available-modules Negative 'optimization-remove-available-modules' option. + --optimization-remove-empty-chunks Remove chunks which are empty. + --no-optimization-remove-empty-chunks Negative 'optimization-remove-empty-chunks' option. + --optimization-runtime-chunk [value] Create an additional chunk which contains only the webpack runtime and chunk hash maps. + --no-optimization-runtime-chunk Negative 'optimization-runtime-chunk' option. + --optimization-runtime-chunk-name The name or name factory for the runtime chunks. + --optimization-side-effects [value] Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects). + --no-optimization-side-effects Negative 'optimization-side-effects' option. + --no-optimization-split-chunks Negative 'optimization-split-chunks' option. + --optimization-split-chunks-automatic-name-delimiter Sets the name delimiter for created chunks. + --optimization-split-chunks-chunks Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML). + --optimization-split-chunks-default-size-types Size type, like 'javascript', 'webassembly'. + --optimization-split-chunks-default-size-types-reset Clear all items provided in configuration. Sets the size types which are used when a number is used for sizes. + --optimization-split-chunks-enforce-size-threshold Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter Sets the name delimiter for created chunks. + --optimization-split-chunks-fallback-cache-group-max-async-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-max-initial-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-max-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-min-size Size of the javascript part of the chunk. + --optimization-split-chunks-filename Sets the template for the filename for created chunks. + --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by maxSize. + --no-optimization-split-chunks-hide-path-info Negative 'optimization-split-chunks-hide-path-info' option. + --optimization-split-chunks-max-async-requests Maximum number of requests which are accepted for on-demand loading. + --optimization-split-chunks-max-async-size Size of the javascript part of the chunk. + --optimization-split-chunks-max-initial-requests Maximum number of initial chunks which are accepted for an entry point. + --optimization-split-chunks-max-initial-size Size of the javascript part of the chunk. + --optimization-split-chunks-max-size Size of the javascript part of the chunk. + --optimization-split-chunks-min-chunks Minimum number of times a module has to be duplicated until it's considered for splitting. + --optimization-split-chunks-min-remaining-size Size of the javascript part of the chunk. + --optimization-split-chunks-min-size Size of the javascript part of the chunk. + --optimization-split-chunks-name Give chunks created a name (chunks with equal name are merged). + --no-optimization-split-chunks-name Negative 'optimization-split-chunks-name' option. + --optimization-split-chunks-used-exports Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal. + --no-optimization-split-chunks-used-exports Negative 'optimization-split-chunks-used-exports' option. + --optimization-used-exports [value] Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined). + --no-optimization-used-exports Negative 'optimization-used-exports' option. + --output-asset-module-filename The filename of asset modules as relative path inside the 'output.path' directory. + --output-charset Add charset attribute for script tag. + --no-output-charset Negative 'output-charset' option. + --output-chunk-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --output-chunk-format The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins). + --no-output-chunk-format Negative 'output-chunk-format' option. + --output-chunk-load-timeout Number of milliseconds before chunk request expires. + --output-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --no-output-chunk-loading Negative 'output-chunk-loading' option. + --output-chunk-loading-global The global variable used by webpack for loading of chunks. + --output-clean Clean the output directory before emit. + --no-output-clean Negative 'output-clean' option. + --output-clean-dry Log the assets that should be removed instead of deleting them. + --no-output-clean-dry Negative 'output-clean-dry' option. + --output-clean-keep Keep these assets. + --output-compare-before-emit Check if to be emitted file already exists and have the same content before writing to output filesystem. + --no-output-compare-before-emit Negative 'output-compare-before-emit' option. + --output-cross-origin-loading This option enables cross-origin loading of chunks. + --no-output-cross-origin-loading Negative 'output-cross-origin-loading' option. + --output-devtool-fallback-module-filename-template Similar to \`output.devtoolModuleFilenameTemplate\`, but used in the case of duplicate module identifiers. + --output-devtool-module-filename-template Filename template string of function for the sources array in a generated SourceMap. + --output-devtool-namespace Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to \`output.library\` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries. + --output-enabled-chunk-loading-types The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --output-enabled-chunk-loading-types-reset Clear all items provided in configuration. List of chunk loading types enabled for use by entry points. + --output-enabled-library-types Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). + --output-enabled-library-types-reset Clear all items provided in configuration. List of library types enabled for use by entry points. + --output-enabled-wasm-loading-types The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --output-enabled-wasm-loading-types-reset Clear all items provided in configuration. List of wasm loading types enabled for use by entry points. + --output-environment-arrow-function The environment supports arrow functions ('() => { ... }'). + --no-output-environment-arrow-function Negative 'output-environment-arrow-function' option. + --output-environment-big-int-literal The environment supports BigInt as literal (123n). + --no-output-environment-big-int-literal Negative 'output-environment-big-int-literal' option. + --output-environment-const The environment supports const and let for variable declarations. + --no-output-environment-const Negative 'output-environment-const' option. + --output-environment-destructuring The environment supports destructuring ('{ a, b } = obj'). + --no-output-environment-destructuring Negative 'output-environment-destructuring' option. + --output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules. + --no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option. + --output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }'). + --no-output-environment-for-of Negative 'output-environment-for-of' option. + --output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...'). + --no-output-environment-module Negative 'output-environment-module' option. + --output-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --output-global-object An expression which is used to address the global object/scope in runtime code. + --output-hash-digest Digest type used for the hash. + --output-hash-digest-length Number of chars which are used for the hash. + --output-hash-function Algorithm used for generation the hash (see node.js crypto package). + --output-hash-salt Any string which is added to the hash to salt it. + --output-hot-update-chunk-filename The filename of the Hot Update Chunks. They are inside the output.path directory. + --output-hot-update-global The global variable used by webpack for loading of hot update chunks. + --output-hot-update-main-filename The filename of the Hot Update Main File. It is inside the 'output.path' directory. + --output-iife Wrap javascript code into IIFE's to avoid leaking into global scope. + --no-output-iife Negative 'output-iife' option. + --output-import-function-name The name of the native import() function (can be exchanged for a polyfill). + --output-import-meta-name The name of the native import.meta object (can be exchanged for a polyfill). + --output-library A part of the library name. + --output-library-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). + --output-library-amd Name of the exposed AMD library in the UMD. + --output-library-commonjs Name of the exposed commonjs export in the UMD. + --output-library-root Part of the name of the property exposed globally by a UMD library. + --output-library-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. + --output-library-auxiliary-comment Append the same comment above each import style. + --output-library-auxiliary-comment-amd Set comment for \`amd\` section in UMD. + --output-library-auxiliary-comment-commonjs Set comment for \`commonjs\` (exports) section in UMD. + --output-library-auxiliary-comment-commonjs2 Set comment for \`commonjs2\` (module.exports) section in UMD. + --output-library-auxiliary-comment-root Set comment for \`root\` (global variable) section in UMD. + --output-library-export Part of the export that should be exposed as library. + --output-library-export-reset Clear all items provided in configuration. Specify which export should be exposed as library. + --output-library-name A part of the library name. + --output-library-name-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). + --output-library-name-amd Name of the exposed AMD library in the UMD. + --output-library-name-commonjs Name of the exposed commonjs export in the UMD. + --output-library-name-root Part of the name of the property exposed globally by a UMD library. + --output-library-name-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. + --output-library-type Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). + --output-library-umd-named-define If \`output.libraryTarget\` is set to umd and \`output.library\` is set, setting this to true will name the AMD module. + --no-output-library-umd-named-define Negative 'output-library-umd-named-define' option. + --output-module Output javascript files as module source type. + --no-output-module Negative 'output-module' option. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --output-pathinfo [value] Include comments with information about the modules. + --no-output-pathinfo Negative 'output-pathinfo' option. + --output-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --output-script-type This option enables loading async chunks via a custom script type, such as script type=\\"module\\". + --no-output-script-type Negative 'output-script-type' option. + --output-source-map-filename The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory. + --output-source-prefix Prefixes every line of the source in the bundle with this string. + --output-strict-module-error-handling Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec. + --no-output-strict-module-error-handling Negative 'output-strict-module-error-handling' option. + --output-strict-module-exception-handling Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way. + --no-output-strict-module-exception-handling Negative 'output-strict-module-exception-handling' option. + --output-unique-name A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. + --output-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --no-output-wasm-loading Negative 'output-wasm-loading' option. + --output-webassembly-module-filename The filename of WebAssembly modules as relative path inside the 'output.path' directory. + --output-worker-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --no-output-worker-chunk-loading Negative 'output-worker-chunk-loading' option. + --output-worker-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --no-output-worker-wasm-loading Negative 'output-worker-wasm-loading' option. + --parallelism The number of parallel processed modules in the compilation. + --no-performance Negative 'performance' option. + --performance-hints Sets the format of the hints: warnings, errors or nothing at all. + --no-performance-hints Negative 'performance-hints' option. + --performance-max-asset-size File size limit (in bytes) when exceeded, that webpack will provide performance hints. + --performance-max-entrypoint-size Total size of an entry point (in bytes). + --profile Capture timing information for each module. + --no-profile Negative 'profile' option. + --records-input-path Store compiler state to a json file. + --no-records-input-path Negative 'records-input-path' option. + --records-output-path Load compiler state from a json file. + --no-records-output-path Negative 'records-output-path' option. + --records-path Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. \`recordsPath\` is used for \`recordsInputPath\` and \`recordsOutputPath\` if they left undefined. + --no-records-path Negative 'records-path' option. + --resolve-alias-alias Ignore request (replace with empty module). New request. + --no-resolve-alias-alias Negative 'resolve-alias-alias' option. + --resolve-alias-name Request to be redirected. + --resolve-alias-only-module Redirect only exact matching request. + --no-resolve-alias-only-module Negative 'resolve-alias-only-module' option. + --resolve-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-cache Enable caching of successfully resolved requests (cache entries are revalidated). + --no-resolve-cache Negative 'resolve-cache' option. + --resolve-cache-with-context Include the context information in the cache identifier when caching. + --no-resolve-cache-with-context Negative 'resolve-cache-with-context' option. + --resolve-condition-names Condition names for exports field entry point. + --resolve-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. + --resolve-description-files Filename used to find a description file (like a package.json). + --resolve-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). + --resolve-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). + --no-resolve-enforce-extension Negative 'resolve-enforce-extension' option. + --resolve-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. + --resolve-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. + --resolve-extensions Extension added to the request when trying to find the file. + --resolve-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. + --resolve-fallback-alias Ignore request (replace with empty module). New request. + --no-resolve-fallback-alias Negative 'resolve-fallback-alias' option. + --resolve-fallback-name Request to be redirected. + --resolve-fallback-only-module Redirect only exact matching request. + --no-resolve-fallback-only-module Negative 'resolve-fallback-only-module' option. + --resolve-fallback-reset Clear all items provided in configuration. Redirect module requests. + --resolve-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). + --no-resolve-fully-specified Negative 'resolve-fully-specified' option. + --resolve-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-main-fields Field name from the description file (package.json) which are used to find the default entry point. + --resolve-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. + --resolve-main-files Filename used to find the default entry point if there is no description file or main field. + --resolve-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. + --resolve-modules Folder name or directory path where to find modules. + --resolve-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. + --resolve-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. + --no-resolve-prefer-absolute Negative 'resolve-prefer-absolute' option. + --resolve-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. + --no-resolve-prefer-relative Negative 'resolve-prefer-relative' option. + --resolve-restrictions Resolve restriction. Resolve result must fulfill this restriction. + --resolve-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. + --resolve-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-symlinks Enable resolving symlinks to the original location. + --no-resolve-symlinks Negative 'resolve-symlinks' option. + --resolve-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). + --no-resolve-unsafe-cache Negative 'resolve-unsafe-cache' option. + --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --no-resolve-use-sync-file-system-calls Negative 'resolve-use-sync-file-system-calls' option. + --resolve-loader-alias-alias Ignore request (replace with empty module). New request. + --no-resolve-loader-alias-alias Negative 'resolve-loader-alias-alias' option. + --resolve-loader-alias-name Request to be redirected. + --resolve-loader-alias-only-module Redirect only exact matching request. + --no-resolve-loader-alias-only-module Negative 'resolve-loader-alias-only-module' option. + --resolve-loader-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-loader-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-loader-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-loader-cache Enable caching of successfully resolved requests (cache entries are revalidated). + --no-resolve-loader-cache Negative 'resolve-loader-cache' option. + --resolve-loader-cache-with-context Include the context information in the cache identifier when caching. + --no-resolve-loader-cache-with-context Negative 'resolve-loader-cache-with-context' option. + --resolve-loader-condition-names Condition names for exports field entry point. + --resolve-loader-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. + --resolve-loader-description-files Filename used to find a description file (like a package.json). + --resolve-loader-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). + --resolve-loader-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). + --no-resolve-loader-enforce-extension Negative 'resolve-loader-enforce-extension' option. + --resolve-loader-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. + --resolve-loader-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. + --resolve-loader-extensions Extension added to the request when trying to find the file. + --resolve-loader-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. + --resolve-loader-fallback-alias Ignore request (replace with empty module). New request. + --no-resolve-loader-fallback-alias Negative 'resolve-loader-fallback-alias' option. + --resolve-loader-fallback-name Request to be redirected. + --resolve-loader-fallback-only-module Redirect only exact matching request. + --no-resolve-loader-fallback-only-module Negative 'resolve-loader-fallback-only-module' option. + --resolve-loader-fallback-reset Clear all items provided in configuration. Redirect module requests. + --resolve-loader-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). + --no-resolve-loader-fully-specified Negative 'resolve-loader-fully-specified' option. + --resolve-loader-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-loader-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-loader-main-fields Field name from the description file (package.json) which are used to find the default entry point. + --resolve-loader-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. + --resolve-loader-main-files Filename used to find the default entry point if there is no description file or main field. + --resolve-loader-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. + --resolve-loader-modules Folder name or directory path where to find modules. + --resolve-loader-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. + --resolve-loader-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. + --no-resolve-loader-prefer-absolute Negative 'resolve-loader-prefer-absolute' option. + --resolve-loader-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. + --no-resolve-loader-prefer-relative Negative 'resolve-loader-prefer-relative' option. + --resolve-loader-restrictions Resolve restriction. Resolve result must fulfill this restriction. + --resolve-loader-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. + --resolve-loader-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-loader-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-loader-symlinks Enable resolving symlinks to the original location. + --no-resolve-loader-symlinks Negative 'resolve-loader-symlinks' option. + --resolve-loader-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). + --no-resolve-loader-unsafe-cache Negative 'resolve-loader-unsafe-cache' option. + --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --no-resolve-loader-use-sync-file-system-calls Negative 'resolve-loader-use-sync-file-system-calls' option. + --snapshot-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-build-dependencies-hash Negative 'snapshot-build-dependencies-hash' option. + --snapshot-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-build-dependencies-timestamp Negative 'snapshot-build-dependencies-timestamp' option. + --snapshot-immutable-paths A path to a immutable directory (usually a package manager cache directory). + --snapshot-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. + --snapshot-managed-paths A path to a managed directory (usually a node_modules directory). + --snapshot-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. + --snapshot-module-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-module-hash Negative 'snapshot-module-hash' option. + --snapshot-module-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-module-timestamp Negative 'snapshot-module-timestamp' option. + --snapshot-resolve-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-resolve-hash Negative 'snapshot-resolve-hash' option. + --snapshot-resolve-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-resolve-timestamp Negative 'snapshot-resolve-timestamp' option. + --snapshot-resolve-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-resolve-build-dependencies-hash Negative 'snapshot-resolve-build-dependencies-hash' option. + --snapshot-resolve-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-resolve-build-dependencies-timestamp Negative 'snapshot-resolve-build-dependencies-timestamp' option. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --stats-all Fallback value for stats options when an option is not defined (has precedence over local webpack defaults). + --no-stats-all Negative 'stats-all' option. + --stats-assets Add assets information. + --no-stats-assets Negative 'stats-assets' option. + --stats-assets-sort Sort the assets by that field. + --stats-assets-space Space to display assets (groups will be collapsed to fit this space). + --stats-built-at Add built at time information. + --no-stats-built-at Negative 'stats-built-at' option. + --stats-cached Add information about cached (not built) modules (deprecated: use 'cachedModules' instead). + --no-stats-cached Negative 'stats-cached' option. + --stats-cached-assets Show cached assets (setting this to \`false\` only shows emitted files). + --no-stats-cached-assets Negative 'stats-cached-assets' option. + --stats-cached-modules Add information about cached (not built) modules. + --no-stats-cached-modules Negative 'stats-cached-modules' option. + --stats-children Add children information. + --no-stats-children Negative 'stats-children' option. + --stats-chunk-group-auxiliary Display auxiliary assets in chunk groups. + --no-stats-chunk-group-auxiliary Negative 'stats-chunk-group-auxiliary' option. + --stats-chunk-group-children Display children of chunk groups. + --no-stats-chunk-group-children Negative 'stats-chunk-group-children' option. + --stats-chunk-group-max-assets Limit of assets displayed in chunk groups. + --stats-chunk-groups Display all chunk groups with the corresponding bundles. + --no-stats-chunk-groups Negative 'stats-chunk-groups' option. + --stats-chunk-modules Add built modules information to chunk information. + --no-stats-chunk-modules Negative 'stats-chunk-modules' option. + --stats-chunk-modules-space Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group). + --stats-chunk-origins Add the origins of chunks and chunk merging info. + --no-stats-chunk-origins Negative 'stats-chunk-origins' option. + --stats-chunk-relations Add information about parent, children and sibling chunks to chunk information. + --no-stats-chunk-relations Negative 'stats-chunk-relations' option. + --stats-chunks Add chunk information. + --no-stats-chunks Negative 'stats-chunks' option. + --stats-chunks-sort Sort the chunks by that field. + --stats-colors Enables/Disables colorful output. + --no-stats-colors Negative 'stats-colors' option. + --stats-colors-bold Custom color for bold text. + --stats-colors-cyan Custom color for cyan text. + --stats-colors-green Custom color for green text. + --stats-colors-magenta Custom color for magenta text. + --stats-colors-red Custom color for red text. + --stats-colors-yellow Custom color for yellow text. + --stats-context Context directory for request shortening. + --stats-dependent-modules Show chunk modules that are dependencies of other modules of the chunk. + --no-stats-dependent-modules Negative 'stats-dependent-modules' option. + --stats-depth Add module depth in module graph. + --no-stats-depth Negative 'stats-depth' option. + --stats-entrypoints [value] Display the entry points with the corresponding bundles. + --no-stats-entrypoints Negative 'stats-entrypoints' option. + --stats-env Add --env information. + --no-stats-env Negative 'stats-env' option. + --stats-error-details [value] Add details to errors (like resolving log). + --no-stats-error-details Negative 'stats-error-details' option. + --stats-error-stack Add internal stack trace to errors. + --no-stats-error-stack Negative 'stats-error-stack' option. + --stats-errors Add errors. + --no-stats-errors Negative 'stats-errors' option. + --stats-errors-count Add errors count. + --no-stats-errors-count Negative 'stats-errors-count' option. + --stats-exclude-assets Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. + --stats-exclude-assets-reset Clear all items provided in configuration. Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. + --stats-exclude-modules [value...] Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. + --no-stats-exclude-modules Negative 'stats-exclude-modules' option. + --stats-exclude-modules-reset Clear all items provided in configuration. Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. + --stats-group-assets-by-chunk Group assets by how their are related to chunks. + --no-stats-group-assets-by-chunk Negative 'stats-group-assets-by-chunk' option. + --stats-group-assets-by-emit-status Group assets by their status (emitted, compared for emit or cached). + --no-stats-group-assets-by-emit-status Negative 'stats-group-assets-by-emit-status' option. + --stats-group-assets-by-extension Group assets by their extension. + --no-stats-group-assets-by-extension Negative 'stats-group-assets-by-extension' option. + --stats-group-assets-by-info Group assets by their asset info (immutable, development, hotModuleReplacement, etc). + --no-stats-group-assets-by-info Negative 'stats-group-assets-by-info' option. + --stats-group-assets-by-path Group assets by their path. + --no-stats-group-assets-by-path Negative 'stats-group-assets-by-path' option. + --stats-group-modules-by-attributes Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). + --no-stats-group-modules-by-attributes Negative 'stats-group-modules-by-attributes' option. + --stats-group-modules-by-cache-status Group modules by their status (cached or built and cacheable). + --no-stats-group-modules-by-cache-status Negative 'stats-group-modules-by-cache-status' option. + --stats-group-modules-by-extension Group modules by their extension. + --no-stats-group-modules-by-extension Negative 'stats-group-modules-by-extension' option. + --stats-group-modules-by-layer Group modules by their layer. + --no-stats-group-modules-by-layer Negative 'stats-group-modules-by-layer' option. + --stats-group-modules-by-path Group modules by their path. + --no-stats-group-modules-by-path Negative 'stats-group-modules-by-path' option. + --stats-hash Add the hash of the compilation. + --no-stats-hash Negative 'stats-hash' option. + --stats-ids Add ids. + --no-stats-ids Negative 'stats-ids' option. + --stats-logging [value] Specify log level of logging output. Enable/disable logging output (\`true\`: shows normal logging output, loglevel: log). + --no-stats-logging Negative 'stats-logging' option. + --stats-logging-debug [value...] Enable/Disable debug logging for all loggers. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. + --no-stats-logging-debug Negative 'stats-logging-debug' option. + --stats-logging-debug-reset Clear all items provided in configuration. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. + --stats-logging-trace Add stack traces to logging output. + --no-stats-logging-trace Negative 'stats-logging-trace' option. + --stats-module-assets Add information about assets inside modules. + --no-stats-module-assets Negative 'stats-module-assets' option. + --stats-module-trace Add dependencies and origin of warnings/errors. + --no-stats-module-trace Negative 'stats-module-trace' option. + --stats-modules Add built modules information. + --no-stats-modules Negative 'stats-modules' option. + --stats-modules-sort Sort the modules by that field. + --stats-modules-space Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups). + --stats-nested-modules Add information about modules nested in other modules (like with module concatenation). + --no-stats-nested-modules Negative 'stats-nested-modules' option. + --stats-nested-modules-space Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group). + --stats-optimization-bailout Show reasons why optimization bailed out for modules. + --no-stats-optimization-bailout Negative 'stats-optimization-bailout' option. + --stats-orphan-modules Add information about orphan modules. + --no-stats-orphan-modules Negative 'stats-orphan-modules' option. + --stats-output-path Add output path information. + --no-stats-output-path Negative 'stats-output-path' option. + --stats-performance Add performance hint flags. + --no-stats-performance Negative 'stats-performance' option. + --stats-preset [value] Preset for the default values. + --no-stats-preset Negative 'stats-preset' option. + --stats-provided-exports Show exports provided by modules. + --no-stats-provided-exports Negative 'stats-provided-exports' option. + --stats-public-path Add public path information. + --no-stats-public-path Negative 'stats-public-path' option. + --stats-reasons Add information about the reasons why modules are included. + --no-stats-reasons Negative 'stats-reasons' option. + --stats-related-assets Add information about assets that are related to other assets (like SourceMaps for assets). + --no-stats-related-assets Negative 'stats-related-assets' option. + --stats-runtime Add information about runtime modules (deprecated: use 'runtimeModules' instead). + --no-stats-runtime Negative 'stats-runtime' option. + --stats-runtime-modules Add information about runtime modules. + --no-stats-runtime-modules Negative 'stats-runtime-modules' option. + --stats-source Add the source code of modules. + --no-stats-source Negative 'stats-source' option. + --stats-timings Add timing information. + --no-stats-timings Negative 'stats-timings' option. + --stats-used-exports Show exports used by modules. + --no-stats-used-exports Negative 'stats-used-exports' option. + --stats-version Add webpack version information. + --no-stats-version Negative 'stats-version' option. + --stats-warnings Add warnings. + --no-stats-warnings Negative 'stats-warnings' option. + --stats-warnings-count Add warnings count. + --no-stats-warnings-count Negative 'stats-warnings-count' option. + --stats-warnings-filter Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. + --stats-warnings-filter-reset Clear all items provided in configuration. Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --target-reset Clear all items provided in configuration. Environment to build for. An array of environments to build for all of them when possible. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-aggregate-timeout Delay the rebuilt after the first change. Value is a time in ms. + --watch-options-follow-symlinks Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks'). + --no-watch-options-follow-symlinks Negative 'watch-options-follow-symlinks' option. + --watch-options-ignored A glob pattern for files that should be ignored from watching. Ignore some files from watching (glob pattern or regexp). + --watch-options-ignored-reset Clear all items provided in configuration. Ignore some files from watching (glob pattern or regexp). + --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. + --no-watch-options-poll Negative 'watch-options-poll' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|c [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option with the "verbose" value 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + -h, --hot [value] Enables Hot Module Replacement + --no-hot Disables Hot Module Replacement. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + --prefetch Prefetch this request. + -j, --json [value] Prints result as JSON or store it in a file. + --no-amd Negative 'amd' option. + --bail Report the first error as a hard error instead of tolerating it. + --no-bail Negative 'bail' option. + --cache Enable in memory caching. Disable caching. + --no-cache Negative 'cache' option. + --cache-type In memory caching. Filesystem caching. + --cache-cache-directory Base directory for the cache (defaults to node_modules/.cache/webpack). + --cache-cache-location Locations for the cache (defaults to cacheDirectory / name). + --cache-hash-algorithm Algorithm used for generation the hash (see node.js crypto package). + --cache-idle-timeout Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle'). + --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle'). + --cache-immutable-paths A path to a immutable directory (usually a package manager cache directory). + --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. + --cache-managed-paths A path to a managed directory (usually a node_modules directory). + --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. + --cache-name Name for the cache. Different names will lead to different coexisting caches. + --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). + --cache-version Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. + --context The base directory (absolute path!) for resolving the \`entry\` option. If \`output.pathinfo\` is set, the included pathinfo is shortened to this directory. + --dependencies References to another configuration to depend on. + --dependencies-reset Clear all items provided in configuration. References to other configurations to depend on. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --entry-reset Clear all items provided in configuration. All modules are loaded upon startup. The last one is exported. + --experiments-asset Allow module type 'asset' to generate assets. + --no-experiments-asset Negative 'experiments-asset' option. + --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. + --no-experiments-async-web-assembly Negative 'experiments-async-web-assembly' option. + --experiments-layers Enable module and chunk layers. + --no-experiments-layers Negative 'experiments-layers' option. + --experiments-lazy-compilation Compile entrypoints and import()s only when they are accessed. + --no-experiments-lazy-compilation Negative 'experiments-lazy-compilation' option. + --experiments-lazy-compilation-client A custom client. + --experiments-lazy-compilation-entries Enable/disable lazy compilation for entries. + --no-experiments-lazy-compilation-entries Negative 'experiments-lazy-compilation-entries' option. + --experiments-lazy-compilation-imports Enable/disable lazy compilation for import() modules. + --no-experiments-lazy-compilation-imports Negative 'experiments-lazy-compilation-imports' option. + --experiments-lazy-compilation-test Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name. + --experiments-output-module Allow output javascript files as module source type. + --no-experiments-output-module Negative 'experiments-output-module' option. + --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). + --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. + --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. + --no-experiments-top-level-await Negative 'experiments-top-level-await' option. + --externals Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency. + --externals-reset Clear all items provided in configuration. Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on \`output.libraryTarget\`. + --externals-presets-electron Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron Negative 'externals-presets-electron' option. + --externals-presets-electron-main Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-main Negative 'externals-presets-electron-main' option. + --externals-presets-electron-preload Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-preload Negative 'externals-presets-electron-preload' option. + --externals-presets-electron-renderer Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. + --no-externals-presets-electron-renderer Negative 'externals-presets-electron-renderer' option. + --externals-presets-node Treat node.js built-in modules like fs, path or vm as external and load them via require() when used. + --no-externals-presets-node Negative 'externals-presets-node' option. + --externals-presets-nwjs Treat NW.js legacy nw.gui module as external and load it via require() when used. + --no-externals-presets-nwjs Negative 'externals-presets-nwjs' option. + --externals-presets-web Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk). + --no-externals-presets-web Negative 'externals-presets-web' option. + --externals-presets-web-async Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution). + --no-externals-presets-web-async Negative 'externals-presets-web-async' option. + --externals-type Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value). + --ignore-warnings A RegExp to select the warning message. + --ignore-warnings-file A RegExp to select the origin file for the warning. + --ignore-warnings-message A RegExp to select the warning message. + --ignore-warnings-module A RegExp to select the origin module for the warning. + --ignore-warnings-reset Clear all items provided in configuration. Ignore specific warnings. + --infrastructure-logging-debug [value...] Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers. + --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. + --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific loggers. + --infrastructure-logging-level Log level. + --mode Defines the mode to pass to webpack. + --module-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-expr-context-critical Negative 'module-expr-context-critical' option. + --module-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'. + --no-module-expr-context-recursive Negative 'module-expr-context-recursive' option. + --module-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'. + --no-module-expr-context-reg-exp Negative 'module-expr-context-reg-exp' option. + --module-expr-context-request Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'. + --module-generator-asset-data-url-encoding Asset encoding (defaults to base64). + --no-module-generator-asset-data-url-encoding Negative 'module-generator-asset-data-url-encoding' option. + --module-generator-asset-data-url-mimetype Asset mimetype (getting from file extension by default). + --module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. + --no-module-generator-asset-emit Negative 'module-generator-asset-emit' option. + --module-generator-asset-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --module-generator-asset-inline-data-url-encoding Asset encoding (defaults to base64). + --no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option. + --module-generator-asset-inline-data-url-mimetype Asset mimetype (getting from file extension by default). + --module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. + --no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option. + --module-generator-asset-resource-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-resource-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --module-no-parse A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed. + --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's matched against the full resolved request. + --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. + --no-module-parser-javascript-amd Negative 'module-parser-javascript-amd' option. + --module-parser-javascript-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-browserify Negative 'module-parser-javascript-browserify' option. + --module-parser-javascript-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-commonjs Negative 'module-parser-javascript-commonjs' option. + --module-parser-javascript-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option. + --module-parser-javascript-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-expr-context-critical Negative 'module-parser-javascript-expr-context-critical' option. + --module-parser-javascript-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-expr-context-recursive Negative 'module-parser-javascript-expr-context-recursive' option. + --module-parser-javascript-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-expr-context-reg-exp Negative 'module-parser-javascript-expr-context-reg-exp' option. + --module-parser-javascript-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-harmony Negative 'module-parser-javascript-harmony' option. + --module-parser-javascript-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-import Negative 'module-parser-javascript-import' option. + --no-module-parser-javascript-node Negative 'module-parser-javascript-node' option. + --module-parser-javascript-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-node-dirname Negative 'module-parser-javascript-node-dirname' option. + --module-parser-javascript-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-node-filename Negative 'module-parser-javascript-node-filename' option. + --module-parser-javascript-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-node-global Negative 'module-parser-javascript-node-global' option. + --module-parser-javascript-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-require-context Negative 'module-parser-javascript-require-context' option. + --module-parser-javascript-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-require-ensure Negative 'module-parser-javascript-require-ensure' option. + --module-parser-javascript-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-require-include Negative 'module-parser-javascript-require-include' option. + --module-parser-javascript-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-require-js Negative 'module-parser-javascript-require-js' option. + --module-parser-javascript-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-strict-export-presence Negative 'module-parser-javascript-strict-export-presence' option. + --module-parser-javascript-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-strict-this-context-on-imports Negative 'module-parser-javascript-strict-this-context-on-imports' option. + --module-parser-javascript-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-system Negative 'module-parser-javascript-system' option. + --module-parser-javascript-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-critical Negative 'module-parser-javascript-unknown-context-critical' option. + --module-parser-javascript-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-recursive Negative 'module-parser-javascript-unknown-context-recursive' option. + --module-parser-javascript-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-unknown-context-reg-exp Negative 'module-parser-javascript-unknown-context-reg-exp' option. + --module-parser-javascript-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-url Negative 'module-parser-javascript-url' option. + --module-parser-javascript-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-worker Negative 'module-parser-javascript-worker' option. + --module-parser-javascript-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-wrapped-context-critical Negative 'module-parser-javascript-wrapped-context-critical' option. + --module-parser-javascript-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-wrapped-context-recursive Negative 'module-parser-javascript-wrapped-context-recursive' option. + --module-parser-javascript-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-auto-amd Negative 'module-parser-javascript-auto-amd' option. + --module-parser-javascript-auto-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-auto-browserify Negative 'module-parser-javascript-auto-browserify' option. + --module-parser-javascript-auto-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-auto-commonjs Negative 'module-parser-javascript-auto-commonjs' option. + --module-parser-javascript-auto-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option. + --module-parser-javascript-auto-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-critical Negative 'module-parser-javascript-auto-expr-context-critical' option. + --module-parser-javascript-auto-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-recursive Negative 'module-parser-javascript-auto-expr-context-recursive' option. + --module-parser-javascript-auto-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-auto-expr-context-reg-exp Negative 'module-parser-javascript-auto-expr-context-reg-exp' option. + --module-parser-javascript-auto-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-auto-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-auto-harmony Negative 'module-parser-javascript-auto-harmony' option. + --module-parser-javascript-auto-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-auto-import Negative 'module-parser-javascript-auto-import' option. + --no-module-parser-javascript-auto-node Negative 'module-parser-javascript-auto-node' option. + --module-parser-javascript-auto-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-auto-node-dirname Negative 'module-parser-javascript-auto-node-dirname' option. + --module-parser-javascript-auto-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-auto-node-filename Negative 'module-parser-javascript-auto-node-filename' option. + --module-parser-javascript-auto-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-auto-node-global Negative 'module-parser-javascript-auto-node-global' option. + --module-parser-javascript-auto-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-auto-require-context Negative 'module-parser-javascript-auto-require-context' option. + --module-parser-javascript-auto-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-auto-require-ensure Negative 'module-parser-javascript-auto-require-ensure' option. + --module-parser-javascript-auto-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-auto-require-include Negative 'module-parser-javascript-auto-require-include' option. + --module-parser-javascript-auto-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-auto-require-js Negative 'module-parser-javascript-auto-require-js' option. + --module-parser-javascript-auto-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-auto-strict-export-presence Negative 'module-parser-javascript-auto-strict-export-presence' option. + --module-parser-javascript-auto-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-auto-strict-this-context-on-imports Negative 'module-parser-javascript-auto-strict-this-context-on-imports' option. + --module-parser-javascript-auto-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-auto-system Negative 'module-parser-javascript-auto-system' option. + --module-parser-javascript-auto-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-critical Negative 'module-parser-javascript-auto-unknown-context-critical' option. + --module-parser-javascript-auto-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-recursive Negative 'module-parser-javascript-auto-unknown-context-recursive' option. + --module-parser-javascript-auto-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-auto-unknown-context-reg-exp Negative 'module-parser-javascript-auto-unknown-context-reg-exp' option. + --module-parser-javascript-auto-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-auto-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-auto-url Negative 'module-parser-javascript-auto-url' option. + --module-parser-javascript-auto-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-auto-worker Negative 'module-parser-javascript-auto-worker' option. + --module-parser-javascript-auto-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-auto-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-auto-wrapped-context-critical Negative 'module-parser-javascript-auto-wrapped-context-critical' option. + --module-parser-javascript-auto-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-auto-wrapped-context-recursive Negative 'module-parser-javascript-auto-wrapped-context-recursive' option. + --module-parser-javascript-auto-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-amd Negative 'module-parser-javascript-dynamic-amd' option. + --module-parser-javascript-dynamic-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-dynamic-browserify Negative 'module-parser-javascript-dynamic-browserify' option. + --module-parser-javascript-dynamic-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-dynamic-commonjs Negative 'module-parser-javascript-dynamic-commonjs' option. + --module-parser-javascript-dynamic-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option. + --module-parser-javascript-dynamic-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-critical Negative 'module-parser-javascript-dynamic-expr-context-critical' option. + --module-parser-javascript-dynamic-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-recursive Negative 'module-parser-javascript-dynamic-expr-context-recursive' option. + --module-parser-javascript-dynamic-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-dynamic-expr-context-reg-exp Negative 'module-parser-javascript-dynamic-expr-context-reg-exp' option. + --module-parser-javascript-dynamic-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-dynamic-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-dynamic-harmony Negative 'module-parser-javascript-dynamic-harmony' option. + --module-parser-javascript-dynamic-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-dynamic-import Negative 'module-parser-javascript-dynamic-import' option. + --no-module-parser-javascript-dynamic-node Negative 'module-parser-javascript-dynamic-node' option. + --module-parser-javascript-dynamic-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-dynamic-node-dirname Negative 'module-parser-javascript-dynamic-node-dirname' option. + --module-parser-javascript-dynamic-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-dynamic-node-filename Negative 'module-parser-javascript-dynamic-node-filename' option. + --module-parser-javascript-dynamic-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-dynamic-node-global Negative 'module-parser-javascript-dynamic-node-global' option. + --module-parser-javascript-dynamic-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-dynamic-require-context Negative 'module-parser-javascript-dynamic-require-context' option. + --module-parser-javascript-dynamic-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-dynamic-require-ensure Negative 'module-parser-javascript-dynamic-require-ensure' option. + --module-parser-javascript-dynamic-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-dynamic-require-include Negative 'module-parser-javascript-dynamic-require-include' option. + --module-parser-javascript-dynamic-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-dynamic-require-js Negative 'module-parser-javascript-dynamic-require-js' option. + --module-parser-javascript-dynamic-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-dynamic-strict-export-presence Negative 'module-parser-javascript-dynamic-strict-export-presence' option. + --module-parser-javascript-dynamic-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-dynamic-strict-this-context-on-imports Negative 'module-parser-javascript-dynamic-strict-this-context-on-imports' option. + --module-parser-javascript-dynamic-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-dynamic-system Negative 'module-parser-javascript-dynamic-system' option. + --module-parser-javascript-dynamic-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-critical Negative 'module-parser-javascript-dynamic-unknown-context-critical' option. + --module-parser-javascript-dynamic-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-recursive Negative 'module-parser-javascript-dynamic-unknown-context-recursive' option. + --module-parser-javascript-dynamic-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-dynamic-unknown-context-reg-exp Negative 'module-parser-javascript-dynamic-unknown-context-reg-exp' option. + --module-parser-javascript-dynamic-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-dynamic-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-dynamic-url Negative 'module-parser-javascript-dynamic-url' option. + --module-parser-javascript-dynamic-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-dynamic-worker Negative 'module-parser-javascript-dynamic-worker' option. + --module-parser-javascript-dynamic-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-dynamic-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-wrapped-context-critical Negative 'module-parser-javascript-dynamic-wrapped-context-critical' option. + --module-parser-javascript-dynamic-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-dynamic-wrapped-context-recursive Negative 'module-parser-javascript-dynamic-wrapped-context-recursive' option. + --module-parser-javascript-dynamic-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --no-module-parser-javascript-esm-amd Negative 'module-parser-javascript-esm-amd' option. + --module-parser-javascript-esm-browserify Enable/disable special handling for browserify bundles. + --no-module-parser-javascript-esm-browserify Negative 'module-parser-javascript-esm-browserify' option. + --module-parser-javascript-esm-commonjs Enable/disable parsing of CommonJs syntax. + --no-module-parser-javascript-esm-commonjs Negative 'module-parser-javascript-esm-commonjs' option. + --module-parser-javascript-esm-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. + --no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option. + --module-parser-javascript-esm-expr-context-critical Enable warnings for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-critical Negative 'module-parser-javascript-esm-expr-context-critical' option. + --module-parser-javascript-esm-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-recursive Negative 'module-parser-javascript-esm-expr-context-recursive' option. + --module-parser-javascript-esm-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. + --no-module-parser-javascript-esm-expr-context-reg-exp Negative 'module-parser-javascript-esm-expr-context-reg-exp' option. + --module-parser-javascript-esm-expr-context-request Set the default request for full dynamic dependencies. + --module-parser-javascript-esm-harmony Enable/disable parsing of EcmaScript Modules syntax. + --no-module-parser-javascript-esm-harmony Negative 'module-parser-javascript-esm-harmony' option. + --module-parser-javascript-esm-import Enable/disable parsing of import() syntax. + --no-module-parser-javascript-esm-import Negative 'module-parser-javascript-esm-import' option. + --no-module-parser-javascript-esm-node Negative 'module-parser-javascript-esm-node' option. + --module-parser-javascript-esm-node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-module-parser-javascript-esm-node-dirname Negative 'module-parser-javascript-esm-node-dirname' option. + --module-parser-javascript-esm-node-filename [value] Include a polyfill for the '__filename' variable. + --no-module-parser-javascript-esm-node-filename Negative 'module-parser-javascript-esm-node-filename' option. + --module-parser-javascript-esm-node-global Include a polyfill for the 'global' variable. + --no-module-parser-javascript-esm-node-global Negative 'module-parser-javascript-esm-node-global' option. + --module-parser-javascript-esm-require-context Enable/disable parsing of require.context syntax. + --no-module-parser-javascript-esm-require-context Negative 'module-parser-javascript-esm-require-context' option. + --module-parser-javascript-esm-require-ensure Enable/disable parsing of require.ensure syntax. + --no-module-parser-javascript-esm-require-ensure Negative 'module-parser-javascript-esm-require-ensure' option. + --module-parser-javascript-esm-require-include Enable/disable parsing of require.include syntax. + --no-module-parser-javascript-esm-require-include Negative 'module-parser-javascript-esm-require-include' option. + --module-parser-javascript-esm-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. + --no-module-parser-javascript-esm-require-js Negative 'module-parser-javascript-esm-require-js' option. + --module-parser-javascript-esm-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. + --no-module-parser-javascript-esm-strict-export-presence Negative 'module-parser-javascript-esm-strict-export-presence' option. + --module-parser-javascript-esm-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. + --no-module-parser-javascript-esm-strict-this-context-on-imports Negative 'module-parser-javascript-esm-strict-this-context-on-imports' option. + --module-parser-javascript-esm-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. + --no-module-parser-javascript-esm-system Negative 'module-parser-javascript-esm-system' option. + --module-parser-javascript-esm-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-critical Negative 'module-parser-javascript-esm-unknown-context-critical' option. + --module-parser-javascript-esm-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-recursive Negative 'module-parser-javascript-esm-unknown-context-recursive' option. + --module-parser-javascript-esm-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. + --no-module-parser-javascript-esm-unknown-context-reg-exp Negative 'module-parser-javascript-esm-unknown-context-reg-exp' option. + --module-parser-javascript-esm-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. + --module-parser-javascript-esm-url [value] Enable/disable parsing of new URL() syntax. + --no-module-parser-javascript-esm-url Negative 'module-parser-javascript-esm-url' option. + --module-parser-javascript-esm-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --no-module-parser-javascript-esm-worker Negative 'module-parser-javascript-esm-worker' option. + --module-parser-javascript-esm-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). + --module-parser-javascript-esm-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --no-module-parser-javascript-esm-wrapped-context-critical Negative 'module-parser-javascript-esm-wrapped-context-critical' option. + --module-parser-javascript-esm-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --no-module-parser-javascript-esm-wrapped-context-recursive Negative 'module-parser-javascript-esm-wrapped-context-recursive' option. + --module-parser-javascript-esm-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. + --module-rules-compiler Match the child compiler name. + --module-rules-dependency Match dependency type. + --module-rules-enforce Enforce this rule as pre or post step. + --module-rules-exclude Shortcut for resource.exclude. + --module-rules-include Shortcut for resource.include. + --module-rules-issuer Match the issuer of the module (The module pointing to this module). + --module-rules-issuer-layer Match layer of the issuer of this module (The module pointing to this module). + --module-rules-layer Specifies the layer in which the module should be placed in. + --module-rules-loader A loader request. + --module-rules-mimetype Match module mimetype when load from Data URI. + --module-rules-real-resource Match the real resource path of the module. + --module-rules-resource Match the resource path of the module. + --module-rules-resource-fragment Match the resource fragment of the module. + --module-rules-resource-query Match the resource query of the module. + --module-rules-side-effects Flags a module as with or without side effects. + --no-module-rules-side-effects Negative 'module-rules-side-effects' option. + --module-rules-test Shortcut for resource.test. + --module-rules-type Module type to use for the module. + --module-rules-use-ident Unique loader options identifier. + --module-rules-use-loader A loader request. + --module-rules-use-options Options passed to a loader. + --module-rules-use A loader request. + --module-rules-reset Clear all items provided in configuration. A list of rules. + --module-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'. + --no-module-strict-export-presence Negative 'module-strict-export-presence' option. + --module-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'. + --no-module-strict-this-context-on-imports Negative 'module-strict-this-context-on-imports' option. + --module-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'. + --no-module-unknown-context-critical Negative 'module-unknown-context-critical' option. + --module-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'. + --no-module-unknown-context-recursive Negative 'module-unknown-context-recursive' option. + --module-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'. + --no-module-unknown-context-reg-exp Negative 'module-unknown-context-reg-exp' option. + --module-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'. + --module-unsafe-cache Cache the resolving of module requests. + --no-module-unsafe-cache Negative 'module-unsafe-cache' option. + --module-wrapped-context-critical Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'. + --no-module-wrapped-context-critical Negative 'module-wrapped-context-critical' option. + --module-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'. + --no-module-wrapped-context-recursive Negative 'module-wrapped-context-recursive' option. + --module-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'. + --name Name of the configuration. Used when loading multiple configurations. + --no-node Negative 'node' option. + --node-dirname [value] Include a polyfill for the '__dirname' variable. + --no-node-dirname Negative 'node-dirname' option. + --node-filename [value] Include a polyfill for the '__filename' variable. + --no-node-filename Negative 'node-filename' option. + --node-global Include a polyfill for the 'global' variable. + --no-node-global Negative 'node-global' option. + --optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM. + --no-optimization-check-wasm-types Negative 'optimization-check-wasm-types' option. + --optimization-chunk-ids Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin). + --no-optimization-chunk-ids Negative 'optimization-chunk-ids' option. + --optimization-concatenate-modules Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. + --no-optimization-concatenate-modules Negative 'optimization-concatenate-modules' option. + --optimization-emit-on-errors Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime. + --no-optimization-emit-on-errors Negative 'optimization-emit-on-errors' option. + --optimization-flag-included-chunks Also flag chunks as loaded which contain a subset of the modules. + --no-optimization-flag-included-chunks Negative 'optimization-flag-included-chunks' option. + --optimization-inner-graph Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection. + --no-optimization-inner-graph Negative 'optimization-inner-graph' option. + --optimization-mangle-exports [value] Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names). + --no-optimization-mangle-exports Negative 'optimization-mangle-exports' option. + --optimization-mangle-wasm-imports Reduce size of WASM by changing imports to shorter strings. + --no-optimization-mangle-wasm-imports Negative 'optimization-mangle-wasm-imports' option. + --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. + --no-optimization-merge-duplicate-chunks Negative 'optimization-merge-duplicate-chunks' option. + --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. + --no-optimization-minimize Negative 'optimization-minimize' option. + --optimization-module-ids Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin). + --no-optimization-module-ids Negative 'optimization-module-ids' option. + --optimization-node-env Set process.env.NODE_ENV to a specific value. + --no-optimization-node-env Negative 'optimization-node-env' option. + --optimization-portable-records Generate records with relative paths to be able to move the context folder. + --no-optimization-portable-records Negative 'optimization-portable-records' option. + --optimization-provided-exports Figure out which exports are provided by modules to generate more efficient code. + --no-optimization-provided-exports Negative 'optimization-provided-exports' option. + --optimization-real-content-hash Use real [contenthash] based on final content of the assets. + --no-optimization-real-content-hash Negative 'optimization-real-content-hash' option. + --optimization-remove-available-modules Removes modules from chunks when these modules are already included in all parents. + --no-optimization-remove-available-modules Negative 'optimization-remove-available-modules' option. + --optimization-remove-empty-chunks Remove chunks which are empty. + --no-optimization-remove-empty-chunks Negative 'optimization-remove-empty-chunks' option. + --optimization-runtime-chunk [value] Create an additional chunk which contains only the webpack runtime and chunk hash maps. + --no-optimization-runtime-chunk Negative 'optimization-runtime-chunk' option. + --optimization-runtime-chunk-name The name or name factory for the runtime chunks. + --optimization-side-effects [value] Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects). + --no-optimization-side-effects Negative 'optimization-side-effects' option. + --no-optimization-split-chunks Negative 'optimization-split-chunks' option. + --optimization-split-chunks-automatic-name-delimiter Sets the name delimiter for created chunks. + --optimization-split-chunks-chunks Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML). + --optimization-split-chunks-default-size-types Size type, like 'javascript', 'webassembly'. + --optimization-split-chunks-default-size-types-reset Clear all items provided in configuration. Sets the size types which are used when a number is used for sizes. + --optimization-split-chunks-enforce-size-threshold Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter Sets the name delimiter for created chunks. + --optimization-split-chunks-fallback-cache-group-max-async-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-max-initial-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-max-size Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-min-size Size of the javascript part of the chunk. + --optimization-split-chunks-filename Sets the template for the filename for created chunks. + --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by maxSize. + --no-optimization-split-chunks-hide-path-info Negative 'optimization-split-chunks-hide-path-info' option. + --optimization-split-chunks-max-async-requests Maximum number of requests which are accepted for on-demand loading. + --optimization-split-chunks-max-async-size Size of the javascript part of the chunk. + --optimization-split-chunks-max-initial-requests Maximum number of initial chunks which are accepted for an entry point. + --optimization-split-chunks-max-initial-size Size of the javascript part of the chunk. + --optimization-split-chunks-max-size Size of the javascript part of the chunk. + --optimization-split-chunks-min-chunks Minimum number of times a module has to be duplicated until it's considered for splitting. + --optimization-split-chunks-min-remaining-size Size of the javascript part of the chunk. + --optimization-split-chunks-min-size Size of the javascript part of the chunk. + --optimization-split-chunks-name Give chunks created a name (chunks with equal name are merged). + --no-optimization-split-chunks-name Negative 'optimization-split-chunks-name' option. + --optimization-split-chunks-used-exports Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal. + --no-optimization-split-chunks-used-exports Negative 'optimization-split-chunks-used-exports' option. + --optimization-used-exports [value] Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined). + --no-optimization-used-exports Negative 'optimization-used-exports' option. + --output-asset-module-filename The filename of asset modules as relative path inside the 'output.path' directory. + --output-charset Add charset attribute for script tag. + --no-output-charset Negative 'output-charset' option. + --output-chunk-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --output-chunk-format The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins). + --no-output-chunk-format Negative 'output-chunk-format' option. + --output-chunk-load-timeout Number of milliseconds before chunk request expires. + --output-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --no-output-chunk-loading Negative 'output-chunk-loading' option. + --output-chunk-loading-global The global variable used by webpack for loading of chunks. + --output-clean Clean the output directory before emit. + --no-output-clean Negative 'output-clean' option. + --output-clean-dry Log the assets that should be removed instead of deleting them. + --no-output-clean-dry Negative 'output-clean-dry' option. + --output-clean-keep Keep these assets. + --output-compare-before-emit Check if to be emitted file already exists and have the same content before writing to output filesystem. + --no-output-compare-before-emit Negative 'output-compare-before-emit' option. + --output-cross-origin-loading This option enables cross-origin loading of chunks. + --no-output-cross-origin-loading Negative 'output-cross-origin-loading' option. + --output-devtool-fallback-module-filename-template Similar to \`output.devtoolModuleFilenameTemplate\`, but used in the case of duplicate module identifiers. + --output-devtool-module-filename-template Filename template string of function for the sources array in a generated SourceMap. + --output-devtool-namespace Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to \`output.library\` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries. + --output-enabled-chunk-loading-types The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --output-enabled-chunk-loading-types-reset Clear all items provided in configuration. List of chunk loading types enabled for use by entry points. + --output-enabled-library-types Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). + --output-enabled-library-types-reset Clear all items provided in configuration. List of library types enabled for use by entry points. + --output-enabled-wasm-loading-types The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --output-enabled-wasm-loading-types-reset Clear all items provided in configuration. List of wasm loading types enabled for use by entry points. + --output-environment-arrow-function The environment supports arrow functions ('() => { ... }'). + --no-output-environment-arrow-function Negative 'output-environment-arrow-function' option. + --output-environment-big-int-literal The environment supports BigInt as literal (123n). + --no-output-environment-big-int-literal Negative 'output-environment-big-int-literal' option. + --output-environment-const The environment supports const and let for variable declarations. + --no-output-environment-const Negative 'output-environment-const' option. + --output-environment-destructuring The environment supports destructuring ('{ a, b } = obj'). + --no-output-environment-destructuring Negative 'output-environment-destructuring' option. + --output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules. + --no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option. + --output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }'). + --no-output-environment-for-of Negative 'output-environment-for-of' option. + --output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...'). + --no-output-environment-module Negative 'output-environment-module' option. + --output-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --output-global-object An expression which is used to address the global object/scope in runtime code. + --output-hash-digest Digest type used for the hash. + --output-hash-digest-length Number of chars which are used for the hash. + --output-hash-function Algorithm used for generation the hash (see node.js crypto package). + --output-hash-salt Any string which is added to the hash to salt it. + --output-hot-update-chunk-filename The filename of the Hot Update Chunks. They are inside the output.path directory. + --output-hot-update-global The global variable used by webpack for loading of hot update chunks. + --output-hot-update-main-filename The filename of the Hot Update Main File. It is inside the 'output.path' directory. + --output-iife Wrap javascript code into IIFE's to avoid leaking into global scope. + --no-output-iife Negative 'output-iife' option. + --output-import-function-name The name of the native import() function (can be exchanged for a polyfill). + --output-import-meta-name The name of the native import.meta object (can be exchanged for a polyfill). + --output-library A part of the library name. + --output-library-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). + --output-library-amd Name of the exposed AMD library in the UMD. + --output-library-commonjs Name of the exposed commonjs export in the UMD. + --output-library-root Part of the name of the property exposed globally by a UMD library. + --output-library-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. + --output-library-auxiliary-comment Append the same comment above each import style. + --output-library-auxiliary-comment-amd Set comment for \`amd\` section in UMD. + --output-library-auxiliary-comment-commonjs Set comment for \`commonjs\` (exports) section in UMD. + --output-library-auxiliary-comment-commonjs2 Set comment for \`commonjs2\` (module.exports) section in UMD. + --output-library-auxiliary-comment-root Set comment for \`root\` (global variable) section in UMD. + --output-library-export Part of the export that should be exposed as library. + --output-library-export-reset Clear all items provided in configuration. Specify which export should be exposed as library. + --output-library-name A part of the library name. + --output-library-name-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). + --output-library-name-amd Name of the exposed AMD library in the UMD. + --output-library-name-commonjs Name of the exposed commonjs export in the UMD. + --output-library-name-root Part of the name of the property exposed globally by a UMD library. + --output-library-name-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. + --output-library-type Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). + --output-library-umd-named-define If \`output.libraryTarget\` is set to umd and \`output.library\` is set, setting this to true will name the AMD module. + --no-output-library-umd-named-define Negative 'output-library-umd-named-define' option. + --output-module Output javascript files as module source type. + --no-output-module Negative 'output-module' option. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --output-pathinfo [value] Include comments with information about the modules. + --no-output-pathinfo Negative 'output-pathinfo' option. + --output-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. + --output-script-type This option enables loading async chunks via a custom script type, such as script type=\\"module\\". + --no-output-script-type Negative 'output-script-type' option. + --output-source-map-filename The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory. + --output-source-prefix Prefixes every line of the source in the bundle with this string. + --output-strict-module-error-handling Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec. + --no-output-strict-module-error-handling Negative 'output-strict-module-error-handling' option. + --output-strict-module-exception-handling Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way. + --no-output-strict-module-exception-handling Negative 'output-strict-module-exception-handling' option. + --output-unique-name A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. + --output-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --no-output-wasm-loading Negative 'output-wasm-loading' option. + --output-webassembly-module-filename The filename of WebAssembly modules as relative path inside the 'output.path' directory. + --output-worker-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). + --no-output-worker-chunk-loading Negative 'output-worker-chunk-loading' option. + --output-worker-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). + --no-output-worker-wasm-loading Negative 'output-worker-wasm-loading' option. + --parallelism The number of parallel processed modules in the compilation. + --no-performance Negative 'performance' option. + --performance-hints Sets the format of the hints: warnings, errors or nothing at all. + --no-performance-hints Negative 'performance-hints' option. + --performance-max-asset-size File size limit (in bytes) when exceeded, that webpack will provide performance hints. + --performance-max-entrypoint-size Total size of an entry point (in bytes). + --profile Capture timing information for each module. + --no-profile Negative 'profile' option. + --records-input-path Store compiler state to a json file. + --no-records-input-path Negative 'records-input-path' option. + --records-output-path Load compiler state from a json file. + --no-records-output-path Negative 'records-output-path' option. + --records-path Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. \`recordsPath\` is used for \`recordsInputPath\` and \`recordsOutputPath\` if they left undefined. + --no-records-path Negative 'records-path' option. + --resolve-alias-alias Ignore request (replace with empty module). New request. + --no-resolve-alias-alias Negative 'resolve-alias-alias' option. + --resolve-alias-name Request to be redirected. + --resolve-alias-only-module Redirect only exact matching request. + --no-resolve-alias-only-module Negative 'resolve-alias-only-module' option. + --resolve-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-cache Enable caching of successfully resolved requests (cache entries are revalidated). + --no-resolve-cache Negative 'resolve-cache' option. + --resolve-cache-with-context Include the context information in the cache identifier when caching. + --no-resolve-cache-with-context Negative 'resolve-cache-with-context' option. + --resolve-condition-names Condition names for exports field entry point. + --resolve-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. + --resolve-description-files Filename used to find a description file (like a package.json). + --resolve-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). + --resolve-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). + --no-resolve-enforce-extension Negative 'resolve-enforce-extension' option. + --resolve-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. + --resolve-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. + --resolve-extensions Extension added to the request when trying to find the file. + --resolve-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. + --resolve-fallback-alias Ignore request (replace with empty module). New request. + --no-resolve-fallback-alias Negative 'resolve-fallback-alias' option. + --resolve-fallback-name Request to be redirected. + --resolve-fallback-only-module Redirect only exact matching request. + --no-resolve-fallback-only-module Negative 'resolve-fallback-only-module' option. + --resolve-fallback-reset Clear all items provided in configuration. Redirect module requests. + --resolve-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). + --no-resolve-fully-specified Negative 'resolve-fully-specified' option. + --resolve-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-main-fields Field name from the description file (package.json) which are used to find the default entry point. + --resolve-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. + --resolve-main-files Filename used to find the default entry point if there is no description file or main field. + --resolve-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. + --resolve-modules Folder name or directory path where to find modules. + --resolve-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. + --resolve-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. + --no-resolve-prefer-absolute Negative 'resolve-prefer-absolute' option. + --resolve-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. + --no-resolve-prefer-relative Negative 'resolve-prefer-relative' option. + --resolve-restrictions Resolve restriction. Resolve result must fulfill this restriction. + --resolve-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. + --resolve-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-symlinks Enable resolving symlinks to the original location. + --no-resolve-symlinks Negative 'resolve-symlinks' option. + --resolve-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). + --no-resolve-unsafe-cache Negative 'resolve-unsafe-cache' option. + --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --no-resolve-use-sync-file-system-calls Negative 'resolve-use-sync-file-system-calls' option. + --resolve-loader-alias-alias Ignore request (replace with empty module). New request. + --no-resolve-loader-alias-alias Negative 'resolve-loader-alias-alias' option. + --resolve-loader-alias-name Request to be redirected. + --resolve-loader-alias-only-module Redirect only exact matching request. + --no-resolve-loader-alias-only-module Negative 'resolve-loader-alias-only-module' option. + --resolve-loader-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-loader-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-loader-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. + --resolve-loader-cache Enable caching of successfully resolved requests (cache entries are revalidated). + --no-resolve-loader-cache Negative 'resolve-loader-cache' option. + --resolve-loader-cache-with-context Include the context information in the cache identifier when caching. + --no-resolve-loader-cache-with-context Negative 'resolve-loader-cache-with-context' option. + --resolve-loader-condition-names Condition names for exports field entry point. + --resolve-loader-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. + --resolve-loader-description-files Filename used to find a description file (like a package.json). + --resolve-loader-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). + --resolve-loader-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). + --no-resolve-loader-enforce-extension Negative 'resolve-loader-enforce-extension' option. + --resolve-loader-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. + --resolve-loader-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. + --resolve-loader-extensions Extension added to the request when trying to find the file. + --resolve-loader-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. + --resolve-loader-fallback-alias Ignore request (replace with empty module). New request. + --no-resolve-loader-fallback-alias Negative 'resolve-loader-fallback-alias' option. + --resolve-loader-fallback-name Request to be redirected. + --resolve-loader-fallback-only-module Redirect only exact matching request. + --no-resolve-loader-fallback-only-module Negative 'resolve-loader-fallback-only-module' option. + --resolve-loader-fallback-reset Clear all items provided in configuration. Redirect module requests. + --resolve-loader-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). + --no-resolve-loader-fully-specified Negative 'resolve-loader-fully-specified' option. + --resolve-loader-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-loader-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). + --resolve-loader-main-fields Field name from the description file (package.json) which are used to find the default entry point. + --resolve-loader-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. + --resolve-loader-main-files Filename used to find the default entry point if there is no description file or main field. + --resolve-loader-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. + --resolve-loader-modules Folder name or directory path where to find modules. + --resolve-loader-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. + --resolve-loader-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. + --no-resolve-loader-prefer-absolute Negative 'resolve-loader-prefer-absolute' option. + --resolve-loader-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. + --no-resolve-loader-prefer-relative Negative 'resolve-loader-prefer-relative' option. + --resolve-loader-restrictions Resolve restriction. Resolve result must fulfill this restriction. + --resolve-loader-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. + --resolve-loader-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-loader-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. + --resolve-loader-symlinks Enable resolving symlinks to the original location. + --no-resolve-loader-symlinks Negative 'resolve-loader-symlinks' option. + --resolve-loader-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). + --no-resolve-loader-unsafe-cache Negative 'resolve-loader-unsafe-cache' option. + --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --no-resolve-loader-use-sync-file-system-calls Negative 'resolve-loader-use-sync-file-system-calls' option. + --snapshot-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-build-dependencies-hash Negative 'snapshot-build-dependencies-hash' option. + --snapshot-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-build-dependencies-timestamp Negative 'snapshot-build-dependencies-timestamp' option. + --snapshot-immutable-paths A path to a immutable directory (usually a package manager cache directory). + --snapshot-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. + --snapshot-managed-paths A path to a managed directory (usually a node_modules directory). + --snapshot-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. + --snapshot-module-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-module-hash Negative 'snapshot-module-hash' option. + --snapshot-module-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-module-timestamp Negative 'snapshot-module-timestamp' option. + --snapshot-resolve-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-resolve-hash Negative 'snapshot-resolve-hash' option. + --snapshot-resolve-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-resolve-timestamp Negative 'snapshot-resolve-timestamp' option. + --snapshot-resolve-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. + --no-snapshot-resolve-build-dependencies-hash Negative 'snapshot-resolve-build-dependencies-hash' option. + --snapshot-resolve-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. + --no-snapshot-resolve-build-dependencies-timestamp Negative 'snapshot-resolve-build-dependencies-timestamp' option. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --stats-all Fallback value for stats options when an option is not defined (has precedence over local webpack defaults). + --no-stats-all Negative 'stats-all' option. + --stats-assets Add assets information. + --no-stats-assets Negative 'stats-assets' option. + --stats-assets-sort Sort the assets by that field. + --stats-assets-space Space to display assets (groups will be collapsed to fit this space). + --stats-built-at Add built at time information. + --no-stats-built-at Negative 'stats-built-at' option. + --stats-cached Add information about cached (not built) modules (deprecated: use 'cachedModules' instead). + --no-stats-cached Negative 'stats-cached' option. + --stats-cached-assets Show cached assets (setting this to \`false\` only shows emitted files). + --no-stats-cached-assets Negative 'stats-cached-assets' option. + --stats-cached-modules Add information about cached (not built) modules. + --no-stats-cached-modules Negative 'stats-cached-modules' option. + --stats-children Add children information. + --no-stats-children Negative 'stats-children' option. + --stats-chunk-group-auxiliary Display auxiliary assets in chunk groups. + --no-stats-chunk-group-auxiliary Negative 'stats-chunk-group-auxiliary' option. + --stats-chunk-group-children Display children of chunk groups. + --no-stats-chunk-group-children Negative 'stats-chunk-group-children' option. + --stats-chunk-group-max-assets Limit of assets displayed in chunk groups. + --stats-chunk-groups Display all chunk groups with the corresponding bundles. + --no-stats-chunk-groups Negative 'stats-chunk-groups' option. + --stats-chunk-modules Add built modules information to chunk information. + --no-stats-chunk-modules Negative 'stats-chunk-modules' option. + --stats-chunk-modules-space Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group). + --stats-chunk-origins Add the origins of chunks and chunk merging info. + --no-stats-chunk-origins Negative 'stats-chunk-origins' option. + --stats-chunk-relations Add information about parent, children and sibling chunks to chunk information. + --no-stats-chunk-relations Negative 'stats-chunk-relations' option. + --stats-chunks Add chunk information. + --no-stats-chunks Negative 'stats-chunks' option. + --stats-chunks-sort Sort the chunks by that field. + --stats-colors Enables/Disables colorful output. + --no-stats-colors Negative 'stats-colors' option. + --stats-colors-bold Custom color for bold text. + --stats-colors-cyan Custom color for cyan text. + --stats-colors-green Custom color for green text. + --stats-colors-magenta Custom color for magenta text. + --stats-colors-red Custom color for red text. + --stats-colors-yellow Custom color for yellow text. + --stats-context Context directory for request shortening. + --stats-dependent-modules Show chunk modules that are dependencies of other modules of the chunk. + --no-stats-dependent-modules Negative 'stats-dependent-modules' option. + --stats-depth Add module depth in module graph. + --no-stats-depth Negative 'stats-depth' option. + --stats-entrypoints [value] Display the entry points with the corresponding bundles. + --no-stats-entrypoints Negative 'stats-entrypoints' option. + --stats-env Add --env information. + --no-stats-env Negative 'stats-env' option. + --stats-error-details [value] Add details to errors (like resolving log). + --no-stats-error-details Negative 'stats-error-details' option. + --stats-error-stack Add internal stack trace to errors. + --no-stats-error-stack Negative 'stats-error-stack' option. + --stats-errors Add errors. + --no-stats-errors Negative 'stats-errors' option. + --stats-errors-count Add errors count. + --no-stats-errors-count Negative 'stats-errors-count' option. + --stats-exclude-assets Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. + --stats-exclude-assets-reset Clear all items provided in configuration. Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. + --stats-exclude-modules [value...] Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. + --no-stats-exclude-modules Negative 'stats-exclude-modules' option. + --stats-exclude-modules-reset Clear all items provided in configuration. Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. + --stats-group-assets-by-chunk Group assets by how their are related to chunks. + --no-stats-group-assets-by-chunk Negative 'stats-group-assets-by-chunk' option. + --stats-group-assets-by-emit-status Group assets by their status (emitted, compared for emit or cached). + --no-stats-group-assets-by-emit-status Negative 'stats-group-assets-by-emit-status' option. + --stats-group-assets-by-extension Group assets by their extension. + --no-stats-group-assets-by-extension Negative 'stats-group-assets-by-extension' option. + --stats-group-assets-by-info Group assets by their asset info (immutable, development, hotModuleReplacement, etc). + --no-stats-group-assets-by-info Negative 'stats-group-assets-by-info' option. + --stats-group-assets-by-path Group assets by their path. + --no-stats-group-assets-by-path Negative 'stats-group-assets-by-path' option. + --stats-group-modules-by-attributes Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). + --no-stats-group-modules-by-attributes Negative 'stats-group-modules-by-attributes' option. + --stats-group-modules-by-cache-status Group modules by their status (cached or built and cacheable). + --no-stats-group-modules-by-cache-status Negative 'stats-group-modules-by-cache-status' option. + --stats-group-modules-by-extension Group modules by their extension. + --no-stats-group-modules-by-extension Negative 'stats-group-modules-by-extension' option. + --stats-group-modules-by-layer Group modules by their layer. + --no-stats-group-modules-by-layer Negative 'stats-group-modules-by-layer' option. + --stats-group-modules-by-path Group modules by their path. + --no-stats-group-modules-by-path Negative 'stats-group-modules-by-path' option. + --stats-hash Add the hash of the compilation. + --no-stats-hash Negative 'stats-hash' option. + --stats-ids Add ids. + --no-stats-ids Negative 'stats-ids' option. + --stats-logging [value] Specify log level of logging output. Enable/disable logging output (\`true\`: shows normal logging output, loglevel: log). + --no-stats-logging Negative 'stats-logging' option. + --stats-logging-debug [value...] Enable/Disable debug logging for all loggers. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. + --no-stats-logging-debug Negative 'stats-logging-debug' option. + --stats-logging-debug-reset Clear all items provided in configuration. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. + --stats-logging-trace Add stack traces to logging output. + --no-stats-logging-trace Negative 'stats-logging-trace' option. + --stats-module-assets Add information about assets inside modules. + --no-stats-module-assets Negative 'stats-module-assets' option. + --stats-module-trace Add dependencies and origin of warnings/errors. + --no-stats-module-trace Negative 'stats-module-trace' option. + --stats-modules Add built modules information. + --no-stats-modules Negative 'stats-modules' option. + --stats-modules-sort Sort the modules by that field. + --stats-modules-space Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups). + --stats-nested-modules Add information about modules nested in other modules (like with module concatenation). + --no-stats-nested-modules Negative 'stats-nested-modules' option. + --stats-nested-modules-space Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group). + --stats-optimization-bailout Show reasons why optimization bailed out for modules. + --no-stats-optimization-bailout Negative 'stats-optimization-bailout' option. + --stats-orphan-modules Add information about orphan modules. + --no-stats-orphan-modules Negative 'stats-orphan-modules' option. + --stats-output-path Add output path information. + --no-stats-output-path Negative 'stats-output-path' option. + --stats-performance Add performance hint flags. + --no-stats-performance Negative 'stats-performance' option. + --stats-preset [value] Preset for the default values. + --no-stats-preset Negative 'stats-preset' option. + --stats-provided-exports Show exports provided by modules. + --no-stats-provided-exports Negative 'stats-provided-exports' option. + --stats-public-path Add public path information. + --no-stats-public-path Negative 'stats-public-path' option. + --stats-reasons Add information about the reasons why modules are included. + --no-stats-reasons Negative 'stats-reasons' option. + --stats-related-assets Add information about assets that are related to other assets (like SourceMaps for assets). + --no-stats-related-assets Negative 'stats-related-assets' option. + --stats-runtime Add information about runtime modules (deprecated: use 'runtimeModules' instead). + --no-stats-runtime Negative 'stats-runtime' option. + --stats-runtime-modules Add information about runtime modules. + --no-stats-runtime-modules Negative 'stats-runtime-modules' option. + --stats-source Add the source code of modules. + --no-stats-source Negative 'stats-source' option. + --stats-timings Add timing information. + --no-stats-timings Negative 'stats-timings' option. + --stats-used-exports Show exports used by modules. + --no-stats-used-exports Negative 'stats-used-exports' option. + --stats-version Add webpack version information. + --no-stats-version Negative 'stats-version' option. + --stats-warnings Add warnings. + --no-stats-warnings Negative 'stats-warnings' option. + --stats-warnings-count Add warnings count. + --no-stats-warnings-count Negative 'stats-warnings-count' option. + --stats-warnings-filter Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. + --stats-warnings-filter-reset Clear all items provided in configuration. Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --target-reset Clear all items provided in configuration. Environment to build for. An array of environments to build for all of them when possible. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-aggregate-timeout Delay the rebuilt after the first change. Value is a time in ms. + --watch-options-follow-symlinks Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks'). + --no-watch-options-follow-symlinks Negative 'watch-options-follow-symlinks' option. + --watch-options-ignored A glob pattern for files that should be ignored from watching. Ignore some files from watching (glob pattern or regexp). + --watch-options-ignored-reset Clear all items provided in configuration. Ignore some files from watching (glob pattern or regexp). + --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. + --no-watch-options-poll Negative 'watch-options-poll' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|c [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + exports[`help should show help information using the "help --color" option 1`] = ` "Usage: webpack --color Description: Enable colors on console. diff --git a/test/help/help.test.js b/test/help/help.test.js index 979d900452e..514a275a666 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -3,9 +3,6 @@ const { run } = require('../utils/test-utils'); // eslint-disable-next-line node/no-unpublished-require const serializer = require('jest-serializer-ansi'); -// TODO fix it -const isMacOS = process.platform === 'darwin'; - describe('help', () => { expect.addSnapshotSerializer(serializer); @@ -27,6 +24,7 @@ describe('help', () => { it.skip('should show help information using the "--help" option with the "verbose" value #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help=verbose']); + expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toMatchSnapshot(); @@ -37,7 +35,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -52,11 +49,8 @@ describe('help', () => { expect(exitCodeFromOption).toBe(0); expect(exitCodeFromCommandSyntax).toBe(0); expect(stderrFromOption).toBeFalsy(); - - if (!isMacOS) { - expect(stderrFromCommandSyntax).toBeFalsy(); - expect(stdoutFromOption).toBe(stdoutFromCommandSyntax); - } + expect(stderrFromCommandSyntax).toBeFalsy(); + expect(stdoutFromOption).toBe(stdoutFromCommandSyntax); }); it('should show help information and respect the "--color" flag using the "--help" option', async () => { @@ -65,7 +59,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); }); @@ -74,7 +67,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -183,10 +175,7 @@ describe('help', () => { expect(stderr).toBeFalsy(); expect(stdout).toContain('\x1b[1m'); expect(stdout).toContain(usage); - - if (!isMacOS) { - expect(stdout).toContain('Made with ♥ by the webpack team'); - } + expect(stdout).toContain('Made with ♥ by the webpack team'); }); it(`should show help information for '${name}' and respect the "--no-color" flag using the "--help" option`, async () => { @@ -196,10 +185,7 @@ describe('help', () => { expect(stderr).toBeFalsy(); expect(stdout).not.toContain('\x1b[1m'); expect(stdout).toContain(usage); - - if (!isMacOS) { - expect(stdout).toContain('Made with ♥ by the webpack team'); - } + expect(stdout).toContain('Made with ♥ by the webpack team'); }); }); @@ -208,7 +194,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -217,7 +202,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -250,7 +234,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -259,7 +242,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -268,7 +250,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -278,7 +259,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); }); @@ -296,7 +276,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); }); @@ -313,7 +292,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); @@ -322,7 +300,6 @@ describe('help', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); }); From 2bccedcb6c5a0d88574ca85423e77a33e225ced3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:08:58 +0300 Subject: [PATCH 026/103] chore(deps-dev): bump @typescript-eslint/parser Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.20.0 to 4.21.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.21.0/packages/parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2b34405ec7b..fc1ccd7edc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2011,13 +2011,13 @@ eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.14.1": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.20.0.tgz#8dd403c8b4258b99194972d9799e201b8d083bdd" - integrity sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA== + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.21.0.tgz#a227fc2af4001668c3e3f7415d4feee5093894c1" + integrity sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA== dependencies: - "@typescript-eslint/scope-manager" "4.20.0" - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/typescript-estree" "4.20.0" + "@typescript-eslint/scope-manager" "4.21.0" + "@typescript-eslint/types" "4.21.0" + "@typescript-eslint/typescript-estree" "4.21.0" debug "^4.1.1" "@typescript-eslint/scope-manager@4.20.0": @@ -2028,11 +2028,24 @@ "@typescript-eslint/types" "4.20.0" "@typescript-eslint/visitor-keys" "4.20.0" +"@typescript-eslint/scope-manager@4.21.0": + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz#c81b661c4b8af1ec0c010d847a8f9ab76ab95b4d" + integrity sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw== + dependencies: + "@typescript-eslint/types" "4.21.0" + "@typescript-eslint/visitor-keys" "4.21.0" + "@typescript-eslint/types@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== +"@typescript-eslint/types@4.21.0": + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef" + integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w== + "@typescript-eslint/typescript-estree@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" @@ -2046,6 +2059,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.21.0": + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a" + integrity sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w== + dependencies: + "@typescript-eslint/types" "4.21.0" + "@typescript-eslint/visitor-keys" "4.21.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" @@ -2054,6 +2080,14 @@ "@typescript-eslint/types" "4.20.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.21.0": + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d" + integrity sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w== + dependencies: + "@typescript-eslint/types" "4.21.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" From 0144aaa9f4cbdd684ba20c7d976dd6367706fdb3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:09:15 +0300 Subject: [PATCH 027/103] chore(deps): bump envinfo from 7.7.4 to 7.8.1 (#2602) Bumps [envinfo](https://github.com/tabrindle/envinfo) from 7.7.4 to 7.8.1. - [Release notes](https://github.com/tabrindle/envinfo/releases) - [Commits](https://github.com/tabrindle/envinfo/compare/7.7.4...7.8.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index fc1ccd7edc1..3725c10e2f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4155,9 +4155,9 @@ env-paths@^2.2.0: integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== envinfo@^7.7.3, envinfo@^7.7.4: - version "7.7.4" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" - integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== err-code@^2.0.2: version "2.0.3" From 6e207bc24886f7f8a87a19119924a682f66e575b Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 6 Apr 2021 16:46:20 +0530 Subject: [PATCH 028/103] fix: broken URL in generated webpack.config.js (#2600) --- .../default/webpack.configjs.tpl | 3 +- .../__snapshots__/init.test.js.snap.webpack4 | 36 ++++++++++++------- .../__snapshots__/init.test.js.snap.webpack5 | 36 ++++++++++++------- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index 065ee95e0fd..2380c108c11 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -1,4 +1,5 @@ -// Generated using webpack-cli http://github.com/webpack-cli +// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path');<% if (htmlWebpackPlugin) { %> const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (isExtractPlugin) { %> const MiniCssExtractPlugin = require('mini-css-extract-plugin');<% } %> diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 633dd5b4418..e261a6fe61a 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -42,7 +42,8 @@ Object { `; exports[`init command should configure WDS as opted 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -96,7 +97,8 @@ Object { `; exports[`init command should configure assets modules by default 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -153,7 +155,8 @@ Object { `; exports[`init command should configure html-webpack-plugin as opted 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -208,7 +211,8 @@ Object { `; exports[`init command should generate ES6 project correctly 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -324,7 +328,8 @@ Object { `; exports[`init command should generate typescript project correctly 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -381,7 +386,8 @@ Object { `; exports[`init command should use less in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -435,7 +441,8 @@ Object { `; exports[`init command should use mini-css-extract-plugin when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -471,7 +478,8 @@ module.exports = { `; exports[`init command should use postcss in project when selected 1`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -529,7 +537,8 @@ Object { `; exports[`init command should use sass and css with postcss in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -586,7 +595,8 @@ Object { `; exports[`init command should use sass in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -642,7 +652,8 @@ Object { `; exports[`init command should use sass with postcss in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -695,7 +706,8 @@ Object { `; exports[`init command should use stylus in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 633dd5b4418..e261a6fe61a 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -42,7 +42,8 @@ Object { `; exports[`init command should configure WDS as opted 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -96,7 +97,8 @@ Object { `; exports[`init command should configure assets modules by default 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -153,7 +155,8 @@ Object { `; exports[`init command should configure html-webpack-plugin as opted 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -208,7 +211,8 @@ Object { `; exports[`init command should generate ES6 project correctly 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -324,7 +328,8 @@ Object { `; exports[`init command should generate typescript project correctly 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -381,7 +386,8 @@ Object { `; exports[`init command should use less in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -435,7 +441,8 @@ Object { `; exports[`init command should use mini-css-extract-plugin when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -471,7 +478,8 @@ module.exports = { `; exports[`init command should use postcss in project when selected 1`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -529,7 +537,8 @@ Object { `; exports[`init command should use sass and css with postcss in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -586,7 +595,8 @@ Object { `; exports[`init command should use sass in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -642,7 +652,8 @@ Object { `; exports[`init command should use sass with postcss in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { @@ -695,7 +706,8 @@ Object { `; exports[`init command should use stylus in project when selected 2`] = ` -"// Generated using webpack-cli http://github.com/webpack-cli +"// Generated using webpack-cli https://github.com/webpack/webpack-cli + const path = require('path'); module.exports = { From 3a5cf105c3f6c1981b63485e82c68b02b33864e2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:18:29 +0300 Subject: [PATCH 029/103] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2596) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.20.0 to 4.21.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.21.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3725c10e2f7..7bde6ab03f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1985,12 +1985,12 @@ "@types/yeoman-generator" "*" "@typescript-eslint/eslint-plugin@^4.14.1": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.20.0.tgz#9d8794bd99aad9153092ad13c96164e3082e9a92" - integrity sha512-sw+3HO5aehYqn5w177z2D82ZQlqHCwcKSMboueo7oE4KU9QiC0SAgfS/D4z9xXvpTc8Bt41Raa9fBR8T2tIhoQ== + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.21.0.tgz#3fce2bfa76d95c00ac4f33dff369cb593aab8878" + integrity sha512-FPUyCPKZbVGexmbCFI3EQHzCZdy2/5f+jv6k2EDljGdXSRc0cKvbndd2nHZkSLqCNOPk0jB6lGzwIkglXcYVsQ== dependencies: - "@typescript-eslint/experimental-utils" "4.20.0" - "@typescript-eslint/scope-manager" "4.20.0" + "@typescript-eslint/experimental-utils" "4.21.0" + "@typescript-eslint/scope-manager" "4.21.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -1998,15 +1998,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz#a8ab2d7b61924f99042b7d77372996d5f41dc44b" - integrity sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng== +"@typescript-eslint/experimental-utils@4.21.0": + version "4.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz#0b0bb7c15d379140a660c003bdbafa71ae9134b6" + integrity sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.20.0" - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/typescript-estree" "4.20.0" + "@typescript-eslint/scope-manager" "4.21.0" + "@typescript-eslint/types" "4.21.0" + "@typescript-eslint/typescript-estree" "4.21.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" From f92a846e0d1ecf5622df39d4acd0fa2838d0bbe8 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Wed, 7 Apr 2021 15:01:07 +0300 Subject: [PATCH 030/103] test: improve coverage (#2604) --- jest.config.js | 3 +- package.json | 2 +- smoketests/helpers.js | 46 +++++++++++++++++++ .../webpack-dev-server.test.js | 12 ++++- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/jest.config.js b/jest.config.js index 4fe2e3c7bd8..8f29d7d6ed2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,7 +8,8 @@ module.exports = { testPathIgnorePatterns: ignorePattern, testEnvironment: 'node', collectCoverage: true, - coverageReporters: ['none'], + coverageDirectory: '.nyc_output', + coverageReporters: ['json'], transform: { '^.+\\.(ts)?$': 'ts-jest', }, diff --git a/package.json b/package.json index a21d62fd022..0528c2d7030 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "pretest": "yarn build && yarn lint && yarn prepsuite", "test": "jest --reporters=default", "test:smoketests": "nyc node smoketests", - "test:coverage": "nyc --require ts-node/register jest --forceExit", + "test:coverage": "nyc --no-clean --require ts-node/register jest --forceExit", "test:cli": "jest test --reporters=default --forceExit", "test:packages": "jest packages/ --reporters=default --forceExit", "test:ci": "yarn test:cli && yarn test:packages", diff --git a/smoketests/helpers.js b/smoketests/helpers.js index cfc25c9b8a9..fc13bef0043 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -76,6 +76,51 @@ const runTest = (package, cliArgs = [], logMessage, isSubPackage = false) => { }); }; +const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {}) => { + // Simulate package missing + swapPkgName(packageName, isSubPackage); + + const proc = execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }); + + proc.stdin.setDefaultEncoding('utf-8'); + + return new Promise((resolve) => { + setTimeout(() => { + console.log(' timeout: killing process'); + proc.kill(); + }, 30000); + + let hasPassed = false; + + proc.stdout.on('data', (chunk) => { + let data = stripAnsi(chunk.toString()); + console.log(` stdout: ${data}`); + + if (data.includes(logMessage)) { + hasPassed = true; + proc.kill(); + } + }); + + proc.stderr.on('data', (chunk) => { + let data = stripAnsi(chunk.toString()); + console.log(` stderr: ${data}`); + }); + + proc.on('exit', () => { + swapPkgName(`.${packageName}`, isSubPackage); + resolve(hasPassed); + }); + + proc.on('error', () => { + swapPkgName(`.${packageName}`, isSubPackage); + resolve(false); + }); + }); +}; + const runTestWithHelp = (package, cliArgs = [], logMessage, isSubPackage = false) => { // Simulate package missing swapPkgName(package, isSubPackage); @@ -133,5 +178,6 @@ const runTestWithHelp = (package, cliArgs = [], logMessage, isSubPackage = false module.exports = { runTest, + runTestStdout, runTestWithHelp, }; diff --git a/smoketests/missing-packages/webpack-dev-server.test.js b/smoketests/missing-packages/webpack-dev-server.test.js index 9533d86c3c8..d4596cad1b9 100644 --- a/smoketests/missing-packages/webpack-dev-server.test.js +++ b/smoketests/missing-packages/webpack-dev-server.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { runTest } = require('../helpers'); +const { runTest, runTestStdout } = require('../helpers'); const webpackDevServerTest = () => { const packageName = 'webpack-dev-server'; @@ -10,5 +10,13 @@ const webpackDevServerTest = () => { return runTest(packageName, args, logMessage); }; -module.exports.run = [webpackDevServerTest]; +const webpackDevServerWithHelpTest = () => { + const packageName = 'webpack-dev-server'; + const cliArgs = ['help', 'serve']; + const logMessage = "To see all available options you need to install 'webpack-dev-server'"; + + return runTestStdout({ packageName, cliArgs, logMessage }); +}; + +module.exports.run = [webpackDevServerTest, webpackDevServerWithHelpTest]; module.exports.name = 'Missing webpack-dev-server'; From 7c6f390a1d64d562065ffc31d8b23d833813ee9d Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 7 Apr 2021 18:05:43 +0530 Subject: [PATCH 031/103] feat: added `--no-devtool` to webpack v4(#2603) --- packages/webpack-cli/lib/webpack-cli.js | 4 ++++ .../devtool/array/source-map-array.test.js | 6 ++++-- test/build/devtool/array/webpack.config.js | 4 ++++ .../devtool/object/source-map-object.test.js | 19 ++++++++++++++++--- .../devtool/object/webpack.eval.config.js | 3 +++ .../devtool/object/webpack.source.config.js | 3 +++ .../__snapshots__/help.test.js.snap.webpack4 | 8 ++++++++ 7 files changed, 42 insertions(+), 5 deletions(-) diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 23177d515e6..d080c9b6595 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -515,6 +515,10 @@ class WebpackCLI { { type: 'string', }, + { + type: 'enum', + values: [false], + }, ], negative: true, alias: 'd', diff --git a/test/build/devtool/array/source-map-array.test.js b/test/build/devtool/array/source-map-array.test.js index 441fc66912f..d7585ae20d5 100644 --- a/test/build/devtool/array/source-map-array.test.js +++ b/test/build/devtool/array/source-map-array.test.js @@ -9,7 +9,9 @@ describe('source-map object', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); + // multi compilers + expect(stdout).toContain("devtool: 'source-map'"); + expect(stdout).toContain("devtool: 'eval-cheap-module-source-map'"); let files; @@ -27,7 +29,7 @@ describe('source-map object', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); + expect(stdout).toContain("devtool: 'source-map'"); let files; diff --git a/test/build/devtool/array/webpack.config.js b/test/build/devtool/array/webpack.config.js index e59ce251d17..b43cebaa257 100644 --- a/test/build/devtool/array/webpack.config.js +++ b/test/build/devtool/array/webpack.config.js @@ -1,3 +1,5 @@ +const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); + module.exports = [ { output: { @@ -8,6 +10,7 @@ module.exports = [ entry: './index.js', mode: 'development', devtool: 'eval-cheap-module-source-map', + plugins: [new WebpackCLITestPlugin()], }, { output: { @@ -19,5 +22,6 @@ module.exports = [ mode: 'development', devtool: 'source-map', target: 'node', + plugins: [new WebpackCLITestPlugin()], }, ]; diff --git a/test/build/devtool/object/source-map-object.test.js b/test/build/devtool/object/source-map-object.test.js index f89652c6c90..9d8c79b9d54 100644 --- a/test/build/devtool/object/source-map-object.test.js +++ b/test/build/devtool/object/source-map-object.test.js @@ -9,7 +9,7 @@ describe('source-map object', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); + expect(stdout).toContain("devtool: 'eval-cheap-module-source-map'"); let files; @@ -27,7 +27,7 @@ describe('source-map object', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); + expect(stdout).toContain("devtool: 'source-map'"); expect(existsSync(resolve(__dirname, 'dist/dist-amd.js.map'))).toBeTruthy(); }); @@ -40,7 +40,20 @@ describe('source-map object', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); + expect(stdout).toContain("devtool: 'source-map'"); + expect(existsSync(resolve(__dirname, 'binary/dist-amd.js.map'))).toBeTruthy(); + }); + + it('should override config with devtool false', async () => { + const { exitCode, stderr, stdout } = await run( + __dirname, + ['-c', './webpack.eval.config.js', '--no-devtool', '-o', './binary'], + false, + ); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain('devtool: false'); expect(existsSync(resolve(__dirname, 'binary/dist-amd.js.map'))).toBeTruthy(); }); }); diff --git a/test/build/devtool/object/webpack.eval.config.js b/test/build/devtool/object/webpack.eval.config.js index ba392ae1c35..7c2bec6f0d6 100644 --- a/test/build/devtool/object/webpack.eval.config.js +++ b/test/build/devtool/object/webpack.eval.config.js @@ -1,3 +1,5 @@ +const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); + module.exports = { output: { filename: './dist-amd.js', @@ -7,4 +9,5 @@ module.exports = { entry: './index.js', mode: 'development', devtool: 'eval-cheap-module-source-map', + plugins: [new WebpackCLITestPlugin()], }; diff --git a/test/build/devtool/object/webpack.source.config.js b/test/build/devtool/object/webpack.source.config.js index d4999a8ef78..efb87fa2f90 100644 --- a/test/build/devtool/object/webpack.source.config.js +++ b/test/build/devtool/object/webpack.source.config.js @@ -1,3 +1,5 @@ +const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); + module.exports = { output: { filename: './dist-amd.js', @@ -7,4 +9,5 @@ module.exports = { entry: './index.js', mode: 'development', devtool: 'source-map', + plugins: [new WebpackCLITestPlugin()], }; diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index 5794067bd7b..7827dfe8b5d 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -77,6 +77,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. --stats [value] It instructs webpack on how to treat the stats e.g. verbose. @@ -130,6 +131,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. --stats [value] It instructs webpack on how to treat the stats e.g. verbose. @@ -183,6 +185,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. --stats [value] It instructs webpack on how to treat the stats e.g. verbose. @@ -240,6 +243,7 @@ Options: e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. @@ -418,6 +422,7 @@ Options: e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. @@ -500,6 +505,7 @@ Options: e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. @@ -542,6 +548,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. --stats [value] It instructs webpack on how to treat the stats e.g. verbose. @@ -595,6 +602,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. -t, --target Sets the build target e.g. node. -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. --mode Defines the mode to pass to webpack. --name Name of the configuration. Used when loading multiple configurations. --stats [value] It instructs webpack on how to treat the stats e.g. verbose. From a3eaeee84f621034a3e3937b1fe3d8cafeb59aa5 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Wed, 7 Apr 2021 19:52:48 +0530 Subject: [PATCH 032/103] refactor: use own inquirer implementation (#2538) --- .../__tests__/get-package-manager.test.js | 4 +-- .../__tests__/prompt-installation.test.js | 16 ++++----- .../lib/utils/prompt-installation.js | 20 +++++------ packages/webpack-cli/lib/utils/prompt.js | 25 ++++++++++++++ packages/webpack-cli/package.json | 1 - yarn.lock | 34 ------------------- 6 files changed, 42 insertions(+), 58 deletions(-) create mode 100644 packages/webpack-cli/lib/utils/prompt.js diff --git a/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js b/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js index 35fc7939cbb..28de106491c 100644 --- a/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js +++ b/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js @@ -14,9 +14,7 @@ const getPackageManager = require('../get-package-manager'); jest.mock('../get-package-manager', () => jest.fn()); const globalModulesNpmValue = 'test-npm'; jest.setMock('global-modules', globalModulesNpmValue); -jest.setMock('enquirer', { - prompt: jest.fn(), -}); +jest.setMock('../prompt', jest.fn()); describe('packageUtils', () => { describe('getPackageManager', () => { diff --git a/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js b/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js index f2df0a02e69..9736318b57a 100644 --- a/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js +++ b/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js @@ -5,7 +5,7 @@ const stripAnsi = require('strip-ansi'); const globalModulesNpmValue = 'test-npm'; jest.setMock('global-modules', globalModulesNpmValue); -jest.setMock('enquirer', { prompt: jest.fn() }); +jest.setMock('../prompt', jest.fn()); jest.setMock('../run-command', jest.fn()); jest.setMock('../package-exists', jest.fn()); jest.setMock('../get-package-manager', jest.fn()); @@ -14,7 +14,7 @@ const getPackageManager = require('../get-package-manager'); const packageExists = require('../package-exists'); const promptInstallation = require('../prompt-installation'); const runCommand = require('../run-command'); -const { prompt } = require('enquirer'); +const prompt = require('../prompt'); describe('promptInstallation', () => { beforeAll(() => { @@ -26,7 +26,7 @@ describe('promptInstallation', () => { }); it('should prompt to install using npm if npm is package manager', async () => { - prompt.mockReturnValue({ installConfirm: true }); + prompt.mockReturnValue(true); getPackageManager.mockReturnValue('npm'); @@ -37,7 +37,7 @@ describe('promptInstallation', () => { expect(preMessage.mock.calls.length).toEqual(1); expect(prompt.mock.calls.length).toEqual(1); expect(runCommand.mock.calls.length).toEqual(1); - expect(stripAnsi(prompt.mock.calls[0][0][0].message)).toContain( + expect(stripAnsi(prompt.mock.calls[0][0].message)).toContain( "Would you like to install 'test-package' package? (That will run 'npm install -D test-package')", ); @@ -55,7 +55,7 @@ describe('promptInstallation', () => { expect(promptResult).toBeTruthy(); expect(prompt.mock.calls.length).toEqual(1); expect(runCommand.mock.calls.length).toEqual(1); - expect(stripAnsi(prompt.mock.calls[0][0][0].message)).toContain( + expect(stripAnsi(prompt.mock.calls[0][0].message)).toContain( "Would you like to install 'test-package' package? (That will run 'yarn add -D test-package')", ); @@ -73,7 +73,7 @@ describe('promptInstallation', () => { expect(promptResult).toBeTruthy(); expect(prompt.mock.calls.length).toEqual(1); expect(runCommand.mock.calls.length).toEqual(1); - expect(stripAnsi(prompt.mock.calls[0][0][0].message)).toContain( + expect(stripAnsi(prompt.mock.calls[0][0].message)).toContain( "Would you like to install 'test-package' package? (That will run 'pnpm install -D test-package')", ); @@ -93,7 +93,7 @@ describe('promptInstallation', () => { expect(preMessage.mock.calls.length).toEqual(1); expect(prompt.mock.calls.length).toEqual(1); expect(runCommand.mock.calls.length).toEqual(1); - expect(stripAnsi(prompt.mock.calls[0][0][0].message)).toContain( + expect(stripAnsi(prompt.mock.calls[0][0].message)).toContain( "Would you like to install 'test-package' package? (That will run 'npm install -D test-package')", ); @@ -102,7 +102,7 @@ describe('promptInstallation', () => { }); it('should not install if install is not confirmed', async () => { - prompt.mockReturnValue({ installConfirm: false }); + prompt.mockReturnValue(false); const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {}); const promptResult = await promptInstallation('test-package'); diff --git a/packages/webpack-cli/lib/utils/prompt-installation.js b/packages/webpack-cli/lib/utils/prompt-installation.js index d477701a03b..ef029f9c0ba 100644 --- a/packages/webpack-cli/lib/utils/prompt-installation.js +++ b/packages/webpack-cli/lib/utils/prompt-installation.js @@ -1,5 +1,5 @@ -const { prompt } = require('enquirer'); const utils = require('./index'); +const prompt = require('./prompt'); /** * @@ -25,17 +25,13 @@ async function promptInstallation(packageName, preMessage) { let installConfirm; try { - ({ installConfirm } = await prompt([ - { - type: 'confirm', - name: 'installConfirm', - message: `Would you like to install '${colors.green(packageName)}' package? (That will run '${colors.green( - commandToBeRun, - )}')`, - initial: 'Y', - stdout: process.stderr, - }, - ])); + installConfirm = await prompt({ + message: `[webpack-cli] Would you like to install '${colors.green(packageName)}' package? (That will run '${colors.green( + commandToBeRun, + )}') (${colors.yellow('Y/n')})`, + defaultResponse: 'Y', + stream: process.stderr, + }); } catch (error) { utils.logger.error(error); process.exit(2); diff --git a/packages/webpack-cli/lib/utils/prompt.js b/packages/webpack-cli/lib/utils/prompt.js new file mode 100644 index 00000000000..b8fbdf29fed --- /dev/null +++ b/packages/webpack-cli/lib/utils/prompt.js @@ -0,0 +1,25 @@ +const prompt = ({ message, defaultResponse, stream }) => { + const readline = require('readline'); + const rl = readline.createInterface({ + input: process.stdin, + output: stream, + }); + + return new Promise((resolve) => { + rl.question(`${message} `, (answer) => { + // Close the stream + rl.close(); + + const response = (answer || defaultResponse).toLowerCase(); + + // Resolve with the input response + if (response === 'y' || response === 'yes') { + resolve(true); + } else { + resolve(false); + } + }); + }); +}; + +module.exports = prompt; diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index a549aae07a0..128c66c24bd 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -34,7 +34,6 @@ "@webpack-cli/serve": "^1.3.1", "colorette": "^1.2.1", "commander": "^7.0.0", - "enquirer": "^2.3.6", "execa": "^5.0.0", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 7bde6ab03f8..57a58b05836 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,14 +2020,6 @@ "@typescript-eslint/typescript-estree" "4.21.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca" - integrity sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ== - dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" - "@typescript-eslint/scope-manager@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz#c81b661c4b8af1ec0c010d847a8f9ab76ab95b4d" @@ -2036,29 +2028,11 @@ "@typescript-eslint/types" "4.21.0" "@typescript-eslint/visitor-keys" "4.21.0" -"@typescript-eslint/types@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" - integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== - "@typescript-eslint/types@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef" integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w== -"@typescript-eslint/typescript-estree@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" - integrity sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA== - dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a" @@ -2072,14 +2046,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" - integrity sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A== - dependencies: - "@typescript-eslint/types" "4.20.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d" From fd269923f96caaf03862bfe645f6dd594d943733 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 8 Apr 2021 13:53:13 +0300 Subject: [PATCH 033/103] chore(deps-dev): bump typescript from 4.2.3 to 4.2.4 (#2608) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 57a58b05836..b9c32a06050 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10594,9 +10594,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^4.1.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" - integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== + version "4.2.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" + integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== uglify-js@^3.1.4: version "3.11.4" From 83a3f9ef9cd85267733e2252c3015a1f745d6996 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 8 Apr 2021 13:53:33 +0300 Subject: [PATCH 034/103] chore(deps-dev): bump webpack from 5.30.0 to 5.31.0 (#2607) Bumps [webpack](https://github.com/webpack/webpack) from 5.30.0 to 5.31.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.30.0...v5.31.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b9c32a06050..85978b0afc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10968,9 +10968,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.25.0: - version "5.30.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.30.0.tgz#07d87c182a060e0c2491062f3dc0edc85a29d884" - integrity sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA== + version "5.31.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.31.0.tgz#fab61d0be896feca4af87bdad5c18815c0d63455" + integrity sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From e56bd7063273c5d082861efe00e5c9ea7a3e2a6a Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Fri, 9 Apr 2021 16:09:58 +0300 Subject: [PATCH 035/103] test: remove test folder from code coverage result (#2610) --- jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.config.js b/jest.config.js index 8f29d7d6ed2..01b95626cd7 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,6 +10,7 @@ module.exports = { collectCoverage: true, coverageDirectory: '.nyc_output', coverageReporters: ['json'], + coveragePathIgnorePatterns: ['/test/'], transform: { '^.+\\.(ts)?$': 'ts-jest', }, From 5ea478ca9e8fda691e37fdd6d0ad8d1df074e224 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 10 Apr 2021 11:57:44 +0530 Subject: [PATCH 036/103] fix: add node env as prod in default template (#2614) --- .../init-template/default/package.json.js | 4 +- .../__snapshots__/init.test.js.snap.webpack4 | 60 +++++++++---------- .../__snapshots__/init.test.js.snap.webpack5 | 60 +++++++++---------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/packages/generators/init-template/default/package.json.js b/packages/generators/init-template/default/package.json.js index 8a329df8f53..d50cd74f5a4 100644 --- a/packages/generators/init-template/default/package.json.js +++ b/packages/generators/init-template/default/package.json.js @@ -1,8 +1,8 @@ module.exports = (isUsingDevServer) => { const scripts = { - build: 'webpack --mode=production', + build: 'webpack --mode=production --node-env=production', 'build:dev': 'webpack --mode=development', - 'build:prod': 'webpack --mode=production', + 'build:prod': 'webpack --mode=production --node-env=production', watch: 'webpack --watch', }; if (isUsingDevServer) { diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index e261a6fe61a..6cc10a447af 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -11,9 +11,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -31,9 +31,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -86,9 +86,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -145,9 +145,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -201,9 +201,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -255,9 +255,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -276,9 +276,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -297,9 +297,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -318,9 +318,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -376,9 +376,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -431,9 +431,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -527,9 +527,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -585,9 +585,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -642,9 +642,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -696,9 +696,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index e261a6fe61a..6cc10a447af 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -11,9 +11,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -31,9 +31,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -86,9 +86,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -145,9 +145,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -201,9 +201,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -255,9 +255,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -276,9 +276,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -297,9 +297,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "serve": "webpack serve", "watch": "webpack --watch", }, @@ -318,9 +318,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -376,9 +376,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -431,9 +431,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -527,9 +527,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -585,9 +585,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -642,9 +642,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", @@ -696,9 +696,9 @@ Object { }, "name": "my-webpack-project", "scripts": Object { - "build": "webpack --mode=production", + "build": "webpack --mode=production --node-env=production", "build:dev": "webpack --mode=development", - "build:prod": "webpack --mode=production", + "build:prod": "webpack --mode=production --node-env=production", "watch": "webpack --watch", }, "version": "1.0.0", From debe93bcd1f752f3a36ef234212b0b09c0715f15 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Mon, 12 Apr 2021 06:02:09 -0700 Subject: [PATCH 037/103] test: removed `--force-exit` option from jest (#2611) --- package.json | 6 ++--- test/utils/test-utils.js | 25 ++++++++----------- test/watch/analyze/analyze-flag.test.js | 4 +-- test/watch/basic/basic.test.js | 12 ++++----- test/watch/stdin/stdin.test.js | 18 ++++++------- .../watch-variable/watch-variable.test.js | 6 ++--- 6 files changed, 34 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 0528c2d7030..0d21a118645 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "pretest": "yarn build && yarn lint && yarn prepsuite", "test": "jest --reporters=default", "test:smoketests": "nyc node smoketests", - "test:coverage": "nyc --no-clean --require ts-node/register jest --forceExit", - "test:cli": "jest test --reporters=default --forceExit", - "test:packages": "jest packages/ --reporters=default --forceExit", + "test:coverage": "nyc --no-clean --require ts-node/register jest", + "test:cli": "jest test --reporters=default", + "test:packages": "jest packages/ --reporters=default", "test:ci": "yarn test:cli && yarn test:packages", "test:watch": "jest test/ packages/ --watch", "publish:monorepo": "yarn build && lerna version && lerna publish from-git", diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index fb0cc8dcb74..49cec4a31bf 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -36,6 +36,14 @@ const hyphenToUpperCase = (name) => { }); }; +const processKill = (process) => { + if (isWindows) { + exec('taskkill /pid ' + process.pid + ' /T /F'); + } else { + process.kill(); + } +}; + /** * Run the webpack CLI for a test case. * @@ -84,11 +92,7 @@ const runWatch = (testCase, args = [], options, outputKillStr = /webpack \d+\.\d const output = chunk.toString('utf8'); if (outputKillStr.test(output)) { - if (isWindows) { - exec('taskkill /pid ' + proc.pid + ' /T /F'); - } else { - proc.kill(); - } + processKill(proc); } callback(); @@ -286,17 +290,9 @@ const readdir = (path) => const mkdir = (path) => { if (fs.existsSync(path)) { - return path; + return; } - new Promise((resolve) => { - const interval = setInterval(() => { - if (!fs.existsSync(path)) { - clearInterval(interval); - resolve(); - } - }, 1000); - }); fs.mkdirSync(path); }; @@ -329,4 +325,5 @@ module.exports = { isWebpack5, isDevServer4, isWindows, + processKill, }; diff --git a/test/watch/analyze/analyze-flag.test.js b/test/watch/analyze/analyze-flag.test.js index f199ec7a68b..e9788f3ed51 100644 --- a/test/watch/analyze/analyze-flag.test.js +++ b/test/watch/analyze/analyze-flag.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { runAndGetWatchProc, normalizeStdout } = require('../../utils/test-utils'); +const { runAndGetWatchProc, normalizeStdout, processKill } = require('../../utils/test-utils'); describe('"analyze" option', () => { it('should load webpack-bundle-analyzer plugin with --analyze flag', (done) => { @@ -12,7 +12,7 @@ describe('"analyze" option', () => { if (data.includes('Webpack Bundle Analyzer is started at')) { expect(data).toContain('Webpack Bundle Analyzer is started at'); - proc.kill(); + processKill(proc); done(); } }); diff --git a/test/watch/basic/basic.test.js b/test/watch/basic/basic.test.js index 7fc2921e1af..a89d5f331e0 100644 --- a/test/watch/basic/basic.test.js +++ b/test/watch/basic/basic.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { run, runAndGetWatchProc, isWebpack5 } = require('../../utils/test-utils'); +const { run, runAndGetWatchProc, isWebpack5, processKill } = require('../../utils/test-utils'); const { writeFileSync } = require('fs'); const { resolve } = require('path'); @@ -42,7 +42,7 @@ describe('basic', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } @@ -75,7 +75,7 @@ describe('basic', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } @@ -110,7 +110,7 @@ describe('basic', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } @@ -143,7 +143,7 @@ describe('basic', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } @@ -174,7 +174,7 @@ describe('basic', () => { expect(stderr).toContain(`Compiler is using config: '${configPath}'`); expect(stderr).toContain('Compiler finished'); - proc.kill(); + processKill(proc); done(); } }); diff --git a/test/watch/stdin/stdin.test.js b/test/watch/stdin/stdin.test.js index e7d3be46210..0d0065215d7 100644 --- a/test/watch/stdin/stdin.test.js +++ b/test/watch/stdin/stdin.test.js @@ -1,4 +1,4 @@ -const { runAndGetWatchProc } = require('../../utils/test-utils'); +const { runAndGetWatchProc, processKill } = require('../../utils/test-utils'); describe('--watch-options-stdin', () => { it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', (done) => { @@ -9,7 +9,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -27,7 +27,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -45,7 +45,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -63,7 +63,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -79,7 +79,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -94,7 +94,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -109,7 +109,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); @@ -126,7 +126,7 @@ describe('--watch-options-stdin', () => { proc.on('exit', () => { expect(semaphore).toBe(true); - proc.kill(); + processKill(proc); done(); }); diff --git a/test/watch/watch-variable/watch-variable.test.js b/test/watch/watch-variable/watch-variable.test.js index 0ab866c9997..e0656f93a98 100644 --- a/test/watch/watch-variable/watch-variable.test.js +++ b/test/watch/watch-variable/watch-variable.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { runAndGetWatchProc, isWebpack5 } = require('../../utils/test-utils'); +const { runAndGetWatchProc, isWebpack5, processKill } = require('../../utils/test-utils'); const { writeFileSync } = require('fs'); const { resolve } = require('path'); @@ -36,7 +36,7 @@ describe('watch variable', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } @@ -71,7 +71,7 @@ describe('watch variable', () => { modified = true; } else { - proc.kill(); + processKill(proc); done(); } } From 7c2f5e7e32c9ad4200a8071b7f8d05ed118624d7 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Mon, 12 Apr 2021 07:10:09 -0700 Subject: [PATCH 038/103] test: code coverage (#2609) --- test/api/CLI.test.js | 207 +++++++++++++++++- test/build/unknown/unknown.test.js | 9 + .../basic/same-ports-dev-serever.config.js | 25 +++ test/serve/basic/serve-basic.test.js | 15 ++ test/serve/basic/stats.config.js | 7 + .../invalid-schema/invalid-schema.test.js | 16 ++ .../webpack-dev-server.config.mock.js | 6 + 7 files changed, 281 insertions(+), 4 deletions(-) create mode 100644 test/serve/basic/same-ports-dev-serever.config.js create mode 100644 test/serve/basic/stats.config.js create mode 100644 test/serve/invalid-schema/webpack-dev-server.config.mock.js diff --git a/test/api/CLI.test.js b/test/api/CLI.test.js index 336d97138c3..7c480374b84 100644 --- a/test/api/CLI.test.js +++ b/test/api/CLI.test.js @@ -92,7 +92,7 @@ describe('CLI API', () => { command.parseAsync(['--no-boolean'], { from: 'user' }); }); - it('should make command with configs option', async (done) => { + it('should make command with configs boolean option', async (done) => { cli.program.commands = []; const command = await cli.makeCommand( @@ -101,7 +101,7 @@ describe('CLI API', () => { }, [ { - name: 'boolean', + name: 'configs-boolean', configs: [ { type: 'boolean', @@ -111,13 +111,212 @@ describe('CLI API', () => { }, ], (options) => { - expect(options).toEqual({ boolean: false }); + expect(options).toEqual({ configsBoolean: false }); done(); }, ); - command.parseAsync(['--no-boolean'], { from: 'user' }); + command.parseAsync(['--no-configs-boolean'], { from: 'user' }); + }); + + it('should make command with configs number option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'configs-number', + configs: [ + { + type: 'number', + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ configsNumber: 42 }); + + done(); + }, + ); + + command.parseAsync(['--configs-number', '42'], { from: 'user' }); + }); + + it('should make command with configs string option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'configs-string', + configs: [ + { + type: 'string', + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ configsString: 'foo' }); + + done(); + }, + ); + + command.parseAsync(['--configs-string', 'foo'], { from: 'user' }); + }); + + it('should make command with configs path option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'configs-path', + configs: [ + { + type: 'path', + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ configsPath: '/root/foo' }); + + done(); + }, + ); + + command.parseAsync(['--configs-path', '/root/foo'], { from: 'user' }); + }); + + it('should make command with configs RegExp option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'configs-regexp', + configs: [ + { + type: 'RegExp', + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ configsRegexp: '\\w+' }); + + done(); + }, + ); + + command.parseAsync(['--configs-regexp', '\\w+'], { from: 'user' }); + }); + + it('should make command with configs enum/string option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'enum-string', + configs: [ + { + type: 'enum', + values: ['foo'], + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ enumString: 'foo' }); + + done(); + }, + ); + + command.parseAsync(['--enum-string', 'foo'], { from: 'user' }); + }); + + it('should make command with configs enum/number option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'enum-number', + configs: [ + { + type: 'enum', + values: [42], + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ enumNumber: 42 }); + + done(); + }, + ); + + command.parseAsync(['--enum-number', '42'], { from: 'user' }); + }); + + it('should make command with configs enum/boolean option', async (done) => { + cli.program.commands = []; + + const command = await cli.makeCommand( + { + name: 'command', + }, + [ + { + name: 'enum-boolean', + configs: [ + { + type: 'boolean', + values: [false], + }, + ], + description: 'description', + }, + ], + (options) => { + expect(options).toEqual({ enumBoolean: false }); + + done(); + }, + ); + + command.parseAsync(['--no-enum-boolean'], { from: 'user' }); }); it('should make command with Boolean option and negative value #2', async (done) => { diff --git a/test/build/unknown/unknown.test.js b/test/build/unknown/unknown.test.js index a4896531460..b30d8d7fa2f 100644 --- a/test/build/unknown/unknown.test.js +++ b/test/build/unknown/unknown.test.js @@ -21,6 +21,15 @@ describe('unknown behaviour', () => { expect(stdout).toBeFalsy(); }); + it('should log an error if an unknown flag is passed and includes =', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown=foo']); + + expect(exitCode).toBe(2); + expect(stderr).toContain("Error: Unknown option '--unknown=foo'"); + expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); + expect(stdout).toBeFalsy(); + }); + it('should log an error if an unknown flag is passed #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-u', '--unknown']); diff --git a/test/serve/basic/same-ports-dev-serever.config.js b/test/serve/basic/same-ports-dev-serever.config.js new file mode 100644 index 00000000000..d85e05a7341 --- /dev/null +++ b/test/serve/basic/same-ports-dev-serever.config.js @@ -0,0 +1,25 @@ +module.exports = [ + { + name: 'one', + mode: 'development', + devtool: false, + output: { + filename: 'first-output/[name].js', + }, + devServer: { + port: 8081, + }, + }, + { + name: 'two', + mode: 'development', + devtool: false, + entry: './src/other.js', + output: { + filename: 'second-output/[name].js', + }, + devServer: { + port: 8081, + }, + }, +]; diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index 53880fc7921..f7528ab1c9f 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -339,4 +339,19 @@ describe('basic serve usage', () => { expect(stderr).toContain("Error: Unknown option '--unknown-flag'"); expect(stdout).toBeFalsy(); }); + + it('should work with the "stats" option in config', async () => { + const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'stats.config.js'], {}, /Compiled successfully/); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('Compiled successfully'); + expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); + }); + + it('should throw error when same ports in multicompiler', async () => { + const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'same-ports-dev-serever.config.js']); + + expect(stdout).toBeFalsy(); + expect(stderr).toContain('Unique ports must be specified for each devServer option in your webpack configuration'); + }); }); diff --git a/test/serve/basic/stats.config.js b/test/serve/basic/stats.config.js new file mode 100644 index 00000000000..9d27015e4cc --- /dev/null +++ b/test/serve/basic/stats.config.js @@ -0,0 +1,7 @@ +module.exports = { + mode: 'development', + devtool: false, + devServer: { + stats: 'minimal', + }, +}; diff --git a/test/serve/invalid-schema/invalid-schema.test.js b/test/serve/invalid-schema/invalid-schema.test.js index 90e29bf4b44..a4a4e4c4dd5 100644 --- a/test/serve/invalid-schema/invalid-schema.test.js +++ b/test/serve/invalid-schema/invalid-schema.test.js @@ -24,4 +24,20 @@ describe('invalid schema', () => { expect(stdout).toBeFalsy(); }); + + it('should log webpack-dev-server error and exit process on invalid flag', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--port', '-1']); + + expect(exitCode).toEqual(2); + expect(stderr).toContain('RangeError'); + expect(stdout).toBeFalsy(); + }); + + it('should log webpack-dev-server error and exit process on invalid config', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--config', './webpack-dev-server.config.mock.js']); + + expect(exitCode).toEqual(2); + expect(stderr).toContain('webpack Dev Server Invalid Options'); + expect(stdout).toBeFalsy(); + }); }); diff --git a/test/serve/invalid-schema/webpack-dev-server.config.mock.js b/test/serve/invalid-schema/webpack-dev-server.config.mock.js new file mode 100644 index 00000000000..37e88e65591 --- /dev/null +++ b/test/serve/invalid-schema/webpack-dev-server.config.mock.js @@ -0,0 +1,6 @@ +module.exports = { + mode: 'development', + devServer: { + bonjour: '', + }, +}; From 5a9789db237b7696adfdc9826b0dda749fedfa9a Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 13 Apr 2021 16:26:27 +0530 Subject: [PATCH 039/103] feat: add `create` and `new` alias for `init` (#2616) --- OPTIONS.md | 15 +- package.json | 2 +- packages/generators/src/index.ts | 2 +- packages/webpack-cli/lib/webpack-cli.js | 6 +- .../__snapshots__/help.test.js.snap.webpack4 | 352 ++++++++--------- .../__snapshots__/help.test.js.snap.webpack5 | 362 +++++++++--------- test/help/help.test.js | 56 +-- .../__snapshots__/init.test.js.snap.webpack4 | 84 ++++ .../__snapshots__/init.test.js.snap.webpack5 | 84 ++++ test/init/init.test.js | 64 ++++ yarn.lock | 8 +- 11 files changed, 641 insertions(+), 394 deletions(-) diff --git a/OPTIONS.md b/OPTIONS.md index d69cb2e2787..7af5a89d1d0 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -21,6 +21,7 @@ Options: --no-bail Negative 'bail' option. --cache Enable in memory caching. Disable caching. --no-cache Negative 'cache' option. + --cache-max-generations Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). --cache-type In memory caching. Filesystem caching. --cache-cache-directory Base directory for the cache (defaults to node_modules/.cache/webpack). --cache-cache-location Locations for the cache (defaults to cacheDirectory / name). @@ -31,6 +32,8 @@ Options: --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. --cache-managed-paths A path to a managed directory (usually a node_modules directory). --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. + --cache-max-age Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds). + --cache-max-memory-generations Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache. --cache-name Name for the cache. Different names will lead to different coexisting caches. --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). --cache-version Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. @@ -85,6 +88,10 @@ Options: --ignore-warnings-message A RegExp to select the warning message. --ignore-warnings-module A RegExp to select the origin module for the warning. --ignore-warnings-reset Clear all items provided in configuration. Ignore specific warnings. + --infrastructure-logging-append-only Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided. + --no-infrastructure-logging-append-only Negative 'infrastructure-logging-append-only' option. + --infrastructure-logging-colors Enables/Disables colorful output. This option is only used when no custom console is provided. + --no-infrastructure-logging-colors Negative 'infrastructure-logging-colors' option. --infrastructure-logging-debug [value...] Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers. --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific loggers. @@ -103,12 +110,14 @@ Options: --module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. --no-module-generator-asset-emit Negative 'module-generator-asset-emit' option. --module-generator-asset-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. --module-generator-asset-inline-data-url-encoding Asset encoding (defaults to base64). --no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option. --module-generator-asset-inline-data-url-mimetype Asset mimetype (getting from file extension by default). --module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. --no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option. --module-generator-asset-resource-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. + --module-generator-asset-resource-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. --module-no-parse A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed. --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's matched against the full resolved request. --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. @@ -534,7 +543,7 @@ Options: -o, --output-path Output location of the file generated by webpack e.g. ./dist/. --output-pathinfo [value] Include comments with information about the modules. --no-output-pathinfo Negative 'output-pathinfo' option. - --output-public-path The `publicPath` specifies the public URL address of the output files when referenced in a browser. + --output-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. --output-script-type This option enables loading async chunks via a custom script type, such as script type="module". --no-output-script-type Negative 'output-script-type' option. --output-source-map-filename The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory. @@ -774,6 +783,8 @@ Options: --no-stats-group-modules-by-layer Negative 'stats-group-modules-by-layer' option. --stats-group-modules-by-path Group modules by their path. --no-stats-group-modules-by-path Negative 'stats-group-modules-by-path' option. + --stats-group-modules-by-type Group modules by their type. + --no-stats-group-modules-by-type Negative 'stats-group-modules-by-type' option. --stats-hash Add the hash of the compilation. --no-stats-hash Negative 'stats-hash' option. --stats-ids Add ids. @@ -858,7 +869,7 @@ Commands: configtest|t [config-path] Validate a webpack configuration. help|h [command] [option] Display help for commands and options. info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. diff --git a/package.json b/package.json index 0d21a118645..34c4f427517 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "ts-jest": "^26.4.3", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "webpack": "^5.25.0", + "webpack": "^5.31.2", "webpack-bundle-analyzer": "^4.3.0", "webpack-dev-server": "^3.11.1", "yeoman-test": "^2.7.0" diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index 4d862c0cebe..5dabe85e05f 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -12,7 +12,7 @@ class GeneratorsCommand { await cli.makeCommand( { name: 'init [generation-path]', - alias: 'c', + alias: ['create', 'new', 'c', 'n'], description: 'Initialize a new webpack project.', usage: '[generation-path] [options]', pkg: '@webpack-cli/generators', diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index d080c9b6595..c31e7ae5d7b 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -24,7 +24,7 @@ class WebpackCLI { async makeCommand(commandOptions, options, action) { const alreadyLoaded = this.program.commands.find( - (command) => command.name() === commandOptions.name || command.aliases().includes(commandOptions.alias), + (command) => command.name() === commandOptions.name.split(' ')[0] || command.aliases().includes(commandOptions.alias), ); if (alreadyLoaded) { @@ -654,7 +654,7 @@ class WebpackCLI { }, { name: 'init', - alias: 'c', + alias: ['create', 'new', 'c', 'n'], pkg: '@webpack-cli/generators', }, { @@ -711,7 +711,7 @@ class WebpackCLI { return false; }; const findCommandByName = (name) => - this.program.commands.find((command) => name === command.name() || command.alias().includes(name)); + this.program.commands.find((command) => name === command.name() || command.aliases().includes(name)); const isOption = (value) => value.startsWith('-'); const isGlobalOption = (value) => value === '--color' || diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index 7827dfe8b5d..f91ae795a8c 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -66,45 +66,45 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -120,45 +120,45 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -174,45 +174,45 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -313,7 +313,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'init' command using the "--help" option 1`] = ` -"Usage: webpack init|c [generation-path] [options] +"Usage: webpack init|create|new|c|n [generation-path] [options] Initialize a new webpack project. @@ -537,45 +537,45 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -591,45 +591,45 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 0c7e5b2000a..0d9920f5d56 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -66,46 +66,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -121,46 +121,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -176,46 +176,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -317,7 +317,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'init' command using the "--help" option 1`] = ` -"Usage: webpack init|c [generation-path] [options] +"Usage: webpack init|create|new|c|n [generation-path] [options] Initialize a new webpack project. @@ -543,46 +543,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -598,46 +598,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. To see list of all supported commands and options run 'webpack --help=verbose'. diff --git a/test/help/help.test.js b/test/help/help.test.js index 514a275a666..91e4aeab84d 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -73,8 +73,8 @@ describe('help', () => { const commands = [ { name: 'init', - alias: 'c', - usage: 'webpack init|c [generation-path] [options]', + alias: ['create', 'new', 'c', 'n'], + usage: 'webpack init|create|new|c|n [generation-path] [options]', }, { name: 'info', @@ -144,30 +144,6 @@ describe('help', () => { expect(stdout).toContain(usage); }); - it(`should show help information for '${alias}' command using the "--help" option`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help']); - - expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); - }); - - it(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help', 'verbose']); - - expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); - }); - - it(`should show help information for '${alias}' command using command syntax`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['help', alias]); - - expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); - }); - it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', '--color'], { env: { FORCE_COLOR: true } }); @@ -187,6 +163,34 @@ describe('help', () => { expect(stdout).toContain(usage); expect(stdout).toContain('Made with ♥ by the webpack team'); }); + + const alises = Array.isArray(alias) ? alias : [alias]; + + alises.forEach((alias) => { + it(`should show help information for '${alias}' command using the "--help" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help']); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(usage); + }); + + it(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help', 'verbose']); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(usage); + }); + + it(`should show help information for '${alias}' command using command syntax`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['help', alias]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(usage); + }); + }); }); it('should show help information with options for sub commands', async () => { diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 6cc10a447af..517d882758f 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -365,6 +365,90 @@ module.exports = { " `; +exports[`init command should should work with 'c' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'create' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'n' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'new' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + exports[`init command should use less in project when selected 1`] = ` Object { "description": "My webpack project", diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 6cc10a447af..517d882758f 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -365,6 +365,90 @@ module.exports = { " `; +exports[`init command should should work with 'c' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'create' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'n' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should should work with 'new' alias 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "html-webpack-plugin": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + "webpack-dev-server": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "serve": "webpack serve", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + exports[`init command should use less in project when selected 1`] = ` Object { "description": "My webpack project", diff --git a/test/init/init.test.js b/test/init/init.test.js index 706f34fe766..d57c24c95bf 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -380,4 +380,68 @@ describe('init command', () => { expect(exitCode).toBe(2); expect(stderr).toContain('Failed to create directory'); }); + + it("should should work with 'new' alias", async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(assetsPath, ['new', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); + expect(stderr).toContain('webpack.config.js'); + + // Test files + const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + }); + + it("should should work with 'create' alias", async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(assetsPath, ['create', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); + expect(stderr).toContain('webpack.config.js'); + + // Test files + const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + }); + + it("should should work with 'c' alias", async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(assetsPath, ['c', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); + expect(stderr).toContain('webpack.config.js'); + + // Test files + const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + }); + + it("should should work with 'n' alias", async () => { + const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const { stdout, stderr } = await run(assetsPath, ['n', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); + expect(stderr).toContain('webpack.config.js'); + + // Test files + const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + }); }); diff --git a/yarn.lock b/yarn.lock index 85978b0afc4..a6d48c86c25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10967,10 +10967,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.25.0: - version "5.31.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.31.0.tgz#fab61d0be896feca4af87bdad5c18815c0d63455" - integrity sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ== +webpack@^5.31.2: + version "5.31.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.31.2.tgz#40d9b9d15b7d76af73d3f1cae895b82613a544d6" + integrity sha512-0bCQe4ybo7T5Z0SC5axnIAH+1WuIdV4FwLYkaAlLtvfBhIx8bPS48WHTfiRZS1VM+pSiYt7e/rgLs3gLrH82lQ== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From efe16ec06bd8287a97c1b8e9cb6981b25b9ab801 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 13:59:47 +0300 Subject: [PATCH 040/103] chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.21.0 to 4.22.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 58 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6d48c86c25..63eef1c7a6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1985,12 +1985,12 @@ "@types/yeoman-generator" "*" "@typescript-eslint/eslint-plugin@^4.14.1": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.21.0.tgz#3fce2bfa76d95c00ac4f33dff369cb593aab8878" - integrity sha512-FPUyCPKZbVGexmbCFI3EQHzCZdy2/5f+jv6k2EDljGdXSRc0cKvbndd2nHZkSLqCNOPk0jB6lGzwIkglXcYVsQ== + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz#3d5f29bb59e61a9dba1513d491b059e536e16dbc" + integrity sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA== dependencies: - "@typescript-eslint/experimental-utils" "4.21.0" - "@typescript-eslint/scope-manager" "4.21.0" + "@typescript-eslint/experimental-utils" "4.22.0" + "@typescript-eslint/scope-manager" "4.22.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -1998,15 +1998,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.21.0": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz#0b0bb7c15d379140a660c003bdbafa71ae9134b6" - integrity sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA== +"@typescript-eslint/experimental-utils@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz#68765167cca531178e7b650a53456e6e0bef3b1f" + integrity sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.21.0" - "@typescript-eslint/types" "4.21.0" - "@typescript-eslint/typescript-estree" "4.21.0" + "@typescript-eslint/scope-manager" "4.22.0" + "@typescript-eslint/types" "4.22.0" + "@typescript-eslint/typescript-estree" "4.22.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -2028,11 +2028,24 @@ "@typescript-eslint/types" "4.21.0" "@typescript-eslint/visitor-keys" "4.21.0" +"@typescript-eslint/scope-manager@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz#ed411545e61161a8d702e703a4b7d96ec065b09a" + integrity sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q== + dependencies: + "@typescript-eslint/types" "4.22.0" + "@typescript-eslint/visitor-keys" "4.22.0" + "@typescript-eslint/types@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef" integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w== +"@typescript-eslint/types@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" + integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== + "@typescript-eslint/typescript-estree@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a" @@ -2046,6 +2059,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" + integrity sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg== + dependencies: + "@typescript-eslint/types" "4.22.0" + "@typescript-eslint/visitor-keys" "4.22.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d" @@ -2054,6 +2080,14 @@ "@typescript-eslint/types" "4.21.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" + integrity sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw== + dependencies: + "@typescript-eslint/types" "4.22.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" From 253771c3b1527c50485dd04fe3d0ac14d2668044 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 14:00:10 +0300 Subject: [PATCH 041/103] chore(deps-dev): bump @typescript-eslint/parser Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.21.0 to 4.22.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63eef1c7a6b..a108ed89a9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2011,13 +2011,13 @@ eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.14.1": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.21.0.tgz#a227fc2af4001668c3e3f7415d4feee5093894c1" - integrity sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA== + version "4.22.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.0.tgz#e1637327fcf796c641fe55f73530e90b16ac8fe8" + integrity sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q== dependencies: - "@typescript-eslint/scope-manager" "4.21.0" - "@typescript-eslint/types" "4.21.0" - "@typescript-eslint/typescript-estree" "4.21.0" + "@typescript-eslint/scope-manager" "4.22.0" + "@typescript-eslint/types" "4.22.0" + "@typescript-eslint/typescript-estree" "4.22.0" debug "^4.1.1" "@typescript-eslint/scope-manager@4.21.0": From 5f89bb2e847bc0fbf8a8d93504be3e998b2379bf Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 13 Apr 2021 23:08:31 +0530 Subject: [PATCH 042/103] refactor: remove `--no-force` option for `init` (#2621) * refactor: remove `--no-force` option for `init` * test: update snapshots --- packages/generators/src/index.ts | 7 ++++++- test/help/__snapshots__/help.test.js.snap.webpack4 | 1 - test/help/__snapshots__/help.test.js.snap.webpack5 | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index 5dabe85e05f..be8fd99b71f 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -26,7 +26,12 @@ class GeneratorsCommand { }, { name: 'force', - configs: [{ type: 'boolean' }], + configs: [ + { + type: 'enum', + values: [true], + }, + ], description: 'Generate without questions (ideally) using default answers', }, ], diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index f91ae795a8c..62ee96ce206 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -321,7 +321,6 @@ Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers - --no-force Negative 'force' option. Global options: --color Enable colors on console. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 0d9920f5d56..5e758f10da4 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -325,7 +325,6 @@ Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers - --no-force Negative 'force' option. Global options: --color Enable colors on console. From 0eeaabd5562f1484eb32eb961c46efea95f10ae3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 20:41:05 +0300 Subject: [PATCH 043/103] chore(deps-dev): bump eslint --- yarn.lock | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index a108ed89a9d..f0cb3b1595f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4334,9 +4334,9 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.12.1: - version "7.23.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.23.0.tgz#8d029d252f6e8cf45894b4bee08f5493f8e94325" - integrity sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q== + version "7.24.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.24.0.tgz#2e44fa62d93892bfdb100521f17345ba54b8513a" + integrity sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ== dependencies: "@babel/code-frame" "7.12.11" "@eslint/eslintrc" "^0.4.0" @@ -5175,14 +5175,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-parent@^5.1.1: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== From 010e428599b4d36c073900a3d07fc9f5c1fab73a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 20:41:19 +0300 Subject: [PATCH 044/103] chore(deps-dev): bump webpack-bundle-analyzer Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases) - [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.4.0...v4.4.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f0cb3b1595f..b2a38e69737 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10906,9 +10906,9 @@ webidl-conversions@^6.1.0: integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== webpack-bundle-analyzer@^4.3.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.0.tgz#74013106e7e2b07cbd64f3a5ae847f7e814802c7" - integrity sha512-9DhNa+aXpqdHk8LkLPTBU/dMfl84Y+WE2+KnfI6rSpNRNVKa0VGLjPd2pjFubDeqnWmulFggxmWBxhfJXZnR0g== + version "4.4.1" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.1.tgz#c71fb2eaffc10a4754d7303b224adb2342069da1" + integrity sha512-j5m7WgytCkiVBoOGavzNokBOqxe6Mma13X1asfVYtKWM3wxBiRRu1u1iG0Iol5+qp9WgyhkMmBAcvjEfJ2bdDw== dependencies: acorn "^8.0.4" acorn-walk "^8.0.0" From 018c0930a4d90098ee6696fe18b9eb577bc1bdd1 Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 14 Apr 2021 08:23:47 +0530 Subject: [PATCH 045/103] test: add missing snapshot entry (#2622) --- .../__snapshots__/init.test.js.snap.webpack4 | 23 +++++++++++++++++++ .../__snapshots__/init.test.js.snap.webpack5 | 23 +++++++++++++++++++ test/init/init.test.js | 3 +++ 3 files changed, 49 insertions(+) diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 517d882758f..fb9376999b1 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -562,6 +562,29 @@ module.exports = { `; exports[`init command should use postcss in project when selected 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "autoprefixer": "x.x.x", + "css-loader": "x.x.x", + "postcss": "x.x.x", + "postcss-loader": "x.x.x", + "style-loader": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should use postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path'); diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 517d882758f..fb9376999b1 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -562,6 +562,29 @@ module.exports = { `; exports[`init command should use postcss in project when selected 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "autoprefixer": "x.x.x", + "css-loader": "x.x.x", + "postcss": "x.x.x", + "postcss-loader": "x.x.x", + "style-loader": "x.x.x", + "webpack": "x.x.x", + "webpack-cli": "x.x.x", + }, + "name": "my-webpack-project", + "scripts": Object { + "build": "webpack --mode=production --node-env=production", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production --node-env=production", + "watch": "webpack --watch", + }, + "version": "1.0.0", +} +`; + +exports[`init command should use postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path'); diff --git a/test/init/init.test.js b/test/init/init.test.js index d57c24c95bf..cdbf22dc33c 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -343,6 +343,9 @@ describe('init command', () => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + // Check if the generated webpack configuration matches the snapshot expect(readFromWebpackConfig(assetsPath)).toMatchSnapshot(); }); From 21291d2f1bc9654eb808b5314179e858206bab35 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 14 Apr 2021 15:57:55 +0530 Subject: [PATCH 046/103] refactor: update devServerOptions type (#2625) --- packages/serve/src/types.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/serve/src/types.ts b/packages/serve/src/types.ts index c7fece4b5c5..c2d22d8ee86 100644 --- a/packages/serve/src/types.ts +++ b/packages/serve/src/types.ts @@ -8,7 +8,7 @@ export type devServerOptionsType = { headers?: Record; historyApiFallback?: boolean | Record; host?: string | null; - hot?: boolean | string; + hot?: boolean | hotOptionEnum; http2?: boolean; https?: boolean | Record; injectClient?: boolean | (() => void); @@ -30,17 +30,30 @@ export type devServerOptionsType = { useLocalIp?: boolean; publicPath?: string | (() => void); stats?: string | boolean; + watchFiles?: string | Record; }; +enum hotOptionEnum { + only = 'only', +} + type devServerClientOptions = { host?: string; path?: string; port?: string | number | null; logging?: devServerClientLogging; progress?: boolean; + overlay?: boolean | clientOverlay; + needClientEntry?: boolean | (() => void); + needHotEntry?: boolean | (() => void); +}; + +type clientOverlay = { + errors?: boolean; + warnings?: boolean; }; -export enum devServerClientLogging { +enum devServerClientLogging { none = 'none', error = 'error', warn = 'warn', From 395e3d6f7e849dab95be7e20e0cec3441ffab92e Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Wed, 14 Apr 2021 07:24:21 -0700 Subject: [PATCH 047/103] test: moves all tests to `test` folder, removes duplicates (#2623) --- .gitignore | 3 + jest.config.js | 2 +- .../__tests__/addon-generator.test.ts | 134 ------------------ .../__tests__/loader-generator.test.ts | 83 ----------- .../__tests__/plugin-generator.test.ts | 69 --------- .../scaffold-utils.test.js.snap.webpack4 | 0 .../scaffold-utils.test.js.snap.webpack5 | 0 .../api}/get-package-manager.test.js | 7 +- .../api}/prompt-installation.test.js | 25 ++-- .../api/scaffold-utils.test.js | 3 +- .../api}/test-all-lock/package-lock.json | 0 .../api}/test-all-lock/pnpm-lock.yaml | 0 .../api}/test-all-lock/yarn.lock | 0 .../api}/test-npm-and-pnpm/package-lock.json | 0 .../api}/test-npm-and-pnpm/pnpm-lock.yaml | 0 .../api}/test-npm-and-yarn/package-lock.json | 0 .../api}/test-npm-and-yarn/yarn.lock | 0 .../api}/test-npm-lock/package-lock.json | 0 .../api}/test-pnpm-lock/pnpm-lock.yaml | 0 .../api}/test-yarn-and-pnpm/pnpm-lock.yaml | 0 .../api}/test-yarn-and-pnpm/yarn.lock | 0 .../api}/test-yarn-lock/yarn.lock | 0 22 files changed, 24 insertions(+), 302 deletions(-) delete mode 100644 packages/generators/__tests__/addon-generator.test.ts delete mode 100644 packages/generators/__tests__/loader-generator.test.ts delete mode 100644 packages/generators/__tests__/plugin-generator.test.ts rename packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack4 => test/api/__snapshots__/scaffold-utils.test.js.snap.webpack4 (100%) rename packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack5 => test/api/__snapshots__/scaffold-utils.test.js.snap.webpack5 (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/get-package-manager.test.js (92%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/prompt-installation.test.js (82%) rename packages/generators/__tests__/utils/scaffold-utils.test.ts => test/api/scaffold-utils.test.js (94%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-all-lock/package-lock.json (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-all-lock/pnpm-lock.yaml (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-all-lock/yarn.lock (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-npm-and-pnpm/package-lock.json (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-npm-and-pnpm/pnpm-lock.yaml (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-npm-and-yarn/package-lock.json (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-npm-and-yarn/yarn.lock (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-npm-lock/package-lock.json (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-pnpm-lock/pnpm-lock.yaml (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-yarn-and-pnpm/pnpm-lock.yaml (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-yarn-and-pnpm/yarn.lock (100%) rename {packages/webpack-cli/lib/utils/__tests__ => test/api}/test-yarn-lock/yarn.lock (100%) diff --git a/.gitignore b/.gitignore index 5b242bf613f..24b53fa477f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ test/**/node_modules # Lock files test/**/yarn.lock test/**/package-json.lock +!test/api/**/yarn.lock +!test/api/**/package-lock.json # npm-debug log npm-debug.* @@ -39,6 +41,7 @@ lerna-debug.log # package-lock file package-lock.json +!test/api/**/package-lock.json junit.xml diff --git a/jest.config.js b/jest.config.js index 01b95626cd7..ae3797dcc82 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,7 +14,7 @@ module.exports = { transform: { '^.+\\.(ts)?$': 'ts-jest', }, - testRegex: ['/__tests__/.*\\.(test.js|test.ts)$', '/test/.*\\.(test.js|test.ts)$'], + testRegex: ['/test/.*\\.(test.js|test.ts)$'], moduleFileExtensions: ['ts', 'js', 'json'], snapshotResolver: '/scripts/snapshotResolver.js', watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], diff --git a/packages/generators/__tests__/addon-generator.test.ts b/packages/generators/__tests__/addon-generator.test.ts deleted file mode 100644 index 9e428dfee27..00000000000 --- a/packages/generators/__tests__/addon-generator.test.ts +++ /dev/null @@ -1,134 +0,0 @@ -jest.mock('webpack-cli/lib/utils/get-package-manager', () => jest.fn()); - -import fs from 'fs'; -import path from 'path'; -import rimraf from 'rimraf'; -import addonGenerator from '../src/addon-generator'; - -import utils, { getPackageManager } from '../../webpack-cli/lib/utils'; - -describe('addon generator', () => { - let gen, installMock, packageMock; - const genName = 'test-addon'; - const testAssetsPath = path.join(__dirname, 'test-assets'); - const genPath = path.join(testAssetsPath, genName); - // we want to test that the addon generator does not create a path - // like ./test-assets/test-addon/test-addon - // we call this unwanted path doubleGenPath - const doubleGenPath = path.join(genPath, genName); - - afterAll(() => { - rimraf.sync(testAssetsPath); - }); - - beforeEach(() => { - const Gen = addonGenerator([], path.join(__dirname, '..', 'loader-template'), [], [], () => ({})); - - gen = new Gen(null, { cli: { utils }, options: { template: 'default' } }); - gen.props = { - name: genName, - }; - gen.scheduleInstallTask = jest.fn(); - installMock = gen.scheduleInstallTask as jest.Mock; - }); - - it('schedules install using npm', () => { - const defaultCwd = process.cwd(); - - rimraf.sync(testAssetsPath); - fs.mkdirSync(genPath, { recursive: true }); - - // set the working directory to here so that the addon directory is - // generated in ./test-assets/test-addon - process.chdir(genPath); - - packageMock = getPackageManager as jest.Mock; - packageMock.mockReturnValue('npm'); - - gen.install(); - - expect(installMock.mock.calls.length).toEqual(1); - expect(installMock.mock.calls[0]).toEqual([ - 'npm', - ['webpack-defaults', 'bluebird'], - { - 'save-dev': true, - }, - ]); - - process.chdir(defaultCwd); - }); - - it('schedules install using yarn', () => { - const defaultCwd = process.cwd(); - - rimraf.sync(testAssetsPath); - fs.mkdirSync(genPath, { recursive: true }); - // set the working directory to here so that the addon directory is - // generated in ./test-assets/test-addon - process.chdir(genPath); - - packageMock = getPackageManager as jest.Mock; - packageMock.mockReturnValue('yarn'); - - gen.install(); - - expect(installMock.mock.calls.length).toEqual(1); - expect(installMock.mock.calls[0]).toEqual([ - 'yarn', - ['webpack-defaults', 'bluebird'], - { - dev: true, - }, - ]); - - process.chdir(defaultCwd); - }); - - it('does not create new directory when current directory matches addon name', () => { - const defaultCwd = process.cwd(); - - rimraf.sync(testAssetsPath); - fs.mkdirSync(genPath, { recursive: true }); - - // set the working directory to here so that the addon directory is - // generated in ./test-assets/test-addon - process.chdir(genPath); - - packageMock = getPackageManager as jest.Mock; - - expect(fs.existsSync(genPath)).toBeTruthy(); - - gen.default(); - - expect(fs.existsSync(genPath)).toBeTruthy(); - expect(fs.existsSync(doubleGenPath)).toBeFalsy(); - - // this needs to happen before the next test so that the - // working directory is changed before we create the new - // generator above - // this is switching the working directory as follows: - // ./test-assets/test-addon -> ./test-assets - rimraf.sync(genPath); - - process.chdir(defaultCwd); - }); - - it('creates a new directory for the generated addon', () => { - const defaultCwd = process.cwd(); - - rimraf.sync(testAssetsPath); - fs.mkdirSync(genPath, { recursive: true }); - - // set the working directory to here so that the addon directory is - // generated in ./test-assets/test-addon - process.chdir(genPath); - - gen.default(); - - expect(fs.existsSync(genPath)).toBeTruthy(); - expect(fs.existsSync(doubleGenPath)).toBeFalsy(); - - process.chdir(defaultCwd); - }); -}); diff --git a/packages/generators/__tests__/loader-generator.test.ts b/packages/generators/__tests__/loader-generator.test.ts deleted file mode 100644 index cfc104d9b99..00000000000 --- a/packages/generators/__tests__/loader-generator.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { join } from 'path'; -// eslint-disable-next-line node/no-extraneous-import -import { run } from 'yeoman-test'; -import * as assert from 'yeoman-assert'; - -import { makeLoaderName } from '../src/loader-generator'; -import utils from '../../webpack-cli/lib/utils'; - -describe('loader generator', () => { - it('generates a default loader', async () => { - const loaderName = 'my-test-loader'; - const outputDir = await run(join(__dirname, '../src/loader-generator.ts')) - .withPrompts({ - name: loaderName, - }) - .withOptions({ cli: { utils }, options: { template: 'default' } }); - const loaderDir = join(outputDir, loaderName); - const srcFiles = ['cjs.js', 'index.js']; - const testFiles = ['functional.test.js', 'test-utils.js', 'unit.test.js', 'fixtures/simple-file.js']; - const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; - - // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem - // assert for src files - assert.file(srcFiles.map((file) => join(loaderDir, 'src', file))); - - // assert for test files - assert.file(testFiles.map((file) => join(loaderDir, 'test', file))); - - // assert for example files - assert.file(exampleFiles.map((file) => join(loaderDir, 'examples/simple', file))); - - // Check the contents of the webpack config and loader file - assert.fileContent([ - [join(loaderDir, 'examples/simple/webpack.config.js'), /resolveLoader: {/], - [join(loaderDir, 'src/index.js'), /module.exports = function loader\(source\) {/], - [join(loaderDir, 'package.json'), new RegExp(loaderName)], - ]); - - // higher timeout so travis has enough time to execute - }, 10000); - - it('generates a default loader assuming the default template', async () => { - const loaderName = 'my-test-loader'; - const outputDir = await run(join(__dirname, '../src/loader-generator.ts')) - .withPrompts({ - name: loaderName, - }) - .withOptions({ cli: { utils }, options: {} }); - const loaderDir = join(outputDir, loaderName); - const srcFiles = ['cjs.js', 'index.js']; - const testFiles = ['functional.test.js', 'test-utils.js', 'unit.test.js', 'fixtures/simple-file.js']; - const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; - - // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem - // assert for src files - assert.file(srcFiles.map((file) => join(loaderDir, 'src', file))); - - // assert for test files - assert.file(testFiles.map((file) => join(loaderDir, 'test', file))); - - // assert for example files - assert.file(exampleFiles.map((file) => join(loaderDir, 'examples/simple', file))); - - // Check the contents of the webpack config and loader file - assert.fileContent([ - [join(loaderDir, 'examples/simple/webpack.config.js'), /resolveLoader: {/], - [join(loaderDir, 'src/index.js'), /module.exports = function loader\(source\) {/], - [join(loaderDir, 'package.json'), new RegExp(loaderName)], - ]); - }, 10000); -}); - -describe('makeLoaderName', () => { - it("should kebab-case loader name and append '-loader'", () => { - const loaderName = makeLoaderName('This is a test'); - expect(loaderName).toEqual('this-is-a-test-loader'); - }); - - it('should not modify a properly formatted loader name', () => { - const loaderName = makeLoaderName('properly-named-loader'); - expect(loaderName).toEqual('properly-named-loader'); - }); -}); diff --git a/packages/generators/__tests__/plugin-generator.test.ts b/packages/generators/__tests__/plugin-generator.test.ts deleted file mode 100644 index a754dd1ca78..00000000000 --- a/packages/generators/__tests__/plugin-generator.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { join } from 'path'; -// eslint-disable-next-line node/no-extraneous-import -import { run } from 'yeoman-test'; -import * as assert from 'yeoman-assert'; -import utils from '../../webpack-cli/lib/utils'; - -describe('plugin generator', () => { - it('generates a default plugin', async () => { - const pluginName = 'my-test-plugin'; - const outputDir = await run(join(__dirname, '../src/plugin-generator.ts')) - .withPrompts({ - name: pluginName, - }) - .withOptions({ cli: { utils }, options: { template: 'default' } }); - const pluginDir = join(outputDir, pluginName); - const srcFiles = ['cjs.js', 'index.js']; - const testFiles = ['functional.test.js', 'test-utils.js']; - const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; - - // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem - // assert for src files - assert.file(srcFiles.map((file) => join(pluginDir, 'src', file))); - - // assert for test files - assert.file(testFiles.map((file) => join(pluginDir, 'test', file))); - - // assert for example files - assert.file(exampleFiles.map((file) => join(pluginDir, 'examples/simple', file))); - - // Check the contents of the webpack config and loader file - assert.fileContent([ - [join(pluginDir, 'examples/simple/webpack.config.js'), /new MyTestPlugin\(\)/], - [join(pluginDir, 'src/index.js'), /compiler\.hooks\.done\.tap/], - [join(pluginDir, 'package.json'), new RegExp(pluginName)], - ]); - - // higher timeout so travis has enough time to execute - }, 10000); - - it('generates a default plugin assuming the default template', async () => { - const pluginName = 'my-test-plugin'; - const outputDir = await run(join(__dirname, '../src/plugin-generator.ts')) - .withPrompts({ - name: pluginName, - }) - .withOptions({ cli: { utils }, options: {} }); - const pluginDir = join(outputDir, pluginName); - const srcFiles = ['cjs.js', 'index.js']; - const testFiles = ['functional.test.js', 'test-utils.js']; - const exampleFiles = ['webpack.config.js', 'src/index.js', 'src/lazy-module.js', 'src/static-esm-module.js']; - - // Check that files in all folders are scaffolded. Checking them separately so we know which directory has the problem - // assert for src files - assert.file(srcFiles.map((file) => join(pluginDir, 'src', file))); - - // assert for test files - assert.file(testFiles.map((file) => join(pluginDir, 'test', file))); - - // assert for example files - assert.file(exampleFiles.map((file) => join(pluginDir, 'examples/simple', file))); - - // Check the contents of the webpack config and loader file - assert.fileContent([ - [join(pluginDir, 'examples/simple/webpack.config.js'), /new MyTestPlugin\(\)/], - [join(pluginDir, 'src/index.js'), /compiler\.hooks\.done\.tap/], - [join(pluginDir, 'package.json'), new RegExp(pluginName)], - ]); - }, 10000); -}); diff --git a/packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack4 b/test/api/__snapshots__/scaffold-utils.test.js.snap.webpack4 similarity index 100% rename from packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack4 rename to test/api/__snapshots__/scaffold-utils.test.js.snap.webpack4 diff --git a/packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack5 b/test/api/__snapshots__/scaffold-utils.test.js.snap.webpack5 similarity index 100% rename from packages/generators/__tests__/utils/__snapshots__/scaffold-utils.test.ts.snap.webpack5 rename to test/api/__snapshots__/scaffold-utils.test.js.snap.webpack5 diff --git a/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js b/test/api/get-package-manager.test.js similarity index 92% rename from packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js rename to test/api/get-package-manager.test.js index 28de106491c..814c247c392 100644 --- a/packages/webpack-cli/lib/utils/__tests__/get-package-manager.test.js +++ b/test/api/get-package-manager.test.js @@ -9,12 +9,13 @@ const syncMock = jest.fn(() => { jest.setMock('execa', { sync: syncMock, }); -const getPackageManager = require('../get-package-manager'); +const utilsDirectory = path.resolve(__dirname, '../../packages/webpack-cli/lib/utils/'); +const getPackageManager = require(path.resolve(utilsDirectory, './get-package-manager')); -jest.mock('../get-package-manager', () => jest.fn()); +jest.mock(path.resolve(utilsDirectory, './get-package-manager'), () => jest.fn()); const globalModulesNpmValue = 'test-npm'; jest.setMock('global-modules', globalModulesNpmValue); -jest.setMock('../prompt', jest.fn()); +jest.setMock(path.resolve(utilsDirectory, './prompt'), jest.fn()); describe('packageUtils', () => { describe('getPackageManager', () => { diff --git a/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js b/test/api/prompt-installation.test.js similarity index 82% rename from packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js rename to test/api/prompt-installation.test.js index 9736318b57a..44eb2082bb5 100644 --- a/packages/webpack-cli/lib/utils/__tests__/prompt-installation.test.js +++ b/test/api/prompt-installation.test.js @@ -1,20 +1,23 @@ 'use strict'; -// eslint-disable-next-line node/no-extraneous-require +const path = require('path'); + +// eslint-disable-next-line node/no-extraneous-require,node/no-unpublished-require const stripAnsi = require('strip-ansi'); const globalModulesNpmValue = 'test-npm'; +const utilsDirectory = path.resolve(__dirname, '../../packages/webpack-cli/lib/utils/'); jest.setMock('global-modules', globalModulesNpmValue); -jest.setMock('../prompt', jest.fn()); -jest.setMock('../run-command', jest.fn()); -jest.setMock('../package-exists', jest.fn()); -jest.setMock('../get-package-manager', jest.fn()); - -const getPackageManager = require('../get-package-manager'); -const packageExists = require('../package-exists'); -const promptInstallation = require('../prompt-installation'); -const runCommand = require('../run-command'); -const prompt = require('../prompt'); +jest.setMock(path.resolve(utilsDirectory, './prompt'), jest.fn()); +jest.setMock(path.resolve(utilsDirectory, './run-command'), jest.fn()); +jest.setMock(path.resolve(utilsDirectory, './package-exists'), jest.fn()); +jest.setMock(path.resolve(utilsDirectory, './get-package-manager'), jest.fn()); + +const getPackageManager = require(path.resolve(utilsDirectory, './get-package-manager')); +const packageExists = require(path.resolve(utilsDirectory, './package-exists')); +const promptInstallation = require(path.resolve(utilsDirectory, './prompt-installation')); +const runCommand = require(path.resolve(utilsDirectory, './run-command')); +const prompt = require(path.resolve(utilsDirectory, './prompt')); describe('promptInstallation', () => { beforeAll(() => { diff --git a/packages/generators/__tests__/utils/scaffold-utils.test.ts b/test/api/scaffold-utils.test.js similarity index 94% rename from packages/generators/__tests__/utils/scaffold-utils.test.ts rename to test/api/scaffold-utils.test.js index c92e63b4143..a3dfab4a96f 100755 --- a/packages/generators/__tests__/utils/scaffold-utils.test.ts +++ b/test/api/scaffold-utils.test.js @@ -1,4 +1,5 @@ -import { Confirm, List, InputValidate, Input } from '../../src/utils/scaffold-utils'; +// eslint-disable-next-line node/no-missing-require +const { Confirm, List, InputValidate, Input } = require('../../packages/generators/src/utils/scaffold-utils'); describe('utils', () => { let mockSelf; diff --git a/packages/webpack-cli/lib/utils/__tests__/test-all-lock/package-lock.json b/test/api/test-all-lock/package-lock.json similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-all-lock/package-lock.json rename to test/api/test-all-lock/package-lock.json diff --git a/packages/webpack-cli/lib/utils/__tests__/test-all-lock/pnpm-lock.yaml b/test/api/test-all-lock/pnpm-lock.yaml similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-all-lock/pnpm-lock.yaml rename to test/api/test-all-lock/pnpm-lock.yaml diff --git a/packages/webpack-cli/lib/utils/__tests__/test-all-lock/yarn.lock b/test/api/test-all-lock/yarn.lock similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-all-lock/yarn.lock rename to test/api/test-all-lock/yarn.lock diff --git a/packages/webpack-cli/lib/utils/__tests__/test-npm-and-pnpm/package-lock.json b/test/api/test-npm-and-pnpm/package-lock.json similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-npm-and-pnpm/package-lock.json rename to test/api/test-npm-and-pnpm/package-lock.json diff --git a/packages/webpack-cli/lib/utils/__tests__/test-npm-and-pnpm/pnpm-lock.yaml b/test/api/test-npm-and-pnpm/pnpm-lock.yaml similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-npm-and-pnpm/pnpm-lock.yaml rename to test/api/test-npm-and-pnpm/pnpm-lock.yaml diff --git a/packages/webpack-cli/lib/utils/__tests__/test-npm-and-yarn/package-lock.json b/test/api/test-npm-and-yarn/package-lock.json similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-npm-and-yarn/package-lock.json rename to test/api/test-npm-and-yarn/package-lock.json diff --git a/packages/webpack-cli/lib/utils/__tests__/test-npm-and-yarn/yarn.lock b/test/api/test-npm-and-yarn/yarn.lock similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-npm-and-yarn/yarn.lock rename to test/api/test-npm-and-yarn/yarn.lock diff --git a/packages/webpack-cli/lib/utils/__tests__/test-npm-lock/package-lock.json b/test/api/test-npm-lock/package-lock.json similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-npm-lock/package-lock.json rename to test/api/test-npm-lock/package-lock.json diff --git a/packages/webpack-cli/lib/utils/__tests__/test-pnpm-lock/pnpm-lock.yaml b/test/api/test-pnpm-lock/pnpm-lock.yaml similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-pnpm-lock/pnpm-lock.yaml rename to test/api/test-pnpm-lock/pnpm-lock.yaml diff --git a/packages/webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/pnpm-lock.yaml b/test/api/test-yarn-and-pnpm/pnpm-lock.yaml similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/pnpm-lock.yaml rename to test/api/test-yarn-and-pnpm/pnpm-lock.yaml diff --git a/packages/webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/yarn.lock b/test/api/test-yarn-and-pnpm/yarn.lock similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/yarn.lock rename to test/api/test-yarn-and-pnpm/yarn.lock diff --git a/packages/webpack-cli/lib/utils/__tests__/test-yarn-lock/yarn.lock b/test/api/test-yarn-lock/yarn.lock similarity index 100% rename from packages/webpack-cli/lib/utils/__tests__/test-yarn-lock/yarn.lock rename to test/api/test-yarn-lock/yarn.lock From d0d7179cc494cbe1a3ef735e6d67e4017430af2f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 14 Apr 2021 17:24:33 +0300 Subject: [PATCH 048/103] chore(deps-dev): bump webpack from 5.31.0 to 5.32.0 (#2619) Bumps [webpack](https://github.com/webpack/webpack) from 5.31.0 to 5.32.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.31.0...v5.32.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index b2a38e69737..bbd5814a58a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,14 +2020,6 @@ "@typescript-eslint/typescript-estree" "4.22.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.21.0": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz#c81b661c4b8af1ec0c010d847a8f9ab76ab95b4d" - integrity sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw== - dependencies: - "@typescript-eslint/types" "4.21.0" - "@typescript-eslint/visitor-keys" "4.21.0" - "@typescript-eslint/scope-manager@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz#ed411545e61161a8d702e703a4b7d96ec065b09a" @@ -2036,29 +2028,11 @@ "@typescript-eslint/types" "4.22.0" "@typescript-eslint/visitor-keys" "4.22.0" -"@typescript-eslint/types@4.21.0": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef" - integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w== - "@typescript-eslint/types@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== -"@typescript-eslint/typescript-estree@4.21.0": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a" - integrity sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w== - dependencies: - "@typescript-eslint/types" "4.21.0" - "@typescript-eslint/visitor-keys" "4.21.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" @@ -2072,14 +2046,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.21.0": - version "4.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d" - integrity sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w== - dependencies: - "@typescript-eslint/types" "4.21.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" @@ -10995,9 +10961,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.31.2: - version "5.31.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.31.2.tgz#40d9b9d15b7d76af73d3f1cae895b82613a544d6" - integrity sha512-0bCQe4ybo7T5Z0SC5axnIAH+1WuIdV4FwLYkaAlLtvfBhIx8bPS48WHTfiRZS1VM+pSiYt7e/rgLs3gLrH82lQ== + version "5.32.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.32.0.tgz#f013932d778dad81bd51292d0ea00865056dc22c" + integrity sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From ec18b8e478ff1a5f8d85bbddc599001dfd69eba3 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 14 Apr 2021 22:19:51 +0530 Subject: [PATCH 049/103] fix(serve): do not set port client port directly (#2624) --- packages/serve/src/startDevServer.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/serve/src/startDevServer.ts b/packages/serve/src/startDevServer.ts index 5549c59f1ab..1d99e5027e8 100644 --- a/packages/serve/src/startDevServer.ts +++ b/packages/serve/src/startDevServer.ts @@ -73,8 +73,6 @@ export default async function startDevServer( if (isDevServer4) { options.port = await findPort(options.port); - options.client = options.client || {}; - options.client.port = options.client.port || options.port; } else { const getPublicPathOption = (): string => { const normalizePublicPath = (publicPath): string => From 281f8eff220e6eb52840ca8e639718c03ef59eb3 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Wed, 14 Apr 2021 23:34:40 +0530 Subject: [PATCH 050/103] docs: add init aliases (#2627) --- README.md | 2 +- packages/webpack-cli/README.md | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index eb83e891637..e950f468e08 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Thus, webpack CLI provides different commands for many common tasks. - `build|bundle|b [entries...] [options]` - Run webpack (default command, can be omitted). - [`configtest|t [config-path]`](./packages/configtest/README.md#webpack-cli-configtest) - Validate a webpack configuration. - `help|h [command] [option]` - Display help for commands and options. -- [`init|c [generation-path] [options]`](./INIT.md#webpack-cli-init) - Create a new webpack project. +- [`init|create|new|c|n [generation-path] [options]`](./INIT.md#webpack-cli-init) - Create a new webpack project. - [`info|i [options]`](./packages/info/README.md#webpack-cli-info) - Returns information related to the local environment. - [`migrate|m [new-config-path]`](https://www.npmjs.com/package/@webpack-cli/migrate) - Migrate project from one version to another. - [`plugin|p [output-path] [options]`](./packages/generators#generators) - Initiate new plugin project. diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 938112cb981..da57269ae2a 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -63,17 +63,17 @@ npx webpack-cli --help verbose ### Available Commands ``` - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. ``` ### webpack 4 From e259fb93c30998fc3ebee06e5e63f0ed60d0b743 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 14:23:44 +0300 Subject: [PATCH 051/103] chore(deps-dev): bump @types/node Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 14.14.39. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bbd5814a58a..4aa03babe12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1884,9 +1884,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.6": - version "14.14.37" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" - integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== + version "14.14.39" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.39.tgz#9ef394d4eb52953d2890e4839393c309aa25d2d1" + integrity sha512-Qipn7rfTxGEDqZiezH+wxqWYR8vcXq5LRpZrETD19Gs4o8LbklbmqotSUsMU+s5G3PJwMRDfNEYoxrcBwIxOuw== "@types/normalize-package-data@^2.4.0": version "2.4.0" From a3cee4d83001c8f278cddf79669ea13b917e2c8d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 14:23:51 +0300 Subject: [PATCH 052/103] chore(deps-dev): bump webpack from 5.32.0 to 5.33.2 (#2630) Bumps [webpack](https://github.com/webpack/webpack) from 5.32.0 to 5.33.2. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.32.0...v5.33.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4aa03babe12..a6884839456 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10961,9 +10961,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.31.2: - version "5.32.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.32.0.tgz#f013932d778dad81bd51292d0ea00865056dc22c" - integrity sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg== + version "5.33.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.33.2.tgz#c049717c9b038febf5a72fd2f53319ad59a8c1fc" + integrity sha512-X4b7F1sYBmJx8mlh2B7mV5szEkE0jYNJ2y3akgAP0ERi0vLCG1VvdsIxt8lFd4st6SUy0lf7W0CCQS566MBpJg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From 353804bbc751c459f3632b1ab240d046de70908b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 14:24:01 +0300 Subject: [PATCH 053/103] chore(deps-dev): bump eslint-plugin-prettier Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.3.1 to 3.4.0. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6884839456..363035b3b95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4268,9 +4268,9 @@ eslint-plugin-node@^11.1.0: semver "^6.1.0" eslint-plugin-prettier@^3.1.4: - version "3.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" - integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== + version "3.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" + integrity sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw== dependencies: prettier-linter-helpers "^1.0.0" From dd3697bb3609430159d5dc8389d9e8395b15f656 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Thu, 15 Apr 2021 16:58:16 +0530 Subject: [PATCH 054/103] test: refactor test utils (#2457) --- test/build/entry/scss/scss.test.js | 4 +- test/init/init.test.js | 8 ++-- test/loader/loader.test.js | 10 +++-- test/plugin/plugin.test.js | 14 +++--- test/utils/test-utils.js | 70 +++--------------------------- test/utils/test-utils.test.js | 19 +------- 6 files changed, 30 insertions(+), 95 deletions(-) diff --git a/test/build/entry/scss/scss.test.js b/test/build/entry/scss/scss.test.js index f8d1ef7b66e..c5406962f6f 100644 --- a/test/build/entry/scss/scss.test.js +++ b/test/build/entry/scss/scss.test.js @@ -1,10 +1,8 @@ /* eslint-disable node/no-unpublished-require */ -const { run, runInstall } = require('../../../utils/test-utils'); +const { run } = require('../../../utils/test-utils'); describe('entry point', () => { it('should support SCSS files', async () => { - await runInstall(__dirname); - const { stdout } = await run(__dirname); expect(stdout).toBeTruthy(); diff --git a/test/init/init.test.js b/test/init/init.test.js index cdbf22dc33c..539e9a6b376 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -3,7 +3,7 @@ const { mkdirSync, existsSync, readFileSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { isWindows, run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest } = require('../utils/test-utils'); +const { isWindows, run, runPromptWithAnswers, uniqueDirectoryForTest } = require('../utils/test-utils'); const rootAssetsPath = resolve(__dirname, './test-assets'); const ENTER = '\x0D'; @@ -26,8 +26,10 @@ const readFromPkgJSON = (path) => { const readFromWebpackConfig = (path) => readFileSync(join(path, 'webpack.config.js'), 'utf8'); describe('init command', () => { - beforeAll(async () => { - await mkdir(rootAssetsPath); + beforeAll(() => { + if (!existsSync(rootAssetsPath)) { + mkdirSync(rootAssetsPath); + } }); afterAll(() => { diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 88e87be8800..499b9ce9ad1 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -1,10 +1,10 @@ 'use strict'; -const { existsSync } = require('fs'); +const { existsSync, mkdirSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); +const { run, runPromptWithAnswers, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const firstPrompt = '? Loader name (my-loader)'; const ENTER = '\x0D'; @@ -18,8 +18,10 @@ const dataForTests = (rootAssetsPath) => ({ }); describe('loader command', () => { - beforeAll(async () => { - await mkdir(rootAssetsPath); + beforeAll(() => { + if (!existsSync(rootAssetsPath)) { + mkdirSync(rootAssetsPath); + } }); afterAll(() => { diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 09c18f82990..10d329d1e87 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -1,8 +1,8 @@ -const { existsSync } = require('fs'); +const { existsSync, mkdirSync } = require('fs'); const { join, resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); -const { run, runPromptWithAnswers, mkdir, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); +const { run, runPromptWithAnswers, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const ENTER = '\x0D'; @@ -17,8 +17,10 @@ const dataForTests = (rootAssetsPath) => ({ }); describe('plugin command', () => { - beforeAll(async () => { - await mkdir(rootAssetsPath); + beforeAll(() => { + if (!existsSync(rootAssetsPath)) { + mkdirSync(rootAssetsPath); + } }); afterAll(() => { @@ -117,7 +119,9 @@ describe('plugin command', () => { const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); const { genPath, customPluginPath, pluginName } = dataForTests(assetsPath); - await mkdir(genPath); + if (!existsSync(genPath)) { + mkdirSync(genPath); + } let { stdout } = await runPromptWithAnswers(genPath, ['plugin', './'], [`${pluginName}${ENTER}`]); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 49cec4a31bf..c460a9ecc28 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -224,49 +224,7 @@ const runPromptWithAnswers = (location, args, answers, waitForOutput = true) => }); }; -/** - * - * @param {String} testCase - testCase directory - * @param {String} file - file relative to testCase - * @param {String} data - data to append - * @returns {undefined} - * @throws - throw an Error if file does not exist - */ -const appendDataIfFileExists = (testCase, file, data) => { - const filePath = path.resolve(testCase, file); - if (fs.existsSync(filePath)) { - fs.appendFileSync(filePath, data); - } else { - throw new Error(`Oops! ${filePath} does not exist!`); - } -}; - -/** - * fs.copyFileSync was added in Added in: v8.5.0 - * We should refactor the below code once our minimal supported version is v8.5.0 - * @param {String} testCase - testCase directory - * @param {String} file - file relative to testCase which is going to be copied - * @returns {String} - absolute file path of new file - * @throws - throw an Error if file copy fails - */ -const copyFileAsync = async (testCase, file) => { - const fileToChangePath = path.resolve(testCase, file); - const fileMetaData = path.parse(file); - const fileCopyName = fileMetaData.name.concat('_copy').concat(fileMetaData.ext); - const copyFilePath = path.resolve(testCase, fileCopyName); - fs.access(fileToChangePath, fs.F_OK, (accessErr) => { - if (accessErr) throw new Error(`Oops! ${fileToChangePath} does not exist!`); - }); - const data = fs.readFileSync(fileToChangePath); - fs.writeFileSync(copyFilePath, data); - return copyFilePath; -}; - -const runInstall = async (cwd) => { - await execa('yarn', { - cwd, - }); -}; +const normalizeStdout = (string) => stripAnsi(string); const readFile = (path, options = {}) => new Promise((resolve, reject) => { @@ -288,42 +246,28 @@ const readdir = (path) => }); }); -const mkdir = (path) => { - if (fs.existsSync(path)) { - return; - } - - fs.mkdirSync(path); -}; - const uniqueDirectoryForTest = async (assetsPath) => { const localDir = Date.now().toString(); const result = path.resolve(assetsPath, localDir); - await mkdir(result); + if (!fs.existsSync(result)) fs.mkdirSync(result); return result; }; -const normalizeStdout = (string) => stripAnsi(string); - module.exports = { run, runWatch, runAndGetWatchProc, runPromptWithAnswers, - appendDataIfFileExists, - copyFileAsync, - runInstall, - hyphenToUpperCase, - readFile, - readdir, - mkdir, - uniqueDirectoryForTest, - normalizeStdout, isWebpack5, isDevServer4, isWindows, + normalizeStdout, + uniqueDirectoryForTest, + readFile, + readdir, + hyphenToUpperCase, processKill, }; diff --git a/test/utils/test-utils.test.js b/test/utils/test-utils.test.js index c8877365887..876f52c5866 100644 --- a/test/utils/test-utils.test.js +++ b/test/utils/test-utils.test.js @@ -1,7 +1,7 @@ 'use strict'; -const { appendDataIfFileExists, run, runAndGetWatchProc, hyphenToUpperCase } = require('./test-utils'); -const { writeFileSync, unlinkSync, readFileSync, mkdirSync } = require('fs'); +const { run, runAndGetWatchProc, hyphenToUpperCase } = require('./test-utils'); +const { writeFileSync, unlinkSync, mkdirSync } = require('fs'); const { resolve } = require('path'); // eslint-disable-next-line node/no-unpublished-require const rimraf = require('rimraf'); @@ -13,7 +13,6 @@ describe('appendFile', () => { const junkFile = 'junkFile.js'; const junkFilePath = resolve(__dirname, junkFile); const initialJunkData = 'initial junk data'; - const junkComment = '//junk comment'; beforeEach(() => { writeFileSync(junkFilePath, initialJunkData); @@ -21,20 +20,6 @@ describe('appendFile', () => { afterEach(() => { unlinkSync(junkFilePath); }); - - it('should append data to file if file exists', () => { - appendDataIfFileExists(__dirname, junkFile, junkComment); - - const actualData = readFileSync(junkFilePath).toString(); - - expect(actualData).toBe(initialJunkData + junkComment); - }); - }); - - describe('negative test-cases', () => { - it('should throw error if file does not exist', () => { - expect(() => appendDataIfFileExists(__dirname, 'does-not-exist.js', 'junk data')).toThrowError(); - }); }); }); From 993a7f02ec1546a7aca1ee537366faa8ac18de84 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 15 Apr 2021 20:40:04 +0530 Subject: [PATCH 055/103] feat: add support for mode specific config (#2585) * chore: add webpack-merge * chore: add support for mode specific config * chore: mode dev-server config to development * chore: fix babelrc and config * chore: update snapshots * chore: lint configuration file * chore: fix lint errors * chore: update snaps for v5 * chore: update snaps for v4 * chore: remove webpack-merge * chore: update version 5 snaps * chore: update version 4 snaps * chore: update configuration * chore: update snaps --- .../generators/init-template/default/.babelrc | 2 +- .../default/webpack.configjs.tpl | 12 +- .../__snapshots__/init.test.js.snap.webpack4 | 144 +++++++++++++++--- .../__snapshots__/init.test.js.snap.webpack5 | 144 +++++++++++++++--- 4 files changed, 251 insertions(+), 51 deletions(-) diff --git a/packages/generators/init-template/default/.babelrc b/packages/generators/init-template/default/.babelrc index 3508558d784..e3f952fd630 100644 --- a/packages/generators/init-template/default/.babelrc +++ b/packages/generators/init-template/default/.babelrc @@ -1,5 +1,5 @@ { - "plugins": ["syntax-dynamic-import"], + "plugins": ["@babel/syntax-dynamic-import"], "presets": [ [ "@babel/preset-env", diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index 2380c108c11..0289af33787 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -4,8 +4,7 @@ const path = require('path');<% if (htmlWebpackPlugin) { %> const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (isExtractPlugin) { %> const MiniCssExtractPlugin = require('mini-css-extract-plugin');<% } %> -module.exports = { - mode: 'development', +const config = { entry: '<%= entry %>', output: { path: path.resolve(__dirname, 'dist'), @@ -68,3 +67,12 @@ module.exports = { extensions: ['.tsx', '.ts', '.js'], },<% } %> }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index fb9376999b1..4125aa53223 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -46,8 +46,7 @@ exports[`init command should configure WDS as opted 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -72,6 +71,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -102,8 +110,7 @@ exports[`init command should configure assets modules by default 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -132,6 +139,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -160,8 +176,7 @@ exports[`init command should configure html-webpack-plugin as opted 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -186,6 +201,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -215,8 +239,7 @@ exports[`init command should generate ES6 project correctly 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -241,6 +264,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -332,8 +364,7 @@ exports[`init command should generate typescript project correctly 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.ts', output: { path: path.resolve(__dirname, 'dist'), @@ -362,6 +393,15 @@ module.exports = { extensions: ['.tsx', '.ts', '.js'], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -474,8 +514,7 @@ exports[`init command should use less in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -500,6 +539,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -530,8 +578,7 @@ exports[`init command should use mini-css-extract-plugin when selected 2`] = ` const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -558,6 +605,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -589,8 +645,7 @@ exports[`init command should use postcss in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -615,6 +670,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -648,8 +712,7 @@ exports[`init command should use sass and css with postcss in project when selec const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -678,6 +741,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -706,8 +778,7 @@ exports[`init command should use sass in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -732,6 +803,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -763,8 +843,7 @@ exports[`init command should use sass with postcss in project when selected 2`] const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -789,6 +868,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -817,8 +905,7 @@ exports[`init command should use stylus in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -843,5 +930,14 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index fb9376999b1..4125aa53223 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -46,8 +46,7 @@ exports[`init command should configure WDS as opted 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -72,6 +71,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -102,8 +110,7 @@ exports[`init command should configure assets modules by default 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -132,6 +139,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -160,8 +176,7 @@ exports[`init command should configure html-webpack-plugin as opted 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -186,6 +201,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -215,8 +239,7 @@ exports[`init command should generate ES6 project correctly 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -241,6 +264,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -332,8 +364,7 @@ exports[`init command should generate typescript project correctly 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.ts', output: { path: path.resolve(__dirname, 'dist'), @@ -362,6 +393,15 @@ module.exports = { extensions: ['.tsx', '.ts', '.js'], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -474,8 +514,7 @@ exports[`init command should use less in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -500,6 +539,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -530,8 +578,7 @@ exports[`init command should use mini-css-extract-plugin when selected 2`] = ` const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -558,6 +605,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -589,8 +645,7 @@ exports[`init command should use postcss in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -615,6 +670,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -648,8 +712,7 @@ exports[`init command should use sass and css with postcss in project when selec const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -678,6 +741,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -706,8 +778,7 @@ exports[`init command should use sass in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -732,6 +803,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -763,8 +843,7 @@ exports[`init command should use sass with postcss in project when selected 2`] const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -789,6 +868,15 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; @@ -817,8 +905,7 @@ exports[`init command should use stylus in project when selected 2`] = ` const path = require('path'); -module.exports = { - mode: 'development', +const config = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), @@ -843,5 +930,14 @@ module.exports = { ], }, }; + +module.exports = () => { + if (process.env.NODE_ENV == 'production') { + config.mode = 'production'; + } else { + config.mode = 'development'; + } + return config; +}; " `; From e72e17d68d0d21c87767b9de45bae5f34998962f Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Thu, 15 Apr 2021 21:24:46 +0530 Subject: [PATCH 056/103] chore: remove spammy console statements (#2633) --- .../config/type/array-function-with-argv/webpack.config.js | 2 -- .../config/type/array-function-with-env/webpack.config.js | 2 -- test/build/core-flags/watch-flags.test.js | 3 --- 3 files changed, 7 deletions(-) diff --git a/test/build/config/type/array-function-with-argv/webpack.config.js b/test/build/config/type/array-function-with-argv/webpack.config.js index 8c3b60bfde5..da04c44d114 100644 --- a/test/build/config/type/array-function-with-argv/webpack.config.js +++ b/test/build/config/type/array-function-with-argv/webpack.config.js @@ -1,6 +1,5 @@ module.exports = [ (env, argv) => { - console.log({ argv }); const { mode } = argv; return { entry: './a.js', @@ -11,7 +10,6 @@ module.exports = [ }; }, (env, argv) => { - console.log({ argv }); const { mode } = argv; return { entry: './b.js', diff --git a/test/build/config/type/array-function-with-env/webpack.config.js b/test/build/config/type/array-function-with-env/webpack.config.js index 8c3b60bfde5..da04c44d114 100644 --- a/test/build/config/type/array-function-with-env/webpack.config.js +++ b/test/build/config/type/array-function-with-env/webpack.config.js @@ -1,6 +1,5 @@ module.exports = [ (env, argv) => { - console.log({ argv }); const { mode } = argv; return { entry: './a.js', @@ -11,7 +10,6 @@ module.exports = [ }; }, (env, argv) => { - console.log({ argv }); const { mode } = argv; return { entry: './b.js', diff --git a/test/build/core-flags/watch-flags.test.js b/test/build/core-flags/watch-flags.test.js index 5ea212d446d..c664017da1f 100644 --- a/test/build/core-flags/watch-flags.test.js +++ b/test/build/core-flags/watch-flags.test.js @@ -20,9 +20,6 @@ describe('watch config related flag', () => { it(`should config --${flag.name} correctly`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); - console.log(stdout); - console.log(stderr); - expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); From 0b50cdb488383cf1ea627bc51fb9ed4228200a16 Mon Sep 17 00:00:00 2001 From: James George Date: Fri, 16 Apr 2021 10:46:18 +0530 Subject: [PATCH 057/103] chore: update husky to v6 (#2635) --- .husky/.gitignore | 1 + .husky/commit-msg | 4 ++++ .husky/pre-commit | 4 ++++ husky.config.js | 6 ------ package.json | 5 +++-- yarn.lock | 53 ++++------------------------------------------- 6 files changed, 16 insertions(+), 57 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/commit-msg create mode 100755 .husky/pre-commit delete mode 100644 husky.config.js diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 00000000000..31354ec1389 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000000..7cd8dd9a45d --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000000..36af219892f --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/husky.config.js b/husky.config.js deleted file mode 100644 index 1570b2835b6..00000000000 --- a/husky.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - hooks: { - 'pre-commit': 'lint-staged', - 'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', - }, -}; diff --git a/package.json b/package.json index 34c4f427517..ee490ebaef4 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "test:ci": "yarn test:cli && yarn test:packages", "test:watch": "jest test/ packages/ --watch", "publish:monorepo": "yarn build && lerna version && lerna publish from-git", - "update:docs": "node ./scripts/updateDocs" + "update:docs": "node ./scripts/updateDocs", + "prepare": "husky install" }, "peerDependencies": { "webpack": "4.x.x || 5.x.x" @@ -68,7 +69,7 @@ "eslint-plugin-prettier": "^3.1.4", "execa": "^5.0.0", "get-port": "^5.1.1", - "husky": "^4.3.0", + "husky": "^6.0.0", "jest": "^26.6.1", "jest-serializer-ansi": "^1.0.3", "jest-watch-typeahead": "^0.6.1", diff --git a/yarn.lock b/yarn.lock index 363035b3b95..687c8a5637e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3333,11 +3333,6 @@ compare-func@^2.0.0: array-ify "^1.0.0" dot-prop "^5.1.0" -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -4797,13 +4792,6 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-versions@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-4.0.0.tgz#3c57e573bf97769b8cb8df16934b627915da4965" - integrity sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ== - dependencies: - semver-regex "^3.1.2" - findup-sync@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" @@ -5644,21 +5632,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^4.3.0: - version "4.3.8" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d" - integrity sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow== - dependencies: - chalk "^4.0.0" - ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^7.0.0" - find-versions "^4.0.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^5.0.0" - please-upgrade-node "^3.2.0" - slash "^3.0.0" - which-pm-runs "^1.0.0" +husky@6: + version "6.0.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" + integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" @@ -8207,11 +8184,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - opener@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -8682,13 +8654,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-dir@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" - integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== - dependencies: - find-up "^5.0.0" - please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -9456,11 +9421,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -semver-regex@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807" - integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA== - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -11038,11 +10998,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From 7673aade2d33b5f2af28c59c5e64dcdf706d7022 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Fri, 16 Apr 2021 09:33:37 +0300 Subject: [PATCH 058/103] chore(deps): update (#2634) * chore(deps): update * chore: fix config --- .eslintrc.js | 6 +- package.json | 15 +- yarn.lock | 378 ++++++++++++++++++--------------------------------- 3 files changed, 136 insertions(+), 263 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9e59b158b59..2cd5cba0359 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -31,11 +31,7 @@ module.exports = { }, }, files: ['**/*.ts'], - extends: [ - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier/@typescript-eslint', - ], + extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], rules: { diff --git a/package.json b/package.json index ee490ebaef4..5335f4f66c3 100644 --- a/package.json +++ b/package.json @@ -49,22 +49,20 @@ "webpack": "4.x.x || 5.x.x" }, "devDependencies": { - "@commitlint/cli": "^11.0.0", - "@commitlint/config-conventional": "^11.0.0", + "@commitlint/cli": "^12.1.1", + "@commitlint/config-conventional": "^12.1.1", "@types/jest": "^26.0.15", - "@types/node": "^14.14.6", - "@types/yeoman-test": "^2.0.5", + "@types/node": "^14.14.40", "@typescript-eslint/eslint-plugin": "^4.14.1", "@typescript-eslint/parser": "^4.14.1", "@webpack-cli/migrate": "^1.1.2", "coffeescript": "^2.5.1", "colorette": "^1.2.1", - "commitlint": "^11.0.0", "concat-stream": "^2.0.0", "cz-customizable": "^6.3.0", "del-cli": "^3.0.1", "eslint": "^7.12.1", - "eslint-config-prettier": "^7.1.0", + "eslint-config-prettier": "^8.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.4", "execa": "^5.0.0", @@ -80,12 +78,11 @@ "readable-stream": "^3.6.0", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", - "ts-jest": "^26.4.3", + "ts-jest": "^26.5.5", "ts-node": "^9.1.1", "typescript": "^4.1.3", "webpack": "^5.31.2", "webpack-bundle-analyzer": "^4.3.0", - "webpack-dev-server": "^3.11.1", - "yeoman-test": "^2.7.0" + "webpack-dev-server": "^3.11.1" } } diff --git a/yarn.lock b/yarn.lock index 687c8a5637e..f815b35c383 100644 --- a/yarn.lock +++ b/yarn.lock @@ -348,13 +348,6 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime@^7.11.2": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.1.tgz#b4116a6b6711d010b2dad3b7b6e43bf1b9954740" - integrity sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.3.3": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" @@ -401,141 +394,143 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@commitlint/cli@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-11.0.0.tgz#698199bc52afed50aa28169237758fa14a67b5d3" - integrity sha512-YWZWg1DuqqO5Zjh7vUOeSX76vm0FFyz4y0cpGMFhrhvUi5unc4IVfCXZ6337R9zxuBtmveiRuuhQqnRRer+13g== - dependencies: - "@babel/runtime" "^7.11.2" - "@commitlint/format" "^11.0.0" - "@commitlint/lint" "^11.0.0" - "@commitlint/load" "^11.0.0" - "@commitlint/read" "^11.0.0" - chalk "4.1.0" - core-js "^3.6.1" +"@commitlint/cli@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.1.tgz#740370e557a8a17f415052821cdd5276ecb0ab98" + integrity sha512-SB67/s6VJ50seoPx/Sr2gj1fMzKrx+udgarecGdr8h43ah+M2e22gjQJ7xHv5KwyPQ+6ug1YOMCL34ubT4zupQ== + dependencies: + "@commitlint/format" "^12.1.1" + "@commitlint/lint" "^12.1.1" + "@commitlint/load" "^12.1.1" + "@commitlint/read" "^12.1.1" + "@commitlint/types" "^12.1.1" get-stdin "8.0.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" - yargs "^15.1.0" + yargs "^16.2.0" -"@commitlint/config-conventional@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-11.0.0.tgz#3fa300a1b639273946de3c3f15e1cda518333422" - integrity sha512-SNDRsb5gLuDd2PL83yCOQX6pE7gevC79UPFx+GLbLfw6jGnnbO9/tlL76MLD8MOViqGbo7ZicjChO9Gn+7tHhA== +"@commitlint/config-conventional@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.1.tgz#73dd3b1a7912138420d248f334f15c94c250bc9e" + integrity sha512-15CqbXMsQiEb0qbzjEHe2OkzaXPYSp7RxaS6KoSVk/4W0QiigquavQ+M0huBZze92h0lMS6Pxoq4AJ5CQ3D+iQ== dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/ensure@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-11.0.0.tgz#3e796b968ab5b72bc6f8a6040076406306c987fb" - integrity sha512-/T4tjseSwlirKZdnx4AuICMNNlFvRyPQimbZIOYujp9DSO6XRtOy9NrmvWujwHsq9F5Wb80QWi4WMW6HMaENug== +"@commitlint/ensure@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.1.tgz#bcefc85f7f8a41bb31f67d7a8966e322b47a6e43" + integrity sha512-XEUQvUjzBVQM7Uv8vYz+c7PDukFvx0AvQEyX/V+PaTkCK/xPvexu7FLbFwvypjSt9BPMf+T/rhB1hVmldkd6lw== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.1.1" lodash "^4.17.19" -"@commitlint/execute-rule@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-11.0.0.tgz#3ed60ab7a33019e58d90e2d891b75d7df77b4b4d" - integrity sha512-g01p1g4BmYlZ2+tdotCavrMunnPFPhTzG1ZiLKTCYrooHRbmvqo42ZZn4QMStUEIcn+jfLb6BRZX3JzIwA1ezQ== +"@commitlint/execute-rule@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.1.tgz#8aad1d46fb78b3199e4ae36debdc93570bf765ea" + integrity sha512-6mplMGvLCKF5LieL7BRhydpg32tm6LICnWQADrWU4S5g9PKi2utNvhiaiuNPoHUXr29RdbNaGNcyyPv8DSjJsQ== -"@commitlint/format@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-11.0.0.tgz#ac47b0b9ca46540c0082c721b290794e67bdc51b" - integrity sha512-bpBLWmG0wfZH/svzqD1hsGTpm79TKJWcf6EXZllh2J/LSSYKxGlv967lpw0hNojme0sZd4a/97R3qA2QHWWSLg== +"@commitlint/format@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.1.tgz#a6b14f8605171374eecc2c463098d63c127ab7df" + integrity sha512-bTAoOryTFLqls17JTaRwk2WDVOP0NwuG4F/JPK8RaF6DMZNVQTfajkgTxFENNZRnESfau1BvivvEXfUAW2ZsvA== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.1.1" chalk "^4.0.0" -"@commitlint/is-ignored@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-11.0.0.tgz#7b803eda56276dbe7fec51eb1510676198468f39" - integrity sha512-VLHOUBN+sOlkYC4tGuzE41yNPO2w09sQnOpfS+pSPnBFkNUUHawEuA44PLHtDvQgVuYrMAmSWFQpWabMoP5/Xg== - dependencies: - "@commitlint/types" "^11.0.0" - semver "7.3.2" - -"@commitlint/lint@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-11.0.0.tgz#01e062cd1b0e7c3d756aa2c246462e0b6a3348a4" - integrity sha512-Q8IIqGIHfwKr8ecVZyYh6NtXFmKw4YSEWEr2GJTB/fTZXgaOGtGFZDWOesCZllQ63f1s/oWJYtVv5RAEuwN8BQ== - dependencies: - "@commitlint/is-ignored" "^11.0.0" - "@commitlint/parse" "^11.0.0" - "@commitlint/rules" "^11.0.0" - "@commitlint/types" "^11.0.0" - -"@commitlint/load@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-11.0.0.tgz#f736562f0ffa7e773f8808fea93319042ee18211" - integrity sha512-t5ZBrtgvgCwPfxmG811FCp39/o3SJ7L+SNsxFL92OR4WQxPcu6c8taD0CG2lzOHGuRyuMxZ7ps3EbngT2WpiCg== - dependencies: - "@commitlint/execute-rule" "^11.0.0" - "@commitlint/resolve-extends" "^11.0.0" - "@commitlint/types" "^11.0.0" - chalk "4.1.0" +"@commitlint/is-ignored@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.1.tgz#6075a5cd2dcda7b6ec93322f5dbe2142cfbb3248" + integrity sha512-Sn4fsnWX+wLAJOD/UZeoVruB98te1TyPYRiDEq0MhRJAQIrP+7jE/O3/ass68AAMq00HvH3OK9kt4UBXggcGjA== + dependencies: + "@commitlint/types" "^12.1.1" + semver "7.3.5" + +"@commitlint/lint@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.1.tgz#cdd898af6eadba8f9e71d7f1255b5a479a757078" + integrity sha512-FFFPpku/E0svL1jaUVqosuZJDDWiNWYBlUw5ZEljh3MwWRcoaWtMIX5bseX+IvHpFZsCTAiBs1kCgNulCi0UvA== + dependencies: + "@commitlint/is-ignored" "^12.1.1" + "@commitlint/parse" "^12.1.1" + "@commitlint/rules" "^12.1.1" + "@commitlint/types" "^12.1.1" + +"@commitlint/load@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.1.tgz#5a7fb8be11e520931d1237c5e8dc401b7cc9c6c1" + integrity sha512-qOQtgNdJRULUQWP9jkpTwhj7aEtnqUtqeUpbQ9rjS+GIUST65HZbteNUX4S0mAEGPWqy2aK5xGd73cUfFSvuuw== + dependencies: + "@commitlint/execute-rule" "^12.1.1" + "@commitlint/resolve-extends" "^12.1.1" + "@commitlint/types" "^12.1.1" + chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-11.0.0.tgz#83554c3cbbc884fd07b473593bc3e94bcaa3ee05" - integrity sha512-01ObK/18JL7PEIE3dBRtoMmU6S3ecPYDTQWWhcO+ErA3Ai0KDYqV5VWWEijdcVafNpdeUNrEMigRkxXHQLbyJA== +"@commitlint/message@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.1.tgz#56eb1dbb561e85e9295380a46ff3b09bc93cac65" + integrity sha512-RakDSLAiOligXjhbLahV8HowF4K75pZIcs0+Ii9Q8Gz5H3DWf1Ngit7alFTWfcbf/+DTjSzVPov5HiwQZPIBUg== -"@commitlint/parse@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-11.0.0.tgz#d18b08cf67c35d02115207d7009306a2e8e7c901" - integrity sha512-DekKQAIYWAXIcyAZ6/PDBJylWJ1BROTfDIzr9PMVxZRxBPc1gW2TG8fLgjZfBP5mc0cuthPkVi91KQQKGri/7A== +"@commitlint/parse@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.1.tgz#3e49d6dc113d59cf266af0db99e320e933108c56" + integrity sha512-nuljIvAbBDr93DgL0wCArftEIhjSghawAwhvrKNV9FFcqAJqfVqitwMxJrNDCQ5pgUMCSKULLOEv+dA0bLlTEQ== dependencies: - conventional-changelog-angular "^5.0.0" + "@commitlint/types" "^12.1.1" + conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-11.0.0.tgz#f24240548c63587bba139fa5a364cab926077016" - integrity sha512-37V0V91GSv0aDzMzJioKpCoZw6l0shk7+tRG8RkW1GfZzUIytdg3XqJmM+IaIYpaop0m6BbZtfq+idzUwJnw7g== +"@commitlint/read@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.1.tgz#22a2d7fd1eab5e38b9b262311af28ac42f9a5097" + integrity sha512-1k0CQEoZIdixvmqZRKEcWdj2XiKS7SlizEOJ1SE99Qui5d5FlBey8eaooTGgmpR6zObpIHJehtEPzM3VzUT3qA== dependencies: - "@commitlint/top-level" "^11.0.0" + "@commitlint/top-level" "^12.1.1" + "@commitlint/types" "^12.1.1" fs-extra "^9.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-11.0.0.tgz#158ecbe27d4a2a51d426111a01478e216fbb1036" - integrity sha512-WinU6Uv6L7HDGLqn/To13KM1CWvZ09VHZqryqxXa1OY+EvJkfU734CwnOEeNlSCK7FVLrB4kmodLJtL1dkEpXw== +"@commitlint/resolve-extends@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.1.tgz#80a78b0940775d17888dd2985b52f93d93e0a885" + integrity sha512-/DXRt0S0U3o9lq5cc8OL1Lkx0IjW0HcDWjUkUXshAajBIKBYSJB8x/loNCi1krNEJ8SwLXUEFt5OLxNO6wE9yQ== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-11.0.0.tgz#bdb310cc6fc55c9f8d7d917a22b69055c535c375" - integrity sha512-2hD9y9Ep5ZfoNxDDPkQadd2jJeocrwC4vJ98I0g8pNYn/W8hS9+/FuNpolREHN8PhmexXbkjrwyQrWbuC0DVaA== +"@commitlint/rules@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.1.tgz#d59182a837d2addf301a3a4ef83316ae7e70248f" + integrity sha512-oCcLF/ykcJfhM2DeeaDyrgdaiuKsqIPNocugdPj2WEyhSYqmx1/u18CV96LAtW+WyyiOLCCeiZwiQutx3T5nXg== dependencies: - "@commitlint/ensure" "^11.0.0" - "@commitlint/message" "^11.0.0" - "@commitlint/to-lines" "^11.0.0" - "@commitlint/types" "^11.0.0" + "@commitlint/ensure" "^12.1.1" + "@commitlint/message" "^12.1.1" + "@commitlint/to-lines" "^12.1.1" + "@commitlint/types" "^12.1.1" -"@commitlint/to-lines@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-11.0.0.tgz#86dea151c10eea41e39ea96fa4de07839258a7fe" - integrity sha512-TIDTB0Y23jlCNubDROUVokbJk6860idYB5cZkLWcRS9tlb6YSoeLn1NLafPlrhhkkkZzTYnlKYzCVrBNVes1iw== +"@commitlint/to-lines@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.1.tgz#40fbed1767d637249ce49b311a51909d8361ecf8" + integrity sha512-W23AH2XF5rI27MOAPSSr0TUDoRe7ZbFoRtYhFnPu2MBmcuDA9Tmfd9N5sM2tBXtdE26uq3SazwKqGt1OoGAilQ== -"@commitlint/top-level@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-11.0.0.tgz#bb2d1b6e5ed3be56874633b59e1f7de118c32783" - integrity sha512-O0nFU8o+Ws+py5pfMQIuyxOtfR/kwtr5ybqTvR+C2lUPer2x6lnQU+OnfD7hPM+A+COIUZWx10mYQvkR3MmtAA== +"@commitlint/top-level@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.1.tgz#228df8fc36b6d7ea7ad149badfb6ef53dbc7001d" + integrity sha512-g7uRbr81QEIg+pbii0OkE17Zh/2C/f6dSmiMDVRn1S0+hNHR1bENCh18hVUKcV/qKTUsKkFlhhWXM9mQBfxQJw== dependencies: find-up "^5.0.0" -"@commitlint/types@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-11.0.0.tgz#719cf05fcc1abb6533610a2e0f5dd1e61eac14fe" - integrity sha512-VoNqai1vR5anRF5Tuh/+SWDFk7xi7oMwHrHrbm1BprYXjB2RJsWLhUrStMssDxEl5lW/z3EUdg8RvH/IUBccSQ== +"@commitlint/types@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.1.tgz#8e651f6af0171cd4f8d464c6c37a7cf63ee071bd" + integrity sha512-+qGH+s2Lo6qwacV2X3/ZypZwaAI84ift+1HBjXdXtI/q0F5NtmXucV3lcQOTviMTNiJhq4qWON2fjci2NItASw== + dependencies: + chalk "^4.0.0" "@discoveryjs/json-ext@^0.5.0": version "0.5.2" @@ -1649,42 +1644,20 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== -"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": +"@sinonjs/commons@^1.7.0": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^6.0.0", "@sinonjs/fake-timers@^6.0.1": +"@sinonjs/fake-timers@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== dependencies: "@sinonjs/commons" "^1.7.0" -"@sinonjs/formatio@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-5.0.1.tgz#f13e713cb3313b1ab965901b01b0828ea6b77089" - integrity sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ== - dependencies: - "@sinonjs/commons" "^1" - "@sinonjs/samsam" "^5.0.2" - -"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.2.0.tgz#fcff83ab86f83b5498f4a967869c079408d9b5eb" - integrity sha512-CaIcyX5cDsjcW/ab7HposFWzV1kC++4HNsfnEdFJa7cP1QIuILAKV+BgfeqRXhcnSAc76r/Rh/O5C+300BwUIw== - dependencies: - "@sinonjs/commons" "^1.6.0" - lodash.get "^4.4.2" - type-detect "^4.0.8" - -"@sinonjs/text-encoding@^0.7.1": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" - integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== - "@szmarczak/http-timer@^4.0.5": version "4.0.5" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" @@ -1883,11 +1856,16 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= -"@types/node@*", "@types/node@>= 8", "@types/node@^14.14.6": +"@types/node@*", "@types/node@>= 8": version "14.14.39" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.39.tgz#9ef394d4eb52953d2890e4839393c309aa25d2d1" integrity sha512-Qipn7rfTxGEDqZiezH+wxqWYR8vcXq5LRpZrETD19Gs4o8LbklbmqotSUsMU+s5G3PJwMRDfNEYoxrcBwIxOuw== +"@types/node@^14.14.40": + version "14.14.40" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.40.tgz#05a7cd31154487f357ca0bec4334ed1b1ab825a0" + integrity sha512-2HoZZGylcnz19ZSbvWhgWHqvprw1ZGHanxIrDWYykPD4CauLW4gcyLzCVfUN2kv/1t1F3CurQIdi+s1l9+XgEA== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -1977,13 +1955,6 @@ "@types/yeoman-environment" "*" rxjs ">=6.4.0" -"@types/yeoman-test@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/yeoman-test/-/yeoman-test-2.0.5.tgz#91131a779237b599e477de555b607a2e850b4c71" - integrity sha512-BYJFfJ8o341YnOOkzm0Qw3v3C8t/3WSMXTYUepSa7IIBG+PFU14/v+X90llzaNBYjpvDCjhj16H7GY2R874IiQ== - dependencies: - "@types/yeoman-generator" "*" - "@typescript-eslint/eslint-plugin@^4.14.1": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz#3d5f29bb59e61a9dba1513d491b059e536e16dbc" @@ -2991,14 +2962,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@4.1.0, chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -3019,6 +2982,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -3313,13 +3284,6 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commitlint@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/commitlint/-/commitlint-11.0.0.tgz#a60f759b938c97c5d601c881cfe71b1d4051d219" - integrity sha512-nTmP1tM52gfi39tDCN8dAlRRWJyVoJY2JuYgVhSONETGJ2MY69K/go0YbCzlIEDO/bUka5ybeI6CJz5ZicvNzg== - dependencies: - "@commitlint/cli" "^11.0.0" - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -3403,15 +3367,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.0: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-angular@^5.0.12: +conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.12: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== @@ -3540,11 +3496,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^3.6.1: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" - integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - core-util-is@1.0.2, 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" @@ -4237,10 +4188,10 @@ escodegen@^1.14.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" - integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== +eslint-config-prettier@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz#78de77d63bca8e9e59dae75a614b5299925bb7b3" + integrity sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw== eslint-plugin-es@^3.0.0: version "3.0.1" @@ -6191,11 +6142,6 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -6854,11 +6800,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -just-extend@^4.0.2: - version "4.1.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.1.1.tgz#158f1fdb01f128c411dc8b286a7b4837b3545282" - integrity sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA== - keyv@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" @@ -7133,11 +7074,6 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -7348,7 +7284,7 @@ mem-fs-editor@^7.0.1: through2 "^3.0.1" vinyl "^2.2.0" -mem-fs@^1.1.0, mem-fs@^1.2.0: +mem-fs@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.2.0.tgz#5f29b2d02a5875cd14cd836c388385892d556cde" integrity sha512-b8g0jWKdl8pM0LqAPdK9i8ERL7nYrzmJfRhxMiWH2uYdfYnb7uXnmwVb0ZGe7xyEl4lj+nLIU3yf4zPUT+XsVQ== @@ -7770,17 +7706,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nise@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/nise/-/nise-4.0.4.tgz#d73dea3e5731e6561992b8f570be9e363c4512dd" - integrity sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A== - dependencies: - "@sinonjs/commons" "^1.7.0" - "@sinonjs/fake-timers" "^6.0.0" - "@sinonjs/text-encoding" "^0.7.1" - just-extend "^4.0.2" - path-to-regexp "^1.7.0" - node-dir@^0.1.17: version "0.1.17" resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" @@ -8563,13 +8488,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -9069,11 +8987,6 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -9426,12 +9339,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== - -semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: +semver@7.3.5, semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -9574,19 +9482,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -sinon@^9.0.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.1.tgz#64cc88beac718557055bd8caa526b34a2231be6d" - integrity sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w== - dependencies: - "@sinonjs/commons" "^1.8.1" - "@sinonjs/fake-timers" "^6.0.1" - "@sinonjs/formatio" "^5.0.1" - "@sinonjs/samsam" "^5.2.0" - diff "^4.0.2" - nise "^4.0.4" - supports-color "^7.1.0" - sirv@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.10.tgz#3e591f5a9ae2520f50d5830f5fae38d97e7be194" @@ -10415,10 +10310,10 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-jest@^26.4.3: - version "26.5.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.4.tgz#207f4c114812a9c6d5746dd4d1cdf899eafc9686" - integrity sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg== +ts-jest@^26.5.5: + version "26.5.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" + integrity sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -10486,7 +10381,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.8: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -11234,7 +11129,7 @@ yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.0.2, yargs@^15.1.0, yargs@^15.4.1: +yargs@^15.0.2, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== @@ -11269,7 +11164,7 @@ yeoman-assert@^3.1.1: resolved "https://registry.yarnpkg.com/yeoman-assert/-/yeoman-assert-3.1.1.tgz#9f6fa0ecba7dd007c40f579668cb5dda18c79343" integrity sha512-bCuLb/j/WzpvrJZCTdJJLFzm7KK8IYQJ3+dF9dYtNs2CUYyezFJDuULiZ2neM4eqjf45GN1KH/MzCTT3i90wUQ== -yeoman-environment@^2.10.0, yeoman-environment@^2.10.3, yeoman-environment@^2.9.5: +yeoman-environment@^2.10.3, yeoman-environment@^2.9.5: version "2.10.3" resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.10.3.tgz#9d8f42b77317414434cc0e51fb006a4bdd54688e" integrity sha512-pLIhhU9z/G+kjOXmJ2bPFm3nejfbH+f1fjYRSOteEXDBrv1EoJE/e+kuHixSXfCYfTkxjYsvRaDX+1QykLCnpQ== @@ -11294,7 +11189,7 @@ yeoman-environment@^2.10.0, yeoman-environment@^2.10.3, yeoman-environment@^2.9. untildify "^3.0.3" yeoman-generator "^4.8.2" -yeoman-generator@^4.10.0, yeoman-generator@^4.12.0, yeoman-generator@^4.8.2: +yeoman-generator@^4.12.0, yeoman-generator@^4.8.2: version "4.13.0" resolved "https://registry.yarnpkg.com/yeoman-generator/-/yeoman-generator-4.13.0.tgz#a6caeed8491fceea1f84f53e31795f25888b4672" integrity sha512-f2/5N5IR3M2Ozm+QocvZQudlQITv2DwI6Mcxfy7R7gTTzaKgvUpgo/pQMJ+WQKm0KN0YMWCFOZpj0xFGxevc1w== @@ -11328,21 +11223,6 @@ yeoman-generator@^4.10.0, yeoman-generator@^4.12.0, yeoman-generator@^4.8.2: grouped-queue "^1.1.0" yeoman-environment "^2.9.5" -yeoman-test@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/yeoman-test/-/yeoman-test-2.7.0.tgz#c7521b11d95c61d2d756dc14f985d31d1b596e9d" - integrity sha512-NNH3XYaeiYO9gWdQ2B02kZuLZnbYZhGqcqrUjyS5VW/r1xOuJ9t6FIzw7uE35/yCx+U9R0kzeTbxkQ6Iwsv3DA== - dependencies: - inquirer "^7.1.0" - lodash "^4.17.15" - mem-fs "^1.2.0" - mem-fs-editor "^7.0.1" - mkdirp "^1.0.3" - rimraf "^3.0.2" - sinon "^9.0.1" - yeoman-environment "^2.10.0" - yeoman-generator "^4.10.0" - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From c9ee947618c06447bc1f949e4d401e63f737f38d Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 16 Apr 2021 16:45:40 +0530 Subject: [PATCH 059/103] feat: add `server` alias for `serve` command (#2631) --- OPTIONS.md | 2 +- README.md | 2 +- SERVE-OPTIONS.md | 2 +- packages/serve/src/index.ts | 2 +- packages/webpack-cli/README.md | 2 +- packages/webpack-cli/lib/webpack-cli.js | 2 +- test/build/unknown/unknown.test.js | 6 +++--- test/help/__snapshots__/help.test.js.snap.webpack4 | 12 ++++++------ test/help/__snapshots__/help.test.js.snap.webpack5 | 12 ++++++------ test/help/help.test.js | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/OPTIONS.md b/OPTIONS.md index 7af5a89d1d0..88515e0f378 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -873,7 +873,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/README.md b/README.md index e950f468e08..e47e40ab364 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Thus, webpack CLI provides different commands for many common tasks. - [`migrate|m [new-config-path]`](https://www.npmjs.com/package/@webpack-cli/migrate) - Migrate project from one version to another. - [`plugin|p [output-path] [options]`](./packages/generators#generators) - Initiate new plugin project. - [`loader|l [output-path] [options]`](./packages/generators#generators) - Initiate new loader project. -- [`serve|s [entries...] [options]`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading. +- [`serve|server|s [entries...] [options]`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading. - `version|v [commands...]` - Output the version number of `webpack`, `webpack-cli`, `webpack-dev-server`, and commands - `watch|w [entries...] [options]` - Run webpack and watch for files changes. diff --git a/SERVE-OPTIONS.md b/SERVE-OPTIONS.md index 808b6966c4a..efb5b9e51ab 100644 --- a/SERVE-OPTIONS.md +++ b/SERVE-OPTIONS.md @@ -1,5 +1,5 @@ ``` -Usage: webpack serve|s [entries...] [options] +Usage: webpack serve|server|s [entries...] [options] Run the webpack dev server. diff --git a/packages/serve/src/index.ts b/packages/serve/src/index.ts index 0f33450562a..a66f02d248a 100644 --- a/packages/serve/src/index.ts +++ b/packages/serve/src/index.ts @@ -8,7 +8,7 @@ class ServeCommand { await cli.makeCommand( { name: 'serve [entries...]', - alias: 's', + alias: ['server', 's'], description: 'Run the webpack dev server.', usage: '[entries...] [options]', pkg: '@webpack-cli/serve', diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index da57269ae2a..8104a38c73b 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -71,7 +71,7 @@ npx webpack-cli --help verbose loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. ``` diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index c31e7ae5d7b..c5ba9ff9e15 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -644,7 +644,7 @@ class WebpackCLI { const externalBuiltInCommandsInfo = [ { name: 'serve [entries...]', - alias: 's', + alias: ['server', 's'], pkg: '@webpack-cli/serve', }, { diff --git a/test/build/unknown/unknown.test.js b/test/build/unknown/unknown.test.js index b30d8d7fa2f..0ed9c264465 100644 --- a/test/build/unknown/unknown.test.js +++ b/test/build/unknown/unknown.test.js @@ -219,11 +219,11 @@ describe('unknown behaviour', () => { }); it('should log error and provide suggestion if an unknown command passed', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['server'], true, [], { TERM_PROGRAM: false }); + const { exitCode, stderr, stdout } = await run(__dirname, ['serverr'], true, [], { TERM_PROGRAM: false }); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command or entry 'server'"); - expect(stderr).toContain("Did you mean 'serve' (alias 's')?"); + expect(stderr).toContain("Unknown command or entry 'serverr'"); + expect(stderr).toContain("Did you mean 'serve' (alias 'server, s')?"); expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); expect(stdout).toBeFalsy(); }); diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index 62ee96ce206..a17dfec40c0 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -102,7 +102,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -156,7 +156,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -210,7 +210,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -400,7 +400,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'serve' command using the "--help" option 1`] = ` -"Usage: webpack serve|s [entries...] [options] +"Usage: webpack serve|server|s [entries...] [options] Run the webpack dev server. @@ -572,7 +572,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -626,7 +626,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 5e758f10da4..7297f62c0f0 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -103,7 +103,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -158,7 +158,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -213,7 +213,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -404,7 +404,7 @@ Made with ♥ by the webpack team." `; exports[`help should show help information for 'serve' command using the "--help" option 1`] = ` -"Usage: webpack serve|s [entries...] [options] +"Usage: webpack serve|server|s [entries...] [options] Run the webpack dev server. @@ -579,7 +579,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -634,7 +634,7 @@ Commands: loader|l [output-path] [options] Scaffold a loader. migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/test/help/help.test.js b/test/help/help.test.js index 91e4aeab84d..189fcf095d7 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -108,8 +108,8 @@ describe('help', () => { }, { name: 'serve', - alias: 's', - usage: 'webpack serve|s [entries...] [options]', + alias: ['server', 's'], + usage: 'webpack serve|server|s [entries...] [options]', }, { name: 'build', From 558f6b2a1b1a7fa5cc398b7d472bc2ad8069e0d6 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 16 Apr 2021 16:46:09 +0530 Subject: [PATCH 060/103] docs: update INIT.md (#2636) --- INIT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INIT.md b/INIT.md index 34c689ab2d6..ee5b0a36ee2 100644 --- a/INIT.md +++ b/INIT.md @@ -53,7 +53,7 @@ webpack-cli init --force **To scaffold in a specified path** ```bash -webpack-cli init [path] +webpack-cli init [generation-path] ``` **To scaffold specified template** From de7c1ae9dfcdcaa23ca2d6a9b8c342d9ae87c7cf Mon Sep 17 00:00:00 2001 From: James George Date: Fri, 16 Apr 2021 17:14:23 +0530 Subject: [PATCH 061/103] docs: update init generator questions (#2638) --- INIT.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/INIT.md b/INIT.md index ee5b0a36ee2..115aa5cdaa0 100644 --- a/INIT.md +++ b/INIT.md @@ -72,18 +72,18 @@ webpack-cli init --template This enables webpack to parse [`ES2015`](https://babeljs.io/learn-es2015/) code or Typescript code as per choice. -2. `Which of the following CSS solutions do you want to use?` - -> _Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .css files)_ - -If you use any sort of style in your project, such as [`.css`](https://developer.mozilla.org/en-US/docs/Web/CSS) you will need to select this here. If you don't use CSS, answer `none`. - -3. `Do you want to use webpack-dev-server?` +2. `Do you want to use webpack-dev-server?` > _Property/key resolved: [module.rules](https://webpack.js.org/configuration/dev-server/)_ Adds a development server to serve webpack bundles and hence make development faster. -4. `Do you want to simplify the creation of HTML files for your bundle?` +3. `Do you want to simplify the creation of HTML files for your bundle?` Adds `html-webpack-plugin` that simplifies creation of HTML files to serve your bundles. + +4. `Which of the following CSS solutions do you want to use?` + +> _Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .css files)_ + +If you use any sort of style in your project, such as [`.css`](https://developer.mozilla.org/en-US/docs/Web/CSS) you will need to select this here. If you don't use CSS, answer `none`. From 43e5767a6bc8bbdcf73a7b851db8bd26c2388b98 Mon Sep 17 00:00:00 2001 From: James George Date: Fri, 16 Apr 2021 18:34:53 +0530 Subject: [PATCH 062/103] refactor: remove unnecessary helpers (#2637) --- packages/generators/src/addon-generator.ts | 12 ++--- packages/generators/src/utils/copy-utils.ts | 50 --------------------- 2 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 packages/generators/src/utils/copy-utils.ts diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index 9a2e417f451..67fcd56159e 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -2,7 +2,6 @@ import fs from 'fs'; import path from 'path'; import Generator from 'yeoman-generator'; -import { generatorCopy, generatorCopyTpl } from './utils/copy-utils'; import { List } from './utils/scaffold-utils'; /** @@ -101,11 +100,14 @@ const addonGenerator = ( // eslint-disable-next-line @typescript-eslint/no-var-requires this.fs.extendJSON(this.destinationPath('package.json'), require(packageJsonTemplatePath)(this.props.name)); - this.copy = generatorCopy(this, this.resolvedTemplatePath); - this.copyTpl = generatorCopyTpl(this, this.resolvedTemplatePath, templateFn(this)); + copyFiles.forEach((filePath) => + this.fs.copyTpl(path.join(this.resolvedTemplatePath, filePath), this.destinationPath(filePath.replace('.tpl', ''))), + ); - copyFiles.forEach(this.copy); - copyTemplateFiles.forEach(this.copyTpl); + copyTemplateFiles.forEach((filePath) => { + const destFilePath = filePath.replace('_', '').replace('.tpl', ''); + this.fs.copyTpl(path.join(this.resolvedTemplatePath, filePath), this.destinationPath(destFilePath), templateFn(this)); + }); } public install(): void { diff --git a/packages/generators/src/utils/copy-utils.ts b/packages/generators/src/utils/copy-utils.ts deleted file mode 100644 index 25dd6fda949..00000000000 --- a/packages/generators/src/utils/copy-utils.ts +++ /dev/null @@ -1,50 +0,0 @@ -import path from '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 - */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -export const generatorCopy = (generator: any, templateDir: string): ((filePath: string) => void) => (filePath: string): void => { - const sourceParts = templateDir.split(path.delimiter); - - sourceParts.push(...filePath.split('/')); - - const targetParts = path.dirname(filePath).split('/'); - - targetParts.push(path.basename(filePath, '.tpl')); - - generator.fs.copy(path.join(...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 - */ -export const generatorCopyTpl = ( - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any - generator: any, - templateDir: string, - templateData: Record, -): ((filePath: string) => void) => (filePath: string): void => { - const sourceParts = templateDir.split(path.delimiter); - - sourceParts.push(...filePath.split('/')); - - const targetParts = path.dirname(filePath).split('/'); - - targetParts.push(path.basename(filePath, '.tpl').slice(1)); - - generator.fs.copyTpl(path.join(...sourceParts), generator.destinationPath(path.join.apply(null, targetParts)), templateData); -}; From d2ab57d2268d8cc8df628f35d75774c88330a5f8 Mon Sep 17 00:00:00 2001 From: wanashi <1516579+wana4@users.noreply.github.com> Date: Sat, 17 Apr 2021 23:23:00 +0900 Subject: [PATCH 063/103] fix: comment typo in webpack.config.js template file (#2639) obout -> about --- .../default/webpack.configjs.tpl | 2 +- .../__snapshots__/init.test.js.snap.webpack4 | 24 +++++++++---------- .../__snapshots__/init.test.js.snap.webpack5 | 24 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index 0289af33787..30fe8ade33b 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -21,7 +21,7 @@ const config = { new MiniCssExtractPlugin(), <% } %> // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [<% if (langType == "ES6") { %> diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 4125aa53223..9ded1d9cfba 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -57,7 +57,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -125,7 +125,7 @@ const config = { }), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -187,7 +187,7 @@ const config = { }), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -246,7 +246,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -371,7 +371,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -521,7 +521,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -587,7 +587,7 @@ const config = { new MiniCssExtractPlugin(), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -652,7 +652,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -719,7 +719,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -785,7 +785,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -850,7 +850,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -912,7 +912,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 4125aa53223..9ded1d9cfba 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -57,7 +57,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -125,7 +125,7 @@ const config = { }), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -187,7 +187,7 @@ const config = { }), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -246,7 +246,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -371,7 +371,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -521,7 +521,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -587,7 +587,7 @@ const config = { new MiniCssExtractPlugin(), // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -652,7 +652,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -719,7 +719,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -785,7 +785,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -850,7 +850,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ @@ -912,7 +912,7 @@ const config = { }, plugins: [ // Add your plugins here - // Learn more obout plugins from https://webpack.js.org/configuration/plugins/ + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], module: { rules: [ From bc12f1a2a833f09a0585050a0f5dd854da188f1d Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 19 Apr 2021 20:19:28 +0530 Subject: [PATCH 064/103] fix: parsing of empty `--env` flags (#2643) --- packages/webpack-cli/lib/webpack-cli.js | 26 +++++++++++----- .../function-with-env.test.js | 30 +++++++++++++++++++ .../type/function-with-env/webpack.config.js | 24 +++++++++++++++ .../__snapshots__/help.test.js.snap.webpack4 | 2 ++ .../__snapshots__/help.test.js.snap.webpack5 | 2 ++ test/help/help.test.js | 8 +++++ 6 files changed, 85 insertions(+), 7 deletions(-) diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index c5ba9ff9e15..449aa9b4ba6 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -373,6 +373,11 @@ class WebpackCLI { { name: 'env', type: (value, previous = {}) => { + // for https://github.com/webpack/webpack-cli/issues/2642 + if (value.endsWith('=')) { + value.concat('""'); + } + // This ensures we're only splitting by the first `=` const [allKeys, val] = value.split(/=(.+)/, 2); const splitKeys = allKeys.split(/\.(?!$)/); @@ -389,7 +394,11 @@ class WebpackCLI { } if (index === splitKeys.length - 1) { - prevRef[someKey] = val || true; + if (typeof val === 'string') { + prevRef[someKey] = val; + } else { + prevRef[someKey] = true; + } } prevRef = prevRef[someKey]; @@ -1212,13 +1221,13 @@ class WebpackCLI { const defaultCommandToRun = getCommandName(buildCommandOptions.name); const hasOperand = typeof operands[0] !== 'undefined'; const operand = hasOperand ? operands[0] : defaultCommandToRun; - + const isHelpOption = typeof options.help !== 'undefined'; const isHelpCommandSyntax = isCommand(operand, helpCommandOptions); - if (options.help || isHelpCommandSyntax) { + if (isHelpOption || isHelpCommandSyntax) { let isVerbose = false; - if (options.help) { + if (isHelpOption) { if (typeof options.help === 'string') { if (options.help !== 'verbose') { this.logger.error("Unknown value for '--help' option, please use '--help=verbose'"); @@ -1232,7 +1241,7 @@ class WebpackCLI { this.program.forHelp = true; const optionsForHelp = [] - .concat(options.help && hasOperand ? [operand] : []) + .concat(isHelpOption && hasOperand ? [operand] : []) // Syntax `webpack help [command]` .concat(operands.slice(1)) // Syntax `webpack help [option]` @@ -1243,9 +1252,12 @@ class WebpackCLI { await outputHelp(optionsForHelp, isVerbose, isHelpCommandSyntax, program); } - if (options.version || isCommand(operand, versionCommandOptions)) { + const isVersionOption = typeof options.version !== 'undefined'; + const isVersionCommandSyntax = isCommand(operand, versionCommandOptions); + + if (isVersionOption || isVersionCommandSyntax) { const optionsForVersion = [] - .concat(options.version ? [operand] : []) + .concat(isVersionOption ? [operand] : []) .concat(operands.slice(1)) .concat(unknown); diff --git a/test/build/config/type/function-with-env/function-with-env.test.js b/test/build/config/type/function-with-env/function-with-env.test.js index b31b2e546ad..539cc160684 100644 --- a/test/build/config/type/function-with-env/function-with-env.test.js +++ b/test/build/config/type/function-with-env/function-with-env.test.js @@ -117,6 +117,36 @@ describe('function configuration', () => { expect(existsSync(resolve(__dirname, './dist/true.js'))).toBeTruthy(); }); + it('Supports empty string', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', `foo=''`]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toBeTruthy(); + // Should generate the appropriate files + expect(existsSync(resolve(__dirname, './dist/empty-string.js'))).toBeTruthy(); + }); + + it('Supports empty string with multiple "="', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', `foo=bar=''`]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toBeTruthy(); + // Should generate the appropriate files + expect(existsSync(resolve(__dirname, './dist/new-empty-string.js'))).toBeTruthy(); + }); + + it('Supports env variable with "=" at the end', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--env', `foo=`]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toBeTruthy(); + // Should generate the appropriate files + expect(existsSync(resolve(__dirname, './dist/equal-at-the-end.js'))).toBeTruthy(); + }); + it('is able to understand multiple env flags', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--env', 'isDev', '--env', 'verboseStats', '--env', 'envMessage']); diff --git a/test/build/config/type/function-with-env/webpack.config.js b/test/build/config/type/function-with-env/webpack.config.js index 35efedbbb0d..5a726c711f9 100644 --- a/test/build/config/type/function-with-env/webpack.config.js +++ b/test/build/config/type/function-with-env/webpack.config.js @@ -9,6 +9,30 @@ module.exports = (env) => { }, }; } + if (env.foo === `''`) { + return { + entry: './a.js', + output: { + filename: 'empty-string.js', + }, + }; + } + if (env.foo === `bar=''`) { + return { + entry: './a.js', + output: { + filename: 'new-empty-string.js', + }, + }; + } + if (env['foo=']) { + return { + entry: './a.js', + output: { + filename: 'equal-at-the-end.js', + }, + }; + } return { entry: './a.js', mode: 'development', diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 index a17dfec40c0..238420633fd 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.webpack4 @@ -28,6 +28,8 @@ exports[`help should log error for invalid command using the "--help" option 1`] exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; +exports[`help should log error for invalid flag with the "--help" option #2 2`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + exports[`help should log error for invalid flag with the "--help" option 1`] = ` "[webpack-cli] Incorrect use of help [webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 index 7297f62c0f0..444cffabc89 100644 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.webpack5 @@ -28,6 +28,8 @@ exports[`help should log error for invalid command using the "--help" option 1`] exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; +exports[`help should log error for invalid flag with the "--help" option #2 2`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + exports[`help should log error for invalid flag with the "--help" option 1`] = ` "[webpack-cli] Incorrect use of help [webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' diff --git a/test/help/help.test.js b/test/help/help.test.js index 189fcf095d7..e3dbba1cf1d 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -402,4 +402,12 @@ describe('help', () => { expect(stderr).toMatchSnapshot(); expect(stdout).toBeFalsy(); }); + + it('should log error for invalid flag with the "--help" option #2', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ['--help=']); + + expect(exitCode).toBe(2); + expect(stderr).toMatchSnapshot(); + expect(stdout).toBeFalsy(); + }); }); From 39f7c9702740a971f8f1bd74c30912af1970d79c Mon Sep 17 00:00:00 2001 From: James George Date: Tue, 20 Apr 2021 17:07:54 +0530 Subject: [PATCH 065/103] chore: remove stale deps (#2645) --- packages/generators/package.json | 4 +--- yarn.lock | 12 +----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/generators/package.json b/packages/generators/package.json index b204fdb1939..c545cf34496 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -26,10 +26,8 @@ "webpack-cli": "4.x.x" }, "devDependencies": { - "@types/yeoman-assert": "^3.1.1", "@types/yeoman-generator": "^4.11.3", - "rimraf": "^3.0.2", - "yeoman-assert": "^3.1.1" + "rimraf": "^3.0.2" }, "gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9" } diff --git a/yarn.lock b/yarn.lock index f815b35c383..106bb5f2f03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1925,11 +1925,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yeoman-assert@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/yeoman-assert/-/yeoman-assert-3.1.1.tgz#d1f683e5f6e6b15d36bfb216221a19bd7e9735c6" - integrity sha512-ACDlMVhoLIA3VQPFKtJWlr3evUE3DaEbVxi1ukivBRNB1havMW+vo2J0+hNURF19yiqs7iu+yUHLG25bCi2xcw== - "@types/yeoman-environment@*": version "2.10.2" resolved "https://registry.yarnpkg.com/@types/yeoman-environment/-/yeoman-environment-2.10.2.tgz#008b4f7a350ff8fb2be7ad7dda2580ead048ee76" @@ -5583,7 +5578,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@6: +husky@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== @@ -11159,11 +11154,6 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yeoman-assert@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yeoman-assert/-/yeoman-assert-3.1.1.tgz#9f6fa0ecba7dd007c40f579668cb5dda18c79343" - integrity sha512-bCuLb/j/WzpvrJZCTdJJLFzm7KK8IYQJ3+dF9dYtNs2CUYyezFJDuULiZ2neM4eqjf45GN1KH/MzCTT3i90wUQ== - yeoman-environment@^2.10.3, yeoman-environment@^2.9.5: version "2.10.3" resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.10.3.tgz#9d8f42b77317414434cc0e51fb006a4bdd54688e" From 26ae685a98e0f56fff8f91cd1159aed8c0cd500d Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Tue, 20 Apr 2021 21:28:23 +0300 Subject: [PATCH 066/103] test: refactor --- .github/workflows/nodejs.yml | 4 +- package.json | 3 +- packages/webpack-cli/lib/plugins/CLIPlugin.js | 2 + packages/webpack-cli/lib/webpack-cli.js | 2 +- scripts/snapshotResolver.js | 16 +- test/build/mode/mode-with-config/index.js | 10 - .../mode-with-config/mode-with-config.test.js | 67 +- test/build/mode/mode-with-config/package.json | 6 - test/build/mode/mode-with-config/src/index.js | 10 +- .../mode/mode-with-config/webpack.config.js | 30 +- .../help.test.js.snap.devServer3.webpack4 | 2736 ++++++++++++++++ .../help.test.js.snap.devServer3.webpack5 | 2763 +++++++++++++++++ .../__snapshots__/help.test.js.snap.webpack4 | 912 ------ .../__snapshots__/help.test.js.snap.webpack5 | 2560 --------------- test/help/help.test.js | 190 +- ...rve-basic.test.js.snap.devServer3.webpack4 | 83 + ...rve-basic.test.js.snap.devServer3.webpack5 | 80 + test/serve/basic/serve-basic.test.js | 83 +- ...id-schema.test.js.snap.devServer3.webpack4 | 35 + ...id-schema.test.js.snap.devServer3.webpack5 | 33 + .../invalid-schema/invalid-schema.test.js | 25 +- ...rve-basic.test.js.snap.devServer3.webpack4 | 3 + ...rve-basic.test.js.snap.devServer3.webpack5 | 3 + test/serve/serve-variable/serve-basic.test.js | 4 +- ...om-config.test.js.snap.devServer3.webpack4 | 9 + ...om-config.test.js.snap.devServer3.webpack5 | 9 + .../serve-custom-config.test.js | 10 +- test/utils/test-utils.js | 67 +- .../version.test.js.snap.webpack4 | 167 +- .../version.test.js.snap.webpack5 | 167 +- test/version/version.test.js | 171 +- yarn.lock | 1877 ++++++----- 32 files changed, 7181 insertions(+), 4956 deletions(-) delete mode 100644 test/build/mode/mode-with-config/index.js delete mode 100644 test/build/mode/mode-with-config/package.json create mode 100644 test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 create mode 100644 test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 delete mode 100644 test/help/__snapshots__/help.test.js.snap.webpack4 delete mode 100644 test/help/__snapshots__/help.test.js.snap.webpack5 create mode 100644 test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 create mode 100644 test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 create mode 100644 test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 create mode 100644 test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 create mode 100644 test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 create mode 100644 test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 create mode 100644 test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack4 create mode 100644 test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack5 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index bc1989e7613..ec7bdf91d30 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -74,9 +74,9 @@ jobs: path: | node_modules */*/node_modules - key: b-${{ runner.os }}-${{ matrix.webpack-version }}-yarn-${{ hashFiles('**/yarn.lock', './yarn.lock') }} + key: c-${{ runner.os }}-${{ matrix.webpack-version }}-yarn-${{ hashFiles('**/yarn.lock', './yarn.lock') }} restore-keys: | - b-${{ runner.os }}-${{ matrix.webpack-version }}-yarn- + c-${{ runner.os }}-${{ matrix.webpack-version }}-yarn- - name: Install dependencies run: yarn diff --git a/package.json b/package.json index 5335f4f66c3..ac8635387ce 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "get-port": "^5.1.1", "husky": "^6.0.0", "jest": "^26.6.1", - "jest-serializer-ansi": "^1.0.3", "jest-watch-typeahead": "^0.6.1", "lerna": "^4.0.0", "lint-staged": "^10.5.0", @@ -81,7 +80,7 @@ "ts-jest": "^26.5.5", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "webpack": "^5.31.2", + "webpack": "^5.34.0", "webpack-bundle-analyzer": "^4.3.0", "webpack-dev-server": "^3.11.1" } diff --git a/packages/webpack-cli/lib/plugins/CLIPlugin.js b/packages/webpack-cli/lib/plugins/CLIPlugin.js index f4c267441d5..c9a0963431c 100644 --- a/packages/webpack-cli/lib/plugins/CLIPlugin.js +++ b/packages/webpack-cli/lib/plugins/CLIPlugin.js @@ -54,6 +54,7 @@ class CLIPlugin { const name = getCompilationName(); logCompilation(`Compiler${name ? ` ${name}` : ''} starting... `); + if (configPath) { this.logger.log(`Compiler${name ? ` ${name}` : ''} is using config: '${configPath}'`); } @@ -86,6 +87,7 @@ class CLIPlugin { const name = getCompilationName(); logCompilation(`Compiler${name ? ` ${name}` : ''} finished`); + process.nextTick(() => { if (compiler.watchMode) { this.logger.log(`Compiler${name ? `${name}` : ''} is watching files for updates...`); diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 449aa9b4ba6..3bd7ab7e6ab 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -1023,7 +1023,7 @@ class WebpackCLI { }, formatHelp: (command, helper) => { const termWidth = helper.padWidth(command, helper); - const helpWidth = helper.helpWidth || 80; + const helpWidth = helper.helpWidth || process.env.WEBPACK_CLI_HELP_WIDTH || 80; const itemIndentWidth = 2; const itemSeparatorWidth = 2; // between term and description diff --git a/scripts/snapshotResolver.js b/scripts/snapshotResolver.js index 585ff4f3424..5c8ab291240 100644 --- a/scripts/snapshotResolver.js +++ b/scripts/snapshotResolver.js @@ -1,12 +1,24 @@ const path = require('path'); const webpack = require('webpack'); - +//eslint-disable-next-line node/no-unpublished-require +const [devServerVersion] = require('webpack-dev-server/package.json').version; const [webpackVersion] = webpack.version; + const snapshotExtension = `.snap.webpack${webpackVersion}`; +const snapshotExtensionForServe = `.snap.devServer${devServerVersion}.webpack${webpackVersion}`; + +const helpCommandTestDir = path.resolve(__dirname, '../test/help'); +const serveCommandTestDir = path.resolve(__dirname, '../test/serve'); module.exports = { - resolveSnapshotPath: (testPath) => path.join(path.dirname(testPath), '__snapshots__', `${path.basename(testPath)}${snapshotExtension}`), + resolveSnapshotPath: (testPath) => { + if (testPath.startsWith(helpCommandTestDir) || testPath.startsWith(serveCommandTestDir)) { + return path.join(path.dirname(testPath), '__snapshots__', `${path.basename(testPath)}${snapshotExtensionForServe}`); + } + + return path.join(path.dirname(testPath), '__snapshots__', `${path.basename(testPath)}${snapshotExtension}`); + }, resolveTestPath: (snapshotPath) => snapshotPath.replace(`${path.sep}__snapshots__`, '').slice(0, -snapshotExtension.length), testPathForConsistencyCheck: path.join('consistency_check', '__tests__', 'example.test.js'), }; diff --git a/test/build/mode/mode-with-config/index.js b/test/build/mode/mode-with-config/index.js deleted file mode 100644 index 6d7382df589..00000000000 --- a/test/build/mode/mode-with-config/index.js +++ /dev/null @@ -1,10 +0,0 @@ -require("react") -console.log("Ichigo") -if (process.env.NODE_ENV === "production") { - console.log("production mode") -} else if (process.env.NODE_ENV === "development") { - console.log(console.log("development mode")) -} else { - console.log(console.log("none mode")) -} - diff --git a/test/build/mode/mode-with-config/mode-with-config.test.js b/test/build/mode/mode-with-config/mode-with-config.test.js index 5a6f1c45bb8..7935ef0ef87 100644 --- a/test/build/mode/mode-with-config/mode-with-config.test.js +++ b/test/build/mode/mode-with-config/mode-with-config.test.js @@ -1,8 +1,7 @@ 'use strict'; -const { existsSync } = require('fs'); -const { resolve } = require('path'); + // eslint-disable-next-line node/no-unpublished-require -const { run, readFile } = require('../../../utils/test-utils'); +const { run } = require('../../../utils/test-utils'); describe('mode flags with config', () => { it('should run in production mode when --mode=production is passed', async () => { @@ -11,22 +10,7 @@ describe('mode flags with config', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - - // Should generate the appropriate files - expect(existsSync(resolve(__dirname, './dist/main.js.OTHER.LICENSE.txt'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - - let data; - - try { - // Correct mode should be propagated to the compiler - data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); - } catch (error) { - expect(error).toBe(null); - } - - expect(data).toContain('"production mode"'); + expect(stdout).toContain(`mode: 'production'`); }); it('should run in development mode when --mode=development is passed', async () => { @@ -35,22 +19,7 @@ describe('mode flags with config', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - - // Should generate the appropriate files - expect(existsSync(resolve(__dirname, './dist/main.js.OTHER.LICENSE.txt'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - - let data; - - try { - // Correct mode should be propagated to the compiler - data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); - } catch (error) { - expect(error).toBe(null); - } - - expect(data).toContain('development mode'); + expect(stdout).toContain(`mode: 'development'`); }); it('should run in none mode when --mode=none is passed', async () => { @@ -59,34 +28,10 @@ describe('mode flags with config', () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - - // Should generate the appropriate files - // Should generate the appropriate files - expect(existsSync(resolve(__dirname, './dist/main.js.OTHER.LICENSE.txt'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js'))).toBeTruthy(); - expect(existsSync(resolve(__dirname, './dist/main.js.map'))).toBeFalsy(); - - let data; - - try { - // Correct mode should be propagated to the compiler - data = await readFile(resolve(__dirname, './dist/main.js'), 'utf-8'); - } catch (error) { - expect(error).toBe(null); - } - - expect(data).toContain('none mode'); - }); - - it('should use mode flag over config', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'production', '-c', 'webpack.config2.js']); - - expect(exitCode).toEqual(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`mode: 'production'`); + expect(stdout).toContain(`mode: 'none'`); }); - it('should use mode from flag over NODE_ENV', async () => { + it('should use mode from flag over "process.env.NODE_ENV"', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none', '-c', 'webpack.config2.js'], false, [], { NODE_ENV: 'production', }); diff --git a/test/build/mode/mode-with-config/package.json b/test/build/mode/mode-with-config/package.json deleted file mode 100644 index 22ba3e0ed63..00000000000 --- a/test/build/mode/mode-with-config/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "terser-webpack-plugin": "^3.0.1", - "react": "^16.13.0" - } -} diff --git a/test/build/mode/mode-with-config/src/index.js b/test/build/mode/mode-with-config/src/index.js index 6d7382df589..afb30eca56c 100644 --- a/test/build/mode/mode-with-config/src/index.js +++ b/test/build/mode/mode-with-config/src/index.js @@ -1,10 +1,10 @@ -require("react") -console.log("Ichigo") +console.log("Ichigo"); + if (process.env.NODE_ENV === "production") { - console.log("production mode") + console.log("production mode"); } else if (process.env.NODE_ENV === "development") { - console.log(console.log("development mode")) + console.log("development mode"); } else { - console.log(console.log("none mode")) + console.log("none mode"); } diff --git a/test/build/mode/mode-with-config/webpack.config.js b/test/build/mode/mode-with-config/webpack.config.js index 7c659c4efd2..938c3552a34 100644 --- a/test/build/mode/mode-with-config/webpack.config.js +++ b/test/build/mode/mode-with-config/webpack.config.js @@ -1,26 +1,10 @@ const path = require('path'); -const dirname = __dirname; -const TerserPlugin = require('terser-webpack-plugin'); +const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); -module.exports = () => { - const config = { - entry: './index.js', - output: { - path: path.join(dirname, 'dist'), - filename: '[name].js', - }, - optimization: { - minimizer: [ - new TerserPlugin({ - sourceMap: false, - extractComments: { - filename: (fileData) => { - return `${fileData.filename}.OTHER.LICENSE.txt${fileData.query}`; - }, - }, - }), - ], - }, - }; - return config; +module.exports = { + output: { + path: path.join(__dirname, 'dist'), + filename: '[name].js', + }, + plugins: [new WebpackCLITestPlugin()], }; diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 new file mode 100644 index 00000000000..779d58db0f7 --- /dev/null +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 @@ -0,0 +1,2736 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`help should log error for invalid command using command syntax #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using command syntax #4: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #4: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #2: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid command using the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid flag with the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax #2: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'verbose' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'myCommand' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #2: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #3: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #4: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'bui' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #4: stdout 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stderr 1`] = `""`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it + is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on + start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including + client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a + browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, + warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the + dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it + is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on + start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including + client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a + browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, + warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the + dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using command syntax: stderr 1`] = `""`; + +exports[`help should show help information using command syntax: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --color" option: stdout 1`] = ` +"Usage: webpack --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stderr 2`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stdout 2`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-color" option: stdout 1`] = ` +"Usage: webpack --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-stats" option: stdout 1`] = ` +"Usage: webpack --no-stats +Description: Disable stats output. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --stats" option: stdout 1`] = ` +"Usage: webpack --stats [value] +Description: It instructs webpack on how to treat the stats e.g. verbose. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --target" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --target" option: stdout 1`] = ` +"Usage: webpack --target +Short: webpack -t +Description: Sets the build target e.g. node. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --version" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --version" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help -v" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help -v" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --color" option: stdout 1`] = ` +"Usage: webpack serve --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --mode" option: stdout 1`] = ` +"Usage: webpack serve --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --no-color" option: stdout 1`] = ` +"Usage: webpack serve --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information with options for sub commands: stderr 1`] = `""`; + +exports[`help should show help information with options for sub commands: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from command syntax 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from option 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from command sytnax 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from option 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 new file mode 100644 index 00000000000..7de1a7c196a --- /dev/null +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 @@ -0,0 +1,2763 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`help should log error for invalid command using command syntax #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using command syntax #4: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #4: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #2: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid command using the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid flag with the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax #2: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'verbose' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'myCommand' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #2: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #3: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #4: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'bui' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #4: stdout 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stderr 1`] = `""`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it + is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on + start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including + client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a + browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, + warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the + dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it + is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on + start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including + client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a + browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, + warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the + dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using command syntax: stderr 1`] = `""`; + +exports[`help should show help information using command syntax: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --color" option: stdout 1`] = ` +"Usage: webpack --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stderr 2`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stdout 2`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-color" option: stdout 1`] = ` +"Usage: webpack --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-stats" option: stdout 1`] = ` +"Usage: webpack --no-stats +Description: Disable stats output. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --stats" option: stdout 1`] = ` +"Usage: webpack --stats [value] +Description: It instructs webpack on how to treat the stats e.g. verbose. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --target" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --target" option: stdout 1`] = ` +"Usage: webpack --target +Short: webpack -t +Description: Sets the build target e.g. node. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --version" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --version" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help -v" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help -v" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --color" option: stdout 1`] = ` +"Usage: webpack serve --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --mode" option: stdout 1`] = ` +"Usage: webpack serve --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --no-color" option: stdout 1`] = ` +"Usage: webpack serve --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information with options for sub commands: stderr 1`] = `""`; + +exports[`help should show help information with options for sub commands: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from command syntax 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from option 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from command sytnax 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from option 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; diff --git a/test/help/__snapshots__/help.test.js.snap.webpack4 b/test/help/__snapshots__/help.test.js.snap.webpack4 deleted file mode 100644 index 238420633fd..00000000000 --- a/test/help/__snapshots__/help.test.js.snap.webpack4 +++ /dev/null @@ -1,912 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`help should log error for invalid command using command syntax #3 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using command syntax #4 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option #2 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option #3 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option #2 2`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown command using command syntax #2 1`] = ` -"[webpack-cli] Can't find and load command 'verbose' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown command using command syntax 1`] = ` -"[webpack-cli] Can't find and load command 'myCommand' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #2 1`] = ` -"[webpack-cli] Unknown option '--made' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #3 1`] = ` -"[webpack-cli] Unknown option '--made' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #4 1`] = ` -"[webpack-cli] Can't find and load command 'bui' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should show help information and respect the "--color" flag using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information and respect the "--no-color" flag using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information and taking precedence when "--help" and "--version" option using together 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'build' command using the "--help" option 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. - ./src/main.js. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'configtest' command using the "--help" option 1`] = ` -"Usage: webpack configtest|t [config-path] - -Validate a webpack configuration. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'info' command using the "--help" option 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - --output To get the output in a specified format ( accept json - or markdown ) - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'init' command using the "--help" option 1`] = ` -"Usage: webpack init|create|new|c|n [generation-path] [options] - -Initialize a new webpack project. - -Options: - --template Type of template (default: \\"default\\") - --force Generate without questions (ideally) using default - answers - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'loader' command using the "--help" option 1`] = ` -"Usage: webpack loader|l [output-path] [options] - -Scaffold a loader. - -Options: - --template Type of template (default: \\"default\\") - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'plugin' command using the "--help" option 1`] = ` -"Usage: webpack plugin|p [output-path] [options] - -Scaffold a plugin. - -Options: - --template Type of template (default: \\"default\\") - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'serve' command using the "--help" option 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server. - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it - is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. - ./src/main.js. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - --bonjour Broadcasts the server via ZeroConf networking on - start - --lazy Lazy - --liveReload Enables/Disables live reloading on changing files - --serveIndex Enables/Disables serveIndex middleware - --inline Inline mode (set to false to disable including - client scripts like livereload) - --profile Print compilation profile data for progress steps - --progress Print compilation progress in percentage - --hot-only Do not refresh page if HMR fails - --stdin close when stdin ends - --open [value] Open the default browser, or optionally specify a - browser name - --useLocalIp Open default browser with local IP - --open-page Open default browser with the specified page - --client-log-level Log level in the browser (trace, debug, info, - warn, error or silent) - --https HTTPS - --http2 HTTP/2, must be used with HTTPS - --key Path to a SSL key. - --cert Path to a SSL certificate. - --cacert Path to a SSL CA certificate. - --pfx Path to a SSL pfx file. - --pfx-passphrase Passphrase for pfx file. - --content-base A directory or URL to serve HTML content from. - --watch-content-base Enable live-reloading of the content-base. - --history-api-fallback Fallback to /index.html for Single Page - Applications. - --compress Enable gzip compression - --port The port - --disable-host-check Will not check the host - --socket Socket to listen - --public The public hostname/ip address of the server - --host The hostname/ip address the server will bind to - --allowed-hosts A list of hosts that are allowed to access the - dev server, separated by spaces - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'watch' command using the "--help" option 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. - ./src/main.js. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using command syntax 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option with the "verbose" value #2 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - -h, --hot [value] Enables Hot Module Replacement - --no-hot Disables Hot Module Replacement. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - --prefetch Prefetch this request. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option with the "verbose" value 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - -h, --hot [value] Enables Hot Module Replacement - --no-hot Disables Hot Module Replacement. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - --prefetch Prefetch this request. - -j, --json [value] Prints result as JSON or store it in a file. - --entry The entry point(s) of your application e.g. ./src/main.js. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - -t, --target Sets the build target e.g. node. - -d, --devtool Determine source maps to use. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --color" option 1`] = ` -"Usage: webpack --color -Description: Enable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --mode" option 1`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --mode" option 2`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --no-color" option 1`] = ` -"Usage: webpack --no-color -Description: Disable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --no-stats" option 1`] = ` -"Usage: webpack --no-stats -Description: Disable stats output. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --stats" option 1`] = ` -"Usage: webpack --stats [value] -Description: It instructs webpack on how to treat the stats e.g. verbose. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --target" option 1`] = ` -"Usage: webpack --target -Short: webpack -t -Description: Sets the build target e.g. node. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --version" option 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help -v" option 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --color" option 1`] = ` -"Usage: webpack serve --color -Description: Enable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --mode" option 1`] = ` -"Usage: webpack serve --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --no-color" option 1`] = ` -"Usage: webpack serve --no-color -Description: Disable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information with options for sub commands 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - --output To get the output in a specified format ( accept json - or markdown ) - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; diff --git a/test/help/__snapshots__/help.test.js.snap.webpack5 b/test/help/__snapshots__/help.test.js.snap.webpack5 deleted file mode 100644 index 444cffabc89..00000000000 --- a/test/help/__snapshots__/help.test.js.snap.webpack5 +++ /dev/null @@ -1,2560 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`help should log error for invalid command using command syntax #3 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using command syntax #4 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option #2 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option #3 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for invalid command using the "--help" option 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option #2 2`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; - -exports[`help should log error for invalid flag with the "--help" option 1`] = ` -"[webpack-cli] Incorrect use of help -[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown command using command syntax #2 1`] = ` -"[webpack-cli] Can't find and load command 'verbose' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown command using command syntax 1`] = ` -"[webpack-cli] Can't find and load command 'myCommand' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #2 1`] = ` -"[webpack-cli] Unknown option '--made' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #3 1`] = ` -"[webpack-cli] Unknown option '--made' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should log error for unknown option using command syntax #4 1`] = ` -"[webpack-cli] Can't find and load command 'bui' -[webpack-cli] Run 'webpack --help' to see available commands and options" -`; - -exports[`help should show help information and respect the "--color" flag using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information and respect the "--no-color" flag using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information and taking precedence when "--help" and "--version" option using together 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'build' command using the "--help" option 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. - ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'configtest' command using the "--help" option 1`] = ` -"Usage: webpack configtest|t [config-path] - -Validate a webpack configuration. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'info' command using the "--help" option 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - --output To get the output in a specified format ( accept json - or markdown ) - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'init' command using the "--help" option 1`] = ` -"Usage: webpack init|create|new|c|n [generation-path] [options] - -Initialize a new webpack project. - -Options: - --template Type of template (default: \\"default\\") - --force Generate without questions (ideally) using default - answers - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'loader' command using the "--help" option 1`] = ` -"Usage: webpack loader|l [output-path] [options] - -Scaffold a loader. - -Options: - --template Type of template (default: \\"default\\") - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'plugin' command using the "--help" option 1`] = ` -"Usage: webpack plugin|p [output-path] [options] - -Scaffold a plugin. - -Options: - --template Type of template (default: \\"default\\") - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'serve' command using the "--help" option 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server. - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it - is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. - ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - --bonjour Broadcasts the server via ZeroConf networking on - start - --lazy Lazy - --liveReload Enables/Disables live reloading on changing files - --serveIndex Enables/Disables serveIndex middleware - --inline Inline mode (set to false to disable including - client scripts like livereload) - --profile Print compilation profile data for progress steps - --progress Print compilation progress in percentage - --hot-only Do not refresh page if HMR fails - --stdin close when stdin ends - --open [value] Open the default browser, or optionally specify a - browser name - --useLocalIp Open default browser with local IP - --open-page Open default browser with the specified page - --client-log-level Log level in the browser (trace, debug, info, - warn, error or silent) - --https HTTPS - --http2 HTTP/2, must be used with HTTPS - --key Path to a SSL key. - --cert Path to a SSL certificate. - --cacert Path to a SSL CA certificate. - --pfx Path to a SSL pfx file. - --pfx-passphrase Passphrase for pfx file. - --content-base A directory or URL to serve HTML content from. - --watch-content-base Enable live-reloading of the content-base. - --history-api-fallback Fallback to /index.html for Single Page - Applications. - --compress Enable gzip compression - --port The port - --disable-host-check Will not check the host - --socket Socket to listen - --public The public hostname/ip address of the server - --host The hostname/ip address the server will bind to - --allowed-hosts A list of hosts that are allowed to access the - dev server, separated by spaces - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'watch' command using the "--help" option 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. - ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path Output location of the file generated by webpack - e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats - e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using command syntax 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|create|new|c|n [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option with the "verbose" value #2 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - -h, --hot [value] Enables Hot Module Replacement - --no-hot Disables Hot Module Replacement. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - --prefetch Prefetch this request. - -j, --json [value] Prints result as JSON or store it in a file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-type In memory caching. Filesystem caching. - --cache-cache-directory Base directory for the cache (defaults to node_modules/.cache/webpack). - --cache-cache-location Locations for the cache (defaults to cacheDirectory / name). - --cache-hash-algorithm Algorithm used for generation the hash (see node.js crypto package). - --cache-idle-timeout Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle'). - --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle'). - --cache-immutable-paths A path to a immutable directory (usually a package manager cache directory). - --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. - --cache-managed-paths A path to a managed directory (usually a node_modules directory). - --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. - --cache-name Name for the cache. Different names will lead to different coexisting caches. - --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). - --cache-version Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. - --context The base directory (absolute path!) for resolving the \`entry\` option. If \`output.pathinfo\` is set, the included pathinfo is shortened to this directory. - --dependencies References to another configuration to depend on. - --dependencies-reset Clear all items provided in configuration. References to other configurations to depend on. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --entry-reset Clear all items provided in configuration. All modules are loaded upon startup. The last one is exported. - --experiments-asset Allow module type 'asset' to generate assets. - --no-experiments-asset Negative 'experiments-asset' option. - --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. - --no-experiments-async-web-assembly Negative 'experiments-async-web-assembly' option. - --experiments-layers Enable module and chunk layers. - --no-experiments-layers Negative 'experiments-layers' option. - --experiments-lazy-compilation Compile entrypoints and import()s only when they are accessed. - --no-experiments-lazy-compilation Negative 'experiments-lazy-compilation' option. - --experiments-lazy-compilation-client A custom client. - --experiments-lazy-compilation-entries Enable/disable lazy compilation for entries. - --no-experiments-lazy-compilation-entries Negative 'experiments-lazy-compilation-entries' option. - --experiments-lazy-compilation-imports Enable/disable lazy compilation for import() modules. - --no-experiments-lazy-compilation-imports Negative 'experiments-lazy-compilation-imports' option. - --experiments-lazy-compilation-test Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name. - --experiments-output-module Allow output javascript files as module source type. - --no-experiments-output-module Negative 'experiments-output-module' option. - --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). - --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. - --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. - --no-experiments-top-level-await Negative 'experiments-top-level-await' option. - --externals Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency. - --externals-reset Clear all items provided in configuration. Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on \`output.libraryTarget\`. - --externals-presets-electron Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron Negative 'externals-presets-electron' option. - --externals-presets-electron-main Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-main Negative 'externals-presets-electron-main' option. - --externals-presets-electron-preload Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-preload Negative 'externals-presets-electron-preload' option. - --externals-presets-electron-renderer Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-renderer Negative 'externals-presets-electron-renderer' option. - --externals-presets-node Treat node.js built-in modules like fs, path or vm as external and load them via require() when used. - --no-externals-presets-node Negative 'externals-presets-node' option. - --externals-presets-nwjs Treat NW.js legacy nw.gui module as external and load it via require() when used. - --no-externals-presets-nwjs Negative 'externals-presets-nwjs' option. - --externals-presets-web Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk). - --no-externals-presets-web Negative 'externals-presets-web' option. - --externals-presets-web-async Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution). - --no-externals-presets-web-async Negative 'externals-presets-web-async' option. - --externals-type Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value). - --ignore-warnings A RegExp to select the warning message. - --ignore-warnings-file A RegExp to select the origin file for the warning. - --ignore-warnings-message A RegExp to select the warning message. - --ignore-warnings-module A RegExp to select the origin module for the warning. - --ignore-warnings-reset Clear all items provided in configuration. Ignore specific warnings. - --infrastructure-logging-debug [value...] Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers. - --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. - --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific loggers. - --infrastructure-logging-level Log level. - --mode Defines the mode to pass to webpack. - --module-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-expr-context-critical Negative 'module-expr-context-critical' option. - --module-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'. - --no-module-expr-context-recursive Negative 'module-expr-context-recursive' option. - --module-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'. - --no-module-expr-context-reg-exp Negative 'module-expr-context-reg-exp' option. - --module-expr-context-request Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'. - --module-generator-asset-data-url-encoding Asset encoding (defaults to base64). - --no-module-generator-asset-data-url-encoding Negative 'module-generator-asset-data-url-encoding' option. - --module-generator-asset-data-url-mimetype Asset mimetype (getting from file extension by default). - --module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. - --no-module-generator-asset-emit Negative 'module-generator-asset-emit' option. - --module-generator-asset-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --module-generator-asset-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --module-generator-asset-inline-data-url-encoding Asset encoding (defaults to base64). - --no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option. - --module-generator-asset-inline-data-url-mimetype Asset mimetype (getting from file extension by default). - --module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. - --no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option. - --module-generator-asset-resource-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --module-generator-asset-resource-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --module-no-parse A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed. - --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's matched against the full resolved request. - --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. - --no-module-parser-javascript-amd Negative 'module-parser-javascript-amd' option. - --module-parser-javascript-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-browserify Negative 'module-parser-javascript-browserify' option. - --module-parser-javascript-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-commonjs Negative 'module-parser-javascript-commonjs' option. - --module-parser-javascript-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option. - --module-parser-javascript-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-expr-context-critical Negative 'module-parser-javascript-expr-context-critical' option. - --module-parser-javascript-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-expr-context-recursive Negative 'module-parser-javascript-expr-context-recursive' option. - --module-parser-javascript-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-expr-context-reg-exp Negative 'module-parser-javascript-expr-context-reg-exp' option. - --module-parser-javascript-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-harmony Negative 'module-parser-javascript-harmony' option. - --module-parser-javascript-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-import Negative 'module-parser-javascript-import' option. - --no-module-parser-javascript-node Negative 'module-parser-javascript-node' option. - --module-parser-javascript-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-node-dirname Negative 'module-parser-javascript-node-dirname' option. - --module-parser-javascript-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-node-filename Negative 'module-parser-javascript-node-filename' option. - --module-parser-javascript-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-node-global Negative 'module-parser-javascript-node-global' option. - --module-parser-javascript-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-require-context Negative 'module-parser-javascript-require-context' option. - --module-parser-javascript-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-require-ensure Negative 'module-parser-javascript-require-ensure' option. - --module-parser-javascript-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-require-include Negative 'module-parser-javascript-require-include' option. - --module-parser-javascript-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-require-js Negative 'module-parser-javascript-require-js' option. - --module-parser-javascript-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-strict-export-presence Negative 'module-parser-javascript-strict-export-presence' option. - --module-parser-javascript-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-strict-this-context-on-imports Negative 'module-parser-javascript-strict-this-context-on-imports' option. - --module-parser-javascript-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-system Negative 'module-parser-javascript-system' option. - --module-parser-javascript-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-critical Negative 'module-parser-javascript-unknown-context-critical' option. - --module-parser-javascript-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-recursive Negative 'module-parser-javascript-unknown-context-recursive' option. - --module-parser-javascript-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-reg-exp Negative 'module-parser-javascript-unknown-context-reg-exp' option. - --module-parser-javascript-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-url Negative 'module-parser-javascript-url' option. - --module-parser-javascript-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-worker Negative 'module-parser-javascript-worker' option. - --module-parser-javascript-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-wrapped-context-critical Negative 'module-parser-javascript-wrapped-context-critical' option. - --module-parser-javascript-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-wrapped-context-recursive Negative 'module-parser-javascript-wrapped-context-recursive' option. - --module-parser-javascript-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-auto-amd Negative 'module-parser-javascript-auto-amd' option. - --module-parser-javascript-auto-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-auto-browserify Negative 'module-parser-javascript-auto-browserify' option. - --module-parser-javascript-auto-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-auto-commonjs Negative 'module-parser-javascript-auto-commonjs' option. - --module-parser-javascript-auto-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option. - --module-parser-javascript-auto-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-critical Negative 'module-parser-javascript-auto-expr-context-critical' option. - --module-parser-javascript-auto-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-recursive Negative 'module-parser-javascript-auto-expr-context-recursive' option. - --module-parser-javascript-auto-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-reg-exp Negative 'module-parser-javascript-auto-expr-context-reg-exp' option. - --module-parser-javascript-auto-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-auto-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-auto-harmony Negative 'module-parser-javascript-auto-harmony' option. - --module-parser-javascript-auto-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-auto-import Negative 'module-parser-javascript-auto-import' option. - --no-module-parser-javascript-auto-node Negative 'module-parser-javascript-auto-node' option. - --module-parser-javascript-auto-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-auto-node-dirname Negative 'module-parser-javascript-auto-node-dirname' option. - --module-parser-javascript-auto-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-auto-node-filename Negative 'module-parser-javascript-auto-node-filename' option. - --module-parser-javascript-auto-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-auto-node-global Negative 'module-parser-javascript-auto-node-global' option. - --module-parser-javascript-auto-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-auto-require-context Negative 'module-parser-javascript-auto-require-context' option. - --module-parser-javascript-auto-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-auto-require-ensure Negative 'module-parser-javascript-auto-require-ensure' option. - --module-parser-javascript-auto-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-auto-require-include Negative 'module-parser-javascript-auto-require-include' option. - --module-parser-javascript-auto-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-auto-require-js Negative 'module-parser-javascript-auto-require-js' option. - --module-parser-javascript-auto-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-auto-strict-export-presence Negative 'module-parser-javascript-auto-strict-export-presence' option. - --module-parser-javascript-auto-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-auto-strict-this-context-on-imports Negative 'module-parser-javascript-auto-strict-this-context-on-imports' option. - --module-parser-javascript-auto-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-auto-system Negative 'module-parser-javascript-auto-system' option. - --module-parser-javascript-auto-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-critical Negative 'module-parser-javascript-auto-unknown-context-critical' option. - --module-parser-javascript-auto-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-recursive Negative 'module-parser-javascript-auto-unknown-context-recursive' option. - --module-parser-javascript-auto-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-reg-exp Negative 'module-parser-javascript-auto-unknown-context-reg-exp' option. - --module-parser-javascript-auto-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-auto-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-auto-url Negative 'module-parser-javascript-auto-url' option. - --module-parser-javascript-auto-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-auto-worker Negative 'module-parser-javascript-auto-worker' option. - --module-parser-javascript-auto-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-auto-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-auto-wrapped-context-critical Negative 'module-parser-javascript-auto-wrapped-context-critical' option. - --module-parser-javascript-auto-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-auto-wrapped-context-recursive Negative 'module-parser-javascript-auto-wrapped-context-recursive' option. - --module-parser-javascript-auto-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-amd Negative 'module-parser-javascript-dynamic-amd' option. - --module-parser-javascript-dynamic-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-dynamic-browserify Negative 'module-parser-javascript-dynamic-browserify' option. - --module-parser-javascript-dynamic-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-dynamic-commonjs Negative 'module-parser-javascript-dynamic-commonjs' option. - --module-parser-javascript-dynamic-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option. - --module-parser-javascript-dynamic-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-critical Negative 'module-parser-javascript-dynamic-expr-context-critical' option. - --module-parser-javascript-dynamic-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-recursive Negative 'module-parser-javascript-dynamic-expr-context-recursive' option. - --module-parser-javascript-dynamic-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-reg-exp Negative 'module-parser-javascript-dynamic-expr-context-reg-exp' option. - --module-parser-javascript-dynamic-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-dynamic-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-dynamic-harmony Negative 'module-parser-javascript-dynamic-harmony' option. - --module-parser-javascript-dynamic-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-dynamic-import Negative 'module-parser-javascript-dynamic-import' option. - --no-module-parser-javascript-dynamic-node Negative 'module-parser-javascript-dynamic-node' option. - --module-parser-javascript-dynamic-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-dynamic-node-dirname Negative 'module-parser-javascript-dynamic-node-dirname' option. - --module-parser-javascript-dynamic-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-dynamic-node-filename Negative 'module-parser-javascript-dynamic-node-filename' option. - --module-parser-javascript-dynamic-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-dynamic-node-global Negative 'module-parser-javascript-dynamic-node-global' option. - --module-parser-javascript-dynamic-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-dynamic-require-context Negative 'module-parser-javascript-dynamic-require-context' option. - --module-parser-javascript-dynamic-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-dynamic-require-ensure Negative 'module-parser-javascript-dynamic-require-ensure' option. - --module-parser-javascript-dynamic-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-dynamic-require-include Negative 'module-parser-javascript-dynamic-require-include' option. - --module-parser-javascript-dynamic-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-dynamic-require-js Negative 'module-parser-javascript-dynamic-require-js' option. - --module-parser-javascript-dynamic-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-dynamic-strict-export-presence Negative 'module-parser-javascript-dynamic-strict-export-presence' option. - --module-parser-javascript-dynamic-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-dynamic-strict-this-context-on-imports Negative 'module-parser-javascript-dynamic-strict-this-context-on-imports' option. - --module-parser-javascript-dynamic-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-dynamic-system Negative 'module-parser-javascript-dynamic-system' option. - --module-parser-javascript-dynamic-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-critical Negative 'module-parser-javascript-dynamic-unknown-context-critical' option. - --module-parser-javascript-dynamic-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-recursive Negative 'module-parser-javascript-dynamic-unknown-context-recursive' option. - --module-parser-javascript-dynamic-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-reg-exp Negative 'module-parser-javascript-dynamic-unknown-context-reg-exp' option. - --module-parser-javascript-dynamic-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-dynamic-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-dynamic-url Negative 'module-parser-javascript-dynamic-url' option. - --module-parser-javascript-dynamic-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-dynamic-worker Negative 'module-parser-javascript-dynamic-worker' option. - --module-parser-javascript-dynamic-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-dynamic-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-wrapped-context-critical Negative 'module-parser-javascript-dynamic-wrapped-context-critical' option. - --module-parser-javascript-dynamic-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-wrapped-context-recursive Negative 'module-parser-javascript-dynamic-wrapped-context-recursive' option. - --module-parser-javascript-dynamic-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-esm-amd Negative 'module-parser-javascript-esm-amd' option. - --module-parser-javascript-esm-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-esm-browserify Negative 'module-parser-javascript-esm-browserify' option. - --module-parser-javascript-esm-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-esm-commonjs Negative 'module-parser-javascript-esm-commonjs' option. - --module-parser-javascript-esm-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option. - --module-parser-javascript-esm-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-critical Negative 'module-parser-javascript-esm-expr-context-critical' option. - --module-parser-javascript-esm-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-recursive Negative 'module-parser-javascript-esm-expr-context-recursive' option. - --module-parser-javascript-esm-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-reg-exp Negative 'module-parser-javascript-esm-expr-context-reg-exp' option. - --module-parser-javascript-esm-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-esm-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-esm-harmony Negative 'module-parser-javascript-esm-harmony' option. - --module-parser-javascript-esm-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-esm-import Negative 'module-parser-javascript-esm-import' option. - --no-module-parser-javascript-esm-node Negative 'module-parser-javascript-esm-node' option. - --module-parser-javascript-esm-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-esm-node-dirname Negative 'module-parser-javascript-esm-node-dirname' option. - --module-parser-javascript-esm-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-esm-node-filename Negative 'module-parser-javascript-esm-node-filename' option. - --module-parser-javascript-esm-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-esm-node-global Negative 'module-parser-javascript-esm-node-global' option. - --module-parser-javascript-esm-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-esm-require-context Negative 'module-parser-javascript-esm-require-context' option. - --module-parser-javascript-esm-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-esm-require-ensure Negative 'module-parser-javascript-esm-require-ensure' option. - --module-parser-javascript-esm-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-esm-require-include Negative 'module-parser-javascript-esm-require-include' option. - --module-parser-javascript-esm-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-esm-require-js Negative 'module-parser-javascript-esm-require-js' option. - --module-parser-javascript-esm-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-esm-strict-export-presence Negative 'module-parser-javascript-esm-strict-export-presence' option. - --module-parser-javascript-esm-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-esm-strict-this-context-on-imports Negative 'module-parser-javascript-esm-strict-this-context-on-imports' option. - --module-parser-javascript-esm-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-esm-system Negative 'module-parser-javascript-esm-system' option. - --module-parser-javascript-esm-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-critical Negative 'module-parser-javascript-esm-unknown-context-critical' option. - --module-parser-javascript-esm-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-recursive Negative 'module-parser-javascript-esm-unknown-context-recursive' option. - --module-parser-javascript-esm-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-reg-exp Negative 'module-parser-javascript-esm-unknown-context-reg-exp' option. - --module-parser-javascript-esm-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-esm-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-esm-url Negative 'module-parser-javascript-esm-url' option. - --module-parser-javascript-esm-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-esm-worker Negative 'module-parser-javascript-esm-worker' option. - --module-parser-javascript-esm-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-esm-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-esm-wrapped-context-critical Negative 'module-parser-javascript-esm-wrapped-context-critical' option. - --module-parser-javascript-esm-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-esm-wrapped-context-recursive Negative 'module-parser-javascript-esm-wrapped-context-recursive' option. - --module-parser-javascript-esm-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --module-rules-compiler Match the child compiler name. - --module-rules-dependency Match dependency type. - --module-rules-enforce Enforce this rule as pre or post step. - --module-rules-exclude Shortcut for resource.exclude. - --module-rules-include Shortcut for resource.include. - --module-rules-issuer Match the issuer of the module (The module pointing to this module). - --module-rules-issuer-layer Match layer of the issuer of this module (The module pointing to this module). - --module-rules-layer Specifies the layer in which the module should be placed in. - --module-rules-loader A loader request. - --module-rules-mimetype Match module mimetype when load from Data URI. - --module-rules-real-resource Match the real resource path of the module. - --module-rules-resource Match the resource path of the module. - --module-rules-resource-fragment Match the resource fragment of the module. - --module-rules-resource-query Match the resource query of the module. - --module-rules-side-effects Flags a module as with or without side effects. - --no-module-rules-side-effects Negative 'module-rules-side-effects' option. - --module-rules-test Shortcut for resource.test. - --module-rules-type Module type to use for the module. - --module-rules-use-ident Unique loader options identifier. - --module-rules-use-loader A loader request. - --module-rules-use-options Options passed to a loader. - --module-rules-use A loader request. - --module-rules-reset Clear all items provided in configuration. A list of rules. - --module-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'. - --no-module-strict-export-presence Negative 'module-strict-export-presence' option. - --module-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'. - --no-module-strict-this-context-on-imports Negative 'module-strict-this-context-on-imports' option. - --module-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'. - --no-module-unknown-context-critical Negative 'module-unknown-context-critical' option. - --module-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'. - --no-module-unknown-context-recursive Negative 'module-unknown-context-recursive' option. - --module-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'. - --no-module-unknown-context-reg-exp Negative 'module-unknown-context-reg-exp' option. - --module-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'. - --module-unsafe-cache Cache the resolving of module requests. - --no-module-unsafe-cache Negative 'module-unsafe-cache' option. - --module-wrapped-context-critical Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'. - --no-module-wrapped-context-critical Negative 'module-wrapped-context-critical' option. - --module-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'. - --no-module-wrapped-context-recursive Negative 'module-wrapped-context-recursive' option. - --module-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'. - --name Name of the configuration. Used when loading multiple configurations. - --no-node Negative 'node' option. - --node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-node-dirname Negative 'node-dirname' option. - --node-filename [value] Include a polyfill for the '__filename' variable. - --no-node-filename Negative 'node-filename' option. - --node-global Include a polyfill for the 'global' variable. - --no-node-global Negative 'node-global' option. - --optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM. - --no-optimization-check-wasm-types Negative 'optimization-check-wasm-types' option. - --optimization-chunk-ids Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin). - --no-optimization-chunk-ids Negative 'optimization-chunk-ids' option. - --optimization-concatenate-modules Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. - --no-optimization-concatenate-modules Negative 'optimization-concatenate-modules' option. - --optimization-emit-on-errors Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime. - --no-optimization-emit-on-errors Negative 'optimization-emit-on-errors' option. - --optimization-flag-included-chunks Also flag chunks as loaded which contain a subset of the modules. - --no-optimization-flag-included-chunks Negative 'optimization-flag-included-chunks' option. - --optimization-inner-graph Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection. - --no-optimization-inner-graph Negative 'optimization-inner-graph' option. - --optimization-mangle-exports [value] Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names). - --no-optimization-mangle-exports Negative 'optimization-mangle-exports' option. - --optimization-mangle-wasm-imports Reduce size of WASM by changing imports to shorter strings. - --no-optimization-mangle-wasm-imports Negative 'optimization-mangle-wasm-imports' option. - --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. - --no-optimization-merge-duplicate-chunks Negative 'optimization-merge-duplicate-chunks' option. - --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. - --no-optimization-minimize Negative 'optimization-minimize' option. - --optimization-module-ids Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin). - --no-optimization-module-ids Negative 'optimization-module-ids' option. - --optimization-node-env Set process.env.NODE_ENV to a specific value. - --no-optimization-node-env Negative 'optimization-node-env' option. - --optimization-portable-records Generate records with relative paths to be able to move the context folder. - --no-optimization-portable-records Negative 'optimization-portable-records' option. - --optimization-provided-exports Figure out which exports are provided by modules to generate more efficient code. - --no-optimization-provided-exports Negative 'optimization-provided-exports' option. - --optimization-real-content-hash Use real [contenthash] based on final content of the assets. - --no-optimization-real-content-hash Negative 'optimization-real-content-hash' option. - --optimization-remove-available-modules Removes modules from chunks when these modules are already included in all parents. - --no-optimization-remove-available-modules Negative 'optimization-remove-available-modules' option. - --optimization-remove-empty-chunks Remove chunks which are empty. - --no-optimization-remove-empty-chunks Negative 'optimization-remove-empty-chunks' option. - --optimization-runtime-chunk [value] Create an additional chunk which contains only the webpack runtime and chunk hash maps. - --no-optimization-runtime-chunk Negative 'optimization-runtime-chunk' option. - --optimization-runtime-chunk-name The name or name factory for the runtime chunks. - --optimization-side-effects [value] Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects). - --no-optimization-side-effects Negative 'optimization-side-effects' option. - --no-optimization-split-chunks Negative 'optimization-split-chunks' option. - --optimization-split-chunks-automatic-name-delimiter Sets the name delimiter for created chunks. - --optimization-split-chunks-chunks Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML). - --optimization-split-chunks-default-size-types Size type, like 'javascript', 'webassembly'. - --optimization-split-chunks-default-size-types-reset Clear all items provided in configuration. Sets the size types which are used when a number is used for sizes. - --optimization-split-chunks-enforce-size-threshold Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter Sets the name delimiter for created chunks. - --optimization-split-chunks-fallback-cache-group-max-async-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-max-initial-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-max-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-min-size Size of the javascript part of the chunk. - --optimization-split-chunks-filename Sets the template for the filename for created chunks. - --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by maxSize. - --no-optimization-split-chunks-hide-path-info Negative 'optimization-split-chunks-hide-path-info' option. - --optimization-split-chunks-max-async-requests Maximum number of requests which are accepted for on-demand loading. - --optimization-split-chunks-max-async-size Size of the javascript part of the chunk. - --optimization-split-chunks-max-initial-requests Maximum number of initial chunks which are accepted for an entry point. - --optimization-split-chunks-max-initial-size Size of the javascript part of the chunk. - --optimization-split-chunks-max-size Size of the javascript part of the chunk. - --optimization-split-chunks-min-chunks Minimum number of times a module has to be duplicated until it's considered for splitting. - --optimization-split-chunks-min-remaining-size Size of the javascript part of the chunk. - --optimization-split-chunks-min-size Size of the javascript part of the chunk. - --optimization-split-chunks-name Give chunks created a name (chunks with equal name are merged). - --no-optimization-split-chunks-name Negative 'optimization-split-chunks-name' option. - --optimization-split-chunks-used-exports Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal. - --no-optimization-split-chunks-used-exports Negative 'optimization-split-chunks-used-exports' option. - --optimization-used-exports [value] Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined). - --no-optimization-used-exports Negative 'optimization-used-exports' option. - --output-asset-module-filename The filename of asset modules as relative path inside the 'output.path' directory. - --output-charset Add charset attribute for script tag. - --no-output-charset Negative 'output-charset' option. - --output-chunk-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --output-chunk-format The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins). - --no-output-chunk-format Negative 'output-chunk-format' option. - --output-chunk-load-timeout Number of milliseconds before chunk request expires. - --output-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --no-output-chunk-loading Negative 'output-chunk-loading' option. - --output-chunk-loading-global The global variable used by webpack for loading of chunks. - --output-clean Clean the output directory before emit. - --no-output-clean Negative 'output-clean' option. - --output-clean-dry Log the assets that should be removed instead of deleting them. - --no-output-clean-dry Negative 'output-clean-dry' option. - --output-clean-keep Keep these assets. - --output-compare-before-emit Check if to be emitted file already exists and have the same content before writing to output filesystem. - --no-output-compare-before-emit Negative 'output-compare-before-emit' option. - --output-cross-origin-loading This option enables cross-origin loading of chunks. - --no-output-cross-origin-loading Negative 'output-cross-origin-loading' option. - --output-devtool-fallback-module-filename-template Similar to \`output.devtoolModuleFilenameTemplate\`, but used in the case of duplicate module identifiers. - --output-devtool-module-filename-template Filename template string of function for the sources array in a generated SourceMap. - --output-devtool-namespace Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to \`output.library\` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries. - --output-enabled-chunk-loading-types The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --output-enabled-chunk-loading-types-reset Clear all items provided in configuration. List of chunk loading types enabled for use by entry points. - --output-enabled-library-types Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). - --output-enabled-library-types-reset Clear all items provided in configuration. List of library types enabled for use by entry points. - --output-enabled-wasm-loading-types The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --output-enabled-wasm-loading-types-reset Clear all items provided in configuration. List of wasm loading types enabled for use by entry points. - --output-environment-arrow-function The environment supports arrow functions ('() => { ... }'). - --no-output-environment-arrow-function Negative 'output-environment-arrow-function' option. - --output-environment-big-int-literal The environment supports BigInt as literal (123n). - --no-output-environment-big-int-literal Negative 'output-environment-big-int-literal' option. - --output-environment-const The environment supports const and let for variable declarations. - --no-output-environment-const Negative 'output-environment-const' option. - --output-environment-destructuring The environment supports destructuring ('{ a, b } = obj'). - --no-output-environment-destructuring Negative 'output-environment-destructuring' option. - --output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules. - --no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option. - --output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }'). - --no-output-environment-for-of Negative 'output-environment-for-of' option. - --output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...'). - --no-output-environment-module Negative 'output-environment-module' option. - --output-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --output-global-object An expression which is used to address the global object/scope in runtime code. - --output-hash-digest Digest type used for the hash. - --output-hash-digest-length Number of chars which are used for the hash. - --output-hash-function Algorithm used for generation the hash (see node.js crypto package). - --output-hash-salt Any string which is added to the hash to salt it. - --output-hot-update-chunk-filename The filename of the Hot Update Chunks. They are inside the output.path directory. - --output-hot-update-global The global variable used by webpack for loading of hot update chunks. - --output-hot-update-main-filename The filename of the Hot Update Main File. It is inside the 'output.path' directory. - --output-iife Wrap javascript code into IIFE's to avoid leaking into global scope. - --no-output-iife Negative 'output-iife' option. - --output-import-function-name The name of the native import() function (can be exchanged for a polyfill). - --output-import-meta-name The name of the native import.meta object (can be exchanged for a polyfill). - --output-library A part of the library name. - --output-library-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). - --output-library-amd Name of the exposed AMD library in the UMD. - --output-library-commonjs Name of the exposed commonjs export in the UMD. - --output-library-root Part of the name of the property exposed globally by a UMD library. - --output-library-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. - --output-library-auxiliary-comment Append the same comment above each import style. - --output-library-auxiliary-comment-amd Set comment for \`amd\` section in UMD. - --output-library-auxiliary-comment-commonjs Set comment for \`commonjs\` (exports) section in UMD. - --output-library-auxiliary-comment-commonjs2 Set comment for \`commonjs2\` (module.exports) section in UMD. - --output-library-auxiliary-comment-root Set comment for \`root\` (global variable) section in UMD. - --output-library-export Part of the export that should be exposed as library. - --output-library-export-reset Clear all items provided in configuration. Specify which export should be exposed as library. - --output-library-name A part of the library name. - --output-library-name-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). - --output-library-name-amd Name of the exposed AMD library in the UMD. - --output-library-name-commonjs Name of the exposed commonjs export in the UMD. - --output-library-name-root Part of the name of the property exposed globally by a UMD library. - --output-library-name-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. - --output-library-type Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). - --output-library-umd-named-define If \`output.libraryTarget\` is set to umd and \`output.library\` is set, setting this to true will name the AMD module. - --no-output-library-umd-named-define Negative 'output-library-umd-named-define' option. - --output-module Output javascript files as module source type. - --no-output-module Negative 'output-module' option. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --output-pathinfo [value] Include comments with information about the modules. - --no-output-pathinfo Negative 'output-pathinfo' option. - --output-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --output-script-type This option enables loading async chunks via a custom script type, such as script type=\\"module\\". - --no-output-script-type Negative 'output-script-type' option. - --output-source-map-filename The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory. - --output-source-prefix Prefixes every line of the source in the bundle with this string. - --output-strict-module-error-handling Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec. - --no-output-strict-module-error-handling Negative 'output-strict-module-error-handling' option. - --output-strict-module-exception-handling Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way. - --no-output-strict-module-exception-handling Negative 'output-strict-module-exception-handling' option. - --output-unique-name A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. - --output-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --no-output-wasm-loading Negative 'output-wasm-loading' option. - --output-webassembly-module-filename The filename of WebAssembly modules as relative path inside the 'output.path' directory. - --output-worker-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --no-output-worker-chunk-loading Negative 'output-worker-chunk-loading' option. - --output-worker-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --no-output-worker-wasm-loading Negative 'output-worker-wasm-loading' option. - --parallelism The number of parallel processed modules in the compilation. - --no-performance Negative 'performance' option. - --performance-hints Sets the format of the hints: warnings, errors or nothing at all. - --no-performance-hints Negative 'performance-hints' option. - --performance-max-asset-size File size limit (in bytes) when exceeded, that webpack will provide performance hints. - --performance-max-entrypoint-size Total size of an entry point (in bytes). - --profile Capture timing information for each module. - --no-profile Negative 'profile' option. - --records-input-path Store compiler state to a json file. - --no-records-input-path Negative 'records-input-path' option. - --records-output-path Load compiler state from a json file. - --no-records-output-path Negative 'records-output-path' option. - --records-path Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. \`recordsPath\` is used for \`recordsInputPath\` and \`recordsOutputPath\` if they left undefined. - --no-records-path Negative 'records-path' option. - --resolve-alias-alias Ignore request (replace with empty module). New request. - --no-resolve-alias-alias Negative 'resolve-alias-alias' option. - --resolve-alias-name Request to be redirected. - --resolve-alias-only-module Redirect only exact matching request. - --no-resolve-alias-only-module Negative 'resolve-alias-only-module' option. - --resolve-alias-reset Clear all items provided in configuration. Redirect module requests. - --resolve-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-cache Enable caching of successfully resolved requests (cache entries are revalidated). - --no-resolve-cache Negative 'resolve-cache' option. - --resolve-cache-with-context Include the context information in the cache identifier when caching. - --no-resolve-cache-with-context Negative 'resolve-cache-with-context' option. - --resolve-condition-names Condition names for exports field entry point. - --resolve-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. - --resolve-description-files Filename used to find a description file (like a package.json). - --resolve-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). - --resolve-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). - --no-resolve-enforce-extension Negative 'resolve-enforce-extension' option. - --resolve-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. - --resolve-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. - --resolve-extensions Extension added to the request when trying to find the file. - --resolve-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. - --resolve-fallback-alias Ignore request (replace with empty module). New request. - --no-resolve-fallback-alias Negative 'resolve-fallback-alias' option. - --resolve-fallback-name Request to be redirected. - --resolve-fallback-only-module Redirect only exact matching request. - --no-resolve-fallback-only-module Negative 'resolve-fallback-only-module' option. - --resolve-fallback-reset Clear all items provided in configuration. Redirect module requests. - --resolve-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). - --no-resolve-fully-specified Negative 'resolve-fully-specified' option. - --resolve-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-main-fields Field name from the description file (package.json) which are used to find the default entry point. - --resolve-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. - --resolve-main-files Filename used to find the default entry point if there is no description file or main field. - --resolve-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. - --resolve-modules Folder name or directory path where to find modules. - --resolve-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. - --resolve-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. - --no-resolve-prefer-absolute Negative 'resolve-prefer-absolute' option. - --resolve-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. - --no-resolve-prefer-relative Negative 'resolve-prefer-relative' option. - --resolve-restrictions Resolve restriction. Resolve result must fulfill this restriction. - --resolve-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. - --resolve-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-symlinks Enable resolving symlinks to the original location. - --no-resolve-symlinks Negative 'resolve-symlinks' option. - --resolve-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). - --no-resolve-unsafe-cache Negative 'resolve-unsafe-cache' option. - --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. - --no-resolve-use-sync-file-system-calls Negative 'resolve-use-sync-file-system-calls' option. - --resolve-loader-alias-alias Ignore request (replace with empty module). New request. - --no-resolve-loader-alias-alias Negative 'resolve-loader-alias-alias' option. - --resolve-loader-alias-name Request to be redirected. - --resolve-loader-alias-only-module Redirect only exact matching request. - --no-resolve-loader-alias-only-module Negative 'resolve-loader-alias-only-module' option. - --resolve-loader-alias-reset Clear all items provided in configuration. Redirect module requests. - --resolve-loader-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-loader-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-loader-cache Enable caching of successfully resolved requests (cache entries are revalidated). - --no-resolve-loader-cache Negative 'resolve-loader-cache' option. - --resolve-loader-cache-with-context Include the context information in the cache identifier when caching. - --no-resolve-loader-cache-with-context Negative 'resolve-loader-cache-with-context' option. - --resolve-loader-condition-names Condition names for exports field entry point. - --resolve-loader-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. - --resolve-loader-description-files Filename used to find a description file (like a package.json). - --resolve-loader-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). - --resolve-loader-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). - --no-resolve-loader-enforce-extension Negative 'resolve-loader-enforce-extension' option. - --resolve-loader-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. - --resolve-loader-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. - --resolve-loader-extensions Extension added to the request when trying to find the file. - --resolve-loader-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. - --resolve-loader-fallback-alias Ignore request (replace with empty module). New request. - --no-resolve-loader-fallback-alias Negative 'resolve-loader-fallback-alias' option. - --resolve-loader-fallback-name Request to be redirected. - --resolve-loader-fallback-only-module Redirect only exact matching request. - --no-resolve-loader-fallback-only-module Negative 'resolve-loader-fallback-only-module' option. - --resolve-loader-fallback-reset Clear all items provided in configuration. Redirect module requests. - --resolve-loader-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). - --no-resolve-loader-fully-specified Negative 'resolve-loader-fully-specified' option. - --resolve-loader-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-loader-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-loader-main-fields Field name from the description file (package.json) which are used to find the default entry point. - --resolve-loader-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. - --resolve-loader-main-files Filename used to find the default entry point if there is no description file or main field. - --resolve-loader-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. - --resolve-loader-modules Folder name or directory path where to find modules. - --resolve-loader-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. - --resolve-loader-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. - --no-resolve-loader-prefer-absolute Negative 'resolve-loader-prefer-absolute' option. - --resolve-loader-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. - --no-resolve-loader-prefer-relative Negative 'resolve-loader-prefer-relative' option. - --resolve-loader-restrictions Resolve restriction. Resolve result must fulfill this restriction. - --resolve-loader-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. - --resolve-loader-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-loader-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-loader-symlinks Enable resolving symlinks to the original location. - --no-resolve-loader-symlinks Negative 'resolve-loader-symlinks' option. - --resolve-loader-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). - --no-resolve-loader-unsafe-cache Negative 'resolve-loader-unsafe-cache' option. - --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. - --no-resolve-loader-use-sync-file-system-calls Negative 'resolve-loader-use-sync-file-system-calls' option. - --snapshot-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-build-dependencies-hash Negative 'snapshot-build-dependencies-hash' option. - --snapshot-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-build-dependencies-timestamp Negative 'snapshot-build-dependencies-timestamp' option. - --snapshot-immutable-paths A path to a immutable directory (usually a package manager cache directory). - --snapshot-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. - --snapshot-managed-paths A path to a managed directory (usually a node_modules directory). - --snapshot-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. - --snapshot-module-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-module-hash Negative 'snapshot-module-hash' option. - --snapshot-module-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-module-timestamp Negative 'snapshot-module-timestamp' option. - --snapshot-resolve-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-resolve-hash Negative 'snapshot-resolve-hash' option. - --snapshot-resolve-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-resolve-timestamp Negative 'snapshot-resolve-timestamp' option. - --snapshot-resolve-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-resolve-build-dependencies-hash Negative 'snapshot-resolve-build-dependencies-hash' option. - --snapshot-resolve-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-resolve-build-dependencies-timestamp Negative 'snapshot-resolve-build-dependencies-timestamp' option. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - --stats-all Fallback value for stats options when an option is not defined (has precedence over local webpack defaults). - --no-stats-all Negative 'stats-all' option. - --stats-assets Add assets information. - --no-stats-assets Negative 'stats-assets' option. - --stats-assets-sort Sort the assets by that field. - --stats-assets-space Space to display assets (groups will be collapsed to fit this space). - --stats-built-at Add built at time information. - --no-stats-built-at Negative 'stats-built-at' option. - --stats-cached Add information about cached (not built) modules (deprecated: use 'cachedModules' instead). - --no-stats-cached Negative 'stats-cached' option. - --stats-cached-assets Show cached assets (setting this to \`false\` only shows emitted files). - --no-stats-cached-assets Negative 'stats-cached-assets' option. - --stats-cached-modules Add information about cached (not built) modules. - --no-stats-cached-modules Negative 'stats-cached-modules' option. - --stats-children Add children information. - --no-stats-children Negative 'stats-children' option. - --stats-chunk-group-auxiliary Display auxiliary assets in chunk groups. - --no-stats-chunk-group-auxiliary Negative 'stats-chunk-group-auxiliary' option. - --stats-chunk-group-children Display children of chunk groups. - --no-stats-chunk-group-children Negative 'stats-chunk-group-children' option. - --stats-chunk-group-max-assets Limit of assets displayed in chunk groups. - --stats-chunk-groups Display all chunk groups with the corresponding bundles. - --no-stats-chunk-groups Negative 'stats-chunk-groups' option. - --stats-chunk-modules Add built modules information to chunk information. - --no-stats-chunk-modules Negative 'stats-chunk-modules' option. - --stats-chunk-modules-space Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group). - --stats-chunk-origins Add the origins of chunks and chunk merging info. - --no-stats-chunk-origins Negative 'stats-chunk-origins' option. - --stats-chunk-relations Add information about parent, children and sibling chunks to chunk information. - --no-stats-chunk-relations Negative 'stats-chunk-relations' option. - --stats-chunks Add chunk information. - --no-stats-chunks Negative 'stats-chunks' option. - --stats-chunks-sort Sort the chunks by that field. - --stats-colors Enables/Disables colorful output. - --no-stats-colors Negative 'stats-colors' option. - --stats-colors-bold Custom color for bold text. - --stats-colors-cyan Custom color for cyan text. - --stats-colors-green Custom color for green text. - --stats-colors-magenta Custom color for magenta text. - --stats-colors-red Custom color for red text. - --stats-colors-yellow Custom color for yellow text. - --stats-context Context directory for request shortening. - --stats-dependent-modules Show chunk modules that are dependencies of other modules of the chunk. - --no-stats-dependent-modules Negative 'stats-dependent-modules' option. - --stats-depth Add module depth in module graph. - --no-stats-depth Negative 'stats-depth' option. - --stats-entrypoints [value] Display the entry points with the corresponding bundles. - --no-stats-entrypoints Negative 'stats-entrypoints' option. - --stats-env Add --env information. - --no-stats-env Negative 'stats-env' option. - --stats-error-details [value] Add details to errors (like resolving log). - --no-stats-error-details Negative 'stats-error-details' option. - --stats-error-stack Add internal stack trace to errors. - --no-stats-error-stack Negative 'stats-error-stack' option. - --stats-errors Add errors. - --no-stats-errors Negative 'stats-errors' option. - --stats-errors-count Add errors count. - --no-stats-errors-count Negative 'stats-errors-count' option. - --stats-exclude-assets Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. - --stats-exclude-assets-reset Clear all items provided in configuration. Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. - --stats-exclude-modules [value...] Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. - --no-stats-exclude-modules Negative 'stats-exclude-modules' option. - --stats-exclude-modules-reset Clear all items provided in configuration. Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. - --stats-group-assets-by-chunk Group assets by how their are related to chunks. - --no-stats-group-assets-by-chunk Negative 'stats-group-assets-by-chunk' option. - --stats-group-assets-by-emit-status Group assets by their status (emitted, compared for emit or cached). - --no-stats-group-assets-by-emit-status Negative 'stats-group-assets-by-emit-status' option. - --stats-group-assets-by-extension Group assets by their extension. - --no-stats-group-assets-by-extension Negative 'stats-group-assets-by-extension' option. - --stats-group-assets-by-info Group assets by their asset info (immutable, development, hotModuleReplacement, etc). - --no-stats-group-assets-by-info Negative 'stats-group-assets-by-info' option. - --stats-group-assets-by-path Group assets by their path. - --no-stats-group-assets-by-path Negative 'stats-group-assets-by-path' option. - --stats-group-modules-by-attributes Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). - --no-stats-group-modules-by-attributes Negative 'stats-group-modules-by-attributes' option. - --stats-group-modules-by-cache-status Group modules by their status (cached or built and cacheable). - --no-stats-group-modules-by-cache-status Negative 'stats-group-modules-by-cache-status' option. - --stats-group-modules-by-extension Group modules by their extension. - --no-stats-group-modules-by-extension Negative 'stats-group-modules-by-extension' option. - --stats-group-modules-by-layer Group modules by their layer. - --no-stats-group-modules-by-layer Negative 'stats-group-modules-by-layer' option. - --stats-group-modules-by-path Group modules by their path. - --no-stats-group-modules-by-path Negative 'stats-group-modules-by-path' option. - --stats-hash Add the hash of the compilation. - --no-stats-hash Negative 'stats-hash' option. - --stats-ids Add ids. - --no-stats-ids Negative 'stats-ids' option. - --stats-logging [value] Specify log level of logging output. Enable/disable logging output (\`true\`: shows normal logging output, loglevel: log). - --no-stats-logging Negative 'stats-logging' option. - --stats-logging-debug [value...] Enable/Disable debug logging for all loggers. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. - --no-stats-logging-debug Negative 'stats-logging-debug' option. - --stats-logging-debug-reset Clear all items provided in configuration. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. - --stats-logging-trace Add stack traces to logging output. - --no-stats-logging-trace Negative 'stats-logging-trace' option. - --stats-module-assets Add information about assets inside modules. - --no-stats-module-assets Negative 'stats-module-assets' option. - --stats-module-trace Add dependencies and origin of warnings/errors. - --no-stats-module-trace Negative 'stats-module-trace' option. - --stats-modules Add built modules information. - --no-stats-modules Negative 'stats-modules' option. - --stats-modules-sort Sort the modules by that field. - --stats-modules-space Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups). - --stats-nested-modules Add information about modules nested in other modules (like with module concatenation). - --no-stats-nested-modules Negative 'stats-nested-modules' option. - --stats-nested-modules-space Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group). - --stats-optimization-bailout Show reasons why optimization bailed out for modules. - --no-stats-optimization-bailout Negative 'stats-optimization-bailout' option. - --stats-orphan-modules Add information about orphan modules. - --no-stats-orphan-modules Negative 'stats-orphan-modules' option. - --stats-output-path Add output path information. - --no-stats-output-path Negative 'stats-output-path' option. - --stats-performance Add performance hint flags. - --no-stats-performance Negative 'stats-performance' option. - --stats-preset [value] Preset for the default values. - --no-stats-preset Negative 'stats-preset' option. - --stats-provided-exports Show exports provided by modules. - --no-stats-provided-exports Negative 'stats-provided-exports' option. - --stats-public-path Add public path information. - --no-stats-public-path Negative 'stats-public-path' option. - --stats-reasons Add information about the reasons why modules are included. - --no-stats-reasons Negative 'stats-reasons' option. - --stats-related-assets Add information about assets that are related to other assets (like SourceMaps for assets). - --no-stats-related-assets Negative 'stats-related-assets' option. - --stats-runtime Add information about runtime modules (deprecated: use 'runtimeModules' instead). - --no-stats-runtime Negative 'stats-runtime' option. - --stats-runtime-modules Add information about runtime modules. - --no-stats-runtime-modules Negative 'stats-runtime-modules' option. - --stats-source Add the source code of modules. - --no-stats-source Negative 'stats-source' option. - --stats-timings Add timing information. - --no-stats-timings Negative 'stats-timings' option. - --stats-used-exports Show exports used by modules. - --no-stats-used-exports Negative 'stats-used-exports' option. - --stats-version Add webpack version information. - --no-stats-version Negative 'stats-version' option. - --stats-warnings Add warnings. - --no-stats-warnings Negative 'stats-warnings' option. - --stats-warnings-count Add warnings count. - --no-stats-warnings-count Negative 'stats-warnings-count' option. - --stats-warnings-filter Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. - --stats-warnings-filter-reset Clear all items provided in configuration. Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - --target-reset Clear all items provided in configuration. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-aggregate-timeout Delay the rebuilt after the first change. Value is a time in ms. - --watch-options-follow-symlinks Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks'). - --no-watch-options-follow-symlinks Negative 'watch-options-follow-symlinks' option. - --watch-options-ignored A glob pattern for files that should be ignored from watching. Ignore some files from watching (glob pattern or regexp). - --watch-options-ignored-reset Clear all items provided in configuration. Ignore some files from watching (glob pattern or regexp). - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "--help" option with the "verbose" value 1`] = ` -"Usage: webpack [entries...] [options] -Alternative usage to run commands: webpack [command] [options] - -The build tool for modern web applications. - -Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - -h, --hot [value] Enables Hot Module Replacement - --no-hot Disables Hot Module Replacement. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - --prefetch Prefetch this request. - -j, --json [value] Prints result as JSON or store it in a file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-type In memory caching. Filesystem caching. - --cache-cache-directory Base directory for the cache (defaults to node_modules/.cache/webpack). - --cache-cache-location Locations for the cache (defaults to cacheDirectory / name). - --cache-hash-algorithm Algorithm used for generation the hash (see node.js crypto package). - --cache-idle-timeout Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle'). - --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle'). - --cache-immutable-paths A path to a immutable directory (usually a package manager cache directory). - --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. - --cache-managed-paths A path to a managed directory (usually a node_modules directory). - --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. - --cache-name Name for the cache. Different names will lead to different coexisting caches. - --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). - --cache-version Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. - --context The base directory (absolute path!) for resolving the \`entry\` option. If \`output.pathinfo\` is set, the included pathinfo is shortened to this directory. - --dependencies References to another configuration to depend on. - --dependencies-reset Clear all items provided in configuration. References to other configurations to depend on. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --entry-reset Clear all items provided in configuration. All modules are loaded upon startup. The last one is exported. - --experiments-asset Allow module type 'asset' to generate assets. - --no-experiments-asset Negative 'experiments-asset' option. - --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. - --no-experiments-async-web-assembly Negative 'experiments-async-web-assembly' option. - --experiments-layers Enable module and chunk layers. - --no-experiments-layers Negative 'experiments-layers' option. - --experiments-lazy-compilation Compile entrypoints and import()s only when they are accessed. - --no-experiments-lazy-compilation Negative 'experiments-lazy-compilation' option. - --experiments-lazy-compilation-client A custom client. - --experiments-lazy-compilation-entries Enable/disable lazy compilation for entries. - --no-experiments-lazy-compilation-entries Negative 'experiments-lazy-compilation-entries' option. - --experiments-lazy-compilation-imports Enable/disable lazy compilation for import() modules. - --no-experiments-lazy-compilation-imports Negative 'experiments-lazy-compilation-imports' option. - --experiments-lazy-compilation-test Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name. - --experiments-output-module Allow output javascript files as module source type. - --no-experiments-output-module Negative 'experiments-output-module' option. - --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). - --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. - --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. - --no-experiments-top-level-await Negative 'experiments-top-level-await' option. - --externals Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency. - --externals-reset Clear all items provided in configuration. Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on \`output.libraryTarget\`. - --externals-presets-electron Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron Negative 'externals-presets-electron' option. - --externals-presets-electron-main Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-main Negative 'externals-presets-electron-main' option. - --externals-presets-electron-preload Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-preload Negative 'externals-presets-electron-preload' option. - --externals-presets-electron-renderer Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used. - --no-externals-presets-electron-renderer Negative 'externals-presets-electron-renderer' option. - --externals-presets-node Treat node.js built-in modules like fs, path or vm as external and load them via require() when used. - --no-externals-presets-node Negative 'externals-presets-node' option. - --externals-presets-nwjs Treat NW.js legacy nw.gui module as external and load it via require() when used. - --no-externals-presets-nwjs Negative 'externals-presets-nwjs' option. - --externals-presets-web Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk). - --no-externals-presets-web Negative 'externals-presets-web' option. - --externals-presets-web-async Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution). - --no-externals-presets-web-async Negative 'externals-presets-web-async' option. - --externals-type Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value). - --ignore-warnings A RegExp to select the warning message. - --ignore-warnings-file A RegExp to select the origin file for the warning. - --ignore-warnings-message A RegExp to select the warning message. - --ignore-warnings-module A RegExp to select the origin module for the warning. - --ignore-warnings-reset Clear all items provided in configuration. Ignore specific warnings. - --infrastructure-logging-debug [value...] Enable/Disable debug logging for all loggers. Enable debug logging for specific loggers. - --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. - --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific loggers. - --infrastructure-logging-level Log level. - --mode Defines the mode to pass to webpack. - --module-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-expr-context-critical Negative 'module-expr-context-critical' option. - --module-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'. - --no-module-expr-context-recursive Negative 'module-expr-context-recursive' option. - --module-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'. - --no-module-expr-context-reg-exp Negative 'module-expr-context-reg-exp' option. - --module-expr-context-request Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'. - --module-generator-asset-data-url-encoding Asset encoding (defaults to base64). - --no-module-generator-asset-data-url-encoding Negative 'module-generator-asset-data-url-encoding' option. - --module-generator-asset-data-url-mimetype Asset mimetype (getting from file extension by default). - --module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. - --no-module-generator-asset-emit Negative 'module-generator-asset-emit' option. - --module-generator-asset-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --module-generator-asset-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --module-generator-asset-inline-data-url-encoding Asset encoding (defaults to base64). - --no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option. - --module-generator-asset-inline-data-url-mimetype Asset mimetype (getting from file extension by default). - --module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR. - --no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option. - --module-generator-asset-resource-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --module-generator-asset-resource-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --module-no-parse A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed. - --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's matched against the full resolved request. - --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. - --no-module-parser-javascript-amd Negative 'module-parser-javascript-amd' option. - --module-parser-javascript-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-browserify Negative 'module-parser-javascript-browserify' option. - --module-parser-javascript-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-commonjs Negative 'module-parser-javascript-commonjs' option. - --module-parser-javascript-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option. - --module-parser-javascript-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-expr-context-critical Negative 'module-parser-javascript-expr-context-critical' option. - --module-parser-javascript-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-expr-context-recursive Negative 'module-parser-javascript-expr-context-recursive' option. - --module-parser-javascript-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-expr-context-reg-exp Negative 'module-parser-javascript-expr-context-reg-exp' option. - --module-parser-javascript-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-harmony Negative 'module-parser-javascript-harmony' option. - --module-parser-javascript-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-import Negative 'module-parser-javascript-import' option. - --no-module-parser-javascript-node Negative 'module-parser-javascript-node' option. - --module-parser-javascript-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-node-dirname Negative 'module-parser-javascript-node-dirname' option. - --module-parser-javascript-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-node-filename Negative 'module-parser-javascript-node-filename' option. - --module-parser-javascript-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-node-global Negative 'module-parser-javascript-node-global' option. - --module-parser-javascript-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-require-context Negative 'module-parser-javascript-require-context' option. - --module-parser-javascript-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-require-ensure Negative 'module-parser-javascript-require-ensure' option. - --module-parser-javascript-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-require-include Negative 'module-parser-javascript-require-include' option. - --module-parser-javascript-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-require-js Negative 'module-parser-javascript-require-js' option. - --module-parser-javascript-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-strict-export-presence Negative 'module-parser-javascript-strict-export-presence' option. - --module-parser-javascript-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-strict-this-context-on-imports Negative 'module-parser-javascript-strict-this-context-on-imports' option. - --module-parser-javascript-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-system Negative 'module-parser-javascript-system' option. - --module-parser-javascript-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-critical Negative 'module-parser-javascript-unknown-context-critical' option. - --module-parser-javascript-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-recursive Negative 'module-parser-javascript-unknown-context-recursive' option. - --module-parser-javascript-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-unknown-context-reg-exp Negative 'module-parser-javascript-unknown-context-reg-exp' option. - --module-parser-javascript-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-url Negative 'module-parser-javascript-url' option. - --module-parser-javascript-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-worker Negative 'module-parser-javascript-worker' option. - --module-parser-javascript-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-wrapped-context-critical Negative 'module-parser-javascript-wrapped-context-critical' option. - --module-parser-javascript-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-wrapped-context-recursive Negative 'module-parser-javascript-wrapped-context-recursive' option. - --module-parser-javascript-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-auto-amd Negative 'module-parser-javascript-auto-amd' option. - --module-parser-javascript-auto-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-auto-browserify Negative 'module-parser-javascript-auto-browserify' option. - --module-parser-javascript-auto-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-auto-commonjs Negative 'module-parser-javascript-auto-commonjs' option. - --module-parser-javascript-auto-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option. - --module-parser-javascript-auto-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-critical Negative 'module-parser-javascript-auto-expr-context-critical' option. - --module-parser-javascript-auto-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-recursive Negative 'module-parser-javascript-auto-expr-context-recursive' option. - --module-parser-javascript-auto-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-auto-expr-context-reg-exp Negative 'module-parser-javascript-auto-expr-context-reg-exp' option. - --module-parser-javascript-auto-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-auto-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-auto-harmony Negative 'module-parser-javascript-auto-harmony' option. - --module-parser-javascript-auto-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-auto-import Negative 'module-parser-javascript-auto-import' option. - --no-module-parser-javascript-auto-node Negative 'module-parser-javascript-auto-node' option. - --module-parser-javascript-auto-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-auto-node-dirname Negative 'module-parser-javascript-auto-node-dirname' option. - --module-parser-javascript-auto-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-auto-node-filename Negative 'module-parser-javascript-auto-node-filename' option. - --module-parser-javascript-auto-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-auto-node-global Negative 'module-parser-javascript-auto-node-global' option. - --module-parser-javascript-auto-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-auto-require-context Negative 'module-parser-javascript-auto-require-context' option. - --module-parser-javascript-auto-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-auto-require-ensure Negative 'module-parser-javascript-auto-require-ensure' option. - --module-parser-javascript-auto-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-auto-require-include Negative 'module-parser-javascript-auto-require-include' option. - --module-parser-javascript-auto-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-auto-require-js Negative 'module-parser-javascript-auto-require-js' option. - --module-parser-javascript-auto-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-auto-strict-export-presence Negative 'module-parser-javascript-auto-strict-export-presence' option. - --module-parser-javascript-auto-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-auto-strict-this-context-on-imports Negative 'module-parser-javascript-auto-strict-this-context-on-imports' option. - --module-parser-javascript-auto-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-auto-system Negative 'module-parser-javascript-auto-system' option. - --module-parser-javascript-auto-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-critical Negative 'module-parser-javascript-auto-unknown-context-critical' option. - --module-parser-javascript-auto-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-recursive Negative 'module-parser-javascript-auto-unknown-context-recursive' option. - --module-parser-javascript-auto-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-auto-unknown-context-reg-exp Negative 'module-parser-javascript-auto-unknown-context-reg-exp' option. - --module-parser-javascript-auto-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-auto-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-auto-url Negative 'module-parser-javascript-auto-url' option. - --module-parser-javascript-auto-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-auto-worker Negative 'module-parser-javascript-auto-worker' option. - --module-parser-javascript-auto-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-auto-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-auto-wrapped-context-critical Negative 'module-parser-javascript-auto-wrapped-context-critical' option. - --module-parser-javascript-auto-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-auto-wrapped-context-recursive Negative 'module-parser-javascript-auto-wrapped-context-recursive' option. - --module-parser-javascript-auto-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-amd Negative 'module-parser-javascript-dynamic-amd' option. - --module-parser-javascript-dynamic-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-dynamic-browserify Negative 'module-parser-javascript-dynamic-browserify' option. - --module-parser-javascript-dynamic-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-dynamic-commonjs Negative 'module-parser-javascript-dynamic-commonjs' option. - --module-parser-javascript-dynamic-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option. - --module-parser-javascript-dynamic-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-critical Negative 'module-parser-javascript-dynamic-expr-context-critical' option. - --module-parser-javascript-dynamic-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-recursive Negative 'module-parser-javascript-dynamic-expr-context-recursive' option. - --module-parser-javascript-dynamic-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-dynamic-expr-context-reg-exp Negative 'module-parser-javascript-dynamic-expr-context-reg-exp' option. - --module-parser-javascript-dynamic-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-dynamic-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-dynamic-harmony Negative 'module-parser-javascript-dynamic-harmony' option. - --module-parser-javascript-dynamic-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-dynamic-import Negative 'module-parser-javascript-dynamic-import' option. - --no-module-parser-javascript-dynamic-node Negative 'module-parser-javascript-dynamic-node' option. - --module-parser-javascript-dynamic-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-dynamic-node-dirname Negative 'module-parser-javascript-dynamic-node-dirname' option. - --module-parser-javascript-dynamic-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-dynamic-node-filename Negative 'module-parser-javascript-dynamic-node-filename' option. - --module-parser-javascript-dynamic-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-dynamic-node-global Negative 'module-parser-javascript-dynamic-node-global' option. - --module-parser-javascript-dynamic-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-dynamic-require-context Negative 'module-parser-javascript-dynamic-require-context' option. - --module-parser-javascript-dynamic-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-dynamic-require-ensure Negative 'module-parser-javascript-dynamic-require-ensure' option. - --module-parser-javascript-dynamic-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-dynamic-require-include Negative 'module-parser-javascript-dynamic-require-include' option. - --module-parser-javascript-dynamic-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-dynamic-require-js Negative 'module-parser-javascript-dynamic-require-js' option. - --module-parser-javascript-dynamic-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-dynamic-strict-export-presence Negative 'module-parser-javascript-dynamic-strict-export-presence' option. - --module-parser-javascript-dynamic-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-dynamic-strict-this-context-on-imports Negative 'module-parser-javascript-dynamic-strict-this-context-on-imports' option. - --module-parser-javascript-dynamic-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-dynamic-system Negative 'module-parser-javascript-dynamic-system' option. - --module-parser-javascript-dynamic-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-critical Negative 'module-parser-javascript-dynamic-unknown-context-critical' option. - --module-parser-javascript-dynamic-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-recursive Negative 'module-parser-javascript-dynamic-unknown-context-recursive' option. - --module-parser-javascript-dynamic-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-dynamic-unknown-context-reg-exp Negative 'module-parser-javascript-dynamic-unknown-context-reg-exp' option. - --module-parser-javascript-dynamic-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-dynamic-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-dynamic-url Negative 'module-parser-javascript-dynamic-url' option. - --module-parser-javascript-dynamic-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-dynamic-worker Negative 'module-parser-javascript-dynamic-worker' option. - --module-parser-javascript-dynamic-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-dynamic-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-wrapped-context-critical Negative 'module-parser-javascript-dynamic-wrapped-context-critical' option. - --module-parser-javascript-dynamic-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-dynamic-wrapped-context-recursive Negative 'module-parser-javascript-dynamic-wrapped-context-recursive' option. - --module-parser-javascript-dynamic-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --no-module-parser-javascript-esm-amd Negative 'module-parser-javascript-esm-amd' option. - --module-parser-javascript-esm-browserify Enable/disable special handling for browserify bundles. - --no-module-parser-javascript-esm-browserify Negative 'module-parser-javascript-esm-browserify' option. - --module-parser-javascript-esm-commonjs Enable/disable parsing of CommonJs syntax. - --no-module-parser-javascript-esm-commonjs Negative 'module-parser-javascript-esm-commonjs' option. - --module-parser-javascript-esm-commonjs-magic-comments Enable/disable parsing of magic comments in CommonJs syntax. - --no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option. - --module-parser-javascript-esm-expr-context-critical Enable warnings for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-critical Negative 'module-parser-javascript-esm-expr-context-critical' option. - --module-parser-javascript-esm-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-recursive Negative 'module-parser-javascript-esm-expr-context-recursive' option. - --module-parser-javascript-esm-expr-context-reg-exp [value] Sets the default regular expression for full dynamic dependencies. - --no-module-parser-javascript-esm-expr-context-reg-exp Negative 'module-parser-javascript-esm-expr-context-reg-exp' option. - --module-parser-javascript-esm-expr-context-request Set the default request for full dynamic dependencies. - --module-parser-javascript-esm-harmony Enable/disable parsing of EcmaScript Modules syntax. - --no-module-parser-javascript-esm-harmony Negative 'module-parser-javascript-esm-harmony' option. - --module-parser-javascript-esm-import Enable/disable parsing of import() syntax. - --no-module-parser-javascript-esm-import Negative 'module-parser-javascript-esm-import' option. - --no-module-parser-javascript-esm-node Negative 'module-parser-javascript-esm-node' option. - --module-parser-javascript-esm-node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-module-parser-javascript-esm-node-dirname Negative 'module-parser-javascript-esm-node-dirname' option. - --module-parser-javascript-esm-node-filename [value] Include a polyfill for the '__filename' variable. - --no-module-parser-javascript-esm-node-filename Negative 'module-parser-javascript-esm-node-filename' option. - --module-parser-javascript-esm-node-global Include a polyfill for the 'global' variable. - --no-module-parser-javascript-esm-node-global Negative 'module-parser-javascript-esm-node-global' option. - --module-parser-javascript-esm-require-context Enable/disable parsing of require.context syntax. - --no-module-parser-javascript-esm-require-context Negative 'module-parser-javascript-esm-require-context' option. - --module-parser-javascript-esm-require-ensure Enable/disable parsing of require.ensure syntax. - --no-module-parser-javascript-esm-require-ensure Negative 'module-parser-javascript-esm-require-ensure' option. - --module-parser-javascript-esm-require-include Enable/disable parsing of require.include syntax. - --no-module-parser-javascript-esm-require-include Negative 'module-parser-javascript-esm-require-include' option. - --module-parser-javascript-esm-require-js Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError. - --no-module-parser-javascript-esm-require-js Negative 'module-parser-javascript-esm-require-js' option. - --module-parser-javascript-esm-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. - --no-module-parser-javascript-esm-strict-export-presence Negative 'module-parser-javascript-esm-strict-export-presence' option. - --module-parser-javascript-esm-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. - --no-module-parser-javascript-esm-strict-this-context-on-imports Negative 'module-parser-javascript-esm-strict-this-context-on-imports' option. - --module-parser-javascript-esm-system Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register. - --no-module-parser-javascript-esm-system Negative 'module-parser-javascript-esm-system' option. - --module-parser-javascript-esm-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-critical Negative 'module-parser-javascript-esm-unknown-context-critical' option. - --module-parser-javascript-esm-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-recursive Negative 'module-parser-javascript-esm-unknown-context-recursive' option. - --module-parser-javascript-esm-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. - --no-module-parser-javascript-esm-unknown-context-reg-exp Negative 'module-parser-javascript-esm-unknown-context-reg-exp' option. - --module-parser-javascript-esm-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. - --module-parser-javascript-esm-url [value] Enable/disable parsing of new URL() syntax. - --no-module-parser-javascript-esm-url Negative 'module-parser-javascript-esm-url' option. - --module-parser-javascript-esm-worker [value...] Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\"xyz\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --no-module-parser-javascript-esm-worker Negative 'module-parser-javascript-esm-worker' option. - --module-parser-javascript-esm-worker-reset Clear all items provided in configuration. Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register(). - --module-parser-javascript-esm-wrapped-context-critical Enable warnings for partial dynamic dependencies. - --no-module-parser-javascript-esm-wrapped-context-critical Negative 'module-parser-javascript-esm-wrapped-context-critical' option. - --module-parser-javascript-esm-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. - --no-module-parser-javascript-esm-wrapped-context-recursive Negative 'module-parser-javascript-esm-wrapped-context-recursive' option. - --module-parser-javascript-esm-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. - --module-rules-compiler Match the child compiler name. - --module-rules-dependency Match dependency type. - --module-rules-enforce Enforce this rule as pre or post step. - --module-rules-exclude Shortcut for resource.exclude. - --module-rules-include Shortcut for resource.include. - --module-rules-issuer Match the issuer of the module (The module pointing to this module). - --module-rules-issuer-layer Match layer of the issuer of this module (The module pointing to this module). - --module-rules-layer Specifies the layer in which the module should be placed in. - --module-rules-loader A loader request. - --module-rules-mimetype Match module mimetype when load from Data URI. - --module-rules-real-resource Match the real resource path of the module. - --module-rules-resource Match the resource path of the module. - --module-rules-resource-fragment Match the resource fragment of the module. - --module-rules-resource-query Match the resource query of the module. - --module-rules-side-effects Flags a module as with or without side effects. - --no-module-rules-side-effects Negative 'module-rules-side-effects' option. - --module-rules-test Shortcut for resource.test. - --module-rules-type Module type to use for the module. - --module-rules-use-ident Unique loader options identifier. - --module-rules-use-loader A loader request. - --module-rules-use-options Options passed to a loader. - --module-rules-use A loader request. - --module-rules-reset Clear all items provided in configuration. A list of rules. - --module-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'. - --no-module-strict-export-presence Negative 'module-strict-export-presence' option. - --module-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'. - --no-module-strict-this-context-on-imports Negative 'module-strict-this-context-on-imports' option. - --module-unknown-context-critical Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'. - --no-module-unknown-context-critical Negative 'module-unknown-context-critical' option. - --module-unknown-context-recursive Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'. - --no-module-unknown-context-recursive Negative 'module-unknown-context-recursive' option. - --module-unknown-context-reg-exp [value] Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'. - --no-module-unknown-context-reg-exp Negative 'module-unknown-context-reg-exp' option. - --module-unknown-context-request Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'. - --module-unsafe-cache Cache the resolving of module requests. - --no-module-unsafe-cache Negative 'module-unsafe-cache' option. - --module-wrapped-context-critical Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'. - --no-module-wrapped-context-critical Negative 'module-wrapped-context-critical' option. - --module-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'. - --no-module-wrapped-context-recursive Negative 'module-wrapped-context-recursive' option. - --module-wrapped-context-reg-exp Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'. - --name Name of the configuration. Used when loading multiple configurations. - --no-node Negative 'node' option. - --node-dirname [value] Include a polyfill for the '__dirname' variable. - --no-node-dirname Negative 'node-dirname' option. - --node-filename [value] Include a polyfill for the '__filename' variable. - --no-node-filename Negative 'node-filename' option. - --node-global Include a polyfill for the 'global' variable. - --no-node-global Negative 'node-global' option. - --optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM. - --no-optimization-check-wasm-types Negative 'optimization-check-wasm-types' option. - --optimization-chunk-ids Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin). - --no-optimization-chunk-ids Negative 'optimization-chunk-ids' option. - --optimization-concatenate-modules Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. - --no-optimization-concatenate-modules Negative 'optimization-concatenate-modules' option. - --optimization-emit-on-errors Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime. - --no-optimization-emit-on-errors Negative 'optimization-emit-on-errors' option. - --optimization-flag-included-chunks Also flag chunks as loaded which contain a subset of the modules. - --no-optimization-flag-included-chunks Negative 'optimization-flag-included-chunks' option. - --optimization-inner-graph Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection. - --no-optimization-inner-graph Negative 'optimization-inner-graph' option. - --optimization-mangle-exports [value] Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names). - --no-optimization-mangle-exports Negative 'optimization-mangle-exports' option. - --optimization-mangle-wasm-imports Reduce size of WASM by changing imports to shorter strings. - --no-optimization-mangle-wasm-imports Negative 'optimization-mangle-wasm-imports' option. - --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. - --no-optimization-merge-duplicate-chunks Negative 'optimization-merge-duplicate-chunks' option. - --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. - --no-optimization-minimize Negative 'optimization-minimize' option. - --optimization-module-ids Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin). - --no-optimization-module-ids Negative 'optimization-module-ids' option. - --optimization-node-env Set process.env.NODE_ENV to a specific value. - --no-optimization-node-env Negative 'optimization-node-env' option. - --optimization-portable-records Generate records with relative paths to be able to move the context folder. - --no-optimization-portable-records Negative 'optimization-portable-records' option. - --optimization-provided-exports Figure out which exports are provided by modules to generate more efficient code. - --no-optimization-provided-exports Negative 'optimization-provided-exports' option. - --optimization-real-content-hash Use real [contenthash] based on final content of the assets. - --no-optimization-real-content-hash Negative 'optimization-real-content-hash' option. - --optimization-remove-available-modules Removes modules from chunks when these modules are already included in all parents. - --no-optimization-remove-available-modules Negative 'optimization-remove-available-modules' option. - --optimization-remove-empty-chunks Remove chunks which are empty. - --no-optimization-remove-empty-chunks Negative 'optimization-remove-empty-chunks' option. - --optimization-runtime-chunk [value] Create an additional chunk which contains only the webpack runtime and chunk hash maps. - --no-optimization-runtime-chunk Negative 'optimization-runtime-chunk' option. - --optimization-runtime-chunk-name The name or name factory for the runtime chunks. - --optimization-side-effects [value] Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects). - --no-optimization-side-effects Negative 'optimization-side-effects' option. - --no-optimization-split-chunks Negative 'optimization-split-chunks' option. - --optimization-split-chunks-automatic-name-delimiter Sets the name delimiter for created chunks. - --optimization-split-chunks-chunks Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML). - --optimization-split-chunks-default-size-types Size type, like 'javascript', 'webassembly'. - --optimization-split-chunks-default-size-types-reset Clear all items provided in configuration. Sets the size types which are used when a number is used for sizes. - --optimization-split-chunks-enforce-size-threshold Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter Sets the name delimiter for created chunks. - --optimization-split-chunks-fallback-cache-group-max-async-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-max-initial-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-max-size Size of the javascript part of the chunk. - --optimization-split-chunks-fallback-cache-group-min-size Size of the javascript part of the chunk. - --optimization-split-chunks-filename Sets the template for the filename for created chunks. - --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by maxSize. - --no-optimization-split-chunks-hide-path-info Negative 'optimization-split-chunks-hide-path-info' option. - --optimization-split-chunks-max-async-requests Maximum number of requests which are accepted for on-demand loading. - --optimization-split-chunks-max-async-size Size of the javascript part of the chunk. - --optimization-split-chunks-max-initial-requests Maximum number of initial chunks which are accepted for an entry point. - --optimization-split-chunks-max-initial-size Size of the javascript part of the chunk. - --optimization-split-chunks-max-size Size of the javascript part of the chunk. - --optimization-split-chunks-min-chunks Minimum number of times a module has to be duplicated until it's considered for splitting. - --optimization-split-chunks-min-remaining-size Size of the javascript part of the chunk. - --optimization-split-chunks-min-size Size of the javascript part of the chunk. - --optimization-split-chunks-name Give chunks created a name (chunks with equal name are merged). - --no-optimization-split-chunks-name Negative 'optimization-split-chunks-name' option. - --optimization-split-chunks-used-exports Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal. - --no-optimization-split-chunks-used-exports Negative 'optimization-split-chunks-used-exports' option. - --optimization-used-exports [value] Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined). - --no-optimization-used-exports Negative 'optimization-used-exports' option. - --output-asset-module-filename The filename of asset modules as relative path inside the 'output.path' directory. - --output-charset Add charset attribute for script tag. - --no-output-charset Negative 'output-charset' option. - --output-chunk-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --output-chunk-format The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins). - --no-output-chunk-format Negative 'output-chunk-format' option. - --output-chunk-load-timeout Number of milliseconds before chunk request expires. - --output-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --no-output-chunk-loading Negative 'output-chunk-loading' option. - --output-chunk-loading-global The global variable used by webpack for loading of chunks. - --output-clean Clean the output directory before emit. - --no-output-clean Negative 'output-clean' option. - --output-clean-dry Log the assets that should be removed instead of deleting them. - --no-output-clean-dry Negative 'output-clean-dry' option. - --output-clean-keep Keep these assets. - --output-compare-before-emit Check if to be emitted file already exists and have the same content before writing to output filesystem. - --no-output-compare-before-emit Negative 'output-compare-before-emit' option. - --output-cross-origin-loading This option enables cross-origin loading of chunks. - --no-output-cross-origin-loading Negative 'output-cross-origin-loading' option. - --output-devtool-fallback-module-filename-template Similar to \`output.devtoolModuleFilenameTemplate\`, but used in the case of duplicate module identifiers. - --output-devtool-module-filename-template Filename template string of function for the sources array in a generated SourceMap. - --output-devtool-namespace Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to \`output.library\` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries. - --output-enabled-chunk-loading-types The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --output-enabled-chunk-loading-types-reset Clear all items provided in configuration. List of chunk loading types enabled for use by entry points. - --output-enabled-library-types Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). - --output-enabled-library-types-reset Clear all items provided in configuration. List of library types enabled for use by entry points. - --output-enabled-wasm-loading-types The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --output-enabled-wasm-loading-types-reset Clear all items provided in configuration. List of wasm loading types enabled for use by entry points. - --output-environment-arrow-function The environment supports arrow functions ('() => { ... }'). - --no-output-environment-arrow-function Negative 'output-environment-arrow-function' option. - --output-environment-big-int-literal The environment supports BigInt as literal (123n). - --no-output-environment-big-int-literal Negative 'output-environment-big-int-literal' option. - --output-environment-const The environment supports const and let for variable declarations. - --no-output-environment-const Negative 'output-environment-const' option. - --output-environment-destructuring The environment supports destructuring ('{ a, b } = obj'). - --no-output-environment-destructuring Negative 'output-environment-destructuring' option. - --output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules. - --no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option. - --output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }'). - --no-output-environment-for-of Negative 'output-environment-for-of' option. - --output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...'). - --no-output-environment-module Negative 'output-environment-module' option. - --output-filename Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk. - --output-global-object An expression which is used to address the global object/scope in runtime code. - --output-hash-digest Digest type used for the hash. - --output-hash-digest-length Number of chars which are used for the hash. - --output-hash-function Algorithm used for generation the hash (see node.js crypto package). - --output-hash-salt Any string which is added to the hash to salt it. - --output-hot-update-chunk-filename The filename of the Hot Update Chunks. They are inside the output.path directory. - --output-hot-update-global The global variable used by webpack for loading of hot update chunks. - --output-hot-update-main-filename The filename of the Hot Update Main File. It is inside the 'output.path' directory. - --output-iife Wrap javascript code into IIFE's to avoid leaking into global scope. - --no-output-iife Negative 'output-iife' option. - --output-import-function-name The name of the native import() function (can be exchanged for a polyfill). - --output-import-meta-name The name of the native import.meta object (can be exchanged for a polyfill). - --output-library A part of the library name. - --output-library-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). - --output-library-amd Name of the exposed AMD library in the UMD. - --output-library-commonjs Name of the exposed commonjs export in the UMD. - --output-library-root Part of the name of the property exposed globally by a UMD library. - --output-library-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. - --output-library-auxiliary-comment Append the same comment above each import style. - --output-library-auxiliary-comment-amd Set comment for \`amd\` section in UMD. - --output-library-auxiliary-comment-commonjs Set comment for \`commonjs\` (exports) section in UMD. - --output-library-auxiliary-comment-commonjs2 Set comment for \`commonjs2\` (module.exports) section in UMD. - --output-library-auxiliary-comment-root Set comment for \`root\` (global variable) section in UMD. - --output-library-export Part of the export that should be exposed as library. - --output-library-export-reset Clear all items provided in configuration. Specify which export should be exposed as library. - --output-library-name A part of the library name. - --output-library-name-reset Clear all items provided in configuration. The name of the library (some types allow unnamed libraries too). - --output-library-name-amd Name of the exposed AMD library in the UMD. - --output-library-name-commonjs Name of the exposed commonjs export in the UMD. - --output-library-name-root Part of the name of the property exposed globally by a UMD library. - --output-library-name-root-reset Clear all items provided in configuration. Name of the property exposed globally by a UMD library. - --output-library-type Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins). - --output-library-umd-named-define If \`output.libraryTarget\` is set to umd and \`output.library\` is set, setting this to true will name the AMD module. - --no-output-library-umd-named-define Negative 'output-library-umd-named-define' option. - --output-module Output javascript files as module source type. - --no-output-module Negative 'output-module' option. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --output-pathinfo [value] Include comments with information about the modules. - --no-output-pathinfo Negative 'output-pathinfo' option. - --output-public-path The 'publicPath' specifies the public URL address of the output files when referenced in a browser. - --output-script-type This option enables loading async chunks via a custom script type, such as script type=\\"module\\". - --no-output-script-type Negative 'output-script-type' option. - --output-source-map-filename The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory. - --output-source-prefix Prefixes every line of the source in the bundle with this string. - --output-strict-module-error-handling Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec. - --no-output-strict-module-error-handling Negative 'output-strict-module-error-handling' option. - --output-strict-module-exception-handling Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way. - --no-output-strict-module-exception-handling Negative 'output-strict-module-exception-handling' option. - --output-unique-name A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. - --output-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --no-output-wasm-loading Negative 'output-wasm-loading' option. - --output-webassembly-module-filename The filename of WebAssembly modules as relative path inside the 'output.path' directory. - --output-worker-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins). - --no-output-worker-chunk-loading Negative 'output-worker-chunk-loading' option. - --output-worker-wasm-loading The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins). - --no-output-worker-wasm-loading Negative 'output-worker-wasm-loading' option. - --parallelism The number of parallel processed modules in the compilation. - --no-performance Negative 'performance' option. - --performance-hints Sets the format of the hints: warnings, errors or nothing at all. - --no-performance-hints Negative 'performance-hints' option. - --performance-max-asset-size File size limit (in bytes) when exceeded, that webpack will provide performance hints. - --performance-max-entrypoint-size Total size of an entry point (in bytes). - --profile Capture timing information for each module. - --no-profile Negative 'profile' option. - --records-input-path Store compiler state to a json file. - --no-records-input-path Negative 'records-input-path' option. - --records-output-path Load compiler state from a json file. - --no-records-output-path Negative 'records-output-path' option. - --records-path Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. \`recordsPath\` is used for \`recordsInputPath\` and \`recordsOutputPath\` if they left undefined. - --no-records-path Negative 'records-path' option. - --resolve-alias-alias Ignore request (replace with empty module). New request. - --no-resolve-alias-alias Negative 'resolve-alias-alias' option. - --resolve-alias-name Request to be redirected. - --resolve-alias-only-module Redirect only exact matching request. - --no-resolve-alias-only-module Negative 'resolve-alias-only-module' option. - --resolve-alias-reset Clear all items provided in configuration. Redirect module requests. - --resolve-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-cache Enable caching of successfully resolved requests (cache entries are revalidated). - --no-resolve-cache Negative 'resolve-cache' option. - --resolve-cache-with-context Include the context information in the cache identifier when caching. - --no-resolve-cache-with-context Negative 'resolve-cache-with-context' option. - --resolve-condition-names Condition names for exports field entry point. - --resolve-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. - --resolve-description-files Filename used to find a description file (like a package.json). - --resolve-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). - --resolve-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). - --no-resolve-enforce-extension Negative 'resolve-enforce-extension' option. - --resolve-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. - --resolve-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. - --resolve-extensions Extension added to the request when trying to find the file. - --resolve-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. - --resolve-fallback-alias Ignore request (replace with empty module). New request. - --no-resolve-fallback-alias Negative 'resolve-fallback-alias' option. - --resolve-fallback-name Request to be redirected. - --resolve-fallback-only-module Redirect only exact matching request. - --no-resolve-fallback-only-module Negative 'resolve-fallback-only-module' option. - --resolve-fallback-reset Clear all items provided in configuration. Redirect module requests. - --resolve-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). - --no-resolve-fully-specified Negative 'resolve-fully-specified' option. - --resolve-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-main-fields Field name from the description file (package.json) which are used to find the default entry point. - --resolve-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. - --resolve-main-files Filename used to find the default entry point if there is no description file or main field. - --resolve-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. - --resolve-modules Folder name or directory path where to find modules. - --resolve-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. - --resolve-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. - --no-resolve-prefer-absolute Negative 'resolve-prefer-absolute' option. - --resolve-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. - --no-resolve-prefer-relative Negative 'resolve-prefer-relative' option. - --resolve-restrictions Resolve restriction. Resolve result must fulfill this restriction. - --resolve-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. - --resolve-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-symlinks Enable resolving symlinks to the original location. - --no-resolve-symlinks Negative 'resolve-symlinks' option. - --resolve-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). - --no-resolve-unsafe-cache Negative 'resolve-unsafe-cache' option. - --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. - --no-resolve-use-sync-file-system-calls Negative 'resolve-use-sync-file-system-calls' option. - --resolve-loader-alias-alias Ignore request (replace with empty module). New request. - --no-resolve-loader-alias-alias Negative 'resolve-loader-alias-alias' option. - --resolve-loader-alias-name Request to be redirected. - --resolve-loader-alias-only-module Redirect only exact matching request. - --no-resolve-loader-alias-only-module Negative 'resolve-loader-alias-only-module' option. - --resolve-loader-alias-reset Clear all items provided in configuration. Redirect module requests. - --resolve-loader-alias-fields Field in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-loader-alias-fields-reset Clear all items provided in configuration. Fields in the description file (usually package.json) which are used to redirect requests inside the module. - --resolve-loader-cache Enable caching of successfully resolved requests (cache entries are revalidated). - --no-resolve-loader-cache Negative 'resolve-loader-cache' option. - --resolve-loader-cache-with-context Include the context information in the cache identifier when caching. - --no-resolve-loader-cache-with-context Negative 'resolve-loader-cache-with-context' option. - --resolve-loader-condition-names Condition names for exports field entry point. - --resolve-loader-condition-names-reset Clear all items provided in configuration. Condition names for exports field entry point. - --resolve-loader-description-files Filename used to find a description file (like a package.json). - --resolve-loader-description-files-reset Clear all items provided in configuration. Filenames used to find a description file (like a package.json). - --resolve-loader-enforce-extension Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension). - --no-resolve-loader-enforce-extension Negative 'resolve-loader-enforce-extension' option. - --resolve-loader-exports-fields Field name from the description file (usually package.json) which is used to provide entry points of a package. - --resolve-loader-exports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide entry points of a package. - --resolve-loader-extensions Extension added to the request when trying to find the file. - --resolve-loader-extensions-reset Clear all items provided in configuration. Extensions added to the request when trying to find the file. - --resolve-loader-fallback-alias Ignore request (replace with empty module). New request. - --no-resolve-loader-fallback-alias Negative 'resolve-loader-fallback-alias' option. - --resolve-loader-fallback-name Request to be redirected. - --resolve-loader-fallback-only-module Redirect only exact matching request. - --no-resolve-loader-fallback-only-module Negative 'resolve-loader-fallback-only-module' option. - --resolve-loader-fallback-reset Clear all items provided in configuration. Redirect module requests. - --resolve-loader-fully-specified Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases). - --no-resolve-loader-fully-specified Negative 'resolve-loader-fully-specified' option. - --resolve-loader-imports-fields Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-loader-imports-fields-reset Clear all items provided in configuration. Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal). - --resolve-loader-main-fields Field name from the description file (package.json) which are used to find the default entry point. - --resolve-loader-main-fields-reset Clear all items provided in configuration. Field names from the description file (package.json) which are used to find the default entry point. - --resolve-loader-main-files Filename used to find the default entry point if there is no description file or main field. - --resolve-loader-main-files-reset Clear all items provided in configuration. Filenames used to find the default entry point if there is no description file or main field. - --resolve-loader-modules Folder name or directory path where to find modules. - --resolve-loader-modules-reset Clear all items provided in configuration. Folder names or directory paths where to find modules. - --resolve-loader-prefer-absolute Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'. - --no-resolve-loader-prefer-absolute Negative 'resolve-loader-prefer-absolute' option. - --resolve-loader-prefer-relative Prefer to resolve module requests as relative request and fallback to resolving as module. - --no-resolve-loader-prefer-relative Negative 'resolve-loader-prefer-relative' option. - --resolve-loader-restrictions Resolve restriction. Resolve result must fulfill this restriction. - --resolve-loader-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met. - --resolve-loader-roots Directory in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-loader-roots-reset Clear all items provided in configuration. A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. - --resolve-loader-symlinks Enable resolving symlinks to the original location. - --no-resolve-loader-symlinks Negative 'resolve-loader-symlinks' option. - --resolve-loader-unsafe-cache Enable caching of successfully resolved requests (cache entries are not revalidated). - --no-resolve-loader-unsafe-cache Negative 'resolve-loader-unsafe-cache' option. - --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. - --no-resolve-loader-use-sync-file-system-calls Negative 'resolve-loader-use-sync-file-system-calls' option. - --snapshot-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-build-dependencies-hash Negative 'snapshot-build-dependencies-hash' option. - --snapshot-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-build-dependencies-timestamp Negative 'snapshot-build-dependencies-timestamp' option. - --snapshot-immutable-paths A path to a immutable directory (usually a package manager cache directory). - --snapshot-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. - --snapshot-managed-paths A path to a managed directory (usually a node_modules directory). - --snapshot-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by a package manager and can be trusted to not be modified otherwise. - --snapshot-module-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-module-hash Negative 'snapshot-module-hash' option. - --snapshot-module-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-module-timestamp Negative 'snapshot-module-timestamp' option. - --snapshot-resolve-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-resolve-hash Negative 'snapshot-resolve-hash' option. - --snapshot-resolve-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-resolve-timestamp Negative 'snapshot-resolve-timestamp' option. - --snapshot-resolve-build-dependencies-hash Use hashes of the content of the files/directories to determine invalidation. - --no-snapshot-resolve-build-dependencies-hash Negative 'snapshot-resolve-build-dependencies-hash' option. - --snapshot-resolve-build-dependencies-timestamp Use timestamps of the files/directories to determine invalidation. - --no-snapshot-resolve-build-dependencies-timestamp Negative 'snapshot-resolve-build-dependencies-timestamp' option. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - --stats-all Fallback value for stats options when an option is not defined (has precedence over local webpack defaults). - --no-stats-all Negative 'stats-all' option. - --stats-assets Add assets information. - --no-stats-assets Negative 'stats-assets' option. - --stats-assets-sort Sort the assets by that field. - --stats-assets-space Space to display assets (groups will be collapsed to fit this space). - --stats-built-at Add built at time information. - --no-stats-built-at Negative 'stats-built-at' option. - --stats-cached Add information about cached (not built) modules (deprecated: use 'cachedModules' instead). - --no-stats-cached Negative 'stats-cached' option. - --stats-cached-assets Show cached assets (setting this to \`false\` only shows emitted files). - --no-stats-cached-assets Negative 'stats-cached-assets' option. - --stats-cached-modules Add information about cached (not built) modules. - --no-stats-cached-modules Negative 'stats-cached-modules' option. - --stats-children Add children information. - --no-stats-children Negative 'stats-children' option. - --stats-chunk-group-auxiliary Display auxiliary assets in chunk groups. - --no-stats-chunk-group-auxiliary Negative 'stats-chunk-group-auxiliary' option. - --stats-chunk-group-children Display children of chunk groups. - --no-stats-chunk-group-children Negative 'stats-chunk-group-children' option. - --stats-chunk-group-max-assets Limit of assets displayed in chunk groups. - --stats-chunk-groups Display all chunk groups with the corresponding bundles. - --no-stats-chunk-groups Negative 'stats-chunk-groups' option. - --stats-chunk-modules Add built modules information to chunk information. - --no-stats-chunk-modules Negative 'stats-chunk-modules' option. - --stats-chunk-modules-space Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group). - --stats-chunk-origins Add the origins of chunks and chunk merging info. - --no-stats-chunk-origins Negative 'stats-chunk-origins' option. - --stats-chunk-relations Add information about parent, children and sibling chunks to chunk information. - --no-stats-chunk-relations Negative 'stats-chunk-relations' option. - --stats-chunks Add chunk information. - --no-stats-chunks Negative 'stats-chunks' option. - --stats-chunks-sort Sort the chunks by that field. - --stats-colors Enables/Disables colorful output. - --no-stats-colors Negative 'stats-colors' option. - --stats-colors-bold Custom color for bold text. - --stats-colors-cyan Custom color for cyan text. - --stats-colors-green Custom color for green text. - --stats-colors-magenta Custom color for magenta text. - --stats-colors-red Custom color for red text. - --stats-colors-yellow Custom color for yellow text. - --stats-context Context directory for request shortening. - --stats-dependent-modules Show chunk modules that are dependencies of other modules of the chunk. - --no-stats-dependent-modules Negative 'stats-dependent-modules' option. - --stats-depth Add module depth in module graph. - --no-stats-depth Negative 'stats-depth' option. - --stats-entrypoints [value] Display the entry points with the corresponding bundles. - --no-stats-entrypoints Negative 'stats-entrypoints' option. - --stats-env Add --env information. - --no-stats-env Negative 'stats-env' option. - --stats-error-details [value] Add details to errors (like resolving log). - --no-stats-error-details Negative 'stats-error-details' option. - --stats-error-stack Add internal stack trace to errors. - --no-stats-error-stack Negative 'stats-error-stack' option. - --stats-errors Add errors. - --no-stats-errors Negative 'stats-errors' option. - --stats-errors-count Add errors count. - --no-stats-errors-count Negative 'stats-errors-count' option. - --stats-exclude-assets Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. - --stats-exclude-assets-reset Clear all items provided in configuration. Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions. - --stats-exclude-modules [value...] Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. - --no-stats-exclude-modules Negative 'stats-exclude-modules' option. - --stats-exclude-modules-reset Clear all items provided in configuration. Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions. - --stats-group-assets-by-chunk Group assets by how their are related to chunks. - --no-stats-group-assets-by-chunk Negative 'stats-group-assets-by-chunk' option. - --stats-group-assets-by-emit-status Group assets by their status (emitted, compared for emit or cached). - --no-stats-group-assets-by-emit-status Negative 'stats-group-assets-by-emit-status' option. - --stats-group-assets-by-extension Group assets by their extension. - --no-stats-group-assets-by-extension Negative 'stats-group-assets-by-extension' option. - --stats-group-assets-by-info Group assets by their asset info (immutable, development, hotModuleReplacement, etc). - --no-stats-group-assets-by-info Negative 'stats-group-assets-by-info' option. - --stats-group-assets-by-path Group assets by their path. - --no-stats-group-assets-by-path Negative 'stats-group-assets-by-path' option. - --stats-group-modules-by-attributes Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). - --no-stats-group-modules-by-attributes Negative 'stats-group-modules-by-attributes' option. - --stats-group-modules-by-cache-status Group modules by their status (cached or built and cacheable). - --no-stats-group-modules-by-cache-status Negative 'stats-group-modules-by-cache-status' option. - --stats-group-modules-by-extension Group modules by their extension. - --no-stats-group-modules-by-extension Negative 'stats-group-modules-by-extension' option. - --stats-group-modules-by-layer Group modules by their layer. - --no-stats-group-modules-by-layer Negative 'stats-group-modules-by-layer' option. - --stats-group-modules-by-path Group modules by their path. - --no-stats-group-modules-by-path Negative 'stats-group-modules-by-path' option. - --stats-hash Add the hash of the compilation. - --no-stats-hash Negative 'stats-hash' option. - --stats-ids Add ids. - --no-stats-ids Negative 'stats-ids' option. - --stats-logging [value] Specify log level of logging output. Enable/disable logging output (\`true\`: shows normal logging output, loglevel: log). - --no-stats-logging Negative 'stats-logging' option. - --stats-logging-debug [value...] Enable/Disable debug logging for all loggers. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. - --no-stats-logging-debug Negative 'stats-logging-debug' option. - --stats-logging-debug-reset Clear all items provided in configuration. Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions. - --stats-logging-trace Add stack traces to logging output. - --no-stats-logging-trace Negative 'stats-logging-trace' option. - --stats-module-assets Add information about assets inside modules. - --no-stats-module-assets Negative 'stats-module-assets' option. - --stats-module-trace Add dependencies and origin of warnings/errors. - --no-stats-module-trace Negative 'stats-module-trace' option. - --stats-modules Add built modules information. - --no-stats-modules Negative 'stats-modules' option. - --stats-modules-sort Sort the modules by that field. - --stats-modules-space Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups). - --stats-nested-modules Add information about modules nested in other modules (like with module concatenation). - --no-stats-nested-modules Negative 'stats-nested-modules' option. - --stats-nested-modules-space Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group). - --stats-optimization-bailout Show reasons why optimization bailed out for modules. - --no-stats-optimization-bailout Negative 'stats-optimization-bailout' option. - --stats-orphan-modules Add information about orphan modules. - --no-stats-orphan-modules Negative 'stats-orphan-modules' option. - --stats-output-path Add output path information. - --no-stats-output-path Negative 'stats-output-path' option. - --stats-performance Add performance hint flags. - --no-stats-performance Negative 'stats-performance' option. - --stats-preset [value] Preset for the default values. - --no-stats-preset Negative 'stats-preset' option. - --stats-provided-exports Show exports provided by modules. - --no-stats-provided-exports Negative 'stats-provided-exports' option. - --stats-public-path Add public path information. - --no-stats-public-path Negative 'stats-public-path' option. - --stats-reasons Add information about the reasons why modules are included. - --no-stats-reasons Negative 'stats-reasons' option. - --stats-related-assets Add information about assets that are related to other assets (like SourceMaps for assets). - --no-stats-related-assets Negative 'stats-related-assets' option. - --stats-runtime Add information about runtime modules (deprecated: use 'runtimeModules' instead). - --no-stats-runtime Negative 'stats-runtime' option. - --stats-runtime-modules Add information about runtime modules. - --no-stats-runtime-modules Negative 'stats-runtime-modules' option. - --stats-source Add the source code of modules. - --no-stats-source Negative 'stats-source' option. - --stats-timings Add timing information. - --no-stats-timings Negative 'stats-timings' option. - --stats-used-exports Show exports used by modules. - --no-stats-used-exports Negative 'stats-used-exports' option. - --stats-version Add webpack version information. - --no-stats-version Negative 'stats-version' option. - --stats-warnings Add warnings. - --no-stats-warnings Negative 'stats-warnings' option. - --stats-warnings-count Add warnings count. - --no-stats-warnings-count Negative 'stats-warnings-count' option. - --stats-warnings-filter Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. - --stats-warnings-filter-reset Clear all items provided in configuration. Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions. - -t, --target Sets the build target e.g. node. - --no-target Negative 'target' option. - --target-reset Clear all items provided in configuration. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Watch for files changes. - --no-watch Do not watch for file changes. - --watch-options-aggregate-timeout Delay the rebuilt after the first change. Value is a time in ms. - --watch-options-follow-symlinks Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks'). - --no-watch-options-follow-symlinks Negative 'watch-options-follow-symlinks' option. - --watch-options-ignored A glob pattern for files that should be ignored from watching. Ignore some files from watching (glob pattern or regexp). - --watch-options-ignored-reset Clear all items provided in configuration. Ignore some files from watching (glob pattern or regexp). - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Do not stop watching when stdin stream has ended. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - init|c [generation-path] [options] Initialize a new webpack project. - loader|l [output-path] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. - plugin|p [output-path] Scaffold a plugin. - serve|s [entries...] [options] Run the webpack dev server. - version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --color" option 1`] = ` -"Usage: webpack --color -Description: Enable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --mode" option 1`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --mode" option 2`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --no-color" option 1`] = ` -"Usage: webpack --no-color -Description: Disable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --no-stats" option 1`] = ` -"Usage: webpack --no-stats -Description: Disable stats output. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --stats" option 1`] = ` -"Usage: webpack --stats [value] -Description: It instructs webpack on how to treat the stats e.g. verbose. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --target" option 1`] = ` -"Usage: webpack --target -Short: webpack -t -Description: Sets the build target e.g. node. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help --version" option 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help -v" option 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --color" option 1`] = ` -"Usage: webpack serve --color -Description: Enable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --mode" option 1`] = ` -"Usage: webpack serve --mode -Description: Defines the mode to pass to webpack. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information using the "help serve --no-color" option 1`] = ` -"Usage: webpack serve --no-color -Description: Disable colors on console. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information with options for sub commands 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - --output To get the output in a specified format ( accept json - or markdown ) - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; diff --git a/test/help/help.test.js b/test/help/help.test.js index e3dbba1cf1d..4e9eb51d3b8 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -1,41 +1,37 @@ 'use strict'; -const { run } = require('../utils/test-utils'); -// eslint-disable-next-line node/no-unpublished-require -const serializer = require('jest-serializer-ansi'); +const { run, normalizeStderr, normalizeStdout } = require('../utils/test-utils'); describe('help', () => { - expect.addSnapshotSerializer(serializer); - it('should show help information using the "--help" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it.skip('should show help information using the "--help" option with the "verbose" value', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'verbose']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it.skip('should show help information using the "--help" option with the "verbose" value #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help=verbose']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show the same information using the "--help" option and command syntax', async () => { @@ -48,120 +44,110 @@ describe('help', () => { expect(exitCodeFromOption).toBe(0); expect(exitCodeFromCommandSyntax).toBe(0); - expect(stderrFromOption).toBeFalsy(); - expect(stderrFromCommandSyntax).toBeFalsy(); + expect(normalizeStderr(stderrFromOption)).toMatchSnapshot('stderr from option'); + expect(normalizeStderr(stderrFromCommandSyntax)).toMatchSnapshot('stderr from command syntax'); expect(stdoutFromOption).toBe(stdoutFromCommandSyntax); + expect(normalizeStdout(stdoutFromOption)).toMatchSnapshot('stdout from option'); + expect(normalizeStdout(stdoutFromCommandSyntax)).toMatchSnapshot('stdout from command sytnax'); }); it('should show help information and respect the "--color" flag using the "--help" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information and respect the "--no-color" flag using the "--help" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); const commands = [ { name: 'init', alias: ['create', 'new', 'c', 'n'], - usage: 'webpack init|create|new|c|n [generation-path] [options]', }, { name: 'info', alias: 'i', - usage: 'webpack info|i [options]', }, { name: 'loader', alias: 'l', - usage: 'webpack loader|l [output-path] [options]', }, { name: 'migrate', alias: 'm', - usage: 'webpack migrate|m [new-config-path]', }, { name: 'plugin', alias: 'p', - usage: 'webpack plugin|p [output-path] [options]', }, { name: 'configtest', alias: 't', - usage: 'webpack configtest|t [config-path]', }, { name: 'watch', alias: 'w', - usage: 'webpack watch|w [entries...] [options]', }, { name: 'serve', alias: ['server', 's'], - usage: 'webpack serve|server|s [entries...] [options]', }, { name: 'build', alias: 'b', - usage: 'webpack build|bundle|b [entries...] [options]', }, ]; - commands.forEach(({ name, alias, usage }) => { + commands.forEach(({ name, alias }) => { it(`should show help information for '${name}' command using the "--help" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`webpack ${name === 'build' || name === 'bundle' || name === 'b' ? '' : name}`); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); - it(`should show help information for '${name}' command using the "--help verbose" option`, async () => { + it.skip(`should show help information for '${name}' command using the "--help verbose" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', 'verbose']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it(`should show help information for '${name}' command using command syntax`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', name]); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toContain(usage); - expect(stdout).toContain('Made with ♥ by the webpack team'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it(`should show help information for '${name}' and respect the "--no-color" flag using the "--help" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [name, '--help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).not.toContain('\x1b[1m'); - expect(stdout).toContain(usage); - expect(stdout).toContain('Made with ♥ by the webpack team'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); const alises = Array.isArray(alias) ? alias : [alias]; @@ -171,24 +157,24 @@ describe('help', () => { const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); - it(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { + it.skip(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [alias, '--help', 'verbose']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it(`should show help information for '${alias}' command using command syntax`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', alias]); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(usage); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); }); @@ -197,210 +183,210 @@ describe('help', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--help']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information and taking precedence when "--help" and "--version" option using together', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --mode" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --target" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--target']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --stats" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--stats']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --no-stats" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--no-stats']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --mode" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help serve --mode" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--mode']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --color" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --no-color" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help serve --color" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('\x1b[1m'); - expect(stdout).toMatchSnapshot(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help serve --no-color" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--no-color']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help --version" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--version']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should show help information using the "help -v" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '-v']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid command using the "--help" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'myCommand']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid command using the "--help" option #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--flag', '--help']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid command using the "--help" option #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--flag', '--help']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for unknown command using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'myCommand']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for unknown command using command syntax #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'verbose']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for unknown option using command syntax #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--made']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for unknown option using command syntax #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--made']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for unknown option using command syntax #4', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'bui', '--mode']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid command using command syntax #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', '--mode', 'serve']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid command using command syntax #4', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['help', 'serve', '--mode', '--mode']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid flag with the "--help" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', '--my-flag']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid flag with the "--help" option #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--help', 'init', 'info']); expect(exitCode).toBe(2); - expect(stderr).toMatchSnapshot(); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error for invalid flag with the "--help" option #2', async () => { diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 new file mode 100644 index 00000000000..3a840f9fb1d --- /dev/null +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 @@ -0,0 +1,83 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown-flag' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--watch' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-w' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` +" [webpack-cli] Compiler starting... + [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' + [webpack-cli] Compiler finished + [webpack-cli] Compiler is watching files for updates..." +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration (from the "devServer" options): stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options): stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode: stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = `""`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` +"[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. + at stack" +`; + +exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = `"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense."`; + +exports[`basic serve usage should work in multi compiler mode: stderr 1`] = `""`; + +exports[`basic serve usage should work with "--hot" and "--port" options: stderr 1`] = `""`; + +exports[`basic serve usage should work with entries syntax: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--client-log-level" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" and "--env" options and expose dev server options: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" and "--env" options: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--hot" option using the "only" value: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--hot" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option #2: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option #3: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--no-hot" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--open" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--output-public-path" option: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-public-path' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should work with the "--port" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--stats" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "stats" option in config: stderr 1`] = `""`; + +exports[`basic serve usage should work with the default "publicPath" option: stderr 1`] = `""`; + +exports[`basic serve usage should work: stderr 1`] = `""`; diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 new file mode 100644 index 00000000000..414f1462acb --- /dev/null +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 @@ -0,0 +1,80 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown-flag' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--watch' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-w' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` +" [webpack-cli] Compiler starting... + [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' + [webpack-cli] Compiler finished + [webpack-cli] Compiler is watching files for updates..." +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration (from the "devServer" options): stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options): stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode: stderr 1`] = `""`; + +exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = `""`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` +"[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. + at stack" +`; + +exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = `"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense."`; + +exports[`basic serve usage should work in multi compiler mode: stderr 1`] = `""`; + +exports[`basic serve usage should work with "--hot" and "--port" options: stderr 1`] = `""`; + +exports[`basic serve usage should work with entries syntax: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--client-log-level" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" and "--env" options and expose dev server options: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" and "--env" options: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--config" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--hot" option using the "only" value: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--hot" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option #2: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option #3: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--mode" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--no-hot" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--open" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--output-public-path" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--port" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "--stats" option: stderr 1`] = `""`; + +exports[`basic serve usage should work with the "stats" option in config: stderr 1`] = `""`; + +exports[`basic serve usage should work with the default "publicPath" option: stderr 1`] = `""`; + +exports[`basic serve usage should work: stderr 1`] = `""`; diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index f7528ab1c9f..753326c4009 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch, isWebpack5, isDevServer4 } = require('../../utils/test-utils'); +const { runWatch, isWebpack5, isDevServer4, normalizeStderr } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -17,7 +17,7 @@ describe('basic serve usage', () => { it('should work', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -25,7 +25,7 @@ describe('basic serve usage', () => { it('should work with the "--config" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'serve.config.js', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('development'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -41,7 +41,7 @@ describe('basic serve usage', () => { port, ]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('WEBPACK_SERVE: true'); expect(stdout).toContain("foo: 'bar'"); expect(stdout).toContain('development'); @@ -60,7 +60,7 @@ describe('basic serve usage', () => { port, ]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('hot: true'); expect(stdout).toContain('WEBPACK_SERVE: true'); expect(stdout).toContain("foo: 'bar'"); @@ -71,7 +71,7 @@ describe('basic serve usage', () => { it('should work in multi compiler mode', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi.config.js', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); @@ -83,7 +83,7 @@ describe('basic serve usage', () => { it.skip('should work in multi compiler mode with multiple dev servers', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi-dev-server.config.js']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); @@ -94,7 +94,7 @@ describe('basic serve usage', () => { it('should work with the "--mode" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('development'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -103,7 +103,7 @@ describe('basic serve usage', () => { it('should work with the "--stats" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--stats']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain(isWebpack5 ? 'compiled successfully' : 'Version: webpack'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -111,7 +111,7 @@ describe('basic serve usage', () => { it('should work with the "--stats verbose" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--stats', 'verbose']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain(isWebpack5 ? 'from webpack.Compiler' : 'webpack.buildChunkGraph.visitModules'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -119,7 +119,7 @@ describe('basic serve usage', () => { it('should work with the "--mode" option #2', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--mode', 'production']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('production'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -128,7 +128,7 @@ describe('basic serve usage', () => { it('should work with the "--mode" option #3', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--mode', 'development']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('development'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -153,7 +153,7 @@ describe('basic serve usage', () => { it('should work with the "--client-log-level" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--client-log-level', 'info']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -161,7 +161,7 @@ describe('basic serve usage', () => { it('should work with the "--port" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -169,7 +169,7 @@ describe('basic serve usage', () => { it('should work with the "--hot" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--hot']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); @@ -177,7 +177,7 @@ describe('basic serve usage', () => { it('should work with the "--no-hot" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--no-hot']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -185,7 +185,7 @@ describe('basic serve usage', () => { it('should work with the "--hot" option using the "only" value', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, isDevServer4 ? '--hot only' : '--hot-only']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); @@ -193,7 +193,7 @@ describe('basic serve usage', () => { it('should work with "--hot" and "--port" options', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--hot']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); @@ -209,7 +209,7 @@ describe('basic serve usage', () => { it('should work with the default "publicPath" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout).toContain('from /'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -218,13 +218,13 @@ describe('basic serve usage', () => { it('should work with the "--output-public-path" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--output-public-path', '/my-public-path/']); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + if (isWebpack5) { - expect(stderr).toBeFalsy(); expect(stdout).toContain('main.js'); expect(stdout).toContain('/my-public-path/'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); } else { - expect(stderr).toContain("Error: Unknown option '--output-public-path'"); expect(stdout).toBeFalsy(); } }); @@ -232,7 +232,7 @@ describe('basic serve usage', () => { it('should respect the "publicPath" option from configuration', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'output-public-path.config.js']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout).toContain('/my-public-path/'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -241,7 +241,7 @@ describe('basic serve usage', () => { it('should respect the "publicPath" option from configuration using multi compiler mode', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi-output-public-path.config.js', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); @@ -253,7 +253,7 @@ describe('basic serve usage', () => { it('should respect the "publicPath" option from configuration (from the "devServer" options)', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'dev-server-output-public-path.config.js']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout).toContain('/dev-server-my-public-path/'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); @@ -262,7 +262,7 @@ describe('basic serve usage', () => { it('should work with the "--open" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--open', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -276,8 +276,7 @@ describe('basic serve usage', () => { port, ]); - expect(stderr).toBeFalsy(); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); @@ -289,7 +288,7 @@ describe('basic serve usage', () => { it('should work with entries syntax', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', './src/entry.js', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('development'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -297,20 +296,20 @@ describe('basic serve usage', () => { it('should work and log warning on the `watch option in a configuration', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', './watch.config.js', '--port', port]); - expect(stderr).toContain( - "No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense.", - ); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('development'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should log used supplied config with serve', async () => { - const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'log.config.js', '--port', port]); - const configPath = path.resolve(__dirname, './log.config.js'); + const { stderr, stdout } = await runWatch( + __dirname, + ['serve', '--config', 'log.config.js', '--port', port], + {}, + /Compiler is watching files for updates\.\.\./, + ); - expect(stderr).toContain('Compiler starting...'); - expect(stderr).toContain(`Compiler is using config: '${configPath}'`); - expect(stderr).toContain('Compiler finished'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); }); @@ -318,8 +317,7 @@ describe('basic serve usage', () => { const { exitCode, stdout, stderr } = await runWatch(testPath, ['serve', '--watch']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--watch'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeFalsy(); }); @@ -327,8 +325,7 @@ describe('basic serve usage', () => { const { exitCode, stdout, stderr } = await runWatch(testPath, ['serve', '-w']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '-w'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeFalsy(); }); @@ -336,14 +333,14 @@ describe('basic serve usage', () => { const { exitCode, stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--unknown-flag']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown-flag'"); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeFalsy(); }); it('should work with the "stats" option in config', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'stats.config.js'], {}, /Compiled successfully/); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('Compiled successfully'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); @@ -352,6 +349,6 @@ describe('basic serve usage', () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'same-ports-dev-serever.config.js']); expect(stdout).toBeFalsy(); - expect(stderr).toContain('Unique ports must be specified for each devServer option in your webpack configuration'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); }); }); diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 new file mode 100644 index 00000000000..7c7af9c0b64 --- /dev/null +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid schema should log webpack error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] webpack Dev Server Invalid Options + +options.bonjour should be {Boolean} (https://webpack.js.org/configuration/dev-server/#devserverbonjour) +" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received -1. + at stack" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 new file mode 100644 index 00000000000..b800d0008e3 --- /dev/null +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid schema should log webpack error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] Invalid value 'Yukihira' for the '--mode' option +[webpack-cli] Expected: 'development | production | none'" +`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] webpack Dev Server Invalid Options + +options.bonjour should be {Boolean} (https://webpack.js.org/configuration/dev-server/#devserverbonjour) +" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received -1. + at stack" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/invalid-schema.test.js b/test/serve/invalid-schema/invalid-schema.test.js index a4a4e4c4dd5..72eb33d464f 100644 --- a/test/serve/invalid-schema/invalid-schema.test.js +++ b/test/serve/invalid-schema/invalid-schema.test.js @@ -1,43 +1,36 @@ 'use strict'; -const { run, isWebpack5 } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe('invalid schema', () => { it('should log webpack error and exit process on invalid config', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--config', './webpack.config.mock.js']); expect(exitCode).toEqual(2); - expect(stderr).toContain('Invalid configuration object'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log webpack error and exit process on invalid flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--mode', 'Yukihira']); expect(exitCode).toEqual(2); - - if (isWebpack5) { - expect(stderr).toContain("Invalid value 'Yukihira' for the '--mode' option"); - expect(stderr).toContain("Expected: 'development | production | none'"); - } else { - expect(stderr).toContain('Invalid configuration object'); - } - - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log webpack-dev-server error and exit process on invalid flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--port', '-1']); expect(exitCode).toEqual(2); - expect(stderr).toContain('RangeError'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr).replace('Port', 'options.port')).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log webpack-dev-server error and exit process on invalid config', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--config', './webpack-dev-server.config.mock.js']); expect(exitCode).toEqual(2); - expect(stderr).toContain('webpack Dev Server Invalid Options'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 new file mode 100644 index 00000000000..56d5b37ccb4 --- /dev/null +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve variable compiles without flags and export variable: stderr 1`] = `""`; diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 new file mode 100644 index 00000000000..56d5b37ccb4 --- /dev/null +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve variable compiles without flags and export variable: stderr 1`] = `""`; diff --git a/test/serve/serve-variable/serve-basic.test.js b/test/serve/serve-variable/serve-basic.test.js index 19bc9e4f208..cc0cc77b3b6 100644 --- a/test/serve/serve-variable/serve-basic.test.js +++ b/test/serve/serve-variable/serve-basic.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch } = require('../../utils/test-utils'); +const { runWatch, normalizeStderr } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -17,7 +17,7 @@ describe('serve variable', () => { it('compiles without flags and export variable', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('main.js'); expect(stdout).not.toContain('HotModuleReplacementPlugin'); expect(stdout).toContain('PASS'); diff --git a/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack4 b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack4 new file mode 100644 index 00000000000..bac74d1f3d6 --- /dev/null +++ b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack4 @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve with devServer in config Passing hot flag works alongside other server config: stderr 1`] = `""`; + +exports[`serve with devServer in config Port flag should override the config port: stderr 1`] = `""`; + +exports[`serve with devServer in config Should pick up the host and port from config: stderr 1`] = `""`; + +exports[`serve with devServer in config works fine when no-hot flag is passed alongside other server config: stderr 1`] = `""`; diff --git a/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack5 b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack5 new file mode 100644 index 00000000000..bac74d1f3d6 --- /dev/null +++ b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer3.webpack5 @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve with devServer in config Passing hot flag works alongside other server config: stderr 1`] = `""`; + +exports[`serve with devServer in config Port flag should override the config port: stderr 1`] = `""`; + +exports[`serve with devServer in config Should pick up the host and port from config: stderr 1`] = `""`; + +exports[`serve with devServer in config works fine when no-hot flag is passed alongside other server config: stderr 1`] = `""`; diff --git a/test/serve/with-custom-port/serve-custom-config.test.js b/test/serve/with-custom-port/serve-custom-config.test.js index 6a38afe18f8..fe0eda10cef 100644 --- a/test/serve/with-custom-port/serve-custom-config.test.js +++ b/test/serve/with-custom-port/serve-custom-config.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch } = require('../../utils/test-utils'); +const { runWatch, normalizeStderr } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -17,7 +17,7 @@ describe('serve with devServer in config', () => { it('Should pick up the host and port from config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); // Should output the correct bundle file expect(stdout).toContain('main.js'); expect(stdout).not.toContain('HotModuleReplacementPlugin'); @@ -28,7 +28,7 @@ describe('serve with devServer in config', () => { it('Port flag should override the config port', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); // Should output the correct bundle file expect(stdout).toContain('main.js'); expect(stdout).not.toContain('HotModuleReplacementPlugin'); @@ -39,7 +39,7 @@ describe('serve with devServer in config', () => { it('Passing hot flag works alongside other server config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--hot']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); // Should output the correct bundle file expect(stdout).toContain('main.js'); // HMR is being used @@ -51,7 +51,7 @@ describe('serve with devServer in config', () => { it('works fine when no-hot flag is passed alongside other server config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--no-hot']); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); // Should output the correct bundle file expect(stdout).toContain('main.js'); // HMR is not being used diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index c460a9ecc28..85ab12e5b96 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -62,6 +62,7 @@ const run = async (testCase, args = [], options = {}) => { reject: false, stdio: ENABLE_LOG_COMPILATION ? 'inherit' : 'pipe', maxBuffer: Infinity, + env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, ...options, }); }; @@ -89,7 +90,21 @@ const runWatch = (testCase, args = [], options, outputKillStr = /webpack \d+\.\d proc.stdout.pipe( new Writable({ write(chunk, encoding, callback) { - const output = chunk.toString('utf8'); + const output = stripAnsi(chunk.toString('utf8')); + + if (outputKillStr.test(output)) { + processKill(proc); + } + + callback(); + }, + }), + ); + + proc.stderr.pipe( + new Writable({ + write(chunk, encoding, callback) { + const output = stripAnsi(chunk.toString('utf8')); if (outputKillStr.test(output)) { processKill(proc); @@ -224,7 +239,54 @@ const runPromptWithAnswers = (location, args, answers, waitForOutput = true) => }); }; -const normalizeStdout = (string) => stripAnsi(string); +const normalizeVersions = (output) => { + return output.replace( + /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi, + 'x.x.x', + ); +}; + +const normalizeCwd = (output) => { + return output.replace(/\\/g, '/').replace(new RegExp(process.cwd().replace(/\\/g, '/'), 'g'), ''); +}; + +const normalizeError = (output) => { + return output.replace(/\s+at .+(}|\))/gs, '\n at stack'); +}; + +const normalizeStdout = (stdout) => { + if (typeof stdout !== 'string') { + return stdout; + } + + if (stdout.length === 0) { + return stdout; + } + + let normalizedStdout = stripAnsi(stdout); + normalizedStdout = normalizeCwd(normalizedStdout); + normalizedStdout = normalizeVersions(normalizedStdout); + normalizedStdout = normalizeError(normalizedStdout); + + return normalizedStdout; +}; + +const normalizeStderr = (stderr) => { + if (typeof stderr !== 'string') { + return stderr; + } + + if (stderr.length === 0) { + return stderr; + } + + let normalizedStderr = stripAnsi(stderr); + normalizedStderr = normalizeCwd(normalizedStderr); + normalizedStderr = normalizeVersions(normalizedStderr); + normalizedStderr = normalizeError(normalizedStderr); + + return normalizedStderr; +}; const readFile = (path, options = {}) => new Promise((resolve, reject) => { @@ -264,6 +326,7 @@ module.exports = { isWebpack5, isDevServer4, isWindows, + normalizeStderr, normalizeStdout, uniqueDirectoryForTest, readFile, diff --git a/test/version/__snapshots__/version.test.js.snap.webpack4 b/test/version/__snapshots__/version.test.js.snap.webpack4 index d8c44caf514..eb5f5200f1f 100644 --- a/test/version/__snapshots__/version.test.js.snap.webpack4 +++ b/test/version/__snapshots__/version.test.js.snap.webpack4 @@ -1,264 +1,264 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`single version flag outputs version with b 1`] = `""`; +exports[`single version flag outputs version with b: stderr 1`] = `""`; -exports[`single version flag outputs version with b 2`] = ` +exports[`single version flag outputs version with b: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with build 1`] = `""`; +exports[`single version flag outputs version with build: stderr 1`] = `""`; -exports[`single version flag outputs version with build 2`] = ` +exports[`single version flag outputs version with build: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with bundle 1`] = `""`; +exports[`single version flag outputs version with bundle: stderr 1`] = `""`; -exports[`single version flag outputs version with bundle 2`] = ` +exports[`single version flag outputs version with bundle: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info 1`] = `""`; +exports[`single version flag outputs version with info using command alias: stderr 1`] = `""`; -exports[`single version flag outputs version with info 2`] = ` +exports[`single version flag outputs version with info using command alias: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using command alias 1`] = `""`; +exports[`single version flag outputs version with info using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs version with info using command alias 2`] = ` +exports[`single version flag outputs version with info using command syntax: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using command syntax 1`] = `""`; +exports[`single version flag outputs version with info using option alias: stderr 1`] = `""`; -exports[`single version flag outputs version with info using command syntax 2`] = ` +exports[`single version flag outputs version with info using option alias: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using option alias 1`] = `""`; +exports[`single version flag outputs version with info: stderr 1`] = `""`; -exports[`single version flag outputs version with info using option alias 2`] = ` +exports[`single version flag outputs version with info: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with init 1`] = `""`; +exports[`single version flag outputs version with init: stderr 1`] = `""`; -exports[`single version flag outputs version with init 2`] = ` +exports[`single version flag outputs version with init: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with loader 1`] = `""`; +exports[`single version flag outputs version with loader: stderr 1`] = `""`; -exports[`single version flag outputs version with loader 2`] = ` +exports[`single version flag outputs version with loader: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with migrate 1`] = `""`; +exports[`single version flag outputs version with migrate: stderr 1`] = `""`; -exports[`single version flag outputs version with migrate 2`] = ` +exports[`single version flag outputs version with migrate: stdout 1`] = ` "@webpack-cli/migrate x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with plugin 1`] = `""`; +exports[`single version flag outputs version with plugin: stderr 1`] = `""`; -exports[`single version flag outputs version with plugin 2`] = ` +exports[`single version flag outputs version with plugin: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with serve 1`] = `""`; +exports[`single version flag outputs version with serve: stderr 1`] = `""`; -exports[`single version flag outputs version with serve 2`] = ` +exports[`single version flag outputs version with serve: stdout 1`] = ` "@webpack-cli/serve x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with the alias c for init 1`] = `""`; +exports[`single version flag outputs version with the alias c for init: stderr 1`] = `""`; -exports[`single version flag outputs version with the alias c for init 2`] = ` +exports[`single version flag outputs version with the alias c for init: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with w 1`] = `""`; +exports[`single version flag outputs version with w: stderr 1`] = `""`; -exports[`single version flag outputs version with w 2`] = ` +exports[`single version flag outputs version with w: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with watch 1`] = `""`; +exports[`single version flag outputs version with watch: stderr 1`] = `""`; -exports[`single version flag outputs version with watch 2`] = ` +exports[`single version flag outputs version with watch: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --color using command syntax 1`] = `""`; +exports[`single version flag outputs versions with --color using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --color using command syntax 2`] = ` +exports[`single version flag outputs versions with --color using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --color using option syntax 1`] = `""`; +exports[`single version flag outputs versions with --color using option syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --color using option syntax 2`] = ` +exports[`single version flag outputs versions with --color using option syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --no-color using command syntax 1`] = `""`; +exports[`single version flag outputs versions with --no-color using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --no-color using command syntax 2`] = ` +exports[`single version flag outputs versions with --no-color using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --no-color using option syntax 1`] = `""`; +exports[`single version flag outputs versions with --no-color using option syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --no-color using option syntax 2`] = ` +exports[`single version flag outputs versions with --no-color using option syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with alias syntax 1`] = `""`; +exports[`single version flag outputs versions with alias syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with alias syntax 2`] = ` +exports[`single version flag outputs versions with alias syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with command syntax 1`] = `""`; +exports[`single version flag outputs versions with command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with command syntax 2`] = ` +exports[`single version flag outputs versions with command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with dashed syntax 1`] = `""`; +exports[`single version flag outputs versions with dashed syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with dashed syntax 2`] = ` +exports[`single version flag outputs versions with dashed syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 1`] = ` +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 2`] = `""`; +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument: stdout 1`] = `""`; -exports[`single version flag should log an error using command syntax with unknown argument #2 1`] = ` +exports[`single version flag should log an error using command syntax with unknown argument #2: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with unknown argument #2 2`] = `""`; +exports[`single version flag should log an error using command syntax with unknown argument #2: stdout 1`] = `""`; -exports[`single version flag should log an error using command syntax with unknown argument 1`] = ` +exports[`single version flag should log an error using command syntax with unknown argument: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with unknown argument 2`] = `""`; +exports[`single version flag should log an error using command syntax with unknown argument: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used 1`] = ` +exports[`single version flag should log error when unknown command used with --version flag: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used 2`] = `""`; +exports[`single version flag should log error when unknown command used with --version flag: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used with --version flag 1`] = ` +exports[`single version flag should log error when unknown command used with -v alias: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used with --version flag 2`] = `""`; +exports[`single version flag should log error when unknown command used with -v alias: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used with -v alias 1`] = ` +exports[`single version flag should log error when unknown command used: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used with -v alias 2`] = `""`; +exports[`single version flag should log error when unknown command used: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command using command syntax 1`] = ` +exports[`single version flag should log error when unknown command using command syntax: stderr 1`] = ` "[webpack-cli] Unknown command 'unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command using command syntax 2`] = `""`; +exports[`single version flag should log error when unknown command using command syntax: stdout 1`] = `""`; -exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands: stderr 1`] = ` "[webpack-cli] Unknown command 'unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 2`] = `"@webpack-cli/info x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands: stdout 1`] = `"@webpack-cli/info x.x.x"`; -exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 2`] = `"@webpack-cli/serve x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option: stdout 1`] = `"@webpack-cli/serve x.x.x"`; -exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 2`] = `"@webpack-cli/serve x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option: stdout 1`] = `"@webpack-cli/serve x.x.x"`; -exports[`single version flag should not output version with help dashed 1`] = `""`; +exports[`single version flag should not output version with help dashed: stderr 1`] = `""`; -exports[`single version flag should not output version with help dashed 2`] = ` +exports[`single version flag should not output version with help dashed: stdout 1`] = ` "Usage: webpack version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -266,8 +266,7 @@ Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' a Global options: --color Enable colors on console. --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -277,9 +276,9 @@ CLI documentation: https://webpack.js.org/api/cli/. Made with ♥ by the webpack team." `; -exports[`single version flag should output versions for multiple commands using command syntax 1`] = `""`; +exports[`single version flag should output versions for multiple commands using command syntax: stderr 1`] = `""`; -exports[`single version flag should output versions for multiple commands using command syntax 2`] = ` +exports[`single version flag should output versions for multiple commands using command syntax: stdout 1`] = ` "@webpack-cli/info x.x.x @webpack-cli/serve x.x.x webpack x.x.x @@ -287,17 +286,17 @@ webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should output versions with help command using command syntax 1`] = `""`; +exports[`single version flag should output versions with help command using command syntax: stderr 1`] = `""`; -exports[`single version flag should output versions with help command using command syntax 2`] = ` +exports[`single version flag should output versions with help command using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work for multiple commands 1`] = `""`; +exports[`single version flag should work for multiple commands: stderr 1`] = `""`; -exports[`single version flag should work for multiple commands 2`] = ` +exports[`single version flag should work for multiple commands: stdout 1`] = ` "@webpack-cli/info x.x.x @webpack-cli/serve x.x.x webpack x.x.x @@ -305,39 +304,39 @@ webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work using command syntax and the "--version" argument 1`] = `""`; +exports[`single version flag should work using command syntax and the "--version" argument: stderr 1`] = `""`; -exports[`single version flag should work using command syntax and the "--version" argument 2`] = ` +exports[`single version flag should work using command syntax and the "--version" argument: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work using command syntax with the "version" value 1`] = `""`; +exports[`single version flag should work using command syntax with the "version" value: stderr 1`] = `""`; -exports[`single version flag should work using command syntax with the "version" value 2`] = ` +exports[`single version flag should work using command syntax with the "version" value: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag throws error if invalid option is passed with --version flag 1`] = ` +exports[`single version flag throws error if invalid option is passed with --version flag: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with --version flag 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with --version flag: stdout 1`] = `""`; -exports[`single version flag throws error if invalid option is passed with -v alias 1`] = ` +exports[`single version flag throws error if invalid option is passed with -v alias: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with -v alias 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with -v alias: stdout 1`] = `""`; -exports[`single version flag throws error if invalid option is passed with version command 1`] = ` +exports[`single version flag throws error if invalid option is passed with version command: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with version command 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with version command: stdout 1`] = `""`; diff --git a/test/version/__snapshots__/version.test.js.snap.webpack5 b/test/version/__snapshots__/version.test.js.snap.webpack5 index d8c44caf514..eb5f5200f1f 100644 --- a/test/version/__snapshots__/version.test.js.snap.webpack5 +++ b/test/version/__snapshots__/version.test.js.snap.webpack5 @@ -1,264 +1,264 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`single version flag outputs version with b 1`] = `""`; +exports[`single version flag outputs version with b: stderr 1`] = `""`; -exports[`single version flag outputs version with b 2`] = ` +exports[`single version flag outputs version with b: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with build 1`] = `""`; +exports[`single version flag outputs version with build: stderr 1`] = `""`; -exports[`single version flag outputs version with build 2`] = ` +exports[`single version flag outputs version with build: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with bundle 1`] = `""`; +exports[`single version flag outputs version with bundle: stderr 1`] = `""`; -exports[`single version flag outputs version with bundle 2`] = ` +exports[`single version flag outputs version with bundle: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info 1`] = `""`; +exports[`single version flag outputs version with info using command alias: stderr 1`] = `""`; -exports[`single version flag outputs version with info 2`] = ` +exports[`single version flag outputs version with info using command alias: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using command alias 1`] = `""`; +exports[`single version flag outputs version with info using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs version with info using command alias 2`] = ` +exports[`single version flag outputs version with info using command syntax: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using command syntax 1`] = `""`; +exports[`single version flag outputs version with info using option alias: stderr 1`] = `""`; -exports[`single version flag outputs version with info using command syntax 2`] = ` +exports[`single version flag outputs version with info using option alias: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with info using option alias 1`] = `""`; +exports[`single version flag outputs version with info: stderr 1`] = `""`; -exports[`single version flag outputs version with info using option alias 2`] = ` +exports[`single version flag outputs version with info: stdout 1`] = ` "@webpack-cli/info x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with init 1`] = `""`; +exports[`single version flag outputs version with init: stderr 1`] = `""`; -exports[`single version flag outputs version with init 2`] = ` +exports[`single version flag outputs version with init: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with loader 1`] = `""`; +exports[`single version flag outputs version with loader: stderr 1`] = `""`; -exports[`single version flag outputs version with loader 2`] = ` +exports[`single version flag outputs version with loader: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with migrate 1`] = `""`; +exports[`single version flag outputs version with migrate: stderr 1`] = `""`; -exports[`single version flag outputs version with migrate 2`] = ` +exports[`single version flag outputs version with migrate: stdout 1`] = ` "@webpack-cli/migrate x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with plugin 1`] = `""`; +exports[`single version flag outputs version with plugin: stderr 1`] = `""`; -exports[`single version flag outputs version with plugin 2`] = ` +exports[`single version flag outputs version with plugin: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with serve 1`] = `""`; +exports[`single version flag outputs version with serve: stderr 1`] = `""`; -exports[`single version flag outputs version with serve 2`] = ` +exports[`single version flag outputs version with serve: stdout 1`] = ` "@webpack-cli/serve x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with the alias c for init 1`] = `""`; +exports[`single version flag outputs version with the alias c for init: stderr 1`] = `""`; -exports[`single version flag outputs version with the alias c for init 2`] = ` +exports[`single version flag outputs version with the alias c for init: stdout 1`] = ` "@webpack-cli/generators x.x.x webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with w 1`] = `""`; +exports[`single version flag outputs version with w: stderr 1`] = `""`; -exports[`single version flag outputs version with w 2`] = ` +exports[`single version flag outputs version with w: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with watch 1`] = `""`; +exports[`single version flag outputs version with watch: stderr 1`] = `""`; -exports[`single version flag outputs version with watch 2`] = ` +exports[`single version flag outputs version with watch: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --color using command syntax 1`] = `""`; +exports[`single version flag outputs versions with --color using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --color using command syntax 2`] = ` +exports[`single version flag outputs versions with --color using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --color using option syntax 1`] = `""`; +exports[`single version flag outputs versions with --color using option syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --color using option syntax 2`] = ` +exports[`single version flag outputs versions with --color using option syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --no-color using command syntax 1`] = `""`; +exports[`single version flag outputs versions with --no-color using command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --no-color using command syntax 2`] = ` +exports[`single version flag outputs versions with --no-color using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with --no-color using option syntax 1`] = `""`; +exports[`single version flag outputs versions with --no-color using option syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with --no-color using option syntax 2`] = ` +exports[`single version flag outputs versions with --no-color using option syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with alias syntax 1`] = `""`; +exports[`single version flag outputs versions with alias syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with alias syntax 2`] = ` +exports[`single version flag outputs versions with alias syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with command syntax 1`] = `""`; +exports[`single version flag outputs versions with command syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with command syntax 2`] = ` +exports[`single version flag outputs versions with command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs versions with dashed syntax 1`] = `""`; +exports[`single version flag outputs versions with dashed syntax: stderr 1`] = `""`; -exports[`single version flag outputs versions with dashed syntax 2`] = ` +exports[`single version flag outputs versions with dashed syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 1`] = ` +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with multiple commands with unknown argument 2`] = `""`; +exports[`single version flag should log an error using command syntax with multiple commands with unknown argument: stdout 1`] = `""`; -exports[`single version flag should log an error using command syntax with unknown argument #2 1`] = ` +exports[`single version flag should log an error using command syntax with unknown argument #2: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with unknown argument #2 2`] = `""`; +exports[`single version flag should log an error using command syntax with unknown argument #2: stdout 1`] = `""`; -exports[`single version flag should log an error using command syntax with unknown argument 1`] = ` +exports[`single version flag should log an error using command syntax with unknown argument: stderr 1`] = ` "[webpack-cli] Unknown option '--unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log an error using command syntax with unknown argument 2`] = `""`; +exports[`single version flag should log an error using command syntax with unknown argument: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used 1`] = ` +exports[`single version flag should log error when unknown command used with --version flag: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used 2`] = `""`; +exports[`single version flag should log error when unknown command used with --version flag: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used with --version flag 1`] = ` +exports[`single version flag should log error when unknown command used with -v alias: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used with --version flag 2`] = `""`; +exports[`single version flag should log error when unknown command used with -v alias: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command used with -v alias 1`] = ` +exports[`single version flag should log error when unknown command used: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command used with -v alias 2`] = `""`; +exports[`single version flag should log error when unknown command used: stdout 1`] = `""`; -exports[`single version flag should log error when unknown command using command syntax 1`] = ` +exports[`single version flag should log error when unknown command using command syntax: stderr 1`] = ` "[webpack-cli] Unknown command 'unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log error when unknown command using command syntax 2`] = `""`; +exports[`single version flag should log error when unknown command using command syntax: stdout 1`] = `""`; -exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands: stderr 1`] = ` "[webpack-cli] Unknown command 'unknown' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands 2`] = `"@webpack-cli/info x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using command syntax with multi commands: stdout 1`] = `"@webpack-cli/info x.x.x"`; -exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using the "--version" option 2`] = `"@webpack-cli/serve x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using the "--version" option: stdout 1`] = `"@webpack-cli/serve x.x.x"`; -exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 1`] = ` +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option: stderr 1`] = ` "[webpack-cli] Unknown command 'abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag should log version for known command and log error for unknown command using the "-v" option 2`] = `"@webpack-cli/serve x.x.x"`; +exports[`single version flag should log version for known command and log error for unknown command using the "-v" option: stdout 1`] = `"@webpack-cli/serve x.x.x"`; -exports[`single version flag should not output version with help dashed 1`] = `""`; +exports[`single version flag should not output version with help dashed: stderr 1`] = `""`; -exports[`single version flag should not output version with help dashed 2`] = ` +exports[`single version flag should not output version with help dashed: stdout 1`] = ` "Usage: webpack version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -266,8 +266,7 @@ Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' a Global options: --color Enable colors on console. --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -277,9 +276,9 @@ CLI documentation: https://webpack.js.org/api/cli/. Made with ♥ by the webpack team." `; -exports[`single version flag should output versions for multiple commands using command syntax 1`] = `""`; +exports[`single version flag should output versions for multiple commands using command syntax: stderr 1`] = `""`; -exports[`single version flag should output versions for multiple commands using command syntax 2`] = ` +exports[`single version flag should output versions for multiple commands using command syntax: stdout 1`] = ` "@webpack-cli/info x.x.x @webpack-cli/serve x.x.x webpack x.x.x @@ -287,17 +286,17 @@ webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should output versions with help command using command syntax 1`] = `""`; +exports[`single version flag should output versions with help command using command syntax: stderr 1`] = `""`; -exports[`single version flag should output versions with help command using command syntax 2`] = ` +exports[`single version flag should output versions with help command using command syntax: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work for multiple commands 1`] = `""`; +exports[`single version flag should work for multiple commands: stderr 1`] = `""`; -exports[`single version flag should work for multiple commands 2`] = ` +exports[`single version flag should work for multiple commands: stdout 1`] = ` "@webpack-cli/info x.x.x @webpack-cli/serve x.x.x webpack x.x.x @@ -305,39 +304,39 @@ webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work using command syntax and the "--version" argument 1`] = `""`; +exports[`single version flag should work using command syntax and the "--version" argument: stderr 1`] = `""`; -exports[`single version flag should work using command syntax and the "--version" argument 2`] = ` +exports[`single version flag should work using command syntax and the "--version" argument: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag should work using command syntax with the "version" value 1`] = `""`; +exports[`single version flag should work using command syntax with the "version" value: stderr 1`] = `""`; -exports[`single version flag should work using command syntax with the "version" value 2`] = ` +exports[`single version flag should work using command syntax with the "version" value: stdout 1`] = ` "webpack x.x.x webpack-cli x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag throws error if invalid option is passed with --version flag 1`] = ` +exports[`single version flag throws error if invalid option is passed with --version flag: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with --version flag 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with --version flag: stdout 1`] = `""`; -exports[`single version flag throws error if invalid option is passed with -v alias 1`] = ` +exports[`single version flag throws error if invalid option is passed with -v alias: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with -v alias 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with -v alias: stdout 1`] = `""`; -exports[`single version flag throws error if invalid option is passed with version command 1`] = ` +exports[`single version flag throws error if invalid option is passed with version command: stderr 1`] = ` "[webpack-cli] Unknown option '--abc' [webpack-cli] Run 'webpack --help' to see available commands and options" `; -exports[`single version flag throws error if invalid option is passed with version command 2`] = `""`; +exports[`single version flag throws error if invalid option is passed with version command: stdout 1`] = `""`; diff --git a/test/version/version.test.js b/test/version/version.test.js index 9c6966aac58..224d79ef21a 100644 --- a/test/version/version.test.js +++ b/test/version/version.test.js @@ -1,336 +1,333 @@ 'use strict'; -const { run } = require('../utils/test-utils'); - -const serializeSnapshot = (output) => { - return output.replace(/\d+.\d+.\d+/g, 'x.x.x'); -}; +const { run, normalizeStderr, normalizeStdout } = require('../utils/test-utils'); describe('single version flag', () => { it('outputs versions with command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with dashed syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with alias syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-v']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with info', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with info using option alias', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', '-v']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with info using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with info using command alias', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['v', 'info']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with build', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['build', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with bundle', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with b', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with watch', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['watch', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with w', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['w', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with plugin', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['plugin', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with loader', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['loader', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with init', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['init', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with serve', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with migrate', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['migrate', '--version']); + expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs version with the alias c for init', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['c', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error when unknown command using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'unknown']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log version for known command and log error for unknown command using command syntax with multi commands', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'unknown']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should work for multiple commands', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', 'serve', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should output versions for multiple commands using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'serve']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should output versions with help command using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'help']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log version for known command and log error for unknown command using the "--version" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', 'abc', '--version']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log version for known command and log error for unknown command using the "-v" option', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', 'abc', '-v']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should not output version with help dashed', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--help']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with --color using option syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with --no-color using option syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with --color using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--color']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('outputs versions with --no-color using command syntax', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--no-color']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error when unknown command used', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('throws error if invalid option is passed with version command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error when unknown command used with --version flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--version', 'abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('throws error if invalid option is passed with --version flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--version', '--abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error when unknown command used with -v alias', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-v', 'abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('throws error if invalid option is passed with -v alias', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-v', '--abc']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should work using command syntax with the "version" value', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should work using command syntax and the "--version" argument', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--version']); expect(exitCode).toBe(0); - expect(stderr).toMatchSnapshot(); - expect(serializeSnapshot(stdout)).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error using command syntax with unknown argument', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', '--unknown']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error using command syntax with unknown argument #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', '--unknown']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error using command syntax with multiple commands with unknown argument', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['version', 'info', 'serve', '--unknown']); expect(exitCode).toBe(2); - expect(serializeSnapshot(stderr)).toMatchSnapshot(); - expect(stdout).toMatchSnapshot(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/yarn.lock b/yarn.lock index 106bb5f2f03..3f02d9f013f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,127 +2,148 @@ # yarn lockfile v1 -"@babel/code-frame@7.12.11", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": +"@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/compat-data@^7.13.15": + version "7.13.15" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.15.tgz#7e8eea42d0b64fda2b375b22d06c605222e848f4" + integrity sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA== + "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.7.5": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" - integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.10" - "@babel/types" "^7.12.10" + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.16.tgz#7756ab24396cc9675f1c3fcd5b79fcce192ea96a" + integrity sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.16" + "@babel/helper-compilation-targets" "^7.13.16" + "@babel/helper-module-transforms" "^7.13.14" + "@babel/helpers" "^7.13.16" + "@babel/parser" "^7.13.16" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.15" + "@babel/types" "^7.13.16" convert-source-map "^1.7.0" debug "^4.1.0" - gensync "^1.0.0-beta.1" + gensync "^1.0.0-beta.2" json5 "^2.1.2" - lodash "^4.17.19" - semver "^5.4.1" + semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.12.10": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460" - integrity sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww== +"@babel/generator@^7.13.16", "@babel/generator@^7.13.9": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14" + integrity sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.13.16" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-create-class-features-plugin@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" - integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== +"@babel/helper-compilation-targets@^7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz#6e91dccf15e3f43e5556dffe32d860109887563c" + integrity sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA== dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/compat-data" "^7.13.15" + "@babel/helper-validator-option" "^7.12.17" + browserslist "^4.14.5" + semver "^6.3.0" -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== +"@babel/helper-create-class-features-plugin@^7.13.0": + version "7.13.11" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz#30d30a005bca2c953f5653fc25091a492177f4f6" + integrity sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw== dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-split-export-declaration" "^7.12.13" -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== dependencies: - "@babel/types" "^7.10.4" + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-member-expression-to-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" - integrity sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ== +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.12.13" -"@babel/helper-module-imports@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" - integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== +"@babel/helper-member-expression-to-functions@^7.13.0", "@babel/helper-member-expression-to-functions@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" + integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== dependencies: - "@babel/types" "^7.12.5" + "@babel/types" "^7.13.12" -"@babel/helper-module-transforms@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" - integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== - dependencies: - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-simple-access" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/helper-validator-identifier" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" - lodash "^4.17.19" +"@babel/helper-module-imports@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz#c6a369a6f3621cb25da014078684da9196b61977" + integrity sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== + dependencies: + "@babel/types" "^7.13.12" -"@babel/helper-optimise-call-expression@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" - integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== +"@babel/helper-module-transforms@^7.13.0", "@babel/helper-module-transforms@^7.13.14": + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz#e600652ba48ccb1641775413cb32cfa4e8b495ef" + integrity sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g== dependencies: - "@babel/types" "^7.10.4" + "@babel/helper-module-imports" "^7.13.12" + "@babel/helper-replace-supers" "^7.13.12" + "@babel/helper-simple-access" "^7.13.12" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.13" + "@babel/types" "^7.13.14" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== + dependencies: + "@babel/types" "^7.12.13" -"@babel/helper-replace-supers@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz#f15c9cc897439281891e11d5ce12562ac0cf3fa9" - integrity sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" + integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== + +"@babel/helper-replace-supers@^7.13.0", "@babel/helper-replace-supers@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz#6442f4c1ad912502481a564a7386de0c77ff3804" + integrity sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw== dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/helper-member-expression-to-functions" "^7.13.12" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.12" -"@babel/helper-simple-access@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" - integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== +"@babel/helper-simple-access@^7.12.13", "@babel/helper-simple-access@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz#dd6c538afb61819d205a012c31792a39c7a5eaf6" + integrity sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.13.12" "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" @@ -131,70 +152,70 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + "@babel/types" "^7.12.13" "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helpers@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" - integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== +"@babel/helper-validator-option@^7.12.17": + version "7.12.17" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" + integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + +"@babel/helpers@^7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.16.tgz#08af075f786fd06a56e41bcac3e8cc87ddc4d0b3" + integrity sha512-x5otxUaLpdWHl02P4L94wBU+2BJXBkvO+6d6uzQ+xD9/h2hTSAwA5O8QV8GqKx/l8i+VYmKKQg9e2QGTa2Wu3Q== dependencies: - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.15" + "@babel/types" "^7.13.16" -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" + integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" - integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== +"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.13", "@babel/parser@^7.13.15", "@babel/parser@^7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.16.tgz#0f18179b0448e6939b1f3f5c4c355a3a9bcdfd37" + integrity sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw== "@babel/plugin-proposal-class-properties@^7.1.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de" - integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz#146376000b94efd001e57a40a88a525afaab9f37" + integrity sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg== dependencies: - "@babel/helper-create-class-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-create-class-features-plugin" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c" - integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz#3730a31dafd3c10d8ccd10648ed80a2ac5472ef3" + integrity sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-optional-chaining@^7.1.0": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c" - integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz#ba9feb601d422e0adea6760c2bd6bbb7bfec4866" + integrity sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.13.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -211,18 +232,18 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" - integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-flow@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.1.tgz#a77670d9abe6d63e8acadf4c31bb1eb5a506bbdd" - integrity sha512-1lBLLmtxrwpm4VKmtVFselI/P3pX+G63fAtUUt6b2Nzgao77KNDwyuRt90Mj2/9pKobtt68FdvjfqohZjg/FCA== +"@babel/plugin-syntax-flow@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz#5df9962503c0a9c918381c929d51d4d6949e7e86" + integrity sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -245,7 +266,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0", "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== @@ -273,7 +294,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-optional-chaining@^7.8.0", "@babel/plugin-syntax-optional-chaining@^7.8.3": +"@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== @@ -281,104 +302,104 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" - integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" + integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-typescript@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.1.tgz#460ba9d77077653803c3dd2e673f76d66b4029e5" - integrity sha512-UZNEcCY+4Dp9yYRCAHrHDU+9ZXLYaY9MgBXSRLkB9WjYFRR6quJBumfVrEkUxrePPBwFcpWfNKXqVRQQtm7mMA== +"@babel/plugin-syntax-typescript@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" + integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-flow-strip-types@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.12.1.tgz#8430decfa7eb2aea5414ed4a3fa6e1652b7d77c4" - integrity sha512-8hAtkmsQb36yMmEtk2JZ9JnVyDSnDOdlB+0nEGzIDLuK4yR3JcEjfuFPYkdEPSh8Id+rAMeBEn+X0iVEyho6Hg== +"@babel/plugin-transform-flow-strip-types@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz#58177a48c209971e8234e99906cb6bd1122addd3" + integrity sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-flow" "^7.12.1" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-flow" "^7.12.13" "@babel/plugin-transform-modules-commonjs@^7.1.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648" - integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz#7b01ad7c2dcf2275b06fa1781e00d13d420b3e1b" + integrity sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw== dependencies: - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-simple-access" "^7.12.1" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-typescript@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz#d92cc0af504d510e26a754a7dbc2e5c8cd9c7ab4" - integrity sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw== +"@babel/plugin-transform-typescript@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz#4a498e1f3600342d2a9e61f60131018f55774853" + integrity sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-typescript" "^7.12.1" + "@babel/helper-create-class-features-plugin" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-typescript" "^7.12.13" "@babel/preset-flow@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.12.1.tgz#1a81d376c5a9549e75352a3888f8c273455ae940" - integrity sha512-UAoyMdioAhM6H99qPoKvpHMzxmNVXno8GYU/7vZmGaHk6/KqfDYL1W0NxszVbJ2EP271b7e6Ox+Vk2A9QsB3Sw== + version "7.13.13" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.13.13.tgz#a61a1c149b3f77589d795287744393444d5cdd9e" + integrity sha512-MDtwtamMifqq3R2mC7l3A3uFalUb3NH5TIBQWjN/epEPlZktcLq4se3J+ivckKrLMGsR7H9LW8+pYuIUN9tsKg== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-flow-strip-types" "^7.12.1" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-validator-option" "^7.12.17" + "@babel/plugin-transform-flow-strip-types" "^7.13.0" "@babel/preset-typescript@^7.1.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.12.1.tgz#86480b483bb97f75036e8864fe404cc782cc311b" - integrity sha512-hNK/DhmoJPsksdHuI/RVrcEws7GN5eamhi28JkO52MqIxU8Z0QpmiSOQxZHWOHV7I3P4UjHV97ay4TcamMA6Kw== + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz#ab107e5f050609d806fbb039bec553b33462c60a" + integrity sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-typescript" "^7.12.1" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-validator-option" "^7.12.17" + "@babel/plugin-transform-typescript" "^7.13.0" "@babel/register@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.1.tgz#cdb087bdfc4f7241c03231f22e15d211acf21438" - integrity sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q== + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.13.16.tgz#ae3ab0b55c8ec28763877383c454f01521d9a53d" + integrity sha512-dh2t11ysujTwByQjXNgJ48QZ2zcXKQVdV8s0TbeMI0flmtGWCdTwK9tJiACHXPLmncm5+ktNn/diojA45JE4jg== dependencies: + clone-deep "^4.0.1" find-cache-dir "^2.0.0" - lodash "^4.17.19" make-dir "^2.1.0" pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.3.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" - integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" - integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.10" - "@babel/types" "^7.12.10" +"@babel/template@^7.12.13", "@babel/template@^7.3.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13", "@babel/traverse@^7.13.15": + version "7.13.15" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.15.tgz#c38bf7679334ddd4028e8e1f7b3aa5019f0dada7" + integrity sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.15" + "@babel/types" "^7.13.14" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.11.tgz#a86e4d71e30a9b6ee102590446c98662589283ce" - integrity sha512-ukA9SQtKThINm++CX1CwmliMrE54J6nIYB5XTwL5f/CLFW9owfls+YSU8tVW15RQ2w+a3fSbPjC6HdQNtWZkiA== +"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.13.16", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.16.tgz#916120b858aa5655cfba84bd0f6021ff5bdb4e65" + integrity sha512-7enM8Wxhrl1hB1+k6+xO6RmxpNkaveRWkdpyii8DkrLWRgr0l3x29/SEuhTIkP+ynHsU/Hpjn8Evd/axv/ll6Q== dependencies: "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -564,9 +585,9 @@ resolve-from "^5.0.0" "@istanbuljs/schema@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" - integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/console@^26.6.2": version "26.6.2" @@ -1418,18 +1439,18 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -1437,11 +1458,11 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" "@npmcli/ci-detect@^1.0.0": @@ -1450,18 +1471,17 @@ integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q== "@npmcli/git@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.0.6.tgz#47b97e96b2eede3f38379262fa3bdfa6eae57bf2" - integrity sha512-a1MnTfeRPBaKbFY07fd+6HugY1WAkKJzdiJvlRub/9o5xz2F/JtPacZZapx5zRJUQFIzSL677vmTSxEcDMrDbg== + version "2.0.8" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.0.8.tgz#c38b54cdeec556ab641cf6161cc7825711a88d65" + integrity sha512-LPnzyBZ+1p7+JzHVwwKycMF8M3lr1ze3wxGRnxn/QxJtk++Y3prSJQrdBDGCxJyRpFsup6J3lrRBVYBhJVrM8Q== dependencies: - "@npmcli/promise-spawn" "^1.1.0" + "@npmcli/promise-spawn" "^1.3.2" lru-cache "^6.0.0" - mkdirp "^1.0.3" - npm-pick-manifest "^6.0.0" + mkdirp "^1.0.4" + npm-pick-manifest "^6.1.1" promise-inflight "^1.0.1" promise-retry "^2.0.1" - semver "^7.3.2" - unique-filename "^1.1.1" + semver "^7.3.5" which "^2.0.2" "@npmcli/installed-package-contents@^1.0.6": @@ -1485,7 +1505,7 @@ resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.2.tgz#3cdc1f30e9736dbc417373ed803b42b1a0a29ede" integrity sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg== -"@npmcli/promise-spawn@^1.1.0", "@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": +"@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz#42d4e56a8e9274fba180dabc0aea6e38f29274f5" integrity sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg== @@ -1511,9 +1531,9 @@ "@octokit/types" "^6.0.3" "@octokit/core@^3.2.3": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.3.1.tgz#c6bb6ba171ad84a5f430853a98892cfe8f93d8cd" - integrity sha512-Dc5NNQOYjgZU5S1goN6A/E500yXOfDUFRGQB8/2Tl16AcfvS3H9PudyOe3ZNE/MaVyHPIfC0htReHMJb1tMrvw== + version "3.4.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.4.0.tgz#b48aa27d755b339fe7550548b340dcc2b513b742" + integrity sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg== dependencies: "@octokit/auth-token" "^2.4.4" "@octokit/graphql" "^4.5.8" @@ -1524,11 +1544,11 @@ universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": - version "6.0.8" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.8.tgz#91b07e236fdb69929c678c6439f7a560dc6058ac" - integrity sha512-MuRrgv+bM4Q+e9uEvxAB/Kf+Sj0O2JAOBA131uo1o6lgdq1iS8ejKwtqHgdfY91V3rN9R/hdGKFiQYMzVzVBEQ== + version "6.0.11" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.11.tgz#082adc2aebca6dcefa1fb383f5efb3ed081949d1" + integrity sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" @@ -1571,16 +1591,7 @@ "@octokit/types" "^6.13.0" deprecation "^2.3.1" -"@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== - dependencies: - "@octokit/types" "^5.0.1" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request-error@^2.0.5": +"@octokit/request-error@^2.0.0", "@octokit/request-error@^2.0.5": version "2.0.5" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143" integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg== @@ -1590,17 +1601,15 @@ once "^1.4.0" "@octokit/request@^5.3.0", "@octokit/request@^5.4.12": - version "5.4.14" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96" - integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA== + version "5.4.15" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.15.tgz#829da413dc7dd3aa5e2cdbb1c7d0ebe1f146a128" + integrity sha512-6UnZfZzLwNhdLRreOtTkT9n57ZwulCve8q3IT/Z477vThu6snfdkBuhxnChpOKNGxcQ71ow561Qoa6uqLdPtag== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" "@octokit/types" "^6.7.1" - deprecation "^2.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.1" - once "^1.4.0" universal-user-agent "^6.0.0" "@octokit/rest@^18.1.0": @@ -1613,13 +1622,6 @@ "@octokit/plugin-request-log" "^1.0.2" "@octokit/plugin-rest-endpoint-methods" "5.0.0" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" - integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== - dependencies: - "@types/node" ">= 8" - "@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.13.0", "@octokit/types@^6.7.1": version "6.13.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.0.tgz#779e5b7566c8dde68f2f6273861dd2f0409480d0" @@ -1628,9 +1630,9 @@ "@octokit/openapi-types" "^6.0.0" "@polka/url@^1.0.0-next.9": - version "1.0.0-next.11" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71" - integrity sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA== + version "1.0.0-next.12" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.12.tgz#431ec342a7195622f86688bbda82e3166ce8cb28" + integrity sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ== "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" @@ -1645,9 +1647,9 @@ integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== "@sinonjs/commons@^1.7.0": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" - integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" @@ -1671,9 +1673,9 @@ integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.10" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.10.tgz#ca58fc195dd9734e77e57c6f2df565623636ab40" - integrity sha512-x8OM8XzITIMyiwl5Vmo2B1cR1S1Ipkyv4mdlbJjMa1lmuKvKY9FrBbEANIaMlnWn5Rf7uO+rC/VgYabNkE17Hw== + version "7.1.14" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" + integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1689,17 +1691,17 @@ "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.3.tgz#b8aaeba0a45caca7b56a5de9459872dde3727214" - integrity sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q== + version "7.4.0" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" + integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.15.tgz#db9e4238931eb69ef8aab0ad6523d4d4caa39d03" - integrity sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A== + version "7.11.1" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639" + integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw== dependencies: "@babel/types" "^7.3.0" @@ -1719,14 +1721,14 @@ integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== "@types/diff@*": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/diff/-/diff-4.0.2.tgz#2e9bb89f9acc3ab0108f0f3dc4dbdcf2fff8a99c" - integrity sha512-mIenTfsIe586/yzsyfql69KRnA75S8SVXQbTLpDejRrjH0QSJcpu3AUOi/Vjnt9IOsXKxPhJfGpQUNMueIU1fQ== + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.0.tgz#eb71e94feae62548282c4889308a3dfb57e36020" + integrity sha512-jrm2K65CokCCX4NmowtA+MfXyuprZC13jbRuwprs6/04z/EcFg/MCwYdsHn+zgV4CQBiATiI7AEq7y1sZCtWKA== "@types/ejs@*": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.5.tgz#95a3a1c3d9603eba80fe67ff56da1ba275ef2eda" - integrity sha512-k4ef69sS4sIqAPW9GoBnN+URAON2LeL1H0duQvL4RgdEBna19/WattYSA1qYqvbVEDRTSWzOw56tCLhC/m/IOw== + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe" + integrity sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ== "@types/eslint-scope@^3.7.0": version "3.7.0" @@ -1737,17 +1739,17 @@ "@types/estree" "*" "@types/eslint@*": - version "7.2.6" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.6.tgz#5e9aff555a975596c03a98b59ecd103decc70c3c" - integrity sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw== + version "7.2.10" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.10.tgz#4b7a9368d46c0f8cd5408c23288a59aa2394d917" + integrity sha512-kUEPnMKrqbtpCq/KTaGFFKAcz6Ethm2EjCoKIDaCmfRBWLbFuTcOJfTlorwbnboXBzahqWLgUp1BQeKHiJzPUQ== dependencies: "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*", "@types/estree@^0.0.46": - version "0.0.46" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" - integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== +"@types/estree@*", "@types/estree@^0.0.47": + version "0.0.47" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4" + integrity sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg== "@types/expect@^1.20.4": version "1.20.4" @@ -1763,9 +1765,9 @@ "@types/node" "*" "@types/graceful-fs@^4.1.2": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.4.tgz#4ff9f641a7c6d1a3508ff88bc3141b152772e753" - integrity sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg== + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" + integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== dependencies: "@types/node" "*" @@ -1809,12 +1811,7 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.3": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" - integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== - -"@types/json-schema@^7.0.6": +"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== @@ -1847,24 +1844,19 @@ "@types/vinyl" "*" "@types/minimatch@*", "@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" + integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== "@types/minimist@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" - integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= - -"@types/node@*", "@types/node@>= 8": - version "14.14.39" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.39.tgz#9ef394d4eb52953d2890e4839393c309aa25d2d1" - integrity sha512-Qipn7rfTxGEDqZiezH+wxqWYR8vcXq5LRpZrETD19Gs4o8LbklbmqotSUsMU+s5G3PJwMRDfNEYoxrcBwIxOuw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== -"@types/node@^14.14.40": - version "14.14.40" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.40.tgz#05a7cd31154487f357ca0bec4334ed1b1ab825a0" - integrity sha512-2HoZZGylcnz19ZSbvWhgWHqvprw1ZGHanxIrDWYykPD4CauLW4gcyLzCVfUN2kv/1t1F3CurQIdi+s1l9+XgEA== +"@types/node@*", "@types/node@^14.14.40": + version "14.14.41" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" + integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1914,14 +1906,14 @@ "@types/node" "*" "@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== "@types/yargs@^15.0.0": - version "15.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.9.tgz#524cd7998fe810cdb02f26101b699cccd156ff19" - integrity sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g== + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" + integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== dependencies: "@types/yargs-parser" "*" @@ -2188,7 +2180,7 @@ JSONStream@^1.0.4, JSONStream@^1.2.1, JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.3: +abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== @@ -2225,19 +2217,19 @@ acorn-walk@^7.1.1: integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== acorn-walk@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.0.0.tgz#56ae4c0f434a45fff4a125e7ea95fa9c98f67a16" - integrity sha512-oZRad/3SMOI/pxbbmqyurIx7jHw1wZDcR9G44L8pUVFEomX/0dH89SrM1KaDXuv1NpzAXz6Op/Xu/Qd5XXzdEA== + version "8.0.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.0.2.tgz#d4632bfc63fd93d0f15fd05ea0e984ffd3f5a8c3" + integrity sha512-+bpA9MJsHdZ4bgfDcpk0ozQyhhVct7rzOmO0s1IIr0AGGgKBljss8n2zp11rRP2wid5VGeh04CgeKzgat5/25A== acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4: - version "8.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" - integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== +acorn@^8.0.4, acorn@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff" + integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g== add-stream@^1.0.0: version "1.0.0" @@ -2288,6 +2280,16 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.1.0.tgz#45d5d3d36c7cdd808930cc3e603cf6200dbeb736" + integrity sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-colors@^3.0.0: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -2304,11 +2306,11 @@ ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" - integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: - type-fest "^0.11.0" + type-fest "^0.21.3" ansi-html@0.0.7: version "0.0.7" @@ -2368,9 +2370,9 @@ anymatch@^2.0.0: normalize-path "^2.1.1" anymatch@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -2566,17 +2568,16 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" - integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" + follow-redirects "^1.10.0" babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" @@ -2626,9 +2627,9 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz#cf5feef29551253471cfa82fc8e0f5063df07a77" - integrity sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q== + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -2652,9 +2653,9 @@ babel-preset-jest@^26.6.2: babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base@^0.11.1: version "0.11.2" @@ -2682,9 +2683,9 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" before-after-hook@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.0.tgz#09c40d92e936c64777aa385c4e9b904f8147eaf0" - integrity sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ== + version "2.2.1" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.1.tgz#73540563558687586b52ed217dad6a802ab1549c" + integrity sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw== binary-extensions@^1.0.0: version "1.13.1" @@ -2768,15 +2769,15 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.14.5: - version "4.16.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" - integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== + version "4.16.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.4.tgz#7ebf913487f40caf4637b892b268069951c35d58" + integrity sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ== dependencies: - caniuse-lite "^1.0.30001173" - colorette "^1.2.1" - electron-to-chromium "^1.3.634" + caniuse-lite "^1.0.30001208" + colorette "^1.2.2" + electron-to-chromium "^1.3.712" escalade "^3.1.1" - node-releases "^1.1.69" + node-releases "^1.1.71" bs-logger@0.x: version "0.2.6" @@ -2866,9 +2867,9 @@ cache-base@^1.0.1: unset-value "^1.0.0" cacheable-lookup@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.3.tgz#049fdc59dffdd4fc285e8f4f82936591bd59fec3" - integrity sha512-W+JBqF9SWe18A72XFzN/V/CULFzPm7sBXzzR6ekkE+3tLG72wFZrBiBZhrZuDoYexop4PHJVdFAKb/Nj9+tm9w== + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== cacheable-request@^7.0.1: version "7.0.1" @@ -2893,6 +2894,14 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2935,10 +2944,10 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001173: - version "1.0.30001180" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001180.tgz#67abcd6d1edf48fa5e7d1e84091d1d65ab76e33b" - integrity sha512-n8JVqXuZMVSPKiPiypjFtDTXc4jWIdjxull0f92WLo7e1MSi3uJ3NvveakSh/aCl1QKFAvIz3vIj0v+0K+FrXw== +caniuse-lite@^1.0.30001208: + version "1.0.30001214" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz#70f153c78223515c6d37a9fde6cd69250da9d872" + integrity sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg== capture-exit@^2.0.0: version "2.0.0" @@ -3025,11 +3034,9 @@ chownr@^2.0.0: integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^2.0.0: version "2.0.0" @@ -3071,9 +3078,9 @@ cli-cursor@^3.1.0: restore-cursor "^3.1.0" cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - integrity sha1-9TsFJmqLGguTSz0IIebi3FkUriM= + version "0.3.6" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.6.tgz#e9d6aa859c7fe636981fd3787378c2a20bce92fc" + integrity sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ== dependencies: colors "1.0.3" @@ -3234,7 +3241,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.1: +colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== @@ -3429,20 +3436,7 @@ conventional-commits-filter@^2.0.7: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" - integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - trim-off-newlines "^1.0.0" - -conventional-commits-parser@^3.2.0: +conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz#ba44f0b3b6588da2ee9fd8da508ebff50d116ce2" integrity sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA== @@ -3549,7 +3543,7 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.2.0: +cssstyle@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== @@ -3625,13 +3619,6 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0: dependencies: ms "2.1.2" -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -3657,7 +3644,7 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^10.2.0: +decimal.js@^10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== @@ -3729,9 +3716,9 @@ defaults@^1.0.3: clone "^1.0.2" defer-to-connect@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1" - integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== define-properties@^1.1.3: version "1.1.3" @@ -3843,9 +3830,9 @@ detect-newline@^3.0.0: integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== + version "2.0.5" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.5.tgz#9d270aa7eaa5af0b72c4c9d9b814e7f4ce738b79" + integrity sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw== dezalgo@^1.0.0: version "1.0.3" @@ -3990,17 +3977,17 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -ejs@^3.0.1: - version "3.1.5" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.5.tgz#aed723844dc20acb4b170cd9ab1017e476a0d93b" - integrity sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w== +ejs@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== dependencies: jake "^10.6.1" -electron-to-chromium@^1.3.634: - version "1.3.647" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.647.tgz#8f1750ab7a5137f1a9a27f8f4ebdf550e08ae10b" - integrity sha512-Or2Nu8TjkmSywY9hk85K/Y6il28hchlonITz30fkC87qvSNupQl29O12BzDDDTnUFlo6kEIFL2QGSpkZDMxH8g== +electron-to-chromium@^1.3.712: + version "1.3.717" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz#78d4c857070755fb58ab64bcc173db1d51cbc25f" + integrity sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ== elegant-spinner@^1.0.1: version "1.0.1" @@ -4041,10 +4028,10 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" - integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== +enhanced-resolve@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz#d9deae58f9d3773b6a111a5a46831da5be5c9ac0" + integrity sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -4057,9 +4044,9 @@ enquirer@^2.3.5, enquirer@^2.3.6: ansi-colors "^4.1.1" env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== envinfo@^7.7.3, envinfo@^7.7.4: version "7.8.1" @@ -4097,45 +4084,32 @@ error@^7.0.2: dependencies: string-template "~0.2.1" -es-abstract@^1.17.0-next.1: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== +es-abstract@^1.18.0-next.2: + version "1.18.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0.tgz#ab80b359eecb7ede4c298000390bc5ac3ec7b5a4" + integrity sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== dependencies: + call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" + get-intrinsic "^1.1.1" has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.2" + is-string "^1.0.5" + object-inspect "^1.9.0" object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.0, es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.0" es-module-lexer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.4.0.tgz#21f4181cc8b7eee06855f1c59e6087c7bc4f77b0" - integrity sha512-iuEGihqqhKWFgh72Q/Jtch7V2t/ft8w8IPP2aEN8ArYKO+IWyo6hsi96hCdgyeEDQIV3InhYQ9BlwUFPGXrbEQ== + version "0.4.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.4.1.tgz#dda8c6a14d8f340a24e34331e0fab0cb50438e0e" + integrity sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== es-to-primitive@^1.2.1: version "1.2.1" @@ -4171,13 +4145,13 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.14.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" - integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== dependencies: esprima "^4.0.1" - estraverse "^4.2.0" + estraverse "^5.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: @@ -4311,7 +4285,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -4337,21 +4311,21 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.4: integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== events@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" - integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== eventsource@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" - integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.0.tgz#00e8ca7c92109e94b0ddf32dac677d841028cfaf" + integrity sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg== dependencies: original "^1.0.0" exec-sh@^0.3.2: - version "0.3.4" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" - integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== + version "0.3.6" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" + integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== execa@^1.0.0: version "1.0.0" @@ -4544,19 +4518,7 @@ fast-glob@^2.0.2, fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" - integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - -fast-glob@^3.1.1: +fast-glob@^3.0.3, fast-glob@^3.1.1: version "3.2.5" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== @@ -4584,9 +4546,9 @@ fastest-levenshtein@^1.0.12: integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== fastq@^1.6.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.9.0.tgz#e16a72f338eaca48e91b5c23593bcc2ef66b7947" - integrity sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w== + version "1.11.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" + integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== dependencies: reusify "^1.0.4" @@ -4639,9 +4601,9 @@ file-uri-to-path@1.0.0: integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== filelist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.1.tgz#f10d1a3ae86c1694808e8f20906f43d4c9132dbb" - integrity sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ== + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== dependencies: minimatch "^3.0.4" @@ -4662,6 +4624,11 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= + finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" @@ -4764,26 +4731,19 @@ flat-cache@^3.0.4: rimraf "^3.0.2" flatted@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067" - integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== flow-parser@0.*: - version "0.137.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.137.0.tgz#8c05612ff9344648d8bcdeaa4c58d131e875d842" - integrity sha512-i3KXJZ8lhlQI0n+BoZzIeH/rv+fNvAiu1i9/s64MklBV+HuhFbycUML7367J2eng0gapLnwvYPFNaPZys8POsA== + version "0.149.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.149.0.tgz#6e5749ad832ba211968429accdb6a3858706e4f8" + integrity sha512-ruUVkZuM9oFQjhSsLO/OJYRYpGnuXJpTnIZmgzna6DyLFb3CLpeO27oJbWyeXaa830hmKf0JRzpcdFsFS8lmpg== -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -follow-redirects@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== +follow-redirects@^1.0.0, follow-redirects@^1.10.0: + version "1.13.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" + integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== for-in@^1.0.2: version "1.0.2" @@ -4830,21 +4790,11 @@ fresh@0.5.2: integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= fromentries@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.1.tgz#64c31665630479bc993cd800d53387920dc61b4d" - integrity sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw== - -fs-extra@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^1.0.0" + version "1.3.2" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== -fs-extra@^9.1.0: +fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -4882,9 +4832,9 @@ fsevents@^1.2.7: nan "^2.12.1" fsevents@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -4910,7 +4860,7 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -gensync@^1.0.0-beta.1: +gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== @@ -4920,6 +4870,15 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -4976,9 +4935,9 @@ get-stream@^5.0.0, get-stream@^5.1.0: pump "^3.0.0" get-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" - integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" @@ -5000,18 +4959,7 @@ gh-got@^5.0.0: got "^6.2.0" is-plain-obj "^1.1.0" -git-raw-commits@^2.0.0: - version "2.0.7" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.7.tgz#02e9357727a9755efa8e14dd5e59b381c29068fb" - integrity sha512-SkwrTqrDxw8y0G1uGJ9Zw13F7qu3LF8V4BifyDeiJCxSnjRGZD9SaoMiMqUvvXMXh6S3sOQ1DsBN7L2fMUZW/g== - dependencies: - dargs "^7.0.0" - lodash.template "^4.0.2" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - -git-raw-commits@^2.0.8: +git-raw-commits@^2.0.0, git-raw-commits@^2.0.8: version "2.0.10" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== @@ -5160,9 +5108,9 @@ globals@^12.1.0: type-fest "^0.8.1" globals@^13.6.0: - version "13.6.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.6.0.tgz#d77138e53738567bb96a3916ff6f6b487af20ef7" - integrity sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ== + version "13.8.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.8.0.tgz#3e20f504810ce87a8d72e55aecf8435b50f4c1b3" + integrity sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q== dependencies: type-fest "^0.20.2" @@ -5180,19 +5128,7 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -globby@^11.0.2: +globby@^11.0.1, globby@^11.0.2: version "11.0.3" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== @@ -5306,9 +5242,9 @@ handle-thing@^2.0.0: integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== handlebars@^4.7.6: - version "4.7.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" - integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: minimist "^1.2.5" neo-async "^2.6.0" @@ -5342,12 +5278,10 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-3.0.0.tgz#36077ef1d15f333484aa7fa77a28606f1c655b37" - integrity sha1-Ngd+8dFfMzSEqn+neihgbxxlWzc= - dependencies: - ansi-regex "^3.0.0" +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== has-flag@^3.0.0: version "3.0.0" @@ -5359,10 +5293,10 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" @@ -5423,9 +5357,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== hosted-git-info@^4.0.1: version "4.0.2" @@ -5452,9 +5386,9 @@ html-encoding-sniffer@^2.0.1: whatwg-encoding "^1.0.5" html-entities@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" - integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" + integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== html-escaper@^2.0.0: version "2.0.2" @@ -5504,9 +5438,9 @@ http-errors@~1.7.2: toidentifier "1.0.0" http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== + version "0.5.3" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" + integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== http-proxy-agent@^4.0.1: version "4.0.1" @@ -5546,9 +5480,9 @@ http-signature@~1.2.0: sshpk "^1.7.0" http2-wrapper@^1.0.0-beta.5.2: - version "1.0.0-beta.5.2" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" - integrity sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== dependencies: quick-lru "^5.1.1" resolve-alpn "^1.0.0" @@ -5620,9 +5554,9 @@ ignore@^5.1.1, ignore@^5.1.4: integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -5694,16 +5628,16 @@ ini@^1.3.2, ini@^1.3.4, ini@^1.3.5: integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== init-package-json@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.2.tgz#d81a7e6775af9b618f20bba288e440b8d1ce05f3" - integrity sha512-PO64kVeArePvhX7Ff0jVWkpnE1DfGRvaWcStYrPugcJz9twQGYibagKJuIMHCX7ENcp0M6LJlcjLBuLD5KeJMg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.3.tgz#c8ae4f2a4ad353bcbc089e5ffe98a8f1a314e8fd" + integrity sha512-tk/gAgbMMxR6fn1MgMaM1HpU1ryAmBWWitnxG5OhuNXeX0cbpbgV5jA4AIpQJVNoyOfOevTtO6WX+rPs+EFqaQ== dependencies: glob "^7.1.1" - npm-package-arg "^8.1.0" + npm-package-arg "^8.1.2" promzard "^0.3.0" read "~1.0.1" - read-package-json "^3.0.0" - semver "^7.3.2" + read-package-json "^3.0.1" + semver "^7.3.5" validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" @@ -5798,15 +5732,22 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bigint@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" + integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + 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" @@ -5814,20 +5755,22 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" +is-boolean-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" + integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + dependencies: + call-bind "^1.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - -is-callable@^1.1.4, is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== +is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== is-ci@^2.0.0: version "2.0.0" @@ -5836,13 +5779,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" - integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== - dependencies: - has "^1.0.3" - is-core-module@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -5888,9 +5824,9 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: kind-of "^6.0.2" is-docker@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" - integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" @@ -5955,10 +5891,15 @@ is-lambda@^1.0.1: resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== is-number@^3.0.0: version "3.0.0" @@ -6009,9 +5950,9 @@ is-path-inside@^2.1.0: path-is-inside "^1.0.2" is-path-inside@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" - integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" @@ -6036,9 +5977,9 @@ is-plain-object@^5.0.0: integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== is-potential-custom-element-name@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" - integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== is-promise@^2.1.0: version "2.2.2" @@ -6050,11 +5991,12 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= -is-regex@^1.0.4, is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== +is-regex@^1.0.4, is-regex@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== dependencies: + call-bind "^1.0.2" has-symbols "^1.0.1" is-regexp@^1.0.0: @@ -6091,7 +6033,12 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-symbol@^1.0.2: +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== @@ -6537,15 +6484,6 @@ jest-runtime@^26.6.3: strip-bom "^4.0.0" yargs "^15.4.1" -jest-serializer-ansi@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/jest-serializer-ansi/-/jest-serializer-ansi-1.0.3.tgz#b4303a48159f8f3a92bb38c3c9e5df18014e2905" - integrity sha512-WYxhEjUxuAvOrECAzIBy65OWLfEnVOxb7RerNFpBSXW2cf4u8YaC/j7688OgCQ4WD80dYx5KnPh2jFVnk91XTw== - dependencies: - has-ansi "^3.0.0" - lodash "^4.17.4" - strip-ansi "^4.0.0" - jest-serializer@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" @@ -6650,9 +6588,9 @@ js-tokens@^4.0.0: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -6688,35 +6626,35 @@ jscodeshift@^0.11.0: write-file-atomic "^2.3.0" jsdom@^16.4.0: - version "16.4.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" - integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== + version "16.5.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.5.3.tgz#13a755b3950eb938b4482c407238ddf16f0d2136" + integrity sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA== dependencies: - abab "^2.0.3" - acorn "^7.1.1" + abab "^2.0.5" + acorn "^8.1.0" acorn-globals "^6.0.0" cssom "^0.4.4" - cssstyle "^2.2.0" + cssstyle "^2.3.0" data-urls "^2.0.0" - decimal.js "^10.2.0" + decimal.js "^10.2.1" domexception "^2.0.1" - escodegen "^1.14.1" + escodegen "^2.0.0" html-encoding-sniffer "^2.0.1" is-potential-custom-element-name "^1.0.0" nwsapi "^2.2.0" - parse5 "5.1.1" + parse5 "6.0.1" request "^2.88.2" - request-promise-native "^1.0.8" - saxes "^5.0.0" + request-promise-native "^1.0.9" + saxes "^5.0.1" symbol-tree "^3.2.4" - tough-cookie "^3.0.1" + tough-cookie "^4.0.0" w3c-hr-time "^1.0.2" w3c-xmlserializer "^2.0.0" webidl-conversions "^6.1.0" whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - ws "^7.2.3" + whatwg-url "^8.5.0" + ws "^7.4.4" xml-name-validator "^3.0.0" jsesc@^2.5.1: @@ -6744,6 +6682,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -6765,18 +6708,18 @@ json3@^3.3.3: integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== json5@2.x, json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: - universalify "^1.0.0" + universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -6965,9 +6908,9 @@ listr-verbose-renderer@^0.5.0: figures "^2.0.0" listr2@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.2.tgz#d20feb75015e506992b55af40722ba1af168b8f1" - integrity sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg== + version "3.7.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.7.1.tgz#ff0c410b10eb1c5c76735e4814128ec8f7d2b983" + integrity sha512-cNd368GTrk8351/ov/IV+BSwyf9sJRgI0UIvfORonCZA1u9UHAtAlqSEv9dgafoQIA1CgB3nu4No79pJtK2LHw== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" @@ -6975,8 +6918,9 @@ listr2@^3.2.2: indent-string "^4.0.0" log-update "^4.0.0" p-map "^4.0.0" - rxjs "^6.6.3" + rxjs "^6.6.7" through "^2.3.8" + wrap-ansi "^7.0.0" listr@^0.14.3: version "0.14.3" @@ -7064,6 +7008,16 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -7074,12 +7028,7 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.template@^4.0.2, lodash.template@^4.5.0: +lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -7094,7 +7043,12 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash@4.x, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + +lodash@4.x, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7229,9 +7183,9 @@ map-obj@^1.0.0, map-obj@^1.0.1: integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" - integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== + version "4.2.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" + integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== map-visit@^1.0.0: version "1.0.0" @@ -7263,21 +7217,21 @@ mem-fs-editor@^6.0.0: vinyl "^2.2.0" mem-fs-editor@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-7.0.1.tgz#e0797802b7797acf43ef3c511f3d3ad5ea765783" - integrity sha512-eD8r4/d2ayp9HHIgBPHB6Ds0ggA8F9cf9HxcNtbqrwqJXfIDrOSMG5K4fV3+Ib3B+HIdrWqkeDDDvrO7i9EbvQ== + version "7.1.0" + resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-7.1.0.tgz#2a16f143228df87bf918874556723a7ee73bfe88" + integrity sha512-BH6QEqCXSqGeX48V7zu+e3cMwHU7x640NB8Zk8VNvVZniz+p4FK60pMx/3yfkzo6miI6G3a8pH6z7FeuIzqrzA== dependencies: commondir "^1.0.1" deep-extend "^0.6.0" - ejs "^3.0.1" + ejs "^3.1.5" glob "^7.1.4" globby "^9.2.0" isbinaryfile "^4.0.0" mkdirp "^1.0.0" multimatch "^4.0.0" rimraf "^3.0.0" - through2 "^3.0.1" - vinyl "^2.2.0" + through2 "^3.0.2" + vinyl "^2.2.1" mem-fs@^1.1.0: version "1.2.0" @@ -7329,23 +7283,6 @@ meow@^6.1.1: type-fest "^0.13.1" yargs-parser "^18.1.3" -meow@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306" - integrity sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^2.5.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.13.1" - yargs-parser "^18.1.3" - meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -7403,24 +7340,24 @@ micromatch@^3.1.10, micromatch@^3.1.4: to-regex "^3.0.2" micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== dependencies: braces "^3.0.1" - picomatch "^2.0.5" + picomatch "^2.2.3" -mime-db@1.45.0, "mime-db@>= 1.43.0 < 2": - version "1.45.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" - integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== +mime-db@1.47.0, "mime-db@>= 1.43.0 < 2": + version "1.47.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" + integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.28" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" - integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + version "2.1.30" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" + integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== dependencies: - mime-db "1.45.0" + mime-db "1.47.0" mime@1.6.0: version "1.6.0" @@ -7428,9 +7365,9 @@ mime@1.6.0: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.3.1, mime@^2.4.4: - version "2.4.7" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" - integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== + version "2.5.2" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" + integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== mimic-fn@^1.0.0: version "1.2.0" @@ -7609,11 +7546,16 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@2.1.2, ms@^2.0.0, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -7708,7 +7650,7 @@ node-dir@^0.1.17: dependencies: minimatch "^3.0.2" -node-fetch@^2.6.1: +node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -7762,9 +7704,9 @@ node-modules-regexp@^1.0.0: integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= node-notifier@^8.0.0: - version "8.0.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.1.tgz#f86e89bbc925f2b068784b31f382afdc6ca56be1" - integrity sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA== + version "8.0.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.2.tgz#f3167a38ef0d2c8a866a83e318c1ba0efeb702c5" + integrity sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg== dependencies: growly "^1.3.0" is-wsl "^2.2.0" @@ -7780,10 +7722,10 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^1.1.69: - version "1.1.70" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" - integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== +node-releases@^1.1.71: + version "1.1.71" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" + integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== nopt@^4.0.1: version "4.0.3" @@ -7843,16 +7785,16 @@ normalize-url@^4.1.0: integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== npm-api@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-api/-/npm-api-1.0.0.tgz#6033c283bb04ddb0185344c1ad07ed4f67c77989" - integrity sha512-gtJhIhGq07g9H5sIAB9TZzTySW8MYtcYqg+e+J+5q1GmDsDLLVfyvVBL1VklzjtRsElph11GUtLBS191RDOJxQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-api/-/npm-api-1.0.1.tgz#3def9b51afedca57db14ca0c970d92442d21c9c5" + integrity sha512-4sITrrzEbPcr0aNV28QyOmgn6C9yKiF8k92jn4buYAK8wmA5xo1qL3II5/gT1r7wxbXBflSduZ2K3FbtOrtGkA== dependencies: JSONStream "^1.3.5" clone-deep "^4.0.1" download-stats "^0.3.4" moment "^2.24.0" + node-fetch "^2.6.0" paged-request "^2.0.1" - request "^2.88.0" npm-bundled@^1.1.1: version "1.1.1" @@ -7906,7 +7848,7 @@ npm-packlist@^2.1.4: npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" -npm-pick-manifest@^6.0.0: +npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== @@ -8016,18 +7958,18 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== +object-inspect@^1.9.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.2.tgz#b6385a3e2b7cae0b5eafcf90cddf85d128767f30" + integrity sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA== object-is@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" - integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg== + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -8041,23 +7983,24 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0, object.assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" - integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== +object.assign@^4.1.0, object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.18.0-next.0" has-symbols "^1.0.1" object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.2" object.pick@^1.3.0: version "1.3.0" @@ -8166,9 +8109,9 @@ osenv@^0.1.4: os-tmpdir "^1.0.0" p-cancelable@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" - integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.0.tgz#4d51c3b91f483d02a0d300765321fca393d758dd" + integrity sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ== p-each-series@^2.1.0: version "2.2.0" @@ -8181,9 +8124,9 @@ p-finally@^1.0.0: integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-lazy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-3.0.0.tgz#3d8b2aceea3e49f8e5883947838e9370f15c9e28" - integrity sha512-LwLtFifyLFRTMQUvA3m8iN8Ll0TesCD4KeDg+nJTEuZ38HWz8pi9QSfxt5I2I7nzk8G0ODVTg98GoSjNthlcKQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-3.1.0.tgz#4b1e40482b7ee87853abbcf31824ff64e1816d61" + integrity sha512-sCJn0Cdahs6G6SX9+DUihVFUhrzDEduzE5xeViVBGtoqy5dBWko7W8T6Kk6TjR2uevRXJO7CShfWrqdH5s3w3g== p-limit@^1.1.0: version "1.3.0" @@ -8199,14 +8142,7 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -8350,11 +8286,11 @@ pacote@^11.2.6: tar "^6.1.0" paged-request@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/paged-request/-/paged-request-2.0.1.tgz#91164f042231feb68643542d2530476a518ff4de" - integrity sha512-C0bB/PFk9rQskD1YEiz7uuchzqKDQGgdsEHN1ahify0UUWzgmMK4NDG9fhlQg2waogmNFwEvEeHfMRvJySpdVw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/paged-request/-/paged-request-2.0.2.tgz#4d621a08b8d6bee4440a0a92112354eeece5b5b0" + integrity sha512-NWrGqneZImDdcMU/7vMcAOo1bIi5h/pmpJqe7/jdsy85BA/s5MSaU/KlpxwW/IVPmIwBcq2uKPrBWWhEWhtxag== dependencies: - axios "^0.18.0" + axios "^0.21.1" parent-module@^1.0.0: version "1.0.1" @@ -8384,9 +8320,9 @@ parse-json@^4.0.0: json-parse-better-errors "^1.0.1" parse-json@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" - integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" @@ -8399,12 +8335,14 @@ parse-passwd@^1.0.0: integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= parse-path@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.2.tgz#ef14f0d3d77bae8dd4bc66563a4c151aac9e65aa" - integrity sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" + integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== dependencies: is-ssh "^1.3.0" protocols "^1.4.0" + qs "^6.9.4" + query-string "^6.13.8" parse-url@^5.0.0: version "5.0.2" @@ -8416,10 +8354,10 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" - integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" @@ -8509,10 +8447,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" + integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== pify@^2.0.0, pify@^2.3.0: version "2.3.0" @@ -8616,9 +8554,9 @@ prettier@^2.1.2: integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== pretty-bytes@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b" - integrity sha512-s1Iam6Gwz3JI5Hweaz4GoCD1WUNUIyzePFy5+Js2hjwGVt2Z79wNN+ZKOZ2vB6C+Xs6njyB84Z1IthQg8d9LxA== + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" @@ -8661,9 +8599,9 @@ promise-retry@^2.0.1: retry "^0.12.0" prompts@^2.0.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" - integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== + version "2.4.1" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" + integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== dependencies: kleur "^3.0.3" sisteransi "^1.0.5" @@ -8698,7 +8636,7 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= -psl@^1.1.28: +psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== @@ -8731,11 +8669,28 @@ qs@6.7.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.9.4: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +query-string@^6.13.8: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" @@ -8746,6 +8701,11 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -8779,9 +8739,9 @@ raw-body@2.4.0: unpipe "1.0.0" react-is@^17.0.1: - version "17.0.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" - integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== read-chunk@^3.2.0: version "3.2.0" @@ -8814,7 +8774,7 @@ read-package-json@^2.0.0: normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" -read-package-json@^3.0.0: +read-package-json@^3.0.0, read-package-json@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-3.0.1.tgz#c7108f0b9390257b08c21e3004d2404c806744b9" integrity sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng== @@ -8991,12 +8951,12 @@ regex-not@^1.0.0, regex-not@^1.0.2: safe-regex "^1.1.0" regexp.prototype.flags@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" - integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" @@ -9016,9 +8976,9 @@ remove-trailing-separator@^1.0.1: integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== repeat-string@^1.6.1: version "1.6.1" @@ -9044,7 +9004,7 @@ request-promise-core@1.1.4: dependencies: lodash "^4.17.19" -request-promise-native@^1.0.8: +request-promise-native@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== @@ -9084,6 +9044,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -9095,9 +9060,9 @@ requires-port@^1.0.0: integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-alpn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c" - integrity sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.1.2.tgz#30b60cfbb0c0b8dc897940fe13fe255afcdd4d28" + integrity sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA== resolve-cwd@^2.0.0: version "2.0.0" @@ -9148,15 +9113,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.18.1, resolve@^1.9.0: - version "1.18.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" - integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== - dependencies: - is-core-module "^2.0.0" - path-parse "^1.0.6" - -resolve@^1.20.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.9.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -9234,14 +9191,16 @@ run-async@^2.0.0, run-async@^2.2.0, run-async@^2.4.0: integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" - integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" -rxjs@>=6.4.0, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.3: - version "6.6.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" - integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== +rxjs@>=6.4.0, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== dependencies: tslib "^1.9.0" @@ -9282,7 +9241,7 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -saxes@^5.0.0: +saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== @@ -9329,12 +9288,12 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.5, semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: +semver@7.3.5, semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -9472,15 +9431,24 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== sirv@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.10.tgz#3e591f5a9ae2520f50d5830f5fae38d97e7be194" - integrity sha512-H5EZCoZaggEUQy8ocKsF7WAToGuZhjJlLvM3XOef46CbdIgbNeQ1p32N1PCuCjkVYwrAVOSMacN6CXXgIzuspg== + version "1.0.11" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.11.tgz#81c19a29202048507d6ec0d8ba8910fda52eb5a4" + integrity sha512-SR36i3/LSWja7AJNRBz4fF/Xjpn7lQFI30tZ434dIy+bitLYSP+ZEenHg36i23V2SGEz+kqjksg0uOGZ5LPiqg== dependencies: "@polka/url" "^1.0.0-next.9" mime "^2.3.1" @@ -9570,16 +9538,16 @@ snapdragon@^0.8.1: use "^3.1.0" sockjs-client@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.0.tgz#2f8ff5d4b659e0d092f7aba0b7c386bd2aa20add" - integrity sha512-8Dt3BDi4FYNrCFGTL/HtwVzkARrENdwOUf1ZoW/9p3M8lZdFT35jVdrHza+qgxuG9H3/shR4cuX/X9umUrjP8Q== + version "1.5.1" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.1.tgz#256908f6d5adfb94dabbdbd02c66362cca0f9ea6" + integrity sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ== dependencies: debug "^3.2.6" eventsource "^1.0.7" faye-websocket "^0.11.3" inherits "^2.0.4" json3 "^3.3.3" - url-parse "^1.4.7" + url-parse "^1.5.1" sockjs@^0.3.21: version "0.3.21" @@ -9600,9 +9568,9 @@ socks-proxy-agent@^5.0.0: socks "^2.3.3" socks@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.0.tgz#6b984928461d39871b3666754b9000ecf39dfac2" - integrity sha512-mNmr9owlinMplev0Wd7UHFlqI4ofnBnNzFuzrm63PPaHgbkqCFe4T5LzwKmtQ/f2tX0NTpcdVLyD/FHxFBstYw== + version "2.6.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" + integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== dependencies: ip "^1.1.5" smart-buffer "^4.1.0" @@ -9646,9 +9614,9 @@ source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5. source-map "^0.6.0" source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" @@ -9699,9 +9667,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.6" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce" - integrity sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw== + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== spdy-transport@^3.0.0: version "3.0.0" @@ -9726,6 +9694,11 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -9733,13 +9706,6 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -split2@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" - integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== - dependencies: - through2 "^2.0.2" - split2@^3.0.0: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" @@ -9782,9 +9748,9 @@ ssri@^8.0.0, ssri@^8.0.1: minipass "^3.1.1" stack-utils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.2.tgz#5cf48b4557becb4638d0bc4f21d23f5d19586593" - integrity sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" + integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== dependencies: escape-string-regexp "^2.0.0" @@ -9806,15 +9772,20 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-argv@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== string-length@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" - integrity sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" strip-ansi "^6.0.0" @@ -9851,29 +9822,29 @@ string-width@^3.0.0, string-width@^3.1.0: strip-ansi "^5.1.0" string-width@^4.1.0, string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.trimend@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz#6ddd9a8796bc714b489a3ae22246a208f37bfa46" - integrity sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw== +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" -string.prototype.trimstart@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz#22d45da81015309cd0cdd79787e8919fc5c613e7" - integrity sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg== +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" string_decoder@^1.1.1: version "1.3.0" @@ -10023,9 +9994,9 @@ supports-color@^7.0.0, supports-color@^7.1.0: has-flag "^4.0.0" supports-hyperlinks@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" - integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" + integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== dependencies: has-flag "^4.0.0" supports-color "^7.0.0" @@ -10041,12 +10012,17 @@ symbol-tree@^3.2.4: integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== table@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.4.tgz#c523dd182177e926c723eb20e1b341238188aa0d" - integrity sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw== - dependencies: - ajv "^6.12.4" - lodash "^4.17.20" + version "6.3.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.3.1.tgz#ff50199ca5de00bc695596d581f7550759889b35" + integrity sha512-kNpMVSN4fj9KY4G6tNDVIT59uaG8ZELGQ+cmFSqivmWkCXJLd00VfRmtyHa8X7AeM75PQ/6/TtEtWjTDs1jXJw== + dependencies: + ajv "^8.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + lodash.clonedeep "^4.5.0" + lodash.flatten "^4.4.0" + lodash.truncate "^4.4.2" slice-ansi "^4.0.0" string-width "^4.2.0" @@ -10104,9 +10080,9 @@ temp@^0.8.1: rimraf "~2.6.2" temp@^0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.2.tgz#06728e6e4b847e3ea5579c69c44bcc3ee6a47100" - integrity sha512-KLVd6CXeUYsqmI/LBWDLg3bFkdZPg0Xr/Gn79GUuPNiISzp6v/EKUaCOrxqeH1w/wVNmrljyDRgKxhZV9JzyJA== + version "0.9.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.4.tgz#cd20a8580cb63635d0e4e9d4bd989d44286e7620" + integrity sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA== dependencies: mkdirp "^0.5.1" rimraf "~2.6.2" @@ -10132,9 +10108,9 @@ terser-webpack-plugin@^5.1.1: terser "^5.5.1" terser@^5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" - integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== + version "5.6.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.6.1.tgz#a48eeac5300c0a09b36854bf90d9c26fb201973c" + integrity sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -10169,7 +10145,7 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through2@^2.0.0, through2@^2.0.2: +through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -10177,7 +10153,7 @@ through2@^2.0.0, through2@^2.0.2: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^3.0.0, through2@^3.0.1: +through2@^3.0.0, through2@^3.0.1, through2@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== @@ -10274,14 +10250,14 @@ tough-cookie@^2.3.3, tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" - integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== dependencies: - ip-regex "^2.1.0" - psl "^1.1.28" + psl "^1.1.33" punycode "^2.1.1" + universalify "^0.1.2" tr46@^2.0.2: version "2.0.2" @@ -10339,14 +10315,14 @@ tslib@^1.8.1, tslib@^1.9.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" + integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" @@ -10381,11 +10357,6 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-fest@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" - integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== - type-fest@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" @@ -10401,6 +10372,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + type-fest@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" @@ -10442,9 +10418,9 @@ typescript@^4.1.3: integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== uglify-js@^3.1.4: - version "3.11.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.4.tgz#b47b7ae99d4bd1dca65b53aaa69caa0909e6fadf" - integrity sha512-FyYnoxVL1D6+jDGQpbK5jW6y/2JlVfRfEeQ67BPCUg5wfCjaKOpr2XeceE4QL+MkhxliLtf5EbrMDZgzpt2CNw== + version "3.13.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.4.tgz#592588bb9f47ae03b24916e2471218d914955574" + integrity sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw== uid-number@0.0.6: version "0.0.6" @@ -10456,6 +10432,16 @@ umask@^1.1.0: resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= +unbox-primitive@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -10485,10 +10471,10 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== universalify@^2.0.0: version "2.0.0" @@ -10529,9 +10515,9 @@ upath@^2.0.1: integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -10547,10 +10533,10 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" -url-parse@^1.4.3, url-parse@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" - integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== +url-parse@^1.4.3, url-parse@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" + integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" @@ -10608,9 +10594,9 @@ v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0: integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz#b4fe00e35649ef7785a9b7fcebcea05f37c332fc" - integrity sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA== + version "7.1.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz#04bfd1026ba4577de5472df4f5e89af49de5edda" + integrity sha512-p0BB09E5FRjx0ELN6RgusIPsSPhtgexSRcKETybEs6IGOTXJSZqfwxp7r//55nnu0f1AxltY5VvdVqy2vZf9AA== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -10656,7 +10642,7 @@ vinyl-file@^3.0.0: strip-bom-stream "^2.0.0" vinyl "^2.0.1" -vinyl@^2.0.1, vinyl@^2.2.0: +vinyl@^2.0.1, vinyl@^2.2.0, vinyl@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== @@ -10690,9 +10676,9 @@ walker@^1.0.7, walker@~1.0.5: makeerror "1.0.x" watchpack@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.0.tgz#e63194736bf3aa22026f7b191cd57907b0f9f696" - integrity sha512-UjgD1mqjkG99+3lgG36at4wPnUXNvis2v1utwTgQ43C22c4LD71LsYMExdWXh4HZ+RmW+B0t1Vrg2GpXAkTOQw== + version "2.1.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" + integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -10810,20 +10796,20 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.31.2: - version "5.33.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.33.2.tgz#c049717c9b038febf5a72fd2f53319ad59a8c1fc" - integrity sha512-X4b7F1sYBmJx8mlh2B7mV5szEkE0jYNJ2y3akgAP0ERi0vLCG1VvdsIxt8lFd4st6SUy0lf7W0CCQS566MBpJg== +webpack@^5.34.0: + version "5.34.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.34.0.tgz#8f12bfd3474e7543232345b89294cfe8a5191c10" + integrity sha512-+WiFMgaZqhu7zKN64LQ7z0Ml4WWI+9RwG6zmS0wJDQXiCeg3hpN8fYFNJ+6WlosDT55yVxTfK7XHUAOVR4rLyA== dependencies: "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.46" + "@types/estree" "^0.0.47" "@webassemblyjs/ast" "1.11.0" "@webassemblyjs/wasm-edit" "1.11.0" "@webassemblyjs/wasm-parser" "1.11.0" acorn "^8.0.4" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.7.0" + enhanced-resolve "^5.8.0" es-module-lexer "^0.4.0" eslint-scope "^5.1.1" events "^3.2.0" @@ -10865,16 +10851,7 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^8.0.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" - integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^2.0.2" - webidl-conversions "^6.1.0" - -whatwg-url@^8.4.0: +whatwg-url@^8.0.0, whatwg-url@^8.4.0, whatwg-url@^8.5.0: version "8.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" integrity sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg== @@ -10883,6 +10860,17 @@ whatwg-url@^8.4.0: tr46 "^2.0.2" webidl-conversions "^6.1.0" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -11032,10 +11020,10 @@ ws@^6.2.1: dependencies: async-limiter "~1.0.0" -ws@^7.2.3, ws@^7.3.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" - integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ== +ws@^7.3.1, ws@^7.4.4: + version "7.4.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" + integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== xml-name-validator@^3.0.0: version "3.0.0" @@ -11053,14 +11041,14 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== y18n@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" - integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.0, yallist@^3.0.3: version "3.1.1" @@ -11073,19 +11061,19 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@20.x: - version "20.2.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" - integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww== +yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== yargs-parser@^13.1.2: version "13.1.2" @@ -11103,11 +11091,6 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== - yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" From 295f5db4a2f1e76c5dd69ed3d526146c3d8ceba9 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 21 Apr 2021 17:08:27 +0530 Subject: [PATCH 067/103] docs: fix links on npm (#2649) --- packages/configtest/package.json | 5 +++++ packages/generators/package.json | 5 +++++ packages/info/package.json | 5 +++++ packages/serve/README.md | 2 +- packages/serve/package.json | 5 +++++ packages/webpack-cli/README.md | 2 +- packages/webpack-cli/package.json | 1 + 7 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/configtest/package.json b/packages/configtest/package.json index 19d884a5d24..6bf01763a01 100644 --- a/packages/configtest/package.json +++ b/packages/configtest/package.json @@ -8,6 +8,11 @@ "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "https://github.com/webpack/webpack-cli.git" + }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest", "files": [ "lib" ], diff --git a/packages/generators/package.json b/packages/generators/package.json index c545cf34496..93f9edd0c83 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -9,6 +9,11 @@ "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "https://github.com/webpack/webpack-cli.git" + }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/generators", "files": [ "lib", "addon-template", diff --git a/packages/info/package.json b/packages/info/package.json index 1f7305f508c..ddcb4ec7691 100644 --- a/packages/info/package.json +++ b/packages/info/package.json @@ -8,6 +8,11 @@ "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "https://github.com/webpack/webpack-cli.git" + }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info", "files": [ "lib" ], diff --git a/packages/serve/README.md b/packages/serve/README.md index cd157072c4f..5566baf0710 100644 --- a/packages/serve/README.md +++ b/packages/serve/README.md @@ -24,7 +24,7 @@ npx webpack-cli serve ### Options -Checkout [`SERVE-OPTIONS.md`](../../SERVE-OPTIONS.md) to see list of all available options for `serve` command. +Checkout [`SERVE-OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/SERVE-OPTIONS.md) to see list of all available options for `serve` command. [downloads]: https://img.shields.io/npm/dm/@webpack-cli/serve.svg [downloads-url]: https://www.npmjs.com/package/@webpack-cli/serve diff --git a/packages/serve/package.json b/packages/serve/package.json index 815b9ca0714..58abc421623 100644 --- a/packages/serve/package.json +++ b/packages/serve/package.json @@ -8,6 +8,11 @@ "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "https://github.com/webpack/webpack-cli.git" + }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/serve", "license": "MIT", "files": [ "lib" diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 8104a38c73b..9c6e0010146 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -114,4 +114,4 @@ Global options: ### webpack 5 -Checkout [`OPTIONS.md`](../../OPTIONS.md) to see list of all available options. +Checkout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md) to see list of all available options. diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index 128c66c24bd..ead8b78d314 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -7,6 +7,7 @@ "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli", "bin": { "webpack-cli": "./bin/cli.js" }, From 5063ed7970cd12fd042308edfccca8dbf249f0fc Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Wed, 21 Apr 2021 14:55:10 +0300 Subject: [PATCH 068/103] fix: avoid unnecessary searching port (#2648) --- packages/serve/src/startDevServer.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/serve/src/startDevServer.ts b/packages/serve/src/startDevServer.ts index 1d99e5027e8..e1d7e2fb9aa 100644 --- a/packages/serve/src/startDevServer.ts +++ b/packages/serve/src/startDevServer.ts @@ -21,15 +21,13 @@ export default async function startDevServer( cliOptions: any, logger: any, ): Promise[]> { - let devServerVersion, Server, findPort; + let devServerVersion, Server; try { // eslint-disable-next-line node/no-extraneous-require devServerVersion = require('webpack-dev-server/package.json').version; // eslint-disable-next-line node/no-extraneous-require Server = require('webpack-dev-server/lib/Server'); - // eslint-disable-next-line node/no-extraneous-require - findPort = require('webpack-dev-server/lib/utils/findPort'); } catch (err) { logger.error(`You need to install 'webpack-dev-server' for running 'webpack serve'.\n${err}`); process.exit(2); @@ -71,9 +69,7 @@ export default async function startDevServer( for (const compilerWithDevServerOption of compilersWithDevServerOption) { const options = mergeOptions(compilerWithDevServerOption.options.devServer || {}, devServerCliOptions); - if (isDevServer4) { - options.port = await findPort(options.port); - } else { + if (!isDevServer4) { const getPublicPathOption = (): string => { const normalizePublicPath = (publicPath): string => typeof publicPath === 'undefined' || publicPath === 'auto' ? '/' : publicPath; @@ -87,11 +83,6 @@ export default async function startDevServer( return normalizePublicPath(options.publicPath); } - // webpack-dev-server@4 - if (options.dev && options.dev.publicPath) { - return normalizePublicPath(options.dev.publicPath); - } - return normalizePublicPath(compilerWithDevServerOption.options.output.publicPath); }; const getStatsOption = (): string | boolean => { From e1b57ca0f52a859f101aea0f79efe2c2bd0fcf37 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Wed, 21 Apr 2021 15:30:28 +0300 Subject: [PATCH 069/103] test: refactor --- .../start-finish-force-log.test.js | 1 + test/init/init.test.js | 102 ++++++--- test/loader/loader.test.js | 35 ++- test/plugin/plugin.test.js | 23 +- test/serve/basic/serve-basic.test.js | 13 +- test/utils/test-utils.js | 202 +++++++++--------- test/utils/test-utils.test.js | 43 +--- test/watch/analyze/analyze-flag.test.js | 4 +- test/watch/basic/basic.test.js | 12 +- test/watch/stdin/stdin.test.js | 21 +- .../watch-variable/watch-variable.test.js | 6 +- 11 files changed, 220 insertions(+), 242 deletions(-) diff --git a/test/build/start-finish-force-log/start-finish-force-log.test.js b/test/build/start-finish-force-log/start-finish-force-log.test.js index a91d5510f31..5e24d17d2d3 100644 --- a/test/build/start-finish-force-log/start-finish-force-log.test.js +++ b/test/build/start-finish-force-log/start-finish-force-log.test.js @@ -28,6 +28,7 @@ describe('start finish force log', () => { it('should work with watch', async () => { const { stderr, stdout } = await runWatch(__dirname, ['watch'], { env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true }, + killString: /Compiler finished/, }); expect(stderr).toContain('Compiler starting...'); expect(stderr).toContain('Compiler finished'); diff --git a/test/init/init.test.js b/test/init/init.test.js index 539e9a6b376..05b6c8bc350 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -1,24 +1,28 @@ +const os = require('os'); const path = require('path'); const { mkdirSync, existsSync, readFileSync } = require('fs'); const { join, resolve } = require('path'); -// eslint-disable-next-line node/no-unpublished-require -const rimraf = require('rimraf'); const { isWindows, run, runPromptWithAnswers, uniqueDirectoryForTest } = require('../utils/test-utils'); -const rootAssetsPath = resolve(__dirname, './test-assets'); +jest.setTimeout(480000); + const ENTER = '\x0D'; const DOWN = '\x1B\x5B\x42'; // Helper to read from package.json in a given path const readFromPkgJSON = (path) => { const pkgJSONPath = join(path, 'package.json'); + if (!existsSync(pkgJSONPath)) { return {}; } + const pkgJSON = JSON.parse(readFileSync(pkgJSONPath, 'utf8')); const { devDependencies: devDeps } = pkgJSON; + // Update devDeps versions to be x.x.x to prevent frequent snapshot updates Object.keys(devDeps).forEach((dep) => (devDeps[dep] = 'x.x.x')); + return { ...pkgJSON, devDependencies: devDeps }; }; @@ -26,24 +30,16 @@ const readFromPkgJSON = (path) => { const readFromWebpackConfig = (path) => readFileSync(join(path, 'webpack.config.js'), 'utf8'); describe('init command', () => { - beforeAll(() => { - if (!existsSync(rootAssetsPath)) { - mkdirSync(rootAssetsPath); - } - }); - - afterAll(() => { - rimraf.sync(rootAssetsPath); - }); - it('should generate default project when nothing is passed', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(assetsPath, ['init', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -53,13 +49,15 @@ describe('init command', () => { }); it('should generate project when generationPath is supplied', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -69,14 +67,16 @@ describe('init command', () => { }); it('should generate folders if non existing generation path is given', async () => { - const assetsPath = path.resolve(rootAssetsPath, 'nonExistingDir'); + const assetsPath = path.resolve(os.tmpdir(), Date.now().toString()); const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); + expect(stdout).toContain("generation path doesn't exist, required folders will be created."); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -86,14 +86,16 @@ describe('init command', () => { }); it('should configure assets modules by default', async () => { - const assetsPath = path.resolve(rootAssetsPath, 'nonExistingDir2'); + const assetsPath = path.resolve(os.tmpdir(), Date.now().toString()); const { stdout, stderr } = await run(__dirname, ['init', assetsPath, '--force']); + expect(stdout).toContain("generation path doesn't exist, required folders will be created."); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -106,14 +108,16 @@ describe('init command', () => { }); it('should ask question when wrong template is supplied', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init', '--force', '--template=apple'], [`${ENTER}`]); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stdout).toContain('apple is not a valid template, please select one from below'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -123,18 +127,20 @@ describe('init command', () => { }); it('should generate typescript project correctly', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); expect(stderr).toContain('tsconfig.json'); // Test files const files = ['package.json', 'src', 'src/index.ts', 'webpack.config.js', 'tsconfig.json']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -147,18 +153,20 @@ describe('init command', () => { }); it('should generate ES6 project correctly', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); expect(stderr).toContain('.babelrc'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js', '.babelrc']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -171,17 +179,19 @@ describe('init command', () => { }); it('should use sass in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -194,17 +204,19 @@ describe('init command', () => { }); it('should use sass with postcss in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `y${ENTER}`, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js', 'postcss.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -217,17 +229,19 @@ describe('init command', () => { }); it('should use mini-css-extract-plugin when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `y${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -240,17 +254,19 @@ describe('init command', () => { }); it('should use sass and css with postcss in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${ENTER}`, `y${ENTER}`, `y${ENTER}`, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js', 'postcss.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -263,17 +279,19 @@ describe('init command', () => { }); it('should use less in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -286,17 +304,19 @@ describe('init command', () => { }); it('should use stylus in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${DOWN}${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -309,8 +329,9 @@ describe('init command', () => { }); it('should configure WDS as opted', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init'], [ENTER, ENTER, `n${ENTER}`, ENTER]); + expect(stdout).toContain('Do you want to use webpack-dev-server?'); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -329,12 +350,13 @@ describe('init command', () => { }); it('should use postcss in project when selected', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ['init'], [`${ENTER}`, `n${ENTER}`, `n${ENTER}`, `${DOWN}${ENTER}`, ENTER, `n${ENTER}`], ); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); @@ -353,14 +375,16 @@ describe('init command', () => { }); it('should configure html-webpack-plugin as opted', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init'], [ENTER, `n${ENTER}`, ENTER, ENTER]); + expect(stdout).toContain('Do you want to simplify the creation of HTML files for your bundle?'); expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -377,9 +401,11 @@ describe('init command', () => { return; } - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const projectPath = join(assetsPath, 'non-writable-path'); + mkdirSync(projectPath, 0o500); + const { exitCode, stderr } = await run(projectPath, ['init', 'my-app'], { reject: false }); expect(exitCode).toBe(2); @@ -387,13 +413,15 @@ describe('init command', () => { }); it("should should work with 'new' alias", async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(assetsPath, ['new', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -403,13 +431,15 @@ describe('init command', () => { }); it("should should work with 'create' alias", async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(assetsPath, ['create', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -419,13 +449,15 @@ describe('init command', () => { }); it("should should work with 'c' alias", async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(assetsPath, ['c', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -435,13 +467,15 @@ describe('init command', () => { }); it("should should work with 'n' alias", async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await run(assetsPath, ['n', '--force']); + expect(stdout).toContain('Project has been initialised with webpack!'); expect(stderr).toContain('webpack.config.js'); // Test files const files = ['package.json', 'src', 'src/index.js', 'webpack.config.js']; + files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 499b9ce9ad1..707ae7a7f8d 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -1,14 +1,11 @@ 'use strict'; -const { existsSync, mkdirSync } = require('fs'); +const { existsSync } = require('fs'); const { join, resolve } = require('path'); -// eslint-disable-next-line node/no-unpublished-require -const rimraf = require('rimraf'); const { run, runPromptWithAnswers, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const firstPrompt = '? Loader name (my-loader)'; const ENTER = '\x0D'; -const rootAssetsPath = resolve(__dirname, './test-assets'); const dataForTests = (rootAssetsPath) => ({ loaderName: 'test-loader', loaderPath: join(rootAssetsPath, 'test-loader'), @@ -18,18 +15,8 @@ const dataForTests = (rootAssetsPath) => ({ }); describe('loader command', () => { - beforeAll(() => { - if (!existsSync(rootAssetsPath)) { - mkdirSync(rootAssetsPath); - } - }); - - afterAll(() => { - rimraf.sync(rootAssetsPath); - }); - it('should ask the loader name when invoked', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['loader']); expect(stdout).toBeTruthy(); @@ -38,7 +25,7 @@ describe('loader command', () => { }); it('should scaffold loader with default name if no loader name provided', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { defaultLoaderPath } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers(assetsPath, ['loader'], [`${ENTER}`]); @@ -61,12 +48,14 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './my-loader/examples/simple/'); + ({ stdout } = await run(path, [], false)); + expect(stdout).toContain('my-loader'); }); it('should scaffold loader template with a given name', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { loaderName, loaderPath } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers(assetsPath, ['loader'], [`${loaderName}${ENTER}`]); @@ -89,12 +78,14 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './test-loader/examples/simple/'); + ({ stdout } = await run(path, [], false)); + expect(stdout).toContain('test-loader'); }); it('should scaffold loader template in the specified path', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { loaderName, customLoaderPath } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers(assetsPath, ['loader', 'test-assets'], [`${loaderName}${ENTER}`]); @@ -117,12 +108,14 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); + ({ stdout } = await run(path, [], false)); + expect(stdout).toContain('test-loader'); }); it('should scaffold loader template in the current directory', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { loaderName, customLoaderPath } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers(assetsPath, ['loader', './'], [`${loaderName}${ENTER}`]); @@ -146,12 +139,14 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); + ({ stdout } = await run(path, [], false)); + expect(stdout).toContain('test-loader'); }); it('should prompt on supplying an invalid template', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stderr } = await runPromptWithAnswers(assetsPath, ['loader', '--template=unknown']); expect(stderr).toContain('unknown is not a valid template'); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 10d329d1e87..1ba9e02f150 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -1,13 +1,10 @@ const { existsSync, mkdirSync } = require('fs'); const { join, resolve } = require('path'); -// eslint-disable-next-line node/no-unpublished-require -const rimraf = require('rimraf'); const { run, runPromptWithAnswers, uniqueDirectoryForTest, normalizeStdout } = require('../utils/test-utils'); const ENTER = '\x0D'; const firstPrompt = '? Plugin name'; -const rootAssetsPath = resolve(__dirname, './test-assets'); const dataForTests = (rootAssetsPath) => ({ pluginName: 'test-plugin', pluginPath: join(rootAssetsPath, 'test-plugin'), @@ -17,16 +14,6 @@ const dataForTests = (rootAssetsPath) => ({ }); describe('plugin command', () => { - beforeAll(() => { - if (!existsSync(rootAssetsPath)) { - mkdirSync(rootAssetsPath); - } - }); - - afterAll(() => { - rimraf.sync(rootAssetsPath); - }); - it('should ask the plugin name when invoked', async () => { const { stdout, stderr } = await runPromptWithAnswers(__dirname, ['plugin']); expect(stdout).toBeTruthy(); @@ -35,7 +22,7 @@ describe('plugin command', () => { }); it('should scaffold plugin with default name if no plugin name provided', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { defaultPluginPath } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin'], [`${ENTER}`]); @@ -62,7 +49,7 @@ describe('plugin command', () => { }); it('should scaffold plugin template with a given name', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { pluginName, pluginPath } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin'], [`${pluginName}${ENTER}`]); @@ -89,7 +76,7 @@ describe('plugin command', () => { }); it('should scaffold plugin template in the specified path', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { pluginName, customPluginPath } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin', 'test-assets'], [`${pluginName}${ENTER}`]); @@ -116,7 +103,7 @@ describe('plugin command', () => { }); it('should scaffold plugin template in the current directory', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { genPath, customPluginPath, pluginName } = dataForTests(assetsPath); if (!existsSync(genPath)) { @@ -148,7 +135,7 @@ describe('plugin command', () => { }); it('should prompt on supplying an invalid template', async () => { - const assetsPath = await uniqueDirectoryForTest(rootAssetsPath); + const assetsPath = await uniqueDirectoryForTest(); const { stderr } = await runPromptWithAnswers(assetsPath, ['plugin', '--template=unknown']); expect(stderr).toContain('unknown is not a valid template'); diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index 753326c4009..0b580d20d00 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -302,12 +302,9 @@ describe('basic serve usage', () => { }); it('should log used supplied config with serve', async () => { - const { stderr, stdout } = await runWatch( - __dirname, - ['serve', '--config', 'log.config.js', '--port', port], - {}, - /Compiler is watching files for updates\.\.\./, - ); + const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'log.config.js', '--port', port], { + killString: /Compiler is watching files for updates\.\.\./, + }); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); @@ -338,7 +335,9 @@ describe('basic serve usage', () => { }); it('should work with the "stats" option in config', async () => { - const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'stats.config.js'], {}, /Compiled successfully/); + const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'stats.config.js'], { + killString: /Compiled successfully/, + }); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain('Compiled successfully'); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 85ab12e5b96..8f5c1e95a57 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -2,6 +2,7 @@ 'use strict'; +const os = require('os'); const stripAnsi = require('strip-ansi'); const path = require('path'); const fs = require('fs'); @@ -31,6 +32,7 @@ const hyphenToUpperCase = (name) => { if (!name) { return name; } + return name.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }); @@ -45,20 +47,19 @@ const processKill = (process) => { }; /** - * Run the webpack CLI for a test case. + * Webpack CLI test runner. * - * @param {String} testCase The path to folder that contains the webpack.config.js - * @param {Array} args Array of arguments to pass to webpack - * @param {Object} options Boolean that decides if a default output path will be set or not + * @param {string} cwd The path to folder that contains test + * @param {Array} args Array of arguments + * @param {Object} options Options for tests * @returns {Promise} */ -const run = async (testCase, args = [], options = {}) => { - const cwd = path.resolve(testCase); +const createProcess = (cwd, args, options) => { const { nodeOptions = [] } = options; const processExecutor = nodeOptions.length ? execaNode : execa; return processExecutor(WEBPACK_PATH, args, { - cwd, + cwd: path.resolve(cwd), reject: false, stdio: ENABLE_LOG_COMPILATION ? 'inherit' : 'pipe', maxBuffer: Infinity, @@ -67,33 +68,50 @@ const run = async (testCase, args = [], options = {}) => { }); }; +/** + * Run the webpack CLI for a test case. + * + * @param {string} cwd The path to folder that contains test + * @param {Array} args Array of arguments + * @param {Object} options Options for tests + * @returns {Promise} + */ +const run = async (cwd, args = [], options = {}) => { + return createProcess(cwd, args, options); +}; + +/** + * Run the webpack CLI for a test case and get process. + * + * @param {string} cwd The path to folder that contains test + * @param {Array} args Array of arguments + * @param {Object} options Options for tests + * @returns {Promise} + */ +const runAndGetProcess = (cwd, args = [], options = {}) => { + return createProcess(cwd, args, options); +}; + /** * Run the webpack CLI in watch mode for a test case. * - * @param {String} testCase The path to folder that contains the webpack.config.js - * @param {Array} args Array of arguments to pass to webpack - * @param {Object} options Boolean that decides if a default output path will be set or not - * @param {string} outputKillStr String to kill + * @param {string} cwd The path to folder that contains test + * @param {Array} args Array of arguments + * @param {Object} options Options for tests * @returns {Object} The webpack output or Promise when nodeOptions are present */ -const runWatch = (testCase, args = [], options, outputKillStr = /webpack \d+\.\d+\.\d/) => { - const cwd = path.resolve(testCase); - +const runWatch = (cwd, args = [], options = {}) => { return new Promise((resolve, reject) => { - const proc = execa(WEBPACK_PATH, args, { - cwd, - reject: false, - stdio: 'pipe', - ...options, - }); + const process = createProcess(cwd, args, options); + const outputKillStr = options.killString || /webpack \d+\.\d+\.\d/; - proc.stdout.pipe( + process.stdout.pipe( new Writable({ write(chunk, encoding, callback) { const output = stripAnsi(chunk.toString('utf8')); if (outputKillStr.test(output)) { - processKill(proc); + processKill(process); } callback(); @@ -101,13 +119,13 @@ const runWatch = (testCase, args = [], options, outputKillStr = /webpack \d+\.\d }), ); - proc.stderr.pipe( + process.stderr.pipe( new Writable({ write(chunk, encoding, callback) { const output = stripAnsi(chunk.toString('utf8')); if (outputKillStr.test(output)) { - processKill(proc); + processKill(process); } callback(); @@ -115,124 +133,98 @@ const runWatch = (testCase, args = [], options, outputKillStr = /webpack \d+\.\d }), ); - proc.then((result) => { - resolve(result); - }).catch((error) => { - reject(error); - }); + process + .then((result) => { + resolve(result); + }) + .catch((error) => { + reject(error); + }); }); }; -const runAndGetWatchProc = (testCase, args = [], setOutput = true, input = '', forcePipe = false) => { - const cwd = path.resolve(testCase); - - const outputPath = path.resolve(testCase, 'bin'); - const argsWithOutput = setOutput ? args.concat('--output-path', outputPath) : args; - - const options = { - cwd, - reject: false, - stdio: ENABLE_LOG_COMPILATION && !forcePipe ? 'inherit' : 'pipe', - }; - - // some tests don't work if the input option is an empty string - if (input) { - options.input = input; - } - - const webpackProc = execa(WEBPACK_PATH, argsWithOutput, options); - - return webpackProc; -}; /** * runPromptWithAnswers * @param {string} location location of current working directory * @param {string[]} args CLI args to pass in * @param {string[]} answers answers to be passed to stdout for inquirer question - * @param {boolean} waitForOutput whether to wait for stdout before writing the next answer */ -const runPromptWithAnswers = (location, args, answers, waitForOutput = true) => { - const runner = runAndGetWatchProc(location, args, false, '', true); +const runPromptWithAnswers = (location, args, answers) => { + const process = runAndGetProcess(location, args); - runner.stdin.setDefaultEncoding('utf-8'); + process.stdin.setDefaultEncoding('utf-8'); const delay = 2000; let outputTimeout; + let currentAnswer = 0; - if (waitForOutput) { - let currentAnswer = 0; - const writeAnswer = (output) => { - if (!answers) { - runner.stdin.write(output); - runner.kill(); - return; - } + const writeAnswer = (output) => { + if (!answers) { + process.stdin.write(output); + process.kill(); - if (currentAnswer < answers.length) { - runner.stdin.write(answers[currentAnswer]); - currentAnswer++; - } - }; + return; + } - runner.stdout.pipe( - new Writable({ - write(chunk, encoding, callback) { - const output = chunk.toString('utf8'); - if (output) { - if (outputTimeout) { - clearTimeout(outputTimeout); - } - // we must receive new stdout, then have 2 seconds - // without any stdout before writing the next answer - outputTimeout = setTimeout(() => { - writeAnswer(output); - }, delay); + if (currentAnswer < answers.length) { + process.stdin.write(answers[currentAnswer]); + currentAnswer++; + } + }; + + process.stdout.pipe( + new Writable({ + write(chunk, encoding, callback) { + const output = chunk.toString('utf8'); + + if (output) { + if (outputTimeout) { + clearTimeout(outputTimeout); } - callback(); - }, - }), - ); - } else { - // Simulate answers by sending the answers every 2s - answers.reduce((prevAnswer, answer) => { - return prevAnswer.then(() => { - return new Promise((resolvePromise) => { - setTimeout(() => { - runner.stdin.write(answer); - resolvePromise(); + // we must receive new stdout, then have 2 seconds + // without any stdout before writing the next answer + outputTimeout = setTimeout(() => { + writeAnswer(output); }, delay); - }); - }); - }, Promise.resolve()); - } + } + + callback(); + }, + }), + ); return new Promise((resolve) => { const obj = {}; + let stdoutDone = false; let stderrDone = false; + const complete = () => { if (outputTimeout) { clearTimeout(outputTimeout); } + if (stdoutDone && stderrDone) { - runner.kill('SIGKILL'); + process.kill('SIGKILL'); resolve(obj); } }; - runner.stdout.pipe( + process.stdout.pipe( concat((result) => { stdoutDone = true; obj.stdout = result.toString(); + complete(); }), ); - runner.stderr.pipe( + process.stderr.pipe( concat((result) => { stderrDone = true; obj.stderr = result.toString(); + complete(); }), ); @@ -308,20 +300,20 @@ const readdir = (path) => }); }); -const uniqueDirectoryForTest = async (assetsPath) => { - const localDir = Date.now().toString(); - - const result = path.resolve(assetsPath, localDir); +const uniqueDirectoryForTest = async () => { + const result = path.resolve(os.tmpdir(), Date.now().toString()); - if (!fs.existsSync(result)) fs.mkdirSync(result); + if (!fs.existsSync(result)) { + fs.mkdirSync(result); + } return result; }; module.exports = { run, + runAndGetProcess, runWatch, - runAndGetWatchProc, runPromptWithAnswers, isWebpack5, isDevServer4, diff --git a/test/utils/test-utils.test.js b/test/utils/test-utils.test.js index 876f52c5866..2055f246242 100644 --- a/test/utils/test-utils.test.js +++ b/test/utils/test-utils.test.js @@ -1,28 +1,9 @@ 'use strict'; -const { run, runAndGetWatchProc, hyphenToUpperCase } = require('./test-utils'); -const { writeFileSync, unlinkSync, mkdirSync } = require('fs'); -const { resolve } = require('path'); -// eslint-disable-next-line node/no-unpublished-require -const rimraf = require('rimraf'); +const { run, runAndGetProcess, hyphenToUpperCase, uniqueDirectoryForTest } = require('./test-utils'); const ENTER = '\x0D'; -describe('appendFile', () => { - describe('positive test-cases', () => { - const junkFile = 'junkFile.js'; - const junkFilePath = resolve(__dirname, junkFile); - const initialJunkData = 'initial junk data'; - - beforeEach(() => { - writeFileSync(junkFilePath, initialJunkData); - }); - afterEach(() => { - unlinkSync(junkFilePath); - }); - }); -}); - describe('run function', () => { it('should work correctly by default', async () => { const { command, stdout, stderr } = await run(__dirname); @@ -60,19 +41,17 @@ describe('run function', () => { describe('runAndGetWatchProc function', () => { it('should work correctly by default', async () => { - const { command, stdout, stderr } = await runAndGetWatchProc(__dirname); + const { command, stdout, stderr } = await runAndGetProcess(__dirname); // Executes the correct command expect(command).toContain('cli.js'); // Should use apply a default output dir - expect(command).toContain('--output-path'); - expect(command).toContain('bin'); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); }); it('executes cli with passed commands and params', async () => { - const { stdout, stderr, command } = await runAndGetWatchProc(__dirname, ['info', '--output', 'markdown'], false); + const { stdout, stderr, command } = await runAndGetProcess(__dirname, ['info', '--output', 'markdown']); // execution command contains info command expect(command).toContain('info'); @@ -85,23 +64,11 @@ describe('runAndGetWatchProc function', () => { expect(stderr).toBeFalsy(); }); - it('uses default output when output param is false', async () => { - const { stdout, stderr, command } = await runAndGetWatchProc(__dirname, [], false); - - // execution command contains info command - expect(command).not.toContain('--output-path'); - expect(stderr).toBeFalsy(); - expect(stdout).toBeTruthy(); - }); - it('writes to stdin', async () => { - const assetsPath = resolve(__dirname, './test-assets'); - mkdirSync(assetsPath); + const assetsPath = await uniqueDirectoryForTest(); + const { stdout } = await runAndGetProcess(assetsPath, ['init', '--force', '--template=mango'], { input: ENTER }); - const { stdout } = await runAndGetWatchProc(assetsPath, ['init', '--force', '--template=mango'], false, ENTER); expect(stdout).toContain('Project has been initialised with webpack!'); - - rimraf.sync(assetsPath); }); }); diff --git a/test/watch/analyze/analyze-flag.test.js b/test/watch/analyze/analyze-flag.test.js index e9788f3ed51..fe5bfe57938 100644 --- a/test/watch/analyze/analyze-flag.test.js +++ b/test/watch/analyze/analyze-flag.test.js @@ -1,10 +1,10 @@ 'use strict'; -const { runAndGetWatchProc, normalizeStdout, processKill } = require('../../utils/test-utils'); +const { runAndGetProcess, normalizeStdout, processKill } = require('../../utils/test-utils'); describe('"analyze" option', () => { it('should load webpack-bundle-analyzer plugin with --analyze flag', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--analyze'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--analyze']); proc.stdout.on('data', (chunk) => { const data = normalizeStdout(chunk.toString()); diff --git a/test/watch/basic/basic.test.js b/test/watch/basic/basic.test.js index a89d5f331e0..ed0fd817749 100644 --- a/test/watch/basic/basic.test.js +++ b/test/watch/basic/basic.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { run, runAndGetWatchProc, isWebpack5, processKill } = require('../../utils/test-utils'); +const { run, runAndGetProcess, isWebpack5, processKill } = require('../../utils/test-utils'); const { writeFileSync } = require('fs'); const { resolve } = require('path'); @@ -17,7 +17,7 @@ describe('basic', () => { }); it('should recompile upon file change using the `--watch` option', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--watch', '--mode', 'development'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--watch', '--mode', 'development']); let modified = false; @@ -50,7 +50,7 @@ describe('basic', () => { }); it('should recompile upon file change using the `watch` command', (done) => { - const proc = runAndGetWatchProc(__dirname, ['watch', '--mode', 'development'], false, '', true); + const proc = runAndGetProcess(__dirname, ['watch', '--mode', 'development']); let modified = false; @@ -83,7 +83,7 @@ describe('basic', () => { }); it('should recompile upon file change using the `watch` command and entries syntax', (done) => { - const proc = runAndGetWatchProc(__dirname, ['watch', './src/entry.js', '--mode', 'development'], false, '', true); + const proc = runAndGetProcess(__dirname, ['watch', './src/entry.js', '--mode', 'development']); let modified = false; @@ -118,7 +118,7 @@ describe('basic', () => { }); it('should log warning about the `watch` option in the configuration and recompile upon file change using the `watch` command', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--watch', '--mode', 'development', '--config', './watch.config.js'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--watch', '--mode', 'development', '--config', './watch.config.js']); let modified = false; @@ -159,7 +159,7 @@ describe('basic', () => { }); it('should log supplied config with watch', (done) => { - const proc = runAndGetWatchProc(__dirname, ['watch', '--config', 'log.config.js']); + const proc = runAndGetProcess(__dirname, ['watch', '--config', 'log.config.js']); const configPath = resolve(__dirname, './log.config.js'); let stderr = ''; diff --git a/test/watch/stdin/stdin.test.js b/test/watch/stdin/stdin.test.js index 0d0065215d7..fe22ebf15d8 100644 --- a/test/watch/stdin/stdin.test.js +++ b/test/watch/stdin/stdin.test.js @@ -1,8 +1,8 @@ -const { runAndGetWatchProc, processKill } = require('../../utils/test-utils'); +const { runAndGetProcess, processKill } = require('../../utils/test-utils'); describe('--watch-options-stdin', () => { it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--watch', '--watch-options-stdin'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--watch', '--watch-options-stdin']); let semaphore = false; @@ -20,7 +20,7 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the "watch" command and the "--watch-options-stdin" option', (done) => { - const proc = runAndGetWatchProc(__dirname, ['watch', '--watch-options-stdin'], false, '', true); + const proc = runAndGetProcess(__dirname, ['watch', '--watch-options-stdin']); let semaphore = false; @@ -38,7 +38,7 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the config file', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--config', './watch.config.js'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--config', './watch.config.js']); let semaphore = false; @@ -56,7 +56,7 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the config file in multi compiler mode', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--config', './multi-watch.config.js'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--config', './multi-watch.config.js']); let semaphore = false; @@ -74,7 +74,8 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the "serve" command and the "--watch-options-stdin" option', (done) => { - const proc = runAndGetWatchProc(__dirname, ['serve', '--watch-options-stdin'], false, '', true); + const proc = runAndGetProcess(__dirname, ['serve', '--watch-options-stdin']); + let semaphore = false; proc.on('exit', () => { @@ -89,7 +90,8 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the "serve" command and the "--stdin" option', (done) => { - const proc = runAndGetWatchProc(__dirname, ['serve', '--stdin'], false, '', true); + const proc = runAndGetProcess(__dirname, ['serve', '--stdin']); + let semaphore = false; proc.on('exit', () => { @@ -104,7 +106,8 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the "serve" command and configuration', (done) => { - const proc = runAndGetWatchProc(__dirname, ['serve', '--config', './serve.config.js'], false, '', true); + const proc = runAndGetProcess(__dirname, ['serve', '--config', './serve.config.js']); + let semaphore = false; proc.on('exit', () => { @@ -119,7 +122,7 @@ describe('--watch-options-stdin', () => { }); it('should stop the process when stdin ends using the "serve" command and the config file in multi compiler mode', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--config', './multi-watch.config.js'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--config', './multi-watch.config.js']); let semaphore = false; diff --git a/test/watch/watch-variable/watch-variable.test.js b/test/watch/watch-variable/watch-variable.test.js index e0656f93a98..ac0281aa922 100644 --- a/test/watch/watch-variable/watch-variable.test.js +++ b/test/watch/watch-variable/watch-variable.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { runAndGetWatchProc, isWebpack5, processKill } = require('../../utils/test-utils'); +const { runAndGetProcess, isWebpack5, processKill } = require('../../utils/test-utils'); const { writeFileSync } = require('fs'); const { resolve } = require('path'); @@ -9,7 +9,7 @@ const wordsInStatsv5 = ['asset', 'index.js', 'compiled successfully']; describe('watch variable', () => { it('should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `watch` command', (done) => { - const proc = runAndGetWatchProc(__dirname, ['watch', '--mode', 'development'], false, '', true); + const proc = runAndGetProcess(__dirname, ['watch', '--mode', 'development']); let modified = false; @@ -44,7 +44,7 @@ describe('watch variable', () => { }); it('should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `--watch` option', (done) => { - const proc = runAndGetWatchProc(__dirname, ['--watch', '--mode', 'development'], false, '', true); + const proc = runAndGetProcess(__dirname, ['--watch', '--mode', 'development']); let modified = false; From 71bfaa8ef5e9de4d4f0cbee4ba7e57a5b1b69d90 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Wed, 21 Apr 2021 18:06:07 +0530 Subject: [PATCH 070/103] feat: allow setup extract plugin (#2644) --- .../default/webpack.configjs.tpl | 30 ++++-- packages/generators/src/handlers/default.ts | 13 +-- .../__snapshots__/init.test.js.snap.webpack4 | 96 ++++++++++++++----- .../__snapshots__/init.test.js.snap.webpack5 | 96 ++++++++++++++----- 4 files changed, 177 insertions(+), 58 deletions(-) diff --git a/packages/generators/init-template/default/webpack.configjs.tpl b/packages/generators/init-template/default/webpack.configjs.tpl index 30fe8ade33b..29e9c7d3e7f 100644 --- a/packages/generators/init-template/default/webpack.configjs.tpl +++ b/packages/generators/init-template/default/webpack.configjs.tpl @@ -1,9 +1,20 @@ // Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path');<% if (htmlWebpackPlugin) { %> -const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (isExtractPlugin) { %> +const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (extractPlugin !== 'No') { %> const MiniCssExtractPlugin = require('mini-css-extract-plugin');<% } %> +const isProduction = process.env.NODE_ENV == 'production'; +<% if (isCSS) { %> +<% if (extractPlugin === "Yes") { %> +const stylesHandler = MiniCssExtractPlugin.loader; +<% } else if (extractPlugin === "Only for Production") { %> +const stylesHandler = isProduction ? MiniCssExtractPlugin.loader : 'style-loader'; +<% } else { %> +const stylesHandler = 'style-loader'; +<% } %> +<% } %> + const config = { entry: '<%= entry %>', output: { @@ -17,7 +28,7 @@ const config = { new HtmlWebpackPlugin({ template: 'index.html', }), -<% } %><% if (isExtractPlugin) { %> +<% } %><% if (extractPlugin === "Yes") { %> new MiniCssExtractPlugin(), <% } %> // Add your plugins here @@ -36,23 +47,23 @@ const config = { },<% } %><% if (isCSS && !isPostCSS) { %> { test: /\.css$/i, - use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>,'css-loader'], + use: [stylesHandler,'css-loader'], },<% } %><% if (cssType == 'SASS') { %> { test: /\.s[ac]ss$/i, - use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', <% if (isPostCSS) { %>'postcss-loader', <% } %>'sass-loader'], + use: [stylesHandler, 'css-loader', <% if (isPostCSS) { %>'postcss-loader', <% } %>'sass-loader'], },<% } %><% if (cssType == 'LESS') { %> { test: /\.less$/i, - use: [<% if (isPostCSS) { %><% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader', <% } %>'less-loader'], + use: [<% if (isPostCSS) { %>stylesHandler, 'css-loader', 'postcss-loader', <% } %>'less-loader'], },<% } %><% if (cssType == 'Stylus') { %> { test: /\.styl$/i, - use: [<% if (isPostCSS) { %><% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader', <% } %>'stylus-loader'], + use: [<% if (isPostCSS) { %>stylesHandler, 'css-loader', 'postcss-loader', <% } %>'stylus-loader'], },<% } %><% if (isPostCSS && isCSS) { %> { test: /\.css$/i, - use: [<% if (isExtractPlugin) { %>MiniCssExtractPlugin.loader<% } else { %>'style-loader' <% } %>, 'css-loader', 'postcss-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader'], },<% } %> { test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -69,8 +80,11 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + <% if (extractPlugin === "Only for Production") { %> + config.plugins.push(new MiniCssExtractPlugin()); + <% } %> } else { config.mode = 'development'; } diff --git a/packages/generators/src/handlers/default.ts b/packages/generators/src/handlers/default.ts index 33ccc4cab6f..0db060af746 100644 --- a/packages/generators/src/handlers/default.ts +++ b/packages/generators/src/handlers/default.ts @@ -65,7 +65,7 @@ export async function questions(self: CustomGenerator, Question: Record { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -110,6 +114,9 @@ exports[`init command should configure assets modules by default 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -141,8 +148,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -176,6 +184,9 @@ exports[`init command should configure html-webpack-plugin as opted 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -203,8 +214,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -239,6 +251,9 @@ exports[`init command should generate ES6 project correctly 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -266,8 +281,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -364,6 +380,9 @@ exports[`init command should generate typescript project correctly 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.ts', output: { @@ -395,8 +414,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -514,6 +534,9 @@ exports[`init command should use less in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -541,8 +564,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -555,7 +579,6 @@ exports[`init command should use mini-css-extract-plugin when selected 1`] = ` Object { "description": "My webpack project", "devDependencies": Object { - "mini-css-extract-plugin": "x.x.x", "sass": "x.x.x", "sass-loader": "x.x.x", "webpack": "x.x.x", @@ -576,7 +599,9 @@ exports[`init command should use mini-css-extract-plugin when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + +const isProduction = process.env.NODE_ENV == 'production'; + const config = { entry: './src/index.js', @@ -584,8 +609,6 @@ const config = { path: path.resolve(__dirname, 'dist'), }, plugins: [ - new MiniCssExtractPlugin(), - // Add your plugins here // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], @@ -593,7 +616,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -607,8 +630,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -645,6 +669,13 @@ exports[`init command should use postcss in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + +const stylesHandler = 'style-loader'; + + + const config = { entry: './src/index.js', output: { @@ -658,7 +689,7 @@ const config = { rules: [ { test: /\\\\.css$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -672,8 +703,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -712,6 +744,13 @@ exports[`init command should use sass and css with postcss in project when selec const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + +const stylesHandler = 'style-loader'; + + + const config = { entry: './src/index.js', output: { @@ -725,11 +764,11 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], }, { test: /\\\\.css$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -743,8 +782,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -778,6 +818,9 @@ exports[`init command should use sass in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -791,7 +834,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -805,8 +848,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -843,6 +887,9 @@ exports[`init command should use sass with postcss in project when selected 2`] const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -856,7 +903,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -870,8 +917,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -905,6 +953,9 @@ exports[`init command should use stylus in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -932,8 +983,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 9ded1d9cfba..d292d21cd6e 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -46,6 +46,9 @@ exports[`init command should configure WDS as opted 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -73,8 +76,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -110,6 +114,9 @@ exports[`init command should configure assets modules by default 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -141,8 +148,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -176,6 +184,9 @@ exports[`init command should configure html-webpack-plugin as opted 2`] = ` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -203,8 +214,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -239,6 +251,9 @@ exports[`init command should generate ES6 project correctly 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -266,8 +281,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -364,6 +380,9 @@ exports[`init command should generate typescript project correctly 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.ts', output: { @@ -395,8 +414,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -514,6 +534,9 @@ exports[`init command should use less in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -541,8 +564,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -555,7 +579,6 @@ exports[`init command should use mini-css-extract-plugin when selected 1`] = ` Object { "description": "My webpack project", "devDependencies": Object { - "mini-css-extract-plugin": "x.x.x", "sass": "x.x.x", "sass-loader": "x.x.x", "webpack": "x.x.x", @@ -576,7 +599,9 @@ exports[`init command should use mini-css-extract-plugin when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + +const isProduction = process.env.NODE_ENV == 'production'; + const config = { entry: './src/index.js', @@ -584,8 +609,6 @@ const config = { path: path.resolve(__dirname, 'dist'), }, plugins: [ - new MiniCssExtractPlugin(), - // Add your plugins here // Learn more about plugins from https://webpack.js.org/configuration/plugins/ ], @@ -593,7 +616,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -607,8 +630,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -645,6 +669,13 @@ exports[`init command should use postcss in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + +const stylesHandler = 'style-loader'; + + + const config = { entry: './src/index.js', output: { @@ -658,7 +689,7 @@ const config = { rules: [ { test: /\\\\.css$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -672,8 +703,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -712,6 +744,13 @@ exports[`init command should use sass and css with postcss in project when selec const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + +const stylesHandler = 'style-loader'; + + + const config = { entry: './src/index.js', output: { @@ -725,11 +764,11 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], }, { test: /\\\\.css$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -743,8 +782,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -778,6 +818,9 @@ exports[`init command should use sass in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -791,7 +834,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -805,8 +848,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -843,6 +887,9 @@ exports[`init command should use sass with postcss in project when selected 2`] const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -856,7 +903,7 @@ const config = { rules: [ { test: /\\\\.s[ac]ss$/i, - use: ['style-loader' , 'css-loader', 'postcss-loader', 'sass-loader'], + use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], }, { test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, @@ -870,8 +917,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } @@ -905,6 +953,9 @@ exports[`init command should use stylus in project when selected 2`] = ` const path = require('path'); +const isProduction = process.env.NODE_ENV == 'production'; + + const config = { entry: './src/index.js', output: { @@ -932,8 +983,9 @@ const config = { }; module.exports = () => { - if (process.env.NODE_ENV == 'production') { + if (isProduction) { config.mode = 'production'; + } else { config.mode = 'development'; } From 40b2c5938eedd066d8eeb224d59180a2e6d38fa0 Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Wed, 21 Apr 2021 05:38:57 -0700 Subject: [PATCH 071/103] test: refactor core-flags (#2646) --- .../build/core-flags/experiments-flag.test.js | 31 +++--- test/build/core-flags/externals-flags.test.js | 21 ++-- test/build/core-flags/module-flags.test.js | 69 +++++++------- .../core-flags/optimization-flags.test.js | 75 +++++++-------- test/build/core-flags/output-flags.test.js | 95 +++++++++---------- .../core-flags/performance-flags.test.js | 25 +++-- test/build/core-flags/resolve-flags.test.js | 47 +++++---- test/build/core-flags/snapshot-flags.test.js | 31 +++--- test/build/core-flags/stats-flags.test.js | 55 +++++------ test/build/core-flags/watch-flags.test.js | 41 ++++---- test/utils/test-utils.js | 19 +++- 11 files changed, 248 insertions(+), 261 deletions(-) diff --git a/test/build/core-flags/experiments-flag.test.js b/test/build/core-flags/experiments-flag.test.js index c87cf9b037b..b083be50724 100644 --- a/test/build/core-flags/experiments-flag.test.js +++ b/test/build/core-flags/experiments-flag.test.js @@ -1,20 +1,17 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const experimentsFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('experiments-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const experimentsFlags = getWebpackCliArguments('experiments-'); describe('experiments option related flag', () => { - experimentsFlags.forEach((flag) => { + for (const [name, value] of Object.entries(experimentsFlags)) { // extract property name from flag name let property; - if (flag.name.includes('-lazy-compilation-')) { - property = flag.name.split('experiments-lazy-compilation-')[1]; + if (name.includes('-lazy-compilation-')) { + property = name.split('experiments-lazy-compilation-')[1]; } else { - property = flag.name.split('experiments-')[1]; + property = name.split('experiments-')[1]; } const propName = hyphenToUpperCase(property); @@ -23,32 +20,32 @@ describe('experiments option related flag', () => { return false; } - if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('-lazy-compilation-')) { + if (name.includes('-lazy-compilation-')) { expect(stdout).toContain(`lazyCompilation: { ${propName}: true }`); } else { expect(stdout).toContain(`${propName}: true`); } }); - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('-lazy-compilation-')) { + if (name.includes('-lazy-compilation-')) { expect(stdout).toContain(`lazyCompilation: { ${propName}: false }`); } else { expect(stdout).toContain(`${propName}: false`); } }); } - }); + } }); diff --git a/test/build/core-flags/externals-flags.test.js b/test/build/core-flags/externals-flags.test.js index cf2758d7e90..844c25e2ad9 100644 --- a/test/build/core-flags/externals-flags.test.js +++ b/test/build/core-flags/externals-flags.test.js @@ -1,10 +1,7 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const externalsPresetsFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('externals-presets-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const externalsPresetsFlags = getWebpackCliArguments('externals-presets-'); describe('externals related flag', () => { it('should set externals properly', async () => { @@ -39,25 +36,25 @@ describe('externals related flag', () => { expect(stdout).toContain(`externals: []`); }); - externalsPresetsFlags.forEach((flag) => { + for (const [name] of Object.entries(externalsPresetsFlags)) { // extract property name from flag name - const property = flag.name.split('externals-presets-')[1]; + const property = name.split('externals-presets-')[1]; const propName = hyphenToUpperCase(property); - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: true`); }); - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: false`); }); - }); + } }); diff --git a/test/build/core-flags/module-flags.test.js b/test/build/core-flags/module-flags.test.js index d1c6d33ea65..6b2f241ba6d 100644 --- a/test/build/core-flags/module-flags.test.js +++ b/test/build/core-flags/module-flags.test.js @@ -1,41 +1,38 @@ 'use strict'; -const { run, hyphenToUpperCase, normalizeStdout } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const moduleFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('module-')); +const { run, hyphenToUpperCase, normalizeStdout, getWebpackCliArguments } = require('../../utils/test-utils'); +const moduleFlags = getWebpackCliArguments('module-'); describe('module config related flag', () => { - moduleFlags.forEach((flag) => { + for (const [name, value] of Object.entries(moduleFlags)) { // extract property name from flag name - let property = flag.name.split('module-')[1]; + let property = name.split('module-')[1]; if (property.includes('rules-') && property !== 'rules-reset') { - property = flag.name.split('rules-')[1]; + property = name.split('rules-')[1]; } const propName = hyphenToUpperCase(property); if ( - flag.configs.filter((config) => config.type === 'boolean').length > 0 && - !flag.name.includes('module-no-parse') && - !flag.name.includes('module-parser-') + value.configs.filter((config) => config.type === 'boolean').length > 0 && + !name.includes('module-no-parse') && + !name.includes('module-parser-') ) { - it(`should config --${flag.name} correctly`, async () => { - if (flag.name.includes('-reset')) { - const { stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + it(`should config --${name} correctly`, async () => { + if (name.includes('-reset')) { + const { stderr, stdout } = await run(__dirname, [`--${name}`]); const option = propName.split('Reset')[0]; expect(stderr).toBeFalsy(); expect(normalizeStdout(stdout)).toContain(`${option}: []`); - } else if (flag.name.includes('rules-')) { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + } else if (name.includes('rules-')) { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(normalizeStdout(stdout)).toContain("sideEffects: 'flag'"); - } else if (flag.name.startsWith('module-generator-')) { + } else if (name.startsWith('module-generator-')) { const { exitCode, stderr, stdout } = await run(__dirname, [ `--module-generator-asset-emit`, '--module-generator-asset-resource-emit', @@ -45,7 +42,7 @@ describe('module config related flag', () => { expect(stderr).toBeFalsy(); expect(normalizeStdout(stdout)).toContain("generator: { asset: { emit: true }, 'asset/resource': { emit: true } }"); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -53,16 +50,16 @@ describe('module config related flag', () => { } }); - if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (!name.endsWith('-reset')) { + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('rules-')) { + if (name.includes('rules-')) { expect(normalizeStdout(stdout)).toContain('sideEffects: false'); - } else if (flag.name.startsWith('module-generator-')) { + } else if (name.startsWith('module-generator-')) { expect(normalizeStdout(stdout)).toContain('emit: false'); } else { expect(normalizeStdout(stdout)).toContain(`${propName}: false`); @@ -72,39 +69,39 @@ describe('module config related flag', () => { } if ( - flag.configs.filter((config) => config.type === 'string').length > 0 && - !(flag.name.includes('module-parser-') || flag.name.startsWith('module-generator')) + value.configs.filter((config) => config.type === 'string').length > 0 && + !(name.includes('module-parser-') || name.startsWith('module-generator')) ) { - it(`should config --${flag.name} correctly`, async () => { - if (flag.name === 'module-no-parse') { - let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`, 'value']); + it(`should config --${name} correctly`, async () => { + if (name === 'module-no-parse') { + let { stderr, stdout, exitCode } = await run(__dirname, [`--${name}`, 'value']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(normalizeStdout(stdout)).toContain('value'); - } else if (flag.name.includes('reg-exp')) { - let { stdout, stderr, exitCode } = await run(__dirname, [`--${flag.name}`, '/ab?c*/']); + } else if (name.includes('reg-exp')) { + let { stdout, stderr, exitCode } = await run(__dirname, [`--${name}`, '/ab?c*/']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(normalizeStdout(stdout)).toContain(`${propName}: /ab?c*/`); - } else if (flag.name.includes('module-rules-')) { + } else if (name.includes('module-rules-')) { if (propName === 'use' || propName === 'type') { - let { stdout } = await run(__dirname, [`--${flag.name}`, 'javascript/auto']); + let { stdout } = await run(__dirname, [`--${name}`, 'javascript/auto']); expect(normalizeStdout(stdout)).toContain(`${propName}: 'javascript/auto'`); } else if (property.includes('use-')) { let { stdout } = await run(__dirname, ['--module-rules-use-loader', 'myLoader']); expect(normalizeStdout(stdout)).toContain(`use: [Object]`); } else if (propName === 'enforce') { - let { stdout } = await run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']); + let { stdout } = await run(__dirname, [`--${name}`, 'pre', '--module-rules-use-loader', 'myLoader']); expect(normalizeStdout(stdout)).toContain(`${propName}: 'pre'`); } else { - let { stdout } = await run(__dirname, [`--${flag.name}`, '/rules-value']); + let { stdout } = await run(__dirname, [`--${name}`, '/rules-value']); expect(normalizeStdout(stdout)).toContain('rules-value'); } } else { - let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`, 'value']); + let { stderr, stdout, exitCode } = await run(__dirname, [`--${name}`, 'value']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -112,7 +109,7 @@ describe('module config related flag', () => { } }); } - }); + } it('should config module.generator flags coorectly', async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ diff --git a/test/build/core-flags/optimization-flags.test.js b/test/build/core-flags/optimization-flags.test.js index 98cd85a7ef8..409daa10f4f 100644 --- a/test/build/core-flags/optimization-flags.test.js +++ b/test/build/core-flags/optimization-flags.test.js @@ -1,47 +1,44 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const optimizationFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('optimization-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const optimizationFlags = getWebpackCliArguments('optimization-'); describe('optimization config related flag', () => { - optimizationFlags.forEach((flag) => { + for (const [name, value] of Object.entries(optimizationFlags)) { // extract property name from flag name - let property = flag.name.split('optimization-')[1]; + let property = name.split('optimization-')[1]; - if (flag.name.includes('split-chunks')) { - property = flag.name.split('optimization-split-chunks-')[1]; + if (name.includes('split-chunks')) { + property = name.split('optimization-split-chunks-')[1]; } let propName = hyphenToUpperCase(property); - if (flag.name.includes('-reset')) { + if (name.includes('-reset')) { propName = propName.split('Reset')[0]; } - if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - if (flag.name === 'optimization-split-chunks') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0) { + it(`should config --${name} correctly`, async () => { + if (name === 'optimization-split-chunks') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`splitChunks: false`); - } else if (flag.name.includes('reset')) { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + } else if (name.includes('reset')) { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: []`); - } else if (flag.name === 'optimization-runtime-chunk') { - const { exitCode, stderr } = await run(__dirname, [`--${flag.name}`]); + } else if (name === 'optimization-runtime-chunk') { + const { exitCode, stderr } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -49,14 +46,14 @@ describe('optimization config related flag', () => { } }); - if (!flag.name.includes('reset')) { - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (!name.includes('reset')) { + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name === 'optimization-split-chunks') { + if (name === 'optimization-split-chunks') { expect(stdout).toContain('splitChunks: false'); } else { expect(stdout).toContain(`${propName}: false`); @@ -68,43 +65,43 @@ describe('optimization config related flag', () => { // ignoring optimization-runtime-* and split-chunks-fallback-* flags because WebpackClITestPlugin logs [Object] // need improve the plugin to log for multi-level options i.e, optimization.runtime if ( - flag.configs.filter((config) => config.type === 'string').length > 0 && - !flag.name.includes('runtime-') && - !flag.name.includes('fallback-') + value.configs.filter((config) => config.type === 'string').length > 0 && + !name.includes('runtime-') && + !name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, async () => { - if (flag.name === 'optimization-split-chunks-chunks') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'initial']); + it(`should config --${name} correctly`, async () => { + if (name === 'optimization-split-chunks-chunks') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'initial']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`chunks: 'initial'`); - } else if (flag.name === 'optimization-mangle-exports') { + } else if (name === 'optimization-mangle-exports') { const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-mangle-exports', 'size']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`mangleExports: 'size'`); - } else if (flag.name === 'optimization-used-exports') { + } else if (name === 'optimization-used-exports') { const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-used-exports', 'global']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`usedExports: 'global'`); - } else if (flag.name === 'optimization-split-chunks-default-size-types') { + } else if (name === 'optimization-split-chunks-default-size-types') { const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-split-chunks-default-size-types', 'global']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`defaultSizeTypes: [Array]`); - } else if (flag.name === 'optimization-side-effects') { + } else if (name === 'optimization-side-effects') { const { exitCode, stderr, stdout } = await run(__dirname, ['--optimization-side-effects', 'flag']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'flag'`); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'named']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'named']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -113,14 +110,14 @@ describe('optimization config related flag', () => { }); } - if (flag.configs.filter((config) => config.type === 'number').length > 0 && !flag.name.includes('fallback-')) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); + if (value.configs.filter((config) => config.type === 'number').length > 0 && !name.includes('fallback-')) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name === 'optimization-split-chunks') { + if (name === 'optimization-split-chunks') { expect(stdout).toContain(`chunks: 'async'`); expect(stdout).toContain(`minChunks: 1`); } else { @@ -128,5 +125,5 @@ describe('optimization config related flag', () => { } }); } - }); + } }); diff --git a/test/build/core-flags/output-flags.test.js b/test/build/core-flags/output-flags.test.js index 849d3f813e8..9f43c4db418 100644 --- a/test/build/core-flags/output-flags.test.js +++ b/test/build/core-flags/output-flags.test.js @@ -1,15 +1,12 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const outputFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('output-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const outputFlags = getWebpackCliArguments('output-'); describe('output config related flag', () => { - outputFlags.forEach((flag) => { + for (const [name, value] of Object.entries(outputFlags)) { // extract property name from flag name - let property = flag.name.split('output-')[1]; + let property = name.split('output-')[1]; if (property.includes('environment-')) { property = property.split('environment-')[1]; @@ -19,24 +16,24 @@ describe('output config related flag', () => { const propName = hyphenToUpperCase(property); - if (flag.configs.filter((config) => config.type === 'boolean').length > 0 && !flag.name.includes('output-library')) { - it(`should config --${flag.name} correctly`, async () => { - let { stderr, stdout, exitCode } = await run(__dirname, [`--${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0 && !name.includes('output-library')) { + it(`should config --${name} correctly`, async () => { + let { stderr, stdout, exitCode } = await run(__dirname, [`--${name}`]); - if (flag.name === 'output-module') { + if (name === 'output-module') { //'output.module: true' is only allowed when 'experiments.outputModule' is enabled - ({ exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '--experiments-output-module'])); + ({ exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '--experiments-output-module'])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('module: true'); - } else if (flag.name === 'output-strict-module-error-handling') { - ({ exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '--hot'])); + } else if (name === 'output-strict-module-error-handling') { + ({ exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '--hot'])); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: true`); - } else if (flag.name.includes('-reset')) { + } else if (name.includes('-reset')) { const option = propName.split('Reset')[0]; expect(exitCode).toBe(0); @@ -49,9 +46,9 @@ describe('output config related flag', () => { } }); - if (!flag.name.endsWith('-reset') && !flag.name.includes('output-strict-module-error-handling')) { - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (!name.endsWith('-reset') && !name.includes('output-strict-module-error-handling')) { + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -60,9 +57,9 @@ describe('output config related flag', () => { } } - if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); + if (value.configs.filter((config) => config.type === 'number').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -70,82 +67,82 @@ describe('output config related flag', () => { }); } - if (flag.configs.filter((config) => config.type === 'string').length > 0 && !flag.name.includes('output-library')) { - it(`should config --${flag.name} correctly`, async () => { - if (flag.name === 'output-cross-origin-loading') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'anonymous']); + if (value.configs.filter((config) => config.type === 'string').length > 0 && !name.includes('output-library')) { + it(`should config --${name} correctly`, async () => { + if (name === 'output-cross-origin-loading') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'anonymous']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'anonymous'`); - } else if (flag.name === 'output-chunk-format') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'commonjs']); + } else if (name === 'output-chunk-format') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'commonjs']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'commonjs'`); - } else if (flag.name === 'output-chunk-loading') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'jsonp']); + } else if (name === 'output-chunk-loading') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'jsonp']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'jsonp'`); - } else if (flag.name === 'output-enabled-chunk-loading-types' || flag.name === 'output-enabled-wasm-loading-types') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); + } else if (name === 'output-enabled-chunk-loading-types' || name === 'output-enabled-wasm-loading-types') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: [ 'async-node' ]`); - } else if (flag.name === 'output-enabled-library-type') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'amd']); + } else if (name === 'output-enabled-library-type') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'amd']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'amd'`); - } else if (flag.name === 'output-hash-function') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'sha256']); + } else if (name === 'output-hash-function') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'sha256']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`hashFunction: 'sha256'`); - } else if (flag.name === 'output-script-type') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'module']); + } else if (name === 'output-script-type') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'module']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'module'`); - } else if (flag.name === 'output-enabled-library-types') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'var']); + } else if (name === 'output-enabled-library-types') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'var']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: [ 'var' ]`); - } else if (flag.name === 'output-path') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'test']); + } else if (name === 'output-path') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'test']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('test'); - } else if (flag.name === 'output-pathinfo') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'verbose']); + } else if (name === 'output-pathinfo') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'verbose']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`pathinfo: 'verbose'`); - } else if (flag.name === 'output-worker-chunk-loading') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); + } else if (name === 'output-worker-chunk-loading') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'async-node'`); - } else if (flag.name.includes('wasm')) { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'async-node']); + } else if (name.includes('wasm')) { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'async-node']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'async-node'`); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'test']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'test']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -153,7 +150,7 @@ describe('output config related flag', () => { } }); } - }); + } it(`should config name, type and export correctly`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ diff --git a/test/build/core-flags/performance-flags.test.js b/test/build/core-flags/performance-flags.test.js index 0e7d2ef92ad..aec94cb16bf 100644 --- a/test/build/core-flags/performance-flags.test.js +++ b/test/build/core-flags/performance-flags.test.js @@ -1,10 +1,7 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const performanceFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('performance-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const performanceFlags = getWebpackCliArguments('performance-'); describe('module config related flag', () => { it(`should config --performance option correctly`, async () => { @@ -15,14 +12,14 @@ describe('module config related flag', () => { expect(stdout).toContain('performance: false'); }); - performanceFlags.forEach((flag) => { + for (const [name, value] of Object.entries(performanceFlags)) { // extract property name from flag name - const property = flag.name.split('performance-')[1]; + const property = name.split('performance-')[1]; const propName = hyphenToUpperCase(property); - if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); + if (value.configs.filter((config) => config.type === 'number').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -30,14 +27,14 @@ describe('module config related flag', () => { }); } - if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'warning']); + if (value.configs.filter((config) => config.type === 'string').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'warning']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'warning'`); }); } - }); + } }); diff --git a/test/build/core-flags/resolve-flags.test.js b/test/build/core-flags/resolve-flags.test.js index 920d9e281d7..3b00780c830 100644 --- a/test/build/core-flags/resolve-flags.test.js +++ b/test/build/core-flags/resolve-flags.test.js @@ -1,34 +1,31 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const resolveFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('resolve')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const resolveFlags = getWebpackCliArguments('resolve'); describe('resolve config related flags', () => { - resolveFlags.forEach((flag) => { + for (const [name, value] of Object.entries(resolveFlags)) { // extract property name from flag name - let property = flag.name.split('resolve-')[1]; + let property = name.split('resolve-')[1]; - if (flag.name.startsWith('resolve-loader')) { - property = flag.name.split('resolve-loader-')[1]; + if (name.startsWith('resolve-loader')) { + property = name.split('resolve-loader-')[1]; } const propName = hyphenToUpperCase(property); if ( - flag.configs.filter((config) => config.type === 'boolean').length > 0 && - !flag.name.includes('alias-') && - !flag.name.includes('fallback-') + value.configs.filter((config) => config.type === 'boolean').length > 0 && + !name.includes('alias-') && + !name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, async () => { - const { stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + it(`should config --${name} correctly`, async () => { + const { stderr, stdout } = await run(__dirname, [`--${name}`]); // expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('reset')) { + if (name.includes('reset')) { const option = propName.split('Reset')[0]; expect(stdout).toContain(`${option}: []`); } else { @@ -38,12 +35,12 @@ describe('resolve config related flags', () => { } if ( - flag.configs.filter((config) => config.type === 'string').length > 0 && - !flag.name.includes('alias-') && - !flag.name.includes('fallback-') + value.configs.filter((config) => config.type === 'string').length > 0 && + !name.includes('alias-') && + !name.includes('fallback-') ) { - it(`should config --${flag.name} correctly`, async () => { - const { stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'browser']); + it(`should config --${name} correctly`, async () => { + const { stderr, stdout } = await run(__dirname, [`--${name}`, 'browser']); // expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -56,8 +53,8 @@ describe('resolve config related flags', () => { }); } - if (flag.name.includes('alias-') || flag.name.includes('fallback-')) { - it(`should config --${flag.name} correctly`, async () => { + if (name.includes('alias-') || name.includes('fallback-')) { + it(`should config --${name} correctly`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ `--resolve-alias-alias`, 'alias', @@ -93,8 +90,8 @@ describe('resolve config related flags', () => { expect(stdout).toContain('loader-fall-alias'); }); - if (flag.name.includes('reset')) { - it(`should config --${flag.name} alias-reset flags correctly`, async () => { + if (name.includes('reset')) { + it(`should config --${name} alias-reset flags correctly`, async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ '--resolve-alias-reset', '--resolve-fallback-reset', @@ -112,5 +109,5 @@ describe('resolve config related flags', () => { }); } } - }); + } }); diff --git a/test/build/core-flags/snapshot-flags.test.js b/test/build/core-flags/snapshot-flags.test.js index 3f768bf2a27..44795b67699 100644 --- a/test/build/core-flags/snapshot-flags.test.js +++ b/test/build/core-flags/snapshot-flags.test.js @@ -1,43 +1,40 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const snapshotFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('snapshot')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const snapshotFlags = getWebpackCliArguments('snapshot'); describe('snapshot config related flags', () => { - snapshotFlags.forEach((flag) => { + for (const [name, value] of Object.entries(snapshotFlags)) { // extract property name from flag name - let property = flag.name.split('snapshot-')[1]; + let property = name.split('snapshot-')[1]; const propName = hyphenToUpperCase(property); - if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('reset')) { + if (name.includes('reset')) { const option = propName.split('Reset')[0]; expect(stdout).toContain(`${option}: []`); - } else if (flag.name.includes('timestamp')) { + } else if (name.includes('timestamp')) { expect(stdout).toContain(`timestamp: true`); - } else if (flag.name.includes('hash')) { + } else if (name.includes('hash')) { expect(stdout).toContain(`hash: true`); } }); } - if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, './mock/mock.js']); + if (value.configs.filter((config) => config.type === 'string').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, './mock/mock.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('./mock/mock.js'); }); } - }); + } }); diff --git a/test/build/core-flags/stats-flags.test.js b/test/build/core-flags/stats-flags.test.js index ab64ff57be7..21b58777c5c 100644 --- a/test/build/core-flags/stats-flags.test.js +++ b/test/build/core-flags/stats-flags.test.js @@ -1,25 +1,22 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const statsFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('stats-')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const statsFlags = getWebpackCliArguments('stats-'); describe('stats config related flag', () => { - statsFlags.forEach((flag) => { + for (const [name, value] of Object.entries(statsFlags)) { // extract property name from flag name - const property = flag.name.split('stats-')[1]; + const property = name.split('stats-')[1]; const propName = hyphenToUpperCase(property); - if (flag.configs.filter((config) => config.type === 'boolean').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('-reset')) { + if (name.includes('-reset')) { const option = propName.split('Reset')[0]; expect(stdout).toContain(`${option}: []`); } else { @@ -27,9 +24,9 @@ describe('stats config related flag', () => { } }); - if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (!name.endsWith('-reset')) { + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -38,9 +35,9 @@ describe('stats config related flag', () => { } } - if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); + if (value.configs.filter((config) => config.type === 'number').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -48,37 +45,37 @@ describe('stats config related flag', () => { }); } - if (flag.configs.filter((config) => config.type === 'string').length > 0) { + if (value.configs.filter((config) => config.type === 'string').length > 0) { const acceptsSingleValue = ['preset', 'modulesSort', 'logging', 'chunksSort', 'assetsSort']; - it(`should config --${flag.name} correctly`, async () => { - if (flag.name.includes('stats-colors')) { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'u001b[32m']); - const option = flag.name.split('stats-colors-')[1]; + it(`should config --${name} correctly`, async () => { + if (name.includes('stats-colors')) { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'u001b[32m']); + const option = name.split('stats-colors-')[1]; expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`colors: { ${option}: 'u001b[32m' }`); } else if (acceptsSingleValue.includes(propName)) { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'log'`); - } else if (flag.name === 'stats-context') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); + } else if (name === 'stats-context') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain('log'); - } else if (flag.name === 'stats-entrypoints' || flag.name === 'stats-error-details') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'auto']); + } else if (name === 'stats-entrypoints' || name === 'stats-error-details') { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'auto']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: 'auto'`); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'log']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'log']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -86,5 +83,5 @@ describe('stats config related flag', () => { } }); } - }); + } }); diff --git a/test/build/core-flags/watch-flags.test.js b/test/build/core-flags/watch-flags.test.js index c664017da1f..1f9c3959467 100644 --- a/test/build/core-flags/watch-flags.test.js +++ b/test/build/core-flags/watch-flags.test.js @@ -1,38 +1,35 @@ 'use strict'; -const { run, hyphenToUpperCase } = require('../../utils/test-utils'); -const CLI = require('../../../packages/webpack-cli/lib/index'); - -const cli = new CLI(); -const watchFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('watch')); +const { run, hyphenToUpperCase, getWebpackCliArguments } = require('../../utils/test-utils'); +const watchFlags = getWebpackCliArguments('watch'); describe('watch config related flag', () => { - watchFlags.forEach((flag) => { + for (const [name, value] of Object.entries(watchFlags)) { // extract property name from flag name - const property = flag.name.split('watch-options-')[1]; + const property = name.split('watch-options-')[1]; const propName = hyphenToUpperCase(property); if (propName === 'stdin') { return; } - if (flag.configs.filter((config) => config.type === 'boolean').length > 0 && flag.name !== 'watch') { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`]); + if (value.configs.filter((config) => config.type === 'boolean').length > 0 && name !== 'watch') { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - if (flag.name.includes('reset')) { + if (name.includes('reset')) { expect(stdout).toContain(`watchOptions: { ignored: [] }`); } else { expect(stdout).toContain(`watchOptions: { ${propName}: true }`); } }); - if (!flag.name.endsWith('-reset')) { - it(`should config --no-${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${flag.name}`]); + if (!name.endsWith('-reset')) { + it(`should config --no-${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--no-${name}`]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -41,9 +38,9 @@ describe('watch config related flag', () => { } } - if (flag.configs.filter((config) => config.type === 'number').length > 0) { - it(`should config --${flag.name} correctly`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '10']); + if (value.configs.filter((config) => config.type === 'number').length > 0) { + it(`should config --${name} correctly`, async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '10']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -51,16 +48,16 @@ describe('watch config related flag', () => { }); } - if (flag.configs.filter((config) => config.type === 'string').length > 0) { - it(`should config --${flag.name} correctly`, async () => { + if (value.configs.filter((config) => config.type === 'string').length > 0) { + it(`should config --${name} correctly`, async () => { if (propName === 'poll') { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, '200']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, '200']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toContain(`watchOptions: { ${propName}: 200 }`); } else { - const { exitCode, stderr, stdout } = await run(__dirname, [`--${flag.name}`, 'ignore.js']); + const { exitCode, stderr, stdout } = await run(__dirname, [`--${name}`, 'ignore.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -68,5 +65,5 @@ describe('watch config related flag', () => { } }); } - }); + } }); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 8f5c1e95a57..ac529bfd8b3 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -11,7 +11,7 @@ const { exec } = require('child_process'); const { node: execaNode } = execa; const { Writable } = require('readable-stream'); const concat = require('concat-stream'); -const { version } = require('webpack'); +const { cli, version } = require('webpack'); const isWebpack5 = version.startsWith('5'); let devServerVersion; @@ -310,6 +310,22 @@ const uniqueDirectoryForTest = async () => { return result; }; +const getWebpackCliArguments = (startWith) => { + if (typeof startWith === 'undefined') { + return cli.getArguments(); + } + + const result = {}; + + for (const [name, value] of Object.entries(cli.getArguments())) { + if (name.startsWith(startWith)) { + result[name] = value; + } + } + + return result; +}; + module.exports = { run, runAndGetProcess, @@ -325,4 +341,5 @@ module.exports = { readdir, hyphenToUpperCase, processKill, + getWebpackCliArguments, }; From edb1a576c37730138149b72e0b600c30b063851d Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Thu, 22 Apr 2021 18:31:07 -0700 Subject: [PATCH 072/103] refactor: remove unnecessary code (#2653) --- packages/webpack-cli/lib/webpack-cli.js | 44 ++++++++----------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 3bd7ab7e6ab..7c58c238856 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -75,19 +75,13 @@ class WebpackCLI { const { promptInstallation, colors } = this.utils; - try { - await promptInstallation(dependency, () => { - this.logger.error( - `For using '${colors.green(commandOptions.name.split(' ')[0])}' command you need to install: '${colors.green( - dependency, - )}' package`, - ); - }); - } catch (error) { - this.logger.error("Action Interrupted, use 'webpack-cli help' to see possible commands."); - this.logger.error(error); - process.exit(2); - } + await promptInstallation(dependency, () => { + this.logger.error( + `For using '${colors.green(commandOptions.name.split(' ')[0])}' command you need to install: '${colors.green( + dependency, + )}' package`, + ); + }); } } @@ -778,14 +772,9 @@ class WebpackCLI { const { promptInstallation, colors } = this.utils; - try { - pkg = await promptInstallation(pkg, () => { - this.logger.error(`For using this command you need to install: '${colors.green(pkg)}' package`); - }); - } catch (error) { - this.logger.error(`Action Interrupted, use '${colors.cyan('webpack-cli help')}' to see possible commands`); - process.exit(2); - } + pkg = await promptInstallation(pkg, () => { + this.logger.error(`For using this command you need to install: '${colors.green(pkg)}' package`); + }); } let loadedCommand; @@ -1542,16 +1531,9 @@ class WebpackCLI { if (!this.utils.packageExists('webpack-bundle-analyzer')) { const { promptInstallation, colors } = this.utils; - try { - await promptInstallation('webpack-bundle-analyzer', () => { - this.logger.error(`It looks like ${colors.yellow('webpack-bundle-analyzer')} is not installed.`); - }); - } catch (error) { - this.logger.error( - `Action Interrupted, Please try once again or install ${colors.yellow('webpack-bundle-analyzer')} manually.`, - ); - process.exit(2); - } + await promptInstallation('webpack-bundle-analyzer', () => { + this.logger.error(`It looks like ${colors.yellow('webpack-bundle-analyzer')} is not installed.`); + }); this.logger.success(`${colors.yellow('webpack-bundle-analyzer')} was installed successfully.`); } From 3b4eff8a0912592063e1769a828730f489149d3b Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Fri, 23 Apr 2021 16:37:23 +0530 Subject: [PATCH 073/103] test: handle redundant timeouts (#2650) --- smoketests/helpers.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/smoketests/helpers.js b/smoketests/helpers.js index fc13bef0043..727dae5c0de 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -36,7 +36,7 @@ const runTest = (package, cliArgs = [], logMessage, isSubPackage = false) => { }); return new Promise((resolve) => { - setTimeout(() => { + const timeout = setTimeout(() => { console.log(' timeout: killing process'); proc.kill(); }, 30000); @@ -66,11 +66,13 @@ const runTest = (package, cliArgs = [], logMessage, isSubPackage = false) => { proc.on('exit', () => { swapPkgName(`.${package}`, isSubPackage); + clearTimeout(timeout); resolve(hasPassed); }); proc.on('error', () => { swapPkgName(`.${package}`, isSubPackage); + clearTimeout(timeout); resolve(false); }); }); @@ -87,7 +89,7 @@ const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {}) proc.stdin.setDefaultEncoding('utf-8'); return new Promise((resolve) => { - setTimeout(() => { + const timeout = setTimeout(() => { console.log(' timeout: killing process'); proc.kill(); }, 30000); @@ -111,11 +113,13 @@ const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {}) proc.on('exit', () => { swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); resolve(hasPassed); }); proc.on('error', () => { swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); resolve(false); }); }); @@ -136,7 +140,8 @@ const runTestWithHelp = (package, cliArgs = [], logMessage, isSubPackage = false }); return new Promise((resolve) => { - setTimeout(() => { + const timeout = setTimeout(() => { + console.log(' timeout: killing process'); proc.kill(); }, 30000); @@ -166,11 +171,13 @@ const runTestWithHelp = (package, cliArgs = [], logMessage, isSubPackage = false proc.on('exit', () => { swapPkgName(`.${package}`, isSubPackage); + clearTimeout(timeout); resolve(hasPassed); }); proc.on('error', () => { swapPkgName(`.${package}`, isSubPackage); + clearTimeout(timeout); resolve(false); }); }); From a56761ed5623f576f2ca881141958a913f3af971 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 23 Apr 2021 19:06:04 +0530 Subject: [PATCH 074/103] test: enable tests for webpack-dev-server@next (#2573) --- .github/workflows/nodejs.yml | 6 +- package.json | 5 +- test/api/scaffold-utils.test.js | 7 + test/build/mode/mode-with-config/src/index.js | 1 - .../help.test.js.snap.devServer4.webpack4 | 2762 ++++++++++++++++ .../help.test.js.snap.devServer4.webpack5 | 2789 +++++++++++++++++ test/help/help.test.js | 1 + ...rve-basic.test.js.snap.devServer3.webpack4 | 80 + ...rve-basic.test.js.snap.devServer3.webpack5 | 79 + ...rve-basic.test.js.snap.devServer4.webpack4 | 322 ++ ...rve-basic.test.js.snap.devServer4.webpack5 | 324 ++ .../dev-server-output-public-path.config.js | 5 +- .../basic/helper/base-dev-server.config.js | 17 + ...ti-dev-server-output-public-path.config.js | 6 +- test/serve/basic/multi-dev-server.config.js | 5 +- test/serve/basic/multi.config.js | 5 +- .../serve/basic/multiple-dev-server.config.js | 9 +- test/serve/basic/serve-basic.test.js | 260 +- test/serve/basic/stats.config.js | 14 +- ...id-schema.test.js.snap.devServer3.webpack4 | 7 - ...id-schema.test.js.snap.devServer3.webpack5 | 7 - ...id-schema.test.js.snap.devServer4.webpack4 | 27 + ...id-schema.test.js.snap.devServer4.webpack5 | 25 + .../invalid-schema/invalid-schema.test.js | 3 +- ...rve-basic.test.js.snap.devServer3.webpack4 | 2 +- ...rve-basic.test.js.snap.devServer3.webpack5 | 2 +- ...rve-basic.test.js.snap.devServer4.webpack4 | 9 + ...rve-basic.test.js.snap.devServer4.webpack5 | 9 + test/serve/serve-variable/serve-basic.test.js | 12 +- ...om-config.test.js.snap.devServer4.webpack4 | 33 + ...om-config.test.js.snap.devServer4.webpack5 | 33 + .../serve-custom-config.test.js | 51 +- test/serve/with-custom-port/webpack.config.js | 3 +- test/utils/test-utils.js | 65 +- yarn.lock | 50 +- 35 files changed, 6903 insertions(+), 132 deletions(-) create mode 100644 test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 create mode 100644 test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 create mode 100644 test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 create mode 100644 test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 create mode 100644 test/serve/basic/helper/base-dev-server.config.js create mode 100644 test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack4 create mode 100644 test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack5 create mode 100644 test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 create mode 100644 test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 create mode 100644 test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack4 create mode 100644 test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack5 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ec7bdf91d30..6e9c6d6f145 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -47,7 +47,7 @@ jobs: run: yarn lint build: - name: Tests and Coverage - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} + name: Tests and Coverage - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}, DevServer ${{ matrix.dev-server-version }} runs-on: ${{ matrix.os }} @@ -56,6 +56,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] node-version: [10.x, 12.x, 14.x] webpack-version: [4, latest] + dev-server-version: [latest, next] steps: - uses: actions/checkout@v2 @@ -84,6 +85,9 @@ jobs: - name: Install webpack ${{ matrix.webpack-version }} run: yarn add -W webpack@${{ matrix.webpack-version }} + - name: Install webpack-dev-server ${{ matrix.webpack-version }} + run: yarn add -W webpack-dev-server@${{ matrix.dev-server-version }} + - name: Prepare environment for tests run: yarn build:ci diff --git a/package.json b/package.json index ac8635387ce..203d2c50dda 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "execa": "^5.0.0", "get-port": "^5.1.1", "husky": "^6.0.0", + "internal-ip": "^6.2.0", "jest": "^26.6.1", "jest-watch-typeahead": "^0.6.1", "lerna": "^4.0.0", @@ -80,8 +81,8 @@ "ts-jest": "^26.5.5", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "webpack": "^5.34.0", + "webpack": "^5.35.0", "webpack-bundle-analyzer": "^4.3.0", - "webpack-dev-server": "^3.11.1" + "webpack-dev-server": "^3.11.2" } } diff --git a/test/api/scaffold-utils.test.js b/test/api/scaffold-utils.test.js index a3dfab4a96f..bea825029f4 100755 --- a/test/api/scaffold-utils.test.js +++ b/test/api/scaffold-utils.test.js @@ -27,6 +27,7 @@ describe('utils', () => { entry: 'Yes', }); }); + it('should emulate a prompt for list input', () => { expect(Input(mockSelf, 'plugins', 'what is your plugin?', 'openJSF')).toEqual({ type: 'input', @@ -35,11 +36,13 @@ describe('utils', () => { default: 'openJSF', }); }); + it('should return a default Input object value', () => { expect(Input(mockSelf, 'plugins', 'what is your plugin?', 'my-plugin', true)).toEqual({ plugins: 'my-plugin', }); }); + it('should emulate a prompt for confirm', () => { expect(Confirm(mockSelf, 'context', 'what is your context?')).toEqual({ name: 'context', @@ -48,17 +51,21 @@ describe('utils', () => { type: 'confirm', }); }); + it('should make a Confirm object with yes as default', () => { expect(Confirm(mockSelf, 'context', 'what is your context?', true, true)).toEqual({ context: true, }); }); + it('should make an Input object with validation', () => { expect(InputValidate(mockSelf, 'plugins', 'what is your plugin?', () => true)).toMatchSnapshot(); }); + it('should make an Input object with validation and default value', () => { expect(InputValidate(mockSelf, 'plugins', 'what is your plugin?', () => true, 'my-plugin')).toMatchSnapshot(); }); + it('should return a default Input object with validation and default value', () => { expect(InputValidate(mockSelf, 'plugins', 'what is your plugin?', () => true, 'my-plugin', true)).toEqual({ plugins: 'my-plugin', diff --git a/test/build/mode/mode-with-config/src/index.js b/test/build/mode/mode-with-config/src/index.js index afb30eca56c..a7f54db75ac 100644 --- a/test/build/mode/mode-with-config/src/index.js +++ b/test/build/mode/mode-with-config/src/index.js @@ -7,4 +7,3 @@ if (process.env.NODE_ENV === "production") { } else { console.log("none mode"); } - diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 new file mode 100644 index 00000000000..ffcfd529f1b --- /dev/null +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 @@ -0,0 +1,2762 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`help should log error for invalid command using command syntax #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using command syntax #4: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #4: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #2: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid command using the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid flag with the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax #2: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'verbose' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'myCommand' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #2: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #3: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #4: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'bui' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #4: stdout 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stderr 1`] = `""`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on + start. + --no-bonjour Do not broadcast the server via ZeroConf + networking on start. + --client-progress Print compilation progress in percentage in the + browser. + --no-client-progress Do not print compilation progress in percentage in + the browser. + --client-overlay Show a full-screen overlay in the browser when + there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser + when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and + SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, + log, verbose). + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to + access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on + start. + --no-bonjour Do not broadcast the server via ZeroConf + networking on start. + --client-progress Print compilation progress in percentage in the + browser. + --no-client-progress Do not print compilation progress in percentage in + the browser. + --client-overlay Show a full-screen overlay in the browser when + there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser + when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and + SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, + log, verbose). + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to + access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. + ./src/main.js. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using command syntax: stderr 1`] = `""`; + +exports[`help should show help information using command syntax: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --color" option: stdout 1`] = ` +"Usage: webpack --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stderr 2`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stdout 2`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-color" option: stdout 1`] = ` +"Usage: webpack --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-stats" option: stdout 1`] = ` +"Usage: webpack --no-stats +Description: Disable stats output. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --stats" option: stdout 1`] = ` +"Usage: webpack --stats [value] +Description: It instructs webpack on how to treat the stats e.g. verbose. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --target" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --target" option: stdout 1`] = ` +"Usage: webpack --target +Short: webpack -t +Description: Sets the build target e.g. node. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --version" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --version" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help -v" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help -v" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --color" option: stdout 1`] = ` +"Usage: webpack serve --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --mode" option: stdout 1`] = ` +"Usage: webpack serve --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --no-color" option: stdout 1`] = ` +"Usage: webpack serve --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information with options for sub commands: stderr 1`] = `""`; + +exports[`help should show help information with options for sub commands: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from command syntax 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from option 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from command sytnax 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from option 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 new file mode 100644 index 00000000000..33c0a4bc196 --- /dev/null +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -0,0 +1,2789 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`help should log error for invalid command using command syntax #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using command syntax #4: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using command syntax #4: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #2: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option #3: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid command using the "--help" option #3: stdout 1`] = `""`; + +exports[`help should log error for invalid command using the "--help" option: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid command using the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option #2 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stderr 1`] = `"[webpack-cli] Unknown value for '--help' option, please use '--help=verbose'"`; + +exports[`help should log error for invalid flag with the "--help" option #2: stdout 1`] = `""`; + +exports[`help should log error for invalid flag with the "--help" option: stderr 1`] = ` +"[webpack-cli] Incorrect use of help +[webpack-cli] Please use: 'webpack help [command] [option]' | 'webpack [command] --help' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for invalid flag with the "--help" option: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax #2: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'verbose' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown command using command syntax: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'myCommand' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown command using command syntax: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #2: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #2: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #3: stderr 1`] = ` +"[webpack-cli] Unknown option '--made' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #3: stdout 1`] = `""`; + +exports[`help should log error for unknown option using command syntax #4: stderr 1`] = ` +"[webpack-cli] Can't find and load command 'bui' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`help should log error for unknown option using command syntax #4: stdout 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stderr 1`] = `""`; + +exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'b' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'b' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using command syntax: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'build' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'build' command using the "--help" option: stdout 1`] = ` +"Usage: webpack build|bundle|b [entries...] [options] + +Run webpack (default command, can be omitted). + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'c' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'c' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'configtest' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'create' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'create' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'i' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'i' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json + or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using command syntax: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'info' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'info' command using the "--help" option: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default + answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'init' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'init' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'l' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'l' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using command syntax: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'loader' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'loader' command using the "--help" option: stdout 1`] = ` +"Usage: webpack loader|l [output-path] [options] + +Scaffold a loader. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` +"Usage: webpack migrate|m [new-config-path] + +Migrate a configuration to a new version. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'n' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'n' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using command syntax: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'new' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'new' command using the "--help" option: stdout 1`] = ` +"Usage: webpack init|create|new|c|n [generation-path] [options] + +Initialize a new webpack project. + +Options: + --template Type of template (default: \\"default\\") + --force Generate without questions (ideally) using default answers + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'p' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'p' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' + and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using command syntax: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'plugin' command using the "--help" option: stdout 1`] = ` +"Usage: webpack plugin|p [output-path] [options] + +Scaffold a plugin. + +Options: + --template Type of template (default: \\"default\\") + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 's' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 's' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on + start. + --no-bonjour Do not broadcast the server via ZeroConf + networking on start. + --client-progress Print compilation progress in percentage in the + browser. + --no-client-progress Do not print compilation progress in percentage in + the browser. + --client-overlay Show a full-screen overlay in the browser when + there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser + when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and + SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, + log, verbose). + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to + access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on + start. + --no-bonjour Do not broadcast the server via ZeroConf + networking on start. + --client-progress Print compilation progress in percentage in the + browser. + --no-client-progress Do not print compilation progress in percentage in + the browser. + --client-overlay Show a full-screen overlay in the browser when + there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser + when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and + SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, + log, verbose). + --history-api-fallback Fallback to /index.html for Single Page + Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page + Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to + access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'serve' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'serve' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using command syntax: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'server' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'server' command using the "--help" option: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using command syntax: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 't' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 't' command using the "--help" option: stdout 1`] = ` +"Usage: webpack configtest|t [config-path] + +Validate a webpack configuration. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'w' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'w' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. + ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --env Environment passed to the configuration when it is + a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. + ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading + multiple configurations. + -o, --output-path Output location of the file generated by webpack + e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats + e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' and + commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using command syntax: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using command syntax: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information for 'watch' command using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information for 'watch' command using the "--help" option: stdout 1`] = ` +"Usage: webpack watch|w [entries...] [options] + +Run webpack and watch for files changes. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using command syntax: stderr 1`] = `""`; + +exports[`help should show help information using command syntax: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "--help" option: stderr 1`] = `""`; + +exports[`help should show help information using the "--help" option: stdout 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --color" option: stdout 1`] = ` +"Usage: webpack --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stderr 2`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --mode" option: stdout 2`] = ` +"Usage: webpack --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-color" option: stdout 1`] = ` +"Usage: webpack --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --no-stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --no-stats" option: stdout 1`] = ` +"Usage: webpack --no-stats +Description: Disable stats output. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --stats" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --stats" option: stdout 1`] = ` +"Usage: webpack --stats [value] +Description: It instructs webpack on how to treat the stats e.g. verbose. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --target" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --target" option: stdout 1`] = ` +"Usage: webpack --target +Short: webpack -t +Description: Sets the build target e.g. node. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help --version" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --version" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help -v" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help -v" option: stdout 1`] = ` +"Usage: webpack --version +Short: webpack -v +Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --color" option: stdout 1`] = ` +"Usage: webpack serve --color +Description: Enable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --mode" option: stdout 1`] = ` +"Usage: webpack serve --mode +Description: Defines the mode to pass to webpack. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information using the "help serve --no-color" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help serve --no-color" option: stdout 1`] = ` +"Usage: webpack serve --no-color +Description: Disable colors on console. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show help information with options for sub commands: stderr 1`] = `""`; + +exports[`help should show help information with options for sub commands: stdout 1`] = ` +"Usage: webpack info|i [options] + +Outputs information about your system. + +Options: + --output To get the output in a specified format ( accept json or markdown ) + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from command syntax 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stderr from option 1`] = `""`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from command sytnax 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`help should show the same information using the "--help" option and command syntax: stdout from option 1`] = ` +"Usage: webpack [entries...] [options] +Alternative usage to run commands: webpack [command] [options] + +The build tool for modern web applications. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + -w, --watch Watch for files changes. + --no-watch Do not watch for file changes. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +Commands: + build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). + configtest|t [config-path] Validate a webpack configuration. + help|h [command] [option] Display help for commands and options. + info|i [options] Outputs information about your system. + init|create|new|c|n [generation-path] [options] Initialize a new webpack project. + loader|l [output-path] [options] Scaffold a loader. + migrate|m [new-config-path] Migrate a configuration to a new version. + plugin|p [output-path] [options] Scaffold a plugin. + serve|server|s [entries...] [options] Run the webpack dev server. + version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + watch|w [entries...] [options] Run webpack and watch for files changes. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; diff --git a/test/help/help.test.js b/test/help/help.test.js index 4e9eb51d3b8..61add1d701e 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -1,4 +1,5 @@ 'use strict'; + const { run, normalizeStderr, normalizeStdout } = require('../utils/test-utils'); describe('help', () => { diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 index 3a840f9fb1d..e34efbf1bf6 100644 --- a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 @@ -5,16 +5,22 @@ exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log an error on unknown flag: stdout 1`] = `""`; + exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` "[webpack-cli] Error: Unknown option '--watch' [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log error on using '--watch' flag with serve: stdout 1`] = `""`; + exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` "[webpack-cli] Error: Unknown option '-w' [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log error on using '-w' alias with serve: stdout 1`] = `""`; + exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` " [webpack-cli] Compiler starting... [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' @@ -30,11 +36,83 @@ exports[`basic serve usage should respect the "publicPath" option from configura exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = `""`; +exports[`basic serve usage should shoe help information for serve: stderr 1`] = `""`; + +exports[`basic serve usage should shoe help information for serve: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` "[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. at stack" `; +exports[`basic serve usage should throw error when same ports in multicompiler: stdout 1`] = `""`; + exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = `"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense."`; exports[`basic serve usage should work in multi compiler mode: stderr 1`] = `""`; @@ -70,6 +148,8 @@ exports[`basic serve usage should work with the "--output-public-path" option: s [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should work with the "--output-public-path" option: stdout 1`] = `""`; + exports[`basic serve usage should work with the "--port" option: stderr 1`] = `""`; exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = `""`; diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 index 414f1462acb..43d3cfed3a2 100644 --- a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 @@ -5,16 +5,22 @@ exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log an error on unknown flag: stdout 1`] = `""`; + exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` "[webpack-cli] Error: Unknown option '--watch' [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log error on using '--watch' flag with serve: stdout 1`] = `""`; + exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` "[webpack-cli] Error: Unknown option '-w' [webpack-cli] Run 'webpack --help' to see available commands and options" `; +exports[`basic serve usage should log error on using '-w' alias with serve: stdout 1`] = `""`; + exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` " [webpack-cli] Compiler starting... [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' @@ -30,11 +36,84 @@ exports[`basic serve usage should respect the "publicPath" option from configura exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = `""`; +exports[`basic serve usage should shoe help information for serve: stderr 1`] = `""`; + +exports[`basic serve usage should shoe help information for serve: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --bonjour Broadcasts the server via ZeroConf networking on start + --lazy Lazy + --liveReload Enables/Disables live reloading on changing files + --serveIndex Enables/Disables serveIndex middleware + --inline Inline mode (set to false to disable including client scripts like livereload) + --profile Print compilation profile data for progress steps + --progress Print compilation progress in percentage + --hot-only Do not refresh page if HMR fails + --stdin close when stdin ends + --open [value] Open the default browser, or optionally specify a browser name + --useLocalIp Open default browser with local IP + --open-page Open default browser with the specified page + --client-log-level Log level in the browser (trace, debug, info, warn, error or silent) + --https HTTPS + --http2 HTTP/2, must be used with HTTPS + --key Path to a SSL key. + --cert Path to a SSL certificate. + --cacert Path to a SSL CA certificate. + --pfx Path to a SSL pfx file. + --pfx-passphrase Passphrase for pfx file. + --content-base A directory or URL to serve HTML content from. + --watch-content-base Enable live-reloading of the content-base. + --history-api-fallback Fallback to /index.html for Single Page Applications. + --compress Enable gzip compression + --port The port + --disable-host-check Will not check the host + --socket Socket to listen + --public The public hostname/ip address of the server + --host The hostname/ip address the server will bind to + --allowed-hosts A list of hosts that are allowed to access the dev server, separated by spaces + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` "[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. at stack" `; +exports[`basic serve usage should throw error when same ports in multicompiler: stdout 1`] = `""`; + exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = `"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense."`; exports[`basic serve usage should work in multi compiler mode: stderr 1`] = `""`; diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 new file mode 100644 index 00000000000..db2302b2200 --- /dev/null +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 @@ -0,0 +1,322 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown-flag' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log an error on unknown flag: stdout 1`] = `""`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--watch' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stdout 1`] = `""`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-w' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stdout 1`] = `""`; + +exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` +" [webpack-cli] Compiler starting... + [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' + [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory + [webpack-cli] Compiler finished + [webpack-cli] Compiler is watching files for updates... + [webpack-dev-middleware] Compilation finished" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration (from the "devServer" options): stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options): stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should shoe help information for serve: stderr 1`] = `""`; + +exports[`basic serve usage should shoe help information for serve: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + --entry The entry point(s) of your application e.g. ./src/main.js. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + -t, --target Sets the build target e.g. node. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` +"[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. + at stack" +`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stdout 1`] = `""`; + +exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = ` +"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense. + [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work in multi compiler mode: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with "--hot" and "--port" options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with entries syntax: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--client-log-level" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" and "--env" options and expose dev server options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" and "--env" options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--hot" option using the "only" value: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--hot" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option #2: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option #3: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--no-hot" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--open" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--output-public-path" option: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-public-path' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should work with the "--output-public-path" option: stdout 1`] = `""`; + +exports[`basic serve usage should work with the "--port" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--stats" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "stats" option in config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the default "publicPath" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; diff --git a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 new file mode 100644 index 00000000000..dad84972c3d --- /dev/null +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 @@ -0,0 +1,324 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic serve usage should log an error on unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown-flag' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log an error on unknown flag: stdout 1`] = `""`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--watch' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '--watch' flag with serve: stdout 1`] = `""`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-w' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`basic serve usage should log error on using '-w' alias with serve: stdout 1`] = `""`; + +exports[`basic serve usage should log used supplied config with serve: stderr 1`] = ` +" [webpack-cli] Compiler starting... + [webpack-cli] Compiler is using config: '/test/serve/basic/log.config.js' + [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory + [webpack-cli] Compiler finished + [webpack-cli] Compiler is watching files for updates... + [webpack-dev-middleware] Compilation finished" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration (from the "devServer" options): stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options): stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should shoe help information for serve: stderr 1`] = `""`; + +exports[`basic serve usage should shoe help information for serve: stdout 1`] = ` +"Usage: webpack serve|server|s [entries...] [options] + +Run the webpack dev server. + +Options: + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Do not stop watching when stdin stream has ended. + --host The hostname/ip address the server will bind to. + --port The port server will listen to. + --static [value...] A directory to serve static content from. + --no-static Negative 'static' option. + --live-reload Enables live reloading on changing files. + --no-live-reload Disables live reloading on changing files. + --https Use HTTPS protocol. + --no-https Do not use HTTPS protocol. + --http2 Use HTTP/2, must be used with HTTPS. + --no-http2 Do not use HTTP/2. + --bonjour Broadcasts the server via ZeroConf networking on start. + --no-bonjour Do not broadcast the server via ZeroConf networking on start. + --client-progress Print compilation progress in percentage in the browser. + --no-client-progress Do not print compilation progress in percentage in the browser. + --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. + --setup-exit-signals Close and exit the process on SIGINT and SIGTERM. + --no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. + --client-logging Log level in the browser (none, error, warn, info, log, verbose). + --history-api-fallback Fallback to /index.html for Single Page Applications. + --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. + --compress Enable gzip compression. + --no-compress Disable gzip compression. + --public The public hostname/ip address of the server. + --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. + --no-firewall Disable firewall. + --watch-files Watch static files for file changes. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options run 'webpack --help=verbose'. + +Webpack documentation: https://webpack.js.org/. +CLI documentation: https://webpack.js.org/api/cli/. +Made with ♥ by the webpack team." +`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = ` +"[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config. + at stack" +`; + +exports[`basic serve usage should throw error when same ports in multicompiler: stdout 1`] = `""`; + +exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = ` +"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense. + [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work in multi compiler mode: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with "--hot" and "--port" options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with entries syntax: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--client-log-level" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" and "--env" options and expose dev server options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" and "--env" options: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--config" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--hot" option using the "only" value: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--hot" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option #2: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option #3: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--mode" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--no-hot" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--open" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--output-public-path" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--port" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "--stats" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the "stats" option in config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work with the default "publicPath" option: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; + +exports[`basic serve usage should work: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/basic/public' directory" +`; diff --git a/test/serve/basic/dev-server-output-public-path.config.js b/test/serve/basic/dev-server-output-public-path.config.js index e84e9137dd6..d6d09b622ac 100644 --- a/test/serve/basic/dev-server-output-public-path.config.js +++ b/test/serve/basic/dev-server-output-public-path.config.js @@ -1,4 +1,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); +const { devServerConfig } = require('./helper/base-dev-server.config'); module.exports = { mode: 'development', @@ -6,8 +7,6 @@ module.exports = { output: { publicPath: '/my-public-path/', }, - devServer: { - publicPath: '/dev-server-my-public-path/', - }, + devServer: devServerConfig, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], }; diff --git a/test/serve/basic/helper/base-dev-server.config.js b/test/serve/basic/helper/base-dev-server.config.js new file mode 100644 index 00000000000..6dbb7901b8a --- /dev/null +++ b/test/serve/basic/helper/base-dev-server.config.js @@ -0,0 +1,17 @@ +const { isDevServer4 } = require('../../../utils/test-utils'); + +let devServerConfig = {}; + +if (isDevServer4) { + devServerConfig = { + dev: { + publicPath: '/dev-server-my-public-path/', + }, + }; +} else { + devServerConfig = { + publicPath: '/dev-server-my-public-path/', + }; +} + +module.exports = devServerConfig; diff --git a/test/serve/basic/multi-dev-server-output-public-path.config.js b/test/serve/basic/multi-dev-server-output-public-path.config.js index 56409276d4e..2500c708719 100644 --- a/test/serve/basic/multi-dev-server-output-public-path.config.js +++ b/test/serve/basic/multi-dev-server-output-public-path.config.js @@ -1,4 +1,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); +const { devServerConfig } = require('./helper/base-dev-server.config'); module.exports = [ { @@ -14,13 +15,12 @@ module.exports = [ name: 'two', mode: 'development', devtool: false, + stats: 'detailed', output: { publicPath: '/my-public-path/', filename: 'second-output/[name].js', }, - devServer: { - publicPath: '/dev-server-my-public-path/', - }, + devServer: devServerConfig, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], }, ]; diff --git a/test/serve/basic/multi-dev-server.config.js b/test/serve/basic/multi-dev-server.config.js index 09654325db8..211aaef13e5 100644 --- a/test/serve/basic/multi-dev-server.config.js +++ b/test/serve/basic/multi-dev-server.config.js @@ -2,6 +2,7 @@ const getPort = require('get-port'); const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); +const { devServerConfig } = require('./helper/base-dev-server.config'); module.exports = async () => [ { @@ -12,8 +13,8 @@ module.exports = async () => [ filename: 'first-output/[name].js', }, devServer: { + ...devServerConfig, port: await getPort(), - publicPath: '/one-dev-server-my-public-path/', }, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], }, @@ -26,8 +27,8 @@ module.exports = async () => [ filename: 'second-output/[name].js', }, devServer: { + ...devServerConfig, port: await getPort(), - publicPath: '/two-dev-server-my-public-path/', }, }, ]; diff --git a/test/serve/basic/multi.config.js b/test/serve/basic/multi.config.js index e344db6c72b..e8134f9b209 100644 --- a/test/serve/basic/multi.config.js +++ b/test/serve/basic/multi.config.js @@ -1,4 +1,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); +const { devServerConfig } = require('./helper/base-dev-server.config'); module.exports = [ { @@ -8,9 +9,7 @@ module.exports = [ output: { filename: 'first-output/[name].js', }, - devServer: { - publicPath: '/dev-server-my-public-path/', - }, + devServer: devServerConfig, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], }, { diff --git a/test/serve/basic/multiple-dev-server.config.js b/test/serve/basic/multiple-dev-server.config.js index 154a03b2012..8c72527829a 100644 --- a/test/serve/basic/multiple-dev-server.config.js +++ b/test/serve/basic/multiple-dev-server.config.js @@ -1,4 +1,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); +const { devServerConfig } = require('./helper/base-dev-server.config'); module.exports = [ { @@ -8,9 +9,7 @@ module.exports = [ output: { filename: 'first-output/[name].js', }, - devServer: { - publicPath: '/dev-server-my-public-path/', - }, + devServer: devServerConfig, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false)], }, { @@ -21,9 +20,7 @@ module.exports = [ output: { filename: 'first-output/[name].js', }, - devServer: { - publicPath: '/dev-server-my-public-path/', - }, + devServer: devServerConfig, plugins: [new WebpackCLITestPlugin(['mode', 'output'], false)], }, ]; diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index 0b580d20d00..8d296a2aced 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch, isWebpack5, isDevServer4, normalizeStderr } = require('../../utils/test-utils'); +const { runWatch, isWebpack5, normalizeStderr, normalizeStdout, isDevServer4 } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -18,16 +18,28 @@ describe('basic serve usage', () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--config" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'serve.config.js', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - expect(stdout).toContain('development'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + + expect(stdout).toContain('main.js'); }); it('should work with the "--config" and "--env" options', async () => { @@ -42,10 +54,16 @@ describe('basic serve usage', () => { ]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('WEBPACK_SERVE: true'); expect(stdout).toContain("foo: 'bar'"); expect(stdout).toContain('development'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--config" and "--env" options and expose dev server options', async () => { @@ -61,22 +79,34 @@ describe('basic serve usage', () => { ]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('hot: true'); expect(stdout).toContain('WEBPACK_SERVE: true'); expect(stdout).toContain("foo: 'bar'"); expect(stdout).toContain('development'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); it('should work in multi compiler mode', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi.config.js', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); expect(stdout).toContain('second-output/main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); // TODO need fix in future, edge case @@ -84,148 +114,226 @@ describe('basic serve usage', () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi-dev-server.config.js']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); expect(stdout).toContain('second-output/main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--mode" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('development'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--stats" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--stats']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain(isWebpack5 ? 'compiled successfully' : 'Version: webpack'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--stats verbose" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--stats', 'verbose']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain(isWebpack5 ? 'from webpack.Compiler' : 'webpack.buildChunkGraph.visitModules'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); + expect(stdout).toContain('main.js'); }); it('should work with the "--mode" option #2', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--mode', 'production']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('production'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--mode" option #3', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--mode', 'development']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('development'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--progress" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--progress']); expect(stderr).toContain('webpack.Progress'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--progress" option using the "profile" value', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--progress', 'profile']); expect(stderr).toContain('webpack.Progress'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--client-log-level" option', async () => { - const { stdout, stderr } = await runWatch(testPath, ['serve', '--client-log-level', 'info']); + const { stdout, stderr } = await runWatch(testPath, ['serve', isDevServer4 ? '--client-logging' : '--client-log-level', 'info']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--port" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--hot" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--hot']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); it('should work with the "--no-hot" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--no-hot']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(stdout).not.toContain('HotModuleReplacementPlugin'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--hot" option using the "only" value', async () => { - const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, isDevServer4 ? '--hot only' : '--hot-only']); + const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, isDevServer4 ? '--hot=only' : '--hot-only']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(stdout).toContain('HotModuleReplacementPlugin'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); it('should work with "--hot" and "--port" options', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--hot']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(stdout).toContain('HotModuleReplacementPlugin'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); it('should work with the "--hot" and "--progress" options', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--hot', '--progress']); expect(stderr).toContain('webpack.Progress'); + expect(stdout).toContain('HotModuleReplacementPlugin'); expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toHaveLength(1); }); it('should work with the default "publicPath" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout).toContain('from /'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); + // TODO bug on webpack-dev-server side, need respect `output.publicPath` too it('should work with the "--output-public-path" option', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--output-public-path', '/my-public-path/']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); if (isWebpack5) { + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).toContain('/my-public-path/'); + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout).toContain('/my-public-path/'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); } else { - expect(stdout).toBeFalsy(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); } }); @@ -233,38 +341,75 @@ describe('basic serve usage', () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'output-public-path.config.js']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); expect(stdout).toContain('/my-public-path/'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should respect the "publicPath" option from configuration using multi compiler mode', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'multi-output-public-path.config.js', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); expect(stdout).toContain('second-output/main.js'); expect(stdout).toContain('/my-public-path/'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should respect the "publicPath" option from configuration (from the "devServer" options)', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'dev-server-output-public-path.config.js']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout).toContain('/dev-server-my-public-path/'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with the "--open" option', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--open', '--port', port]); - expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + if (isDevServer4) { + let normalizedStderr = normalizeStderr(stderr); + + if (/wait until bundle finished/.test(normalizedStderr)) { + normalizedStderr = normalizedStderr.split('\n'); + + const waitIndex = normalizedStderr.findIndex((item) => /wait until bundle finished/.test(item)); + + if (waitIndex !== -1) { + normalizedStderr.splice(waitIndex, 1); + } + + normalizedStderr = normalizedStderr.join('\n'); + } + + expect(normalizedStderr).toMatchSnapshot('stderr'); + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('main.js'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options)', async () => { @@ -277,28 +422,53 @@ describe('basic serve usage', () => { ]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('one'); expect(stdout).toContain('first-output/main.js'); expect(stdout).toContain('two'); expect(stdout).toContain('second-output/main.js'); - expect(stdout).toContain('/dev-server-my-public-path/'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work with entries syntax', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', './src/entry.js', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('development'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should work and log warning on the `watch option in a configuration', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', './watch.config.js', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('development'); - expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); + }); + + it('should shoe help information for serve', async () => { + const { exitCode, stderr, stdout } = await runWatch(__dirname, ['serve', '--help']); + + expect(exitCode).toBe(0); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log used supplied config with serve', async () => { @@ -315,7 +485,7 @@ describe('basic serve usage', () => { expect(exitCode).toBe(2); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - expect(stdout).toBeFalsy(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it("should log error on using '-w' alias with serve", async () => { @@ -323,7 +493,7 @@ describe('basic serve usage', () => { expect(exitCode).toBe(2); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - expect(stdout).toBeFalsy(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error on unknown flag', async () => { @@ -331,23 +501,23 @@ describe('basic serve usage', () => { expect(exitCode).toBe(2); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - expect(stdout).toBeFalsy(); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should work with the "stats" option in config', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'stats.config.js'], { - killString: /Compiled successfully/, + killString: /Compiled successfully|modules/i, }); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - expect(stdout).toContain('Compiled successfully'); + expect(stdout).toContain(isWebpack5 ? 'compiled successfully' : 'modules'); expect(stdout.match(/HotModuleReplacementPlugin/g)).toBeNull(); }); it('should throw error when same ports in multicompiler', async () => { const { stderr, stdout } = await runWatch(__dirname, ['serve', '--config', 'same-ports-dev-serever.config.js']); - expect(stdout).toBeFalsy(); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/serve/basic/stats.config.js b/test/serve/basic/stats.config.js index 9d27015e4cc..0159b1dbf83 100644 --- a/test/serve/basic/stats.config.js +++ b/test/serve/basic/stats.config.js @@ -1,7 +1,15 @@ +const { isDevServer4 } = require('../../utils/test-utils'); + module.exports = { mode: 'development', devtool: false, - devServer: { - stats: 'minimal', - }, + devServer: isDevServer4 + ? { + dev: { + stats: 'minimal', + }, + } + : { + stats: 'minimal', + }, }; diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 index 7c7af9c0b64..aaeffa7f042 100644 --- a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack4 @@ -26,10 +26,3 @@ options.bonjour should be {Boolean} (https://webpack.js.org/configuration/dev-se `; exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; - -exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stderr 1`] = ` -"[webpack-cli] RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received -1. - at stack" -`; - -exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 index b800d0008e3..592e306ed93 100644 --- a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer3.webpack5 @@ -24,10 +24,3 @@ options.bonjour should be {Boolean} (https://webpack.js.org/configuration/dev-se `; exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; - -exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stderr 1`] = ` -"[webpack-cli] RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received -1. - at stack" -`; - -exports[`invalid schema should log webpack-dev-server error and exit process on invalid flag: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack4 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack4 new file mode 100644 index 00000000000..1af2481082e --- /dev/null +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack4 @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid schema should log webpack error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema. + - configuration.bonjour should be a boolean. + -> Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack5 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack5 new file mode 100644 index 00000000000..9c3aeaffc0e --- /dev/null +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer4.webpack5 @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid schema should log webpack error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`invalid schema should log webpack error and exit process on invalid config: stdout 1`] = `""`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stderr 1`] = ` +"[webpack-cli] Invalid value 'Yukihira' for the '--mode' option +[webpack-cli] Expected: 'development | production | none'" +`; + +exports[`invalid schema should log webpack error and exit process on invalid flag: stdout 1`] = `""`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema. + - configuration.bonjour should be a boolean. + -> Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour" +`; + +exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; diff --git a/test/serve/invalid-schema/invalid-schema.test.js b/test/serve/invalid-schema/invalid-schema.test.js index 72eb33d464f..95030317d64 100644 --- a/test/serve/invalid-schema/invalid-schema.test.js +++ b/test/serve/invalid-schema/invalid-schema.test.js @@ -18,7 +18,8 @@ describe('invalid schema', () => { expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); - it('should log webpack-dev-server error and exit process on invalid flag', async () => { + // TODO need fix on webpack-dev-server side + it.skip('should log webpack-dev-server error and exit process on invalid flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serve', '--port', '-1']); expect(exitCode).toEqual(2); diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 index 56d5b37ccb4..c60d10f6646 100644 --- a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack4 @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`serve variable compiles without flags and export variable: stderr 1`] = `""`; +exports[`serve variable compiles without flags and export variable 1`] = `""`; diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 index 56d5b37ccb4..c60d10f6646 100644 --- a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer3.webpack5 @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`serve variable compiles without flags and export variable: stderr 1`] = `""`; +exports[`serve variable compiles without flags and export variable 1`] = `""`; diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 new file mode 100644 index 00000000000..3fb634186bc --- /dev/null +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve variable compiles without flags and export variable 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/serve-variable/public' directory" +`; diff --git a/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 new file mode 100644 index 00000000000..3fb634186bc --- /dev/null +++ b/test/serve/serve-variable/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve variable compiles without flags and export variable 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/serve-variable/public' directory" +`; diff --git a/test/serve/serve-variable/serve-basic.test.js b/test/serve/serve-variable/serve-basic.test.js index cc0cc77b3b6..ba6c28d2326 100644 --- a/test/serve/serve-variable/serve-basic.test.js +++ b/test/serve/serve-variable/serve-basic.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch, normalizeStderr } = require('../../utils/test-utils'); +const { runWatch, normalizeStderr, isDevServer4 } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -17,9 +17,15 @@ describe('serve variable', () => { it('compiles without flags and export variable', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); - expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStderr(stderr)).toMatchSnapshot(); expect(stdout).toContain('main.js'); - expect(stdout).not.toContain('HotModuleReplacementPlugin'); + + if (isDevServer4) { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + } + expect(stdout).toContain('PASS'); }); }); diff --git a/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack4 b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack4 new file mode 100644 index 00000000000..893b938dd83 --- /dev/null +++ b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack4 @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve with devServer in config Passing hot flag works alongside other server config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config Port flag should override the config port: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config Should pick up the host and port from config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config works fine when no-hot flag is passed alongside other server config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; diff --git a/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack5 b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack5 new file mode 100644 index 00000000000..893b938dd83 --- /dev/null +++ b/test/serve/with-custom-port/__snapshots__/serve-custom-config.test.js.snap.devServer4.webpack5 @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`serve with devServer in config Passing hot flag works alongside other server config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config Port flag should override the config port: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config Should pick up the host and port from config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; + +exports[`serve with devServer in config works fine when no-hot flag is passed alongside other server config: stderr 1`] = ` +" [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:/ + [webpack-dev-server] On Your Network (IPv4): http://:/ + [webpack-dev-server] On Your Network (IPv6): http://[]:/ + [webpack-dev-server] Content not from webpack is served from '/test/serve/with-custom-port/public' directory" +`; diff --git a/test/serve/with-custom-port/serve-custom-config.test.js b/test/serve/with-custom-port/serve-custom-config.test.js index fe0eda10cef..6808e94b1b8 100644 --- a/test/serve/with-custom-port/serve-custom-config.test.js +++ b/test/serve/with-custom-port/serve-custom-config.test.js @@ -3,7 +3,7 @@ const path = require('path'); // eslint-disable-next-line node/no-unpublished-require const getPort = require('get-port'); -const { runWatch, normalizeStderr } = require('../../utils/test-utils'); +const { runWatch, normalizeStderr, isDevServer4 } = require('../../utils/test-utils'); const testPath = path.resolve(__dirname); @@ -18,45 +18,58 @@ describe('serve with devServer in config', () => { const { stdout, stderr } = await runWatch(testPath, ['serve']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - // Should output the correct bundle file + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + expect(stdout).toContain('http://0.0.0.0:1234'); + } + expect(stdout).toContain('main.js'); - expect(stdout).not.toContain('HotModuleReplacementPlugin'); - // Runs at correct host and port - expect(stdout).toContain('http://0.0.0.0:1234'); }); it('Port flag should override the config port', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port]); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - // Should output the correct bundle file + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).not.toContain('HotModuleReplacementPlugin'); + expect(stdout).toContain(`http://0.0.0.0:${port}`); + } + expect(stdout).toContain('main.js'); - expect(stdout).not.toContain('HotModuleReplacementPlugin'); - // Runs at correct host and port - expect(stdout).toContain(`http://0.0.0.0:${port}`); }); it('Passing hot flag works alongside other server config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--hot']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - // Should output the correct bundle file + + if (isDevServer4) { + expect(stdout).toContain('HotModuleReplacementPlugin'); + } else { + expect(stdout).toContain('HotModuleReplacementPlugin'); + expect(stdout).toContain(`http://0.0.0.0:${port}`); + } + expect(stdout).toContain('main.js'); - // HMR is being used - expect(stdout).toContain('HotModuleReplacementPlugin'); - // Runs at correct host and port - expect(stdout).toContain(`http://0.0.0.0:${port}`); }); it('works fine when no-hot flag is passed alongside other server config', async () => { const { stdout, stderr } = await runWatch(testPath, ['serve', '--port', port, '--no-hot']); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); - // Should output the correct bundle file - expect(stdout).toContain('main.js'); - // HMR is not being used expect(stdout).not.toContain('HotModuleReplacementPlugin'); - // Runs at correct host and port - expect(stdout).toContain(`http://0.0.0.0:${port}`); + + if (!isDevServer4) { + // Runs at correct host and port + expect(stdout).toContain(`http://0.0.0.0:${port}`); + } + + expect(stdout).toContain('main.js'); }); }); diff --git a/test/serve/with-custom-port/webpack.config.js b/test/serve/with-custom-port/webpack.config.js index 0b86f19706c..c0a8ac96ef6 100644 --- a/test/serve/with-custom-port/webpack.config.js +++ b/test/serve/with-custom-port/webpack.config.js @@ -3,9 +3,10 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { mode: 'development', devtool: false, + stats: 'detailed', devServer: { port: 1234, host: '0.0.0.0', }, - plugins: [new WebpackCLITestPlugin(['plugins'], false)], + plugins: [new WebpackCLITestPlugin(['mode'], false, 'hooks.compilation.taps')], }; diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index ac529bfd8b3..7c44735545a 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -7,6 +7,7 @@ const stripAnsi = require('strip-ansi'); const path = require('path'); const fs = require('fs'); const execa = require('execa'); +const internalIp = require('internal-ip'); const { exec } = require('child_process'); const { node: execaNode } = execa; const { Writable } = require('readable-stream'); @@ -274,12 +275,60 @@ const normalizeStderr = (stderr) => { let normalizedStderr = stripAnsi(stderr); normalizedStderr = normalizeCwd(normalizedStderr); + + const networkIPv4 = internalIp.v4.sync(); + + if (networkIPv4) { + normalizedStderr = normalizedStderr.replace(new RegExp(networkIPv4, 'g'), ''); + } + + const networkIPv6 = internalIp.v6.sync(); + + if (networkIPv6) { + normalizedStderr = normalizedStderr.replace(new RegExp(networkIPv6, 'g'), ''); + } + + normalizedStderr = normalizedStderr.replace(/:[0-9]+\//g, ':/'); + + if (!/On Your Network \(IPv6\)/.test(stderr)) { + // Github Actions doesnt' support IPv6 on ubuntu in some cases + normalizedStderr = normalizedStderr.split('\n'); + + const ipv4MessageIndex = normalizedStderr.findIndex((item) => /On Your Network \(IPv4\)/.test(item)); + + if (ipv4MessageIndex !== -1) { + normalizedStderr.splice( + ipv4MessageIndex + 1, + 0, + ' [webpack-dev-server] On Your Network (IPv6): http://[]:/', + ); + } + + normalizedStderr = normalizedStderr.join('\n'); + } + normalizedStderr = normalizeVersions(normalizedStderr); normalizedStderr = normalizeError(normalizedStderr); return normalizedStderr; }; +const getWebpackCliArguments = (startWith) => { + if (typeof startWith === 'undefined') { + return cli.getArguments(); + } + + const result = {}; + + for (const [name, value] of Object.entries(cli.getArguments())) { + if (name.startsWith(startWith)) { + result[name] = value; + } + } + + return result; +}; + const readFile = (path, options = {}) => new Promise((resolve, reject) => { fs.readFile(path, options, (err, stats) => { @@ -310,22 +359,6 @@ const uniqueDirectoryForTest = async () => { return result; }; -const getWebpackCliArguments = (startWith) => { - if (typeof startWith === 'undefined') { - return cli.getArguments(); - } - - const result = {}; - - for (const [name, value] of Object.entries(cli.getArguments())) { - if (name.startsWith(startWith)) { - result[name] = value; - } - } - - return result; -}; - module.exports = { run, runAndGetProcess, diff --git a/yarn.lock b/yarn.lock index 3f02d9f013f..881a224dae3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3701,6 +3701,13 @@ default-gateway@^4.2.0: execa "^1.0.0" ip-regex "^2.1.0" +default-gateway@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== + dependencies: + execa "^5.0.0" + default-require-extensions@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" @@ -5687,6 +5694,16 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" +internal-ip@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-6.2.0.tgz#d5541e79716e406b74ac6b07b856ef18dc1621c1" + integrity sha512-D8WGsR6yDt8uq7vDMu7mjcR+yRMm3dW8yufyChmszWRjcSHuxLBkR3GdS2HZAjodsaGuCvXeEJpueisXJULghg== + dependencies: + default-gateway "^6.0.0" + ipaddr.js "^1.9.1" + is-ip "^3.1.0" + p-event "^4.2.0" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -5702,12 +5719,17 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= +ip-regex@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.9.1, ipaddr.js@^1.9.0: +ipaddr.js@1.9.1, ipaddr.js@^1.9.0, ipaddr.js@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== @@ -5886,6 +5908,13 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-ip@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" + integrity sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q== + dependencies: + ip-regex "^4.0.0" + is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -8118,6 +8147,13 @@ p-each-series@^2.1.0: resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== +p-event@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-4.2.0.tgz#af4b049c8acd91ae81083ebd1e6f5cae2044c1b5" + integrity sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ== + dependencies: + p-timeout "^3.1.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -8226,7 +8262,7 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" -p-timeout@^3.2.0: +p-timeout@^3.1.0, p-timeout@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== @@ -10733,7 +10769,7 @@ webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@^3.11.1: +webpack-dev-server@^3.11.2: version "3.11.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz#695ebced76a4929f0d5de7fd73fafe185fe33708" integrity sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ== @@ -10796,10 +10832,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.34.0: - version "5.34.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.34.0.tgz#8f12bfd3474e7543232345b89294cfe8a5191c10" - integrity sha512-+WiFMgaZqhu7zKN64LQ7z0Ml4WWI+9RwG6zmS0wJDQXiCeg3hpN8fYFNJ+6WlosDT55yVxTfK7XHUAOVR4rLyA== +webpack@^5.35.0: + version "5.35.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.35.0.tgz#4db23c2b96c4e53a90c5732d7cdb301a84a33576" + integrity sha512-au3gu55yYF/h6NXFr0KZPZAYxS6Nlc595BzYPke8n0CSff5WXcoixtjh5LC/8mXunkRKxhymhXmBY0+kEbR6jg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 8fc8d0e5c45a57e0c531bdbdd6b602791b29bf0b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 24 Apr 2021 16:46:45 +0300 Subject: [PATCH 075/103] chore(deps-dev): bump eslint from 7.24.0 to 7.25.0 (#2660) Bumps [eslint](https://github.com/eslint/eslint) from 7.24.0 to 7.25.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.24.0...v7.25.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 881a224dae3..26859056c77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4222,9 +4222,9 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.12.1: - version "7.24.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.24.0.tgz#2e44fa62d93892bfdb100521f17345ba54b8513a" - integrity sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ== + version "7.25.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.25.0.tgz#1309e4404d94e676e3e831b3a3ad2b050031eb67" + integrity sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw== dependencies: "@babel/code-frame" "7.12.11" "@eslint/eslintrc" "^0.4.0" From 4dfd166f757ce94130bf9b7580f2dbe2868b8f4f Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Sat, 24 Apr 2021 06:46:59 -0700 Subject: [PATCH 076/103] feat: added support arguments description (#2659) --- packages/generators/src/index.ts | 9 +++ packages/webpack-cli/lib/webpack-cli.js | 2 +- .../help.test.js.snap.devServer3.webpack4 | 72 +++++++++++++++++++ .../help.test.js.snap.devServer3.webpack5 | 72 +++++++++++++++++++ .../help.test.js.snap.devServer4.webpack4 | 72 +++++++++++++++++++ .../help.test.js.snap.devServer4.webpack5 | 72 +++++++++++++++++++ 6 files changed, 298 insertions(+), 1 deletion(-) diff --git a/packages/generators/src/index.ts b/packages/generators/src/index.ts index be8fd99b71f..d9de58bfbc3 100644 --- a/packages/generators/src/index.ts +++ b/packages/generators/src/index.ts @@ -14,6 +14,9 @@ class GeneratorsCommand { name: 'init [generation-path]', alias: ['create', 'new', 'c', 'n'], description: 'Initialize a new webpack project.', + argsDescription: { + 'generation-path': 'Path to the installation directory, e.g. ./projectName', + }, usage: '[generation-path] [options]', pkg: '@webpack-cli/generators', }, @@ -54,6 +57,9 @@ class GeneratorsCommand { name: 'loader [output-path]', alias: 'l', description: 'Scaffold a loader.', + argsDescription: { + 'output-path': 'Path to the output directory, e.g. ./loaderName', + }, usage: '[output-path] [options]', pkg: '@webpack-cli/generators', }, @@ -82,6 +88,9 @@ class GeneratorsCommand { name: 'plugin [output-path]', alias: 'p', description: 'Scaffold a plugin.', + argsDescription: { + 'output-path': 'Path to the output directory, e.g. ./pluginName', + }, usage: '[output-path] [options]', pkg: '@webpack-cli/generators', }, diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 7c58c238856..cd39489449a 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -38,7 +38,7 @@ class WebpackCLI { }); if (commandOptions.description) { - command.description(commandOptions.description); + command.description(commandOptions.description, commandOptions.argsDescription); } if (commandOptions.usage) { diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 index 779d58db0f7..22f0fa47246 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 @@ -530,6 +530,9 @@ exports[`help should show help information for 'c' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -554,6 +557,9 @@ exports[`help should show help information for 'c' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -660,6 +666,9 @@ exports[`help should show help information for 'create' command using command sy Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -684,6 +693,9 @@ exports[`help should show help information for 'create' command using the "--hel Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -850,6 +862,9 @@ exports[`help should show help information for 'init' and respect the "--color" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -876,6 +891,9 @@ exports[`help should show help information for 'init' and respect the "--no-colo Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -902,6 +920,9 @@ exports[`help should show help information for 'init' command using command synt Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -926,6 +947,9 @@ exports[`help should show help information for 'init' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -950,6 +974,9 @@ exports[`help should show help information for 'l' command using command syntax: Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -973,6 +1000,9 @@ exports[`help should show help information for 'l' command using the "--help" op Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -996,6 +1026,9 @@ exports[`help should show help information for 'loader' and respect the "--color Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1020,6 +1053,9 @@ exports[`help should show help information for 'loader' and respect the "--no-co Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1044,6 +1080,9 @@ exports[`help should show help information for 'loader' command using command sy Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1067,6 +1106,9 @@ exports[`help should show help information for 'loader' command using the "--hel Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1212,6 +1254,9 @@ exports[`help should show help information for 'n' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1236,6 +1281,9 @@ exports[`help should show help information for 'n' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1260,6 +1308,9 @@ exports[`help should show help information for 'new' command using command synta Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1284,6 +1335,9 @@ exports[`help should show help information for 'new' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1308,6 +1362,9 @@ exports[`help should show help information for 'p' command using command syntax: Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1331,6 +1388,9 @@ exports[`help should show help information for 'p' command using the "--help" op Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1354,6 +1414,9 @@ exports[`help should show help information for 'plugin' and respect the "--color Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1378,6 +1441,9 @@ exports[`help should show help information for 'plugin' and respect the "--no-co Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1402,6 +1468,9 @@ exports[`help should show help information for 'plugin' command using command sy Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1425,6 +1494,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 index 7de1a7c196a..ace44a2d488 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 @@ -539,6 +539,9 @@ exports[`help should show help information for 'c' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -563,6 +566,9 @@ exports[`help should show help information for 'c' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -669,6 +675,9 @@ exports[`help should show help information for 'create' command using command sy Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -693,6 +702,9 @@ exports[`help should show help information for 'create' command using the "--hel Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -859,6 +871,9 @@ exports[`help should show help information for 'init' and respect the "--color" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -885,6 +900,9 @@ exports[`help should show help information for 'init' and respect the "--no-colo Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -911,6 +929,9 @@ exports[`help should show help information for 'init' command using command synt Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -935,6 +956,9 @@ exports[`help should show help information for 'init' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -959,6 +983,9 @@ exports[`help should show help information for 'l' command using command syntax: Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -982,6 +1009,9 @@ exports[`help should show help information for 'l' command using the "--help" op Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1005,6 +1035,9 @@ exports[`help should show help information for 'loader' and respect the "--color Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1029,6 +1062,9 @@ exports[`help should show help information for 'loader' and respect the "--no-co Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1053,6 +1089,9 @@ exports[`help should show help information for 'loader' command using command sy Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1076,6 +1115,9 @@ exports[`help should show help information for 'loader' command using the "--hel Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1221,6 +1263,9 @@ exports[`help should show help information for 'n' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1245,6 +1290,9 @@ exports[`help should show help information for 'n' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1269,6 +1317,9 @@ exports[`help should show help information for 'new' command using command synta Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1293,6 +1344,9 @@ exports[`help should show help information for 'new' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1317,6 +1371,9 @@ exports[`help should show help information for 'p' command using command syntax: Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1340,6 +1397,9 @@ exports[`help should show help information for 'p' command using the "--help" op Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1363,6 +1423,9 @@ exports[`help should show help information for 'plugin' and respect the "--color Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1387,6 +1450,9 @@ exports[`help should show help information for 'plugin' and respect the "--no-co Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1411,6 +1477,9 @@ exports[`help should show help information for 'plugin' command using command sy Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1434,6 +1503,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 index ffcfd529f1b..d05143bbc5a 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 @@ -530,6 +530,9 @@ exports[`help should show help information for 'c' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -554,6 +557,9 @@ exports[`help should show help information for 'c' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -660,6 +666,9 @@ exports[`help should show help information for 'create' command using command sy Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -684,6 +693,9 @@ exports[`help should show help information for 'create' command using the "--hel Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -850,6 +862,9 @@ exports[`help should show help information for 'init' and respect the "--color" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -876,6 +891,9 @@ exports[`help should show help information for 'init' and respect the "--no-colo Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -902,6 +920,9 @@ exports[`help should show help information for 'init' command using command synt Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -926,6 +947,9 @@ exports[`help should show help information for 'init' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -950,6 +974,9 @@ exports[`help should show help information for 'l' command using command syntax: Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -973,6 +1000,9 @@ exports[`help should show help information for 'l' command using the "--help" op Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -996,6 +1026,9 @@ exports[`help should show help information for 'loader' and respect the "--color Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1020,6 +1053,9 @@ exports[`help should show help information for 'loader' and respect the "--no-co Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1044,6 +1080,9 @@ exports[`help should show help information for 'loader' command using command sy Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1067,6 +1106,9 @@ exports[`help should show help information for 'loader' command using the "--hel Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1212,6 +1254,9 @@ exports[`help should show help information for 'n' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1236,6 +1281,9 @@ exports[`help should show help information for 'n' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1260,6 +1308,9 @@ exports[`help should show help information for 'new' command using command synta Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1284,6 +1335,9 @@ exports[`help should show help information for 'new' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1308,6 +1362,9 @@ exports[`help should show help information for 'p' command using command syntax: Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1331,6 +1388,9 @@ exports[`help should show help information for 'p' command using the "--help" op Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1354,6 +1414,9 @@ exports[`help should show help information for 'plugin' and respect the "--color Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1378,6 +1441,9 @@ exports[`help should show help information for 'plugin' and respect the "--no-co Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1402,6 +1468,9 @@ exports[`help should show help information for 'plugin' command using command sy Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1425,6 +1494,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index 33c0a4bc196..41daf2d2042 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -539,6 +539,9 @@ exports[`help should show help information for 'c' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -563,6 +566,9 @@ exports[`help should show help information for 'c' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -669,6 +675,9 @@ exports[`help should show help information for 'create' command using command sy Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -693,6 +702,9 @@ exports[`help should show help information for 'create' command using the "--hel Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -859,6 +871,9 @@ exports[`help should show help information for 'init' and respect the "--color" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -885,6 +900,9 @@ exports[`help should show help information for 'init' and respect the "--no-colo Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default @@ -911,6 +929,9 @@ exports[`help should show help information for 'init' command using command synt Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -935,6 +956,9 @@ exports[`help should show help information for 'init' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -959,6 +983,9 @@ exports[`help should show help information for 'l' command using command syntax: Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -982,6 +1009,9 @@ exports[`help should show help information for 'l' command using the "--help" op Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1005,6 +1035,9 @@ exports[`help should show help information for 'loader' and respect the "--color Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1029,6 +1062,9 @@ exports[`help should show help information for 'loader' and respect the "--no-co Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1053,6 +1089,9 @@ exports[`help should show help information for 'loader' command using command sy Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1076,6 +1115,9 @@ exports[`help should show help information for 'loader' command using the "--hel Scaffold a loader. +Arguments: + output-path Path to the output directory, e.g. ./loaderName + Options: --template Type of template (default: \\"default\\") @@ -1221,6 +1263,9 @@ exports[`help should show help information for 'n' command using command syntax: Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1245,6 +1290,9 @@ exports[`help should show help information for 'n' command using the "--help" op Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1269,6 +1317,9 @@ exports[`help should show help information for 'new' command using command synta Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1293,6 +1344,9 @@ exports[`help should show help information for 'new' command using the "--help" Initialize a new webpack project. +Arguments: + generation-path Path to the installation directory, e.g. ./projectName + Options: --template Type of template (default: \\"default\\") --force Generate without questions (ideally) using default answers @@ -1317,6 +1371,9 @@ exports[`help should show help information for 'p' command using command syntax: Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1340,6 +1397,9 @@ exports[`help should show help information for 'p' command using the "--help" op Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1363,6 +1423,9 @@ exports[`help should show help information for 'plugin' and respect the "--color Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1387,6 +1450,9 @@ exports[`help should show help information for 'plugin' and respect the "--no-co Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1411,6 +1477,9 @@ exports[`help should show help information for 'plugin' command using command sy Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") @@ -1434,6 +1503,9 @@ exports[`help should show help information for 'plugin' command using the "--hel Scaffold a plugin. +Arguments: + output-path Path to the output directory, e.g. ./pluginName + Options: --template Type of template (default: \\"default\\") From 895c009536f3c8e58404dc8bddfa3681b483351e Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 24 Apr 2021 22:52:14 +0530 Subject: [PATCH 077/103] refactor: backward compatible flags for dev server (#2652) --- packages/serve/src/index.ts | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/packages/serve/src/index.ts b/packages/serve/src/index.ts index a66f02d248a..2235c563073 100644 --- a/packages/serve/src/index.ts +++ b/packages/serve/src/index.ts @@ -5,6 +5,25 @@ class ServeCommand { async apply(cli: any): Promise { const { logger } = cli; + const loadDevServerOptions = () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires, node/no-extraneous-require + const options = require('webpack-dev-server/bin/cli-flags'); + + // Old options format + // { devServer: [{...}, {}...] } + if (options.devServer) { + return options.devServer; + } + + // New options format + // { flag1: {}, flag2: {} } + return Object.keys(options).map((key) => { + options[key].name = key; + + return options[key]; + }); + }; + await cli.makeCommand( { name: 'serve [entries...]', @@ -18,8 +37,7 @@ class ServeCommand { let devServerFlags = []; try { - // eslint-disable-next-line - devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer; + devServerFlags = loadDevServerOptions(); } catch (error) { logger.error(`You need to install 'webpack-dev-server' for running 'webpack serve'.\n${error}`); process.exit(2); @@ -34,8 +52,7 @@ class ServeCommand { let devServerFlags = []; try { - // eslint-disable-next-line - devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer; + devServerFlags = loadDevServerOptions(); } catch (error) { // Nothing, to prevent future updates } From 205ee2e648940897be02d3ea91da6f2ccc15c71b Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Sat, 24 Apr 2021 20:22:35 +0300 Subject: [PATCH 078/103] test: snapshots more (#2658) --- package.json | 2 +- .../with-config-path.test.js.snap.webpack4 | 42 +++++++++++++++++++ .../with-config-path.test.js.snap.webpack5 | 42 +++++++++++++++++++ .../with-config-path/syntax-error.config.js | 3 +- .../with-config-path/with-config-path.test.js | 37 +++++++--------- .../without-config-path.test.js.snap.webpack4 | 8 ++++ .../without-config-path.test.js.snap.webpack5 | 8 ++++ .../without-config-path.test.js | 11 ++--- ...ut-config-path-error.test.js.snap.webpack4 | 10 +++++ ...ut-config-path-error.test.js.snap.webpack5 | 10 +++++ .../without-config-path-error.test.js | 11 ++--- ...-multi-compiler-mode.test.js.snap.webpack4 | 8 ++++ ...-multi-compiler-mode.test.js.snap.webpack5 | 8 ++++ ...ut-config-path-multi-compiler-mode.test.js | 11 ++--- ...ath-no-configuration.test.js.snap.webpack4 | 5 +++ ...ath-no-configuration.test.js.snap.webpack5 | 5 +++ ...thout-config-path-no-configuration.test.js | 8 ++-- .../without-config-path.test.js.snap.webpack4 | 8 ++++ .../without-config-path.test.js.snap.webpack5 | 8 ++++ .../without-config-path.test.js | 11 ++--- test/utils/test-utils.js | 2 +- test/watch/analyze/analyze-flag.test.js | 20 ++++----- .../watch-variable/watch-variable.test.js | 2 +- yarn.lock | 8 ++-- 24 files changed, 214 insertions(+), 74 deletions(-) create mode 100644 test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack4 create mode 100644 test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 create mode 100644 test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack4 create mode 100644 test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 create mode 100644 test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack4 create mode 100644 test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 create mode 100644 test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack4 create mode 100644 test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 create mode 100644 test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack4 create mode 100644 test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 create mode 100644 test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack4 create mode 100644 test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 diff --git a/package.json b/package.json index 203d2c50dda..28615a73fe4 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "ts-jest": "^26.5.5", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "webpack": "^5.35.0", + "webpack": "^5.35.1", "webpack-bundle-analyzer": "^4.3.0", "webpack-dev-server": "^3.11.2" } diff --git a/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack4 b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack4 new file mode 100644 index 00000000000..93e1e7068e9 --- /dev/null +++ b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack4 @@ -0,0 +1,42 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command with the configuration path option should throw error if configuration does not exist: stderr 1`] = `"[webpack-cli] Failed to load '/test/configtest/with-config-path/a.js' config"`; + +exports[`'configtest' command with the configuration path option should throw error if configuration does not exist: stdout 1`] = `""`; + +exports[`'configtest' command with the configuration path option should throw syntax error: stderr 1`] = ` +"[webpack-cli] Failed to load '/test/configtest/with-config-path/syntax-error.config.js' config +[webpack-cli] /test/configtest/with-config-path/syntax-error.config.js:5 + target: 'node'; + ^ + +SyntaxError: + at stack" +`; + +exports[`'configtest' command with the configuration path option should throw syntax error: stdout 1`] = `""`; + +exports[`'configtest' command with the configuration path option should throw validation error: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command with the configuration path option should throw validation error: stdout 1`] = `"[webpack-cli] Validate '/test/configtest/with-config-path/error.config.js'."`; + +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stdout 1`] = `"[webpack-cli] Validate '/test/configtest/with-config-path/error.config.js'."`; + +exports[`'configtest' command with the configuration path option should validate webpack config successfully: stderr 1`] = `""`; + +exports[`'configtest' command with the configuration path option should validate webpack config successfully: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/with-config-path/basic.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 new file mode 100644 index 00000000000..7185522a7ae --- /dev/null +++ b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 @@ -0,0 +1,42 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command with the configuration path option should throw error if configuration does not exist: stderr 1`] = `"[webpack-cli] Failed to load '/test/configtest/with-config-path/a.js' config"`; + +exports[`'configtest' command with the configuration path option should throw error if configuration does not exist: stdout 1`] = `""`; + +exports[`'configtest' command with the configuration path option should throw syntax error: stderr 1`] = ` +"[webpack-cli] Failed to load '/test/configtest/with-config-path/syntax-error.config.js' config +[webpack-cli] /test/configtest/with-config-path/syntax-error.config.js:5 + target: 'node'; + ^ + +SyntaxError: + at stack" +`; + +exports[`'configtest' command with the configuration path option should throw syntax error: stdout 1`] = `""`; + +exports[`'configtest' command with the configuration path option should throw validation error: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command with the configuration path option should throw validation error: stdout 1`] = `"[webpack-cli] Validate '/test/configtest/with-config-path/error.config.js'."`; + +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stdout 1`] = `"[webpack-cli] Validate '/test/configtest/with-config-path/error.config.js'."`; + +exports[`'configtest' command with the configuration path option should validate webpack config successfully: stderr 1`] = `""`; + +exports[`'configtest' command with the configuration path option should validate webpack config successfully: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/with-config-path/basic.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/with-config-path/syntax-error.config.js b/test/configtest/with-config-path/syntax-error.config.js index 96fc2e63b73..7f18675a4af 100644 --- a/test/configtest/with-config-path/syntax-error.config.js +++ b/test/configtest/with-config-path/syntax-error.config.js @@ -1,5 +1,6 @@ module.exports = { name: 'config-error', mode: 'development', - target: 'node'; //SyntaxError: Unexpected token ';' + // SyntaxError: Unexpected token ';' + target: 'node'; }; diff --git a/test/configtest/with-config-path/with-config-path.test.js b/test/configtest/with-config-path/with-config-path.test.js index 45bd9ce001a..a18a5877adc 100644 --- a/test/configtest/with-config-path/with-config-path.test.js +++ b/test/configtest/with-config-path/with-config-path.test.js @@ -1,50 +1,45 @@ 'use strict'; -const path = require('path'); - -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command with the configuration path option", () => { it('should validate webpack config successfully', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './basic.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './basic.config.js']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'basic.config.js')}'.`); - expect(stdout).toContain('There are no validation errors in the given webpack configuration.'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should throw validation error', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './error.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './error.config.js']); expect(exitCode).toBe(2); - expect(stderr).toContain('Invalid configuration object.'); - expect(stderr).toContain('configuration.mode should be one of these:'); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'error.config.js')}'.`); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should throw syntax error', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './syntax-error.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './syntax-error.config.js']); expect(exitCode).toBe(2); - expect(stderr).toContain(`SyntaxError: Unexpected token ';'`); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it(`should validate the config with alias 't'`, async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['t', './error.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['t', './error.config.js']); expect(exitCode).toBe(2); - expect(stderr).toContain('Invalid configuration object.'); - expect(stderr).toContain('configuration.mode should be one of these:'); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'error.config.js')}'.`); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should throw error if configuration does not exist', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './a.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest', './a.js']); expect(exitCode).toBe(2); - expect(stderr).toContain(`Failed to load '${path.resolve(__dirname, './a.js')}' config`); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr).split('\n')[0]).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack4 b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack4 new file mode 100644 index 00000000000..c3bdec0cf2d --- /dev/null +++ b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack4 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path-custom-extension/webpack.config.json'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 new file mode 100644 index 00000000000..c3bdec0cf2d --- /dev/null +++ b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path-custom-extension/webpack.config.json'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path-custom-extension/without-config-path.test.js b/test/configtest/without-config-path-custom-extension/without-config-path.test.js index 3402386ea81..a03239c9807 100644 --- a/test/configtest/without-config-path-custom-extension/without-config-path.test.js +++ b/test/configtest/without-config-path-custom-extension/without-config-path.test.js @@ -1,16 +1,13 @@ 'use strict'; -const path = require('path'); - -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { it.only('should validate default configuration', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'webpack.config.json')}'.`); - expect(stdout).toContain('There are no validation errors in the given webpack configuration.'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack4 b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack4 new file mode 100644 index 00000000000..9bd48a0450c --- /dev/null +++ b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack4 @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `"[webpack-cli] Validate '/test/configtest/without-config-path-error/webpack.config.js'."`; diff --git a/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 new file mode 100644 index 00000000000..77d5d88f974 --- /dev/null +++ b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.mode should be one of these: + \\"development\\" | \\"production\\" | \\"none\\" + -> Enable production optimizations or development hints." +`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `"[webpack-cli] Validate '/test/configtest/without-config-path-error/webpack.config.js'."`; diff --git a/test/configtest/without-config-path-error/without-config-path-error.test.js b/test/configtest/without-config-path-error/without-config-path-error.test.js index 616393eaf2b..4b1cec50515 100644 --- a/test/configtest/without-config-path-error/without-config-path-error.test.js +++ b/test/configtest/without-config-path-error/without-config-path-error.test.js @@ -1,16 +1,13 @@ 'use strict'; -const path = require('path'); - -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { it.only('should validate default configuration', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest']); expect(exitCode).toBe(2); - expect(stderr).toContain('Invalid configuration object.'); - expect(stderr).toContain('configuration.mode should be one of these:'); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'webpack.config.js')}'.`); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack4 b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack4 new file mode 100644 index 00000000000..a06df430928 --- /dev/null +++ b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack4 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path-multi-compiler-mode/webpack.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 new file mode 100644 index 00000000000..a06df430928 --- /dev/null +++ b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path-multi-compiler-mode/webpack.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js index fd8787e50a0..a03239c9807 100644 --- a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js +++ b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js @@ -1,16 +1,13 @@ 'use strict'; -const path = require('path'); - -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { it.only('should validate default configuration', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'webpack.config.js')}'.`); - expect(stdout).toContain('There are no validation errors in the given webpack configuration.'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack4 b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack4 new file mode 100644 index 00000000000..e5b446ae633 --- /dev/null +++ b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack4 @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `"[webpack-cli] No configuration found."`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `""`; diff --git a/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 new file mode 100644 index 00000000000..e5b446ae633 --- /dev/null +++ b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `"[webpack-cli] No configuration found."`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `""`; diff --git a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js index accb31fc287..4b1cec50515 100644 --- a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js +++ b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js @@ -1,13 +1,13 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { it.only('should validate default configuration', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest']); expect(exitCode).toBe(2); - expect(stderr).toContain('No configuration found.'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack4 b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack4 new file mode 100644 index 00000000000..cfd4a51d532 --- /dev/null +++ b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack4 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path/webpack.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 new file mode 100644 index 00000000000..cfd4a51d532 --- /dev/null +++ b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"[webpack-cli] Validate '/test/configtest/without-config-path/webpack.config.js'. +[webpack-cli] There are no validation errors in the given webpack configuration." +`; diff --git a/test/configtest/without-config-path/without-config-path.test.js b/test/configtest/without-config-path/without-config-path.test.js index fd8787e50a0..a03239c9807 100644 --- a/test/configtest/without-config-path/without-config-path.test.js +++ b/test/configtest/without-config-path/without-config-path.test.js @@ -1,16 +1,13 @@ 'use strict'; -const path = require('path'); - -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); describe("'configtest' command without the configuration path option", () => { it.only('should validate default configuration', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['configtest'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['configtest']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); - expect(stdout).toContain(`Validate '${path.resolve(__dirname, 'webpack.config.js')}'.`); - expect(stdout).toContain('There are no validation errors in the given webpack configuration.'); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 7c44735545a..65a9fce20b7 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -244,7 +244,7 @@ const normalizeCwd = (output) => { }; const normalizeError = (output) => { - return output.replace(/\s+at .+(}|\))/gs, '\n at stack'); + return output.replace(/SyntaxError: .+/, 'SyntaxError: ').replace(/\s+at .+(}|\)|\d)/gs, '\n at stack'); }; const normalizeStdout = (stdout) => { diff --git a/test/watch/analyze/analyze-flag.test.js b/test/watch/analyze/analyze-flag.test.js index fe5bfe57938..25ef9e24825 100644 --- a/test/watch/analyze/analyze-flag.test.js +++ b/test/watch/analyze/analyze-flag.test.js @@ -1,20 +1,14 @@ 'use strict'; -const { runAndGetProcess, normalizeStdout, processKill } = require('../../utils/test-utils'); +const { runWatch } = require('../../utils/test-utils'); describe('"analyze" option', () => { - it('should load webpack-bundle-analyzer plugin with --analyze flag', (done) => { - const proc = runAndGetProcess(__dirname, ['--analyze']); - - proc.stdout.on('data', (chunk) => { - const data = normalizeStdout(chunk.toString()); - - if (data.includes('Webpack Bundle Analyzer is started at')) { - expect(data).toContain('Webpack Bundle Analyzer is started at'); - - processKill(proc); - done(); - } + it('should load webpack-bundle-analyzer plugin with --analyze flag', async () => { + const { stderr, stdout } = await runWatch(__dirname, ['--analyze'], { + killString: /Webpack Bundle Analyzer is started at/, }); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('Webpack Bundle Analyzer is started at'); }); }); diff --git a/test/watch/watch-variable/watch-variable.test.js b/test/watch/watch-variable/watch-variable.test.js index ac0281aa922..19f35f13411 100644 --- a/test/watch/watch-variable/watch-variable.test.js +++ b/test/watch/watch-variable/watch-variable.test.js @@ -43,7 +43,7 @@ describe('watch variable', () => { }); }); - it('should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `--watch` option', (done) => { + it.only('should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `--watch` option', (done) => { const proc = runAndGetProcess(__dirname, ['--watch', '--mode', 'development']); let modified = false; diff --git a/yarn.lock b/yarn.lock index 26859056c77..30c5b53b107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10832,10 +10832,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.35.0: - version "5.35.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.35.0.tgz#4db23c2b96c4e53a90c5732d7cdb301a84a33576" - integrity sha512-au3gu55yYF/h6NXFr0KZPZAYxS6Nlc595BzYPke8n0CSff5WXcoixtjh5LC/8mXunkRKxhymhXmBY0+kEbR6jg== +webpack@^5.35.1: + version "5.35.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.35.1.tgz#857670799465c8a5cbb94c4c175d60ac42d18ba3" + integrity sha512-uWKYStqJ23+N6/EnMEwUjPSSKUG1tFmcuKhALEh/QXoUxwN8eb3ATNIZB38A+fO6QZ0xfc7Cu7KNV9LXNhDCsw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 00e519c10089452b5991c1a39055a92e590215c7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 26 Apr 2021 15:59:58 +0300 Subject: [PATCH 079/103] chore(deps-dev): bump jest-watch-typeahead from 0.6.2 to 0.6.3 (#2665) Bumps [jest-watch-typeahead](https://github.com/jest-community/jest-watch-typeahead) from 0.6.2 to 0.6.3. - [Release notes](https://github.com/jest-community/jest-watch-typeahead/releases) - [Changelog](https://github.com/jest-community/jest-watch-typeahead/blob/master/CHANGELOG.md) - [Commits](https://github.com/jest-community/jest-watch-typeahead/compare/v0.6.2...v0.6.3) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 30c5b53b107..13bd8d59ccd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6568,9 +6568,9 @@ jest-validate@^26.6.2: pretty-format "^26.6.2" jest-watch-typeahead@^0.6.1: - version "0.6.2" - resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.2.tgz#f3ea6518a2a497baad09a8d39f658140e6778e26" - integrity sha512-JKcDGEKWjhXo+/+RZMhtCsCA7J6KfbRXb7AbnQqoG9SH8AOGAkJFx8dHd80uIbkSxSVGEwI4ub62pET7a5BRPg== + version "0.6.3" + resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.3.tgz#26efa37da39a46d8ff417b9e4badc8176a698016" + integrity sha512-rM+2m2U/7o4VeXxA3rcEWbbKq8K/aGjAwCgmqsthPV1AqLb5NNACzS+tDCD11bdQ8MrN+H3uN61Y9qFiJgtZPw== dependencies: ansi-escapes "^4.3.1" chalk "^4.0.0" From c3c069e1cc7958a6f7b5d4cdb74acb12bc25d8c7 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Mon, 26 Apr 2021 18:36:19 +0530 Subject: [PATCH 080/103] feat: prettify generated config (#2640) --- packages/generators/package.json | 5 + packages/generators/src/handlers/default.ts | 1 + packages/generators/src/init-generator.ts | 35 + packages/generators/src/types/index.ts | 1 + smoketests/helpers.js | 54 ++ smoketests/index.js | 1 + smoketests/missing-packages/prettier.test.js | 32 + .../__snapshots__/init.test.js.snap.webpack4 | 780 +++++++++--------- .../__snapshots__/init.test.js.snap.webpack5 | 780 +++++++++--------- 9 files changed, 881 insertions(+), 808 deletions(-) create mode 100644 smoketests/missing-packages/prettier.test.js diff --git a/packages/generators/package.json b/packages/generators/package.json index 93f9edd0c83..a9665dc2e5d 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -30,6 +30,11 @@ "webpack": "4.x.x || 5.x.x", "webpack-cli": "4.x.x" }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + } + }, "devDependencies": { "@types/yeoman-generator": "^4.11.3", "rimraf": "^3.0.2" diff --git a/packages/generators/src/handlers/default.ts b/packages/generators/src/handlers/default.ts index 0db060af746..c607c07a695 100644 --- a/packages/generators/src/handlers/default.ts +++ b/packages/generators/src/handlers/default.ts @@ -146,6 +146,7 @@ export function generate(self: CustomGenerator): void { // Generate webpack configuration self.fs.copyTpl(resolveFile('webpack.configjs.tpl'), self.destinationPath('webpack.config.js'), { ...self.answers, entry }); + self.configurationPath = self.destinationPath('webpack.config.js'); // Generate JS language essentials switch (self.answers.langType) { diff --git a/packages/generators/src/init-generator.ts b/packages/generators/src/init-generator.ts index 0c82336f8bb..3466e77ea18 100644 --- a/packages/generators/src/init-generator.ts +++ b/packages/generators/src/init-generator.ts @@ -6,6 +6,8 @@ import { CustomGenerator } from './types'; import { existsSync, mkdirSync } from 'fs'; import handlers from './handlers'; +import { readFileSync, writeFileSync } from 'fs'; + /** * * Generator for initializing a webpack config @@ -19,6 +21,7 @@ export default class InitGenerator extends CustomGenerator { public template: string; public generationPath: string; public resolvedGenerationPath: string; + public configurationPath: string; public supportedTemplates: string[]; public answers: Record; public force: boolean; @@ -70,6 +73,24 @@ export default class InitGenerator extends CustomGenerator { } await handlers[this.template].questions(this, Question); + + // Handle installation of prettier + try { + // eslint-disable-next-line node/no-extraneous-require + require.resolve('prettier'); + } catch (err) { + const { installPrettier } = await Question.Confirm( + this, + 'installPrettier', + 'Do you like to install prettier to format generated configuration?', + true, + false, + ); + + if (installPrettier) { + this.dependencies.push('prettier'); + } + } } public installPlugins(): void { @@ -86,4 +107,18 @@ export default class InitGenerator extends CustomGenerator { this.utils.logger.log(`${blue('ℹ INFO ')} Initialising project...`); handlers[this.template].generate(this); } + + public end(): void { + // Prettify configuration file if possible + try { + // eslint-disable-next-line node/no-extraneous-require, @typescript-eslint/no-var-requires + const prettier = require('prettier'); + const source = readFileSync(this.configurationPath, { encoding: 'utf8' }); + const formattedSource = prettier.format(source, { parser: 'babel' }); + writeFileSync(this.configurationPath, formattedSource); + } catch (err) { + this.utils.logger.log(`${yellow(`⚠ Generated configuration may not be properly formatted as prettier is not installed.`)}`); + return; + } + } } diff --git a/packages/generators/src/types/index.ts b/packages/generators/src/types/index.ts index 484256072d3..16b610934ac 100644 --- a/packages/generators/src/types/index.ts +++ b/packages/generators/src/types/index.ts @@ -4,4 +4,5 @@ export class CustomGenerator extends Generator { public force: boolean; public dependencies: string[]; public answers: Record; + public configurationPath: string; } diff --git a/smoketests/helpers.js b/smoketests/helpers.js index 727dae5c0de..d25c1bcdcbd 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -125,6 +125,59 @@ const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {}) }); }; +const runTestStdoutWithInput = ({ packageName, cliArgs, inputs, logMessage, isSubPackage } = {}) => { + // Simulate package missing + swapPkgName(packageName, isSubPackage); + + const proc = execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }); + + proc.stdin.setDefaultEncoding('utf-8'); + + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log(' timeout: killing process'); + proc.kill(); + }, 300000); + + let hasPassed = false; + + proc.stdout.on('data', (chunk) => { + let data = stripAnsi(chunk.toString()); + console.log(` stdout: ${data}`); + + if (data.includes(logMessage)) { + hasPassed = true; + proc.kill(); + } + + Object.keys(inputs).forEach((input) => { + if (data.includes(input)) { + proc.stdin.write(inputs[input]); + } + }); + }); + + proc.stderr.on('data', (chunk) => { + let data = stripAnsi(chunk.toString()); + console.log(` stderr: ${data}`); + }); + + proc.on('exit', () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(hasPassed); + }); + + proc.on('error', () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(false); + }); + }); +}; + const runTestWithHelp = (package, cliArgs = [], logMessage, isSubPackage = false) => { // Simulate package missing swapPkgName(package, isSubPackage); @@ -187,4 +240,5 @@ module.exports = { runTest, runTestStdout, runTestWithHelp, + runTestStdoutWithInput, }; diff --git a/smoketests/index.js b/smoketests/index.js index fecd259c0ea..b63f898e2ea 100644 --- a/smoketests/index.js +++ b/smoketests/index.js @@ -6,6 +6,7 @@ const tests = [ require('./missing-command-packages/serve.test.js'), require('./missing-command-packages/info.test.js'), require('./missing-command-packages/configtest.test.js'), + require('./missing-packages/prettier.test.js'), ]; (async () => { diff --git a/smoketests/missing-packages/prettier.test.js b/smoketests/missing-packages/prettier.test.js new file mode 100644 index 00000000000..52cfe96ab4a --- /dev/null +++ b/smoketests/missing-packages/prettier.test.js @@ -0,0 +1,32 @@ +'use strict'; + +const { runTestStdout, runTestStdoutWithInput } = require('../helpers'); +// eslint-disable-next-line node/no-unpublished-require +const rimraf = require('rimraf'); +const { resolve } = require('path'); + +const prettierTest = async () => { + const packageName = 'prettier'; + const rootPath = resolve(__dirname, './test-assets'); + const cliArgs = ['init', rootPath, '--force']; + const logMessage = 'Do you like to install prettier to format generated configuration?'; + const status = await runTestStdout({ packageName, cliArgs, logMessage }); + rimraf.sync(rootPath); + return status; +}; + +const prettierTestWithNoAnswer = async () => { + const packageName = 'prettier'; + const rootPath = resolve(__dirname, './test-assets'); + const cliArgs = ['init', rootPath, '--force']; + const inputs = { + 'Do you like to install prettier to format generated configuration?': 'n\n', + }; + const logMessage = 'Generated configuration may not be properly formatted as prettier is not installed'; + const status = await runTestStdoutWithInput({ packageName, cliArgs, inputs, logMessage }); + rimraf.sync(rootPath); + return status; +}; + +module.exports.run = [prettierTest, prettierTestWithNoAnswer]; +module.exports.name = 'Missing prettier'; diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index d292d21cd6e..6688dabb001 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -44,45 +44,43 @@ Object { exports[`init command should configure WDS as opted 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - devServer: { - open: true, - host: 'localhost', - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + devServer: { + open: true, + host: \\"localhost\\", + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -111,50 +109,48 @@ Object { exports[`init command should configure assets modules by default 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const HtmlWebpackPlugin = require(\\"html-webpack-plugin\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - devServer: { - open: true, - host: 'localhost', - }, - plugins: [ - new HtmlWebpackPlugin({ - template: 'index.html', - }), - - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + devServer: { + open: true, + host: \\"localhost\\", + }, + plugins: [ + new HtmlWebpackPlugin({ + template: \\"index.html\\", + }), + + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -181,46 +177,44 @@ Object { exports[`init command should configure html-webpack-plugin as opted 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const HtmlWebpackPlugin = require(\\"html-webpack-plugin\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - new HtmlWebpackPlugin({ - template: 'index.html', - }), - - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + new HtmlWebpackPlugin({ + template: \\"index.html\\", + }), + + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -249,45 +243,43 @@ Object { exports[`init command should generate ES6 project correctly 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(js|jsx)$/i, + loader: \\"babel-loader\\", + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(js|jsx)$/i, - loader: 'babel-loader', - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -378,49 +370,47 @@ Object { exports[`init command should generate typescript project correctly 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.ts', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.ts\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(ts|tsx)$/i, + loader: \\"ts-loader\\", + exclude: [\\"/node_modules/\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(ts|tsx)$/i, - loader: 'ts-loader', - exclude: ['/node_modules/'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, - resolve: { - extensions: ['.tsx', '.ts', '.js'], - }, + }, + resolve: { + extensions: [\\".tsx\\", \\".ts\\", \\".js\\"], + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -532,45 +522,43 @@ Object { exports[`init command should use less in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.less$/i, + use: [\\"less-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.less$/i, - use: ['less-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -598,45 +586,43 @@ Object { exports[`init command should use mini-css-extract-plugin when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -667,49 +653,45 @@ Object { exports[`init command should use postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; - - -const stylesHandler = 'style-loader'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; +const stylesHandler = \\"style-loader\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.css$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.css$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -742,53 +724,49 @@ Object { exports[`init command should use sass and css with postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; - - -const stylesHandler = 'style-loader'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; +const stylesHandler = \\"style-loader\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.css$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], - }, - { - test: /\\\\.css$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -816,45 +794,43 @@ Object { exports[`init command should use sass in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -885,45 +861,43 @@ Object { exports[`init command should use sass with postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -951,45 +925,43 @@ Object { exports[`init command should use stylus in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.styl$/i, + use: [\\"stylus-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.styl$/i, - use: ['stylus-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index d292d21cd6e..6688dabb001 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -44,45 +44,43 @@ Object { exports[`init command should configure WDS as opted 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - devServer: { - open: true, - host: 'localhost', - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + devServer: { + open: true, + host: \\"localhost\\", + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -111,50 +109,48 @@ Object { exports[`init command should configure assets modules by default 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const HtmlWebpackPlugin = require(\\"html-webpack-plugin\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - devServer: { - open: true, - host: 'localhost', - }, - plugins: [ - new HtmlWebpackPlugin({ - template: 'index.html', - }), - - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + devServer: { + open: true, + host: \\"localhost\\", + }, + plugins: [ + new HtmlWebpackPlugin({ + template: \\"index.html\\", + }), + + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -181,46 +177,44 @@ Object { exports[`init command should configure html-webpack-plugin as opted 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const HtmlWebpackPlugin = require(\\"html-webpack-plugin\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - new HtmlWebpackPlugin({ - template: 'index.html', - }), - - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + new HtmlWebpackPlugin({ + template: \\"index.html\\", + }), + + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -249,45 +243,43 @@ Object { exports[`init command should generate ES6 project correctly 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(js|jsx)$/i, + loader: \\"babel-loader\\", + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(js|jsx)$/i, - loader: 'babel-loader', - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -378,49 +370,47 @@ Object { exports[`init command should generate typescript project correctly 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.ts', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.ts\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.(ts|tsx)$/i, + loader: \\"ts-loader\\", + exclude: [\\"/node_modules/\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.(ts|tsx)$/i, - loader: 'ts-loader', - exclude: ['/node_modules/'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, - resolve: { - extensions: ['.tsx', '.ts', '.js'], - }, + }, + resolve: { + extensions: [\\".tsx\\", \\".ts\\", \\".js\\"], + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -532,45 +522,43 @@ Object { exports[`init command should use less in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.less$/i, + use: [\\"less-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.less$/i, - use: ['less-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -598,45 +586,43 @@ Object { exports[`init command should use mini-css-extract-plugin when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -667,49 +653,45 @@ Object { exports[`init command should use postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; - - -const stylesHandler = 'style-loader'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; +const stylesHandler = \\"style-loader\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.css$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.css$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -742,53 +724,49 @@ Object { exports[`init command should use sass and css with postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; - - -const stylesHandler = 'style-loader'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; +const stylesHandler = \\"style-loader\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.css$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], - }, - { - test: /\\\\.css$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -816,45 +794,43 @@ Object { exports[`init command should use sass in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -885,45 +861,43 @@ Object { exports[`init command should use sass with postcss in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.s[ac]ss$/i, + use: [stylesHandler, \\"css-loader\\", \\"postcss-loader\\", \\"sass-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.s[ac]ss$/i, - use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; @@ -951,45 +925,43 @@ Object { exports[`init command should use stylus in project when selected 2`] = ` "// Generated using webpack-cli https://github.com/webpack/webpack-cli -const path = require('path'); - -const isProduction = process.env.NODE_ENV == 'production'; +const path = require(\\"path\\"); +const isProduction = process.env.NODE_ENV == \\"production\\"; const config = { - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - plugins: [ - // Add your plugins here - // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + entry: \\"./src/index.js\\", + output: { + path: path.resolve(__dirname, \\"dist\\"), + }, + plugins: [ + // Add your plugins here + // Learn more about plugins from https://webpack.js.org/configuration/plugins/ + ], + module: { + rules: [ + { + test: /\\\\.styl$/i, + use: [\\"stylus-loader\\"], + }, + { + test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: \\"asset\\", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ ], - module: { - rules: [ - { - test: /\\\\.styl$/i, - use: ['stylus-loader'], - }, - { - test: /\\\\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, - type: 'asset', - }, - - // Add your rules for custom modules here - // Learn more about loaders from https://webpack.js.org/loaders/ - ], - }, + }, }; module.exports = () => { - if (isProduction) { - config.mode = 'production'; - - } else { - config.mode = 'development'; - } - return config; + if (isProduction) { + config.mode = \\"production\\"; + } else { + config.mode = \\"development\\"; + } + return config; }; " `; From de7b431c408d7a0b3eb4f387ba7e3e3611d1d0f0 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 26 Apr 2021 18:37:23 +0530 Subject: [PATCH 081/103] test: more snapshot testing (#2666) --- .../hot-flag.test.js.snap.webpack4 | 11 ++ .../hot-flag.test.js.snap.webpack5 | 11 ++ test/build/hot/hot-flag.test.js | 12 +- ...output-named-bundles.test.js.snap.webpack4 | 8 + ...output-named-bundles.test.js.snap.webpack5 | 8 + .../build/output/output-named-bundles.test.js | 7 +- .../__snapshots__/stats.test.js.snap.webpack4 | 15 ++ .../__snapshots__/stats.test.js.snap.webpack5 | 10 + test/build/stats/flags/stats.test.js | 16 +- .../target-flag.test.js.snap.webpack4 | 14 ++ .../target-flag.test.js.snap.webpack5 | 45 +++++ .../target/flag-test/target-flag.test.js | 26 +-- .../node-test.test.js.snap.webpack4 | 3 + .../node-test.test.js.snap.webpack5 | 3 + test/build/target/node/node-test.test.js | 4 +- .../unknown.test.js.snap.webpack4 | 168 +++++++++++++++++ .../unknown.test.js.snap.webpack5 | 171 ++++++++++++++++++ test/build/unknown/unknown.test.js | 135 +++++--------- 18 files changed, 538 insertions(+), 129 deletions(-) create mode 100644 test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack4 create mode 100644 test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack5 create mode 100644 test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack4 create mode 100644 test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack5 create mode 100644 test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack4 create mode 100644 test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack5 create mode 100644 test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack4 create mode 100644 test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack5 create mode 100644 test/build/target/node/__snapshots__/node-test.test.js.snap.webpack4 create mode 100644 test/build/target/node/__snapshots__/node-test.test.js.snap.webpack5 create mode 100644 test/build/unknown/__snapshots__/unknown.test.js.snap.webpack4 create mode 100644 test/build/unknown/__snapshots__/unknown.test.js.snap.webpack5 diff --git a/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack4 b/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack4 new file mode 100644 index 00000000000..82796fa900c --- /dev/null +++ b/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack4 @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--hot flag should be successful when --hot is passed: stderr 1`] = `""`; + +exports[`--hot flag should be successful when --hot=only is passed: stderr 1`] = `""`; + +exports[`--hot flag should be successful when --no-hot is passed: stderr 1`] = `""`; + +exports[`--hot flag should throw an error for invalid value: stderr 1`] = `"[webpack-cli] 'unknown' is an invalid value for the --hot option. Use 'only' instead."`; + +exports[`--hot flag should throw an error for invalid value: stdout 1`] = `""`; diff --git a/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack5 b/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack5 new file mode 100644 index 00000000000..82796fa900c --- /dev/null +++ b/test/build/hot/__snapshots__/hot-flag.test.js.snap.webpack5 @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--hot flag should be successful when --hot is passed: stderr 1`] = `""`; + +exports[`--hot flag should be successful when --hot=only is passed: stderr 1`] = `""`; + +exports[`--hot flag should be successful when --no-hot is passed: stderr 1`] = `""`; + +exports[`--hot flag should throw an error for invalid value: stderr 1`] = `"[webpack-cli] 'unknown' is an invalid value for the --hot option. Use 'only' instead."`; + +exports[`--hot flag should throw an error for invalid value: stdout 1`] = `""`; diff --git a/test/build/hot/hot-flag.test.js b/test/build/hot/hot-flag.test.js index 721772eecc5..2ada45b259d 100644 --- a/test/build/hot/hot-flag.test.js +++ b/test/build/hot/hot-flag.test.js @@ -1,5 +1,5 @@ 'use strict'; -const { run } = require('../../utils/test-utils'); +const { run, normalizeStderr, normalizeStdout } = require('../../utils/test-utils'); const { readFileSync } = require('fs'); const { resolve } = require('path'); @@ -8,7 +8,7 @@ describe('--hot flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--hot']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); expect(readFileSync(resolve(__dirname, './dist/main.js')).toString()).toContain('webpackHotUpdate'); }); @@ -17,7 +17,7 @@ describe('--hot flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--hot', 'only']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); expect(readFileSync(resolve(__dirname, './dist/main.js')).toString()).toContain('webpackHotUpdate'); }); @@ -26,15 +26,15 @@ describe('--hot flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--hot', 'unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain(`[webpack-cli] 'unknown' is an invalid value for the --hot option. Use 'only' instead.`); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should be successful when --no-hot is passed', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--no-hot']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); expect(readFileSync(resolve(__dirname, './dist/main.js')).toString()).not.toContain('webpackHotUpdate'); }); diff --git a/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack4 b/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack4 new file mode 100644 index 00000000000..e75556fd8dc --- /dev/null +++ b/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack4 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`output flag named bundles should output file in bin directory using default webpack config with warning for empty output value: stderr 1`] = ` +"[webpack-cli] Error: Option '-o, --output-path ' argument missing +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`output flag named bundles should output file in bin directory using default webpack config with warning for empty output value: stdout 1`] = `""`; diff --git a/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack5 b/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack5 new file mode 100644 index 00000000000..e75556fd8dc --- /dev/null +++ b/test/build/output/__snapshots__/output-named-bundles.test.js.snap.webpack5 @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`output flag named bundles should output file in bin directory using default webpack config with warning for empty output value: stderr 1`] = ` +"[webpack-cli] Error: Option '-o, --output-path ' argument missing +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`output flag named bundles should output file in bin directory using default webpack config with warning for empty output value: stdout 1`] = `""`; diff --git a/test/build/output/output-named-bundles.test.js b/test/build/output/output-named-bundles.test.js index 6669bcca452..2c22e8492b1 100644 --- a/test/build/output/output-named-bundles.test.js +++ b/test/build/output/output-named-bundles.test.js @@ -1,7 +1,7 @@ 'use strict'; const { resolve } = require('path'); -const { run } = require('../../utils/test-utils'); +const { run, normalizeStdout, normalizeStderr } = require('../../utils/test-utils'); describe('output flag named bundles', () => { it('should output file given as flag instead of in configuration', async () => { @@ -52,8 +52,7 @@ describe('output flag named bundles', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path'], false); expect(exitCode).toEqual(2); - expect(stderr).toContain("Error: Option '-o, --output-path ' argument missing"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack4 b/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack4 new file mode 100644 index 00000000000..c89dd9b887a --- /dev/null +++ b/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack4 @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`stats flag should log error when an unknown flag stats value is passed: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.stats should be one of these: + object { all?, assets?, assetsSort?, builtAt?, cached?, cachedAssets?, children?, chunkGroups?, chunkModules?, chunkOrigins?, chunks?, chunksSort?, colors?, context?, depth?, entrypoints?, env?, errorDetails?, errors?, exclude?, excludeAssets?, excludeModules?, hash?, logging?, loggingDebug?, loggingTrace?, maxModules?, moduleAssets?, moduleTrace?, modules?, modulesSort?, nestedModules?, optimizationBailout?, outputPath?, performance?, providedExports?, publicPath?, reasons?, source?, timings?, usedExports?, version?, warnings?, warningsFilter? } | boolean | \\"none\\" | \\"errors-only\\" | \\"minimal\\" | \\"normal\\" | \\"detailed\\" | \\"verbose\\" | \\"errors-warnings\\" + -> Used by the webpack CLI program to pass stats options. + Details: + * configuration.stats should be an object. + * configuration.stats should be a boolean. + * configuration.stats should be one of these: + \\"none\\" | \\"errors-only\\" | \\"minimal\\" | \\"normal\\" | \\"detailed\\" | \\"verbose\\" | \\"errors-warnings\\"" +`; + +exports[`stats flag should log error when an unknown flag stats value is passed: stdout 1`] = `""`; diff --git a/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack5 b/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack5 new file mode 100644 index 00000000000..ded05f33a03 --- /dev/null +++ b/test/build/stats/flags/__snapshots__/stats.test.js.snap.webpack5 @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`stats flag should log error when an unknown flag stats value is passed: stderr 1`] = ` +"[webpack-cli] Invalid value 'foo' for the '--stats' option +[webpack-cli] Expected: 'none | summary | errors-only | errors-warnings | minimal | normal | detailed | verbose' +[webpack-cli] Invalid value 'foo' for the '--stats' option +[webpack-cli] Expected: 'true | false'" +`; + +exports[`stats flag should log error when an unknown flag stats value is passed: stdout 1`] = `""`; diff --git a/test/build/stats/flags/stats.test.js b/test/build/stats/flags/stats.test.js index 8394dd70ac9..fee38ce4e70 100644 --- a/test/build/stats/flags/stats.test.js +++ b/test/build/stats/flags/stats.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { run, isWebpack5 } = require('../../../utils/test-utils'); +const { run, isWebpack5, normalizeStderr, normalizeStdout } = require('../../../utils/test-utils'); const presets = ['normal', 'detailed', 'errors-only', 'errors-warnings', 'minimal', 'verbose', 'none']; @@ -83,17 +83,7 @@ describe('stats flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', 'foo']); expect(exitCode).toEqual(2); - - if (isWebpack5) { - expect(stderr).toContain("Invalid value 'foo' for the '--stats' option"); - expect(stderr).toContain("Expected: 'none | summary | errors-only | errors-warnings | minimal | normal | detailed | verbose'"); - expect(stderr).toContain("Invalid value 'foo' for the '--stats' option"); - expect(stderr).toContain("Expected: 'true | false'"); - } else { - expect(stderr).toContain('* configuration.stats should be one of these:'); - expect(stderr).toContain('"none" | "errors-only" | "minimal" | "normal" | "detailed" | "verbose" | "errors-warnings"'); - } - - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); diff --git a/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack4 b/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack4 new file mode 100644 index 00000000000..2a2bfa720fe --- /dev/null +++ b/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack4 @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--target flag should throw error with invalid value for --target: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. + - configuration.target should be one of these: + \\"web\\" | \\"webworker\\" | \\"node\\" | \\"async-node\\" | \\"node-webkit\\" | \\"electron-main\\" | \\"electron-renderer\\" | \\"electron-preload\\" | function + -> Environment to build for + Details: + * configuration.target should be one of these: + \\"web\\" | \\"webworker\\" | \\"node\\" | \\"async-node\\" | \\"node-webkit\\" | \\"electron-main\\" | \\"electron-renderer\\" | \\"electron-preload\\" + * configuration.target should be an instance of function" +`; + +exports[`--target flag should throw error with invalid value for --target: stdout 1`] = `""`; diff --git a/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack5 b/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack5 new file mode 100644 index 00000000000..9299cf68cda --- /dev/null +++ b/test/build/target/flag-test/__snapshots__/target-flag.test.js.snap.webpack5 @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--target flag should reset target from node to async-node with --target-reset: stderr 1`] = `""`; + +exports[`--target flag should throw an error for incompatible multiple targets: stderr 1`] = ` +"[webpack-cli] Error: Universal Chunk Loading is not implemented yet + at stack" +`; + +exports[`--target flag should throw an error for incompatible multiple targets: stdout 1`] = `""`; + +exports[`--target flag should throw an error for invalid target in multiple syntax: stderr 1`] = ` +"[webpack-cli] Error: Unknown target 'invalid'. The following targets are supported: +* browserslist / browserslist:env / browserslist:query / browserslist:path-to-config / browserslist:path-to-config:env: Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config +* web: Web browser. +* webworker: Web Worker, SharedWorker or Service Worker. +* [async-]node[X[.Y]]: Node.js in version X.Y. The 'async-' prefix will load chunks asynchronously via 'fs' and 'vm' instead of 'require()'. Examples: node14.5, async-node10. +* electron[X[.Y]]-main/preload/renderer: Electron in version X.Y. Script is running in main, preload resp. renderer context. +* nwjs[X[.Y]] / node-webkit[X[.Y]]: NW.js in version X.Y. +* esX: EcmaScript in this version. Examples: es2020, es5. + at stack" +`; + +exports[`--target flag should throw an error for invalid target in multiple syntax: stdout 1`] = `""`; + +exports[`--target flag should throw error if target is an empty array: stderr 1`] = ` +"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.target should be an non-empty array." +`; + +exports[`--target flag should throw error if target is an empty array: stdout 1`] = `""`; + +exports[`--target flag should throw error with invalid value for --target: stderr 1`] = ` +"[webpack-cli] Error: Unknown target 'invalid'. The following targets are supported: +* browserslist / browserslist:env / browserslist:query / browserslist:path-to-config / browserslist:path-to-config:env: Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config +* web: Web browser. +* webworker: Web Worker, SharedWorker or Service Worker. +* [async-]node[X[.Y]]: Node.js in version X.Y. The 'async-' prefix will load chunks asynchronously via 'fs' and 'vm' instead of 'require()'. Examples: node14.5, async-node10. +* electron[X[.Y]]-main/preload/renderer: Electron in version X.Y. Script is running in main, preload resp. renderer context. +* nwjs[X[.Y]] / node-webkit[X[.Y]]: NW.js in version X.Y. +* esX: EcmaScript in this version. Examples: es2020, es5. + at stack" +`; + +exports[`--target flag should throw error with invalid value for --target: stdout 1`] = `""`; diff --git a/test/build/target/flag-test/target-flag.test.js b/test/build/target/flag-test/target-flag.test.js index d547fba2300..1846fe0db73 100644 --- a/test/build/target/flag-test/target-flag.test.js +++ b/test/build/target/flag-test/target-flag.test.js @@ -1,5 +1,5 @@ 'use strict'; -const { run, isWebpack5 } = require('../../../utils/test-utils'); +const { run, isWebpack5, normalizeStdout, normalizeStderr } = require('../../../utils/test-utils'); const targetValues = ['web', 'webworker', 'node', 'async-node', 'node-webkit', 'electron-main', 'electron-renderer', 'electron-preload']; @@ -36,14 +36,8 @@ describe('--target flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'invalid']); expect(exitCode).toBe(2); - - if (isWebpack5) { - expect(stderr).toContain(`Unknown target 'invalid'`); - } else { - expect(stderr).toContain('Invalid configuration object'); - } - - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); if (isWebpack5) { @@ -59,23 +53,23 @@ describe('--target flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'node', '--target', 'invalid']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown target 'invalid'"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should throw an error for incompatible multiple targets', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--target', 'node', '--target', 'web']); expect(exitCode).toBe(2); - expect(stderr).toContain('Error: Universal Chunk Loading is not implemented yet'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should reset target from node to async-node with --target-reset', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--target-reset', '--target', 'async-node']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toContain(`target: [ 'async-node' ]`); }); @@ -83,8 +77,8 @@ describe('--target flag', () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--target-reset']); expect(exitCode).toBe(2); - expect(stderr).toContain('Invalid configuration object'); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); } }); diff --git a/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack4 b/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack4 new file mode 100644 index 00000000000..a01a6ead144 --- /dev/null +++ b/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack4 @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Node target should emit the correct code: stderr 1`] = `""`; diff --git a/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack5 b/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack5 new file mode 100644 index 00000000000..a01a6ead144 --- /dev/null +++ b/test/build/target/node/__snapshots__/node-test.test.js.snap.webpack5 @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Node target should emit the correct code: stderr 1`] = `""`; diff --git a/test/build/target/node/node-test.test.js b/test/build/target/node/node-test.test.js index 74b0d831136..ff458dfc377 100644 --- a/test/build/target/node/node-test.test.js +++ b/test/build/target/node/node-test.test.js @@ -1,12 +1,12 @@ 'use strict'; -const { run } = require('../../../utils/test-utils'); +const { run, normalizeStderr } = require('../../../utils/test-utils'); describe('Node target', () => { it('should emit the correct code', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); - expect(stderr).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); expect(stdout).toBeTruthy(); }); }); diff --git a/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack4 b/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack4 new file mode 100644 index 00000000000..67cf909cdb1 --- /dev/null +++ b/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack4 @@ -0,0 +1,168 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unknown behaviour should log an error if an unknown flag is passed #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #3: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #3: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #4: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #4: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #5: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #5: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and includes =: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown=foo' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and includes =: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-fileneme' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-library-auxiliary-comment-commnjs' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--outpyt' +[webpack-cli] Did you mean '--output'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--outpyt' +[webpack-cli] Did you mean '--output'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "b" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "b" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stderr 2`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stdout 2`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "info" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "info" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed: stdout 1`] = `""`; + +exports[`unknown behaviour should log error and provide suggestion if an unknown command passed: stderr 1`] = ` +"[webpack-cli] Unknown command or entry 'serverr' +[webpack-cli] Did you mean 'serve' (alias 'server, s')? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error and provide suggestion if an unknown command passed: stdout 1`] = `""`; + +exports[`unknown behaviour should log error and respect --color flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error and respect --color flag: stdout 1`] = `""`; + +exports[`unknown behaviour should log error for unknown flag and respect --no-color: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error for unknown flag and respect --no-color: stdout 1`] = `""`; + +exports[`unknown behaviour should log error if an unknown command passed: stderr 1`] = ` +"[webpack-cli] Unknown command or entry 'qqq' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error if an unknown command passed: stdout 1`] = `""`; diff --git a/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack5 b/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack5 new file mode 100644 index 00000000000..cb0588f4684 --- /dev/null +++ b/test/build/unknown/__snapshots__/unknown.test.js.snap.webpack5 @@ -0,0 +1,171 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unknown behaviour should log an error if an unknown flag is passed #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #3: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #3: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #4: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #4: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #5: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '-u' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed #5: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and includes =: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown=foo' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and includes =: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-fileneme' +[webpack-cli] Did you mean '--output-filename'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--output-library-auxiliary-comment-commnjs' +[webpack-cli] Did you mean '--output-library-auxiliary-comment-commonjs'? +[webpack-cli] Did you mean '--output-library-auxiliary-comment-commonjs2'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--outpyt' +[webpack-cli] Did you mean '--output'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--outpyt' +[webpack-cli] Did you mean '--output'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--entyr' +[webpack-cli] Did you mean '--entry'? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed and suggests the closest match to an unknown flag: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "b" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "b" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command #2: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command #2: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "bundle" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stderr 2`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "i" command: stdout 2`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "info" command: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed using "info" command: stdout 1`] = `""`; + +exports[`unknown behaviour should log an error if an unknown flag is passed: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log an error if an unknown flag is passed: stdout 1`] = `""`; + +exports[`unknown behaviour should log error and provide suggestion if an unknown command passed: stderr 1`] = ` +"[webpack-cli] Unknown command or entry 'serverr' +[webpack-cli] Did you mean 'serve' (alias 'server, s')? +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error and provide suggestion if an unknown command passed: stdout 1`] = `""`; + +exports[`unknown behaviour should log error and respect --color flag: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error and respect --color flag: stdout 1`] = `""`; + +exports[`unknown behaviour should log error for unknown flag and respect --no-color: stderr 1`] = ` +"[webpack-cli] Error: Unknown option '--unknown' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error for unknown flag and respect --no-color: stdout 1`] = `""`; + +exports[`unknown behaviour should log error if an unknown command passed: stderr 1`] = ` +"[webpack-cli] Unknown command or entry 'qqq' +[webpack-cli] Run 'webpack --help' to see available commands and options" +`; + +exports[`unknown behaviour should log error if an unknown command passed: stdout 1`] = `""`; diff --git a/test/build/unknown/unknown.test.js b/test/build/unknown/unknown.test.js index 0ed9c264465..68ca63b2864 100644 --- a/test/build/unknown/unknown.test.js +++ b/test/build/unknown/unknown.test.js @@ -1,230 +1,189 @@ 'use strict'; -const { run, isWebpack5 } = require('../../utils/test-utils'); +const { run, normalizeStdout, normalizeStderr } = require('../../utils/test-utils'); describe('unknown behaviour', () => { it('should log an error if an unknown flag is passed', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-u']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '-u'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and includes =', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown=foo']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown=foo'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-u', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '-u'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed #4', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-u', '-u']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '-u'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed #5', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['-u', 'foo']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '-u'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "bundle" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "b" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "bundle" command #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', 'bundle']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "info" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "i" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['i', '--unknown']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed using "i" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', 'i']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error and respect --color flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', '--color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--unknown'"); - expect(stderr).toContain("\u001b[31mRun 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(stderr).toMatchSnapshot('stderr'); + expect(stdout).toMatchSnapshot('stdout'); }); it('should log error for unknown flag and respect --no-color', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--unknown', '--no-color'], { env: { FORCE_COLOR: true } }); expect(exitCode).toBe(2); - expect(stderr).not.toContain(`\u001b[31mError: Unknown option '--unknown'`); - expect(stderr).not.toContain("\u001b[31mRun 'webpack --help' to see available commands and options"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(stderr).toMatchSnapshot('stderr'); + expect(stdout).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--entyr', './a.js']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--entyr'"); - expect(stderr).toContain("Did you mean '--entry'?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #2', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--output-fileneme', '[name].js']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--output-fileneme'"); - - if (isWebpack5) { - expect(stderr).toContain("Did you mean '--output-filename'?"); - } - - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag #3', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['--output-library-auxiliary-comment-commnjs']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--output-library-auxiliary-comment-commnjs'"); - - if (isWebpack5) { - expect(stderr).toContain("Did you mean '--output-library-auxiliary-comment-commonjs'?"); - expect(stderr).toContain("Did you mean '--output-library-auxiliary-comment-commonjs2'?"); - } - - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "bundle" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', '--entyr', './a.js']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--entyr'"); - expect(stderr).toContain("Did you mean '--entry'?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "b" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['b', '--entyr', './a.js']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--entyr'"); - expect(stderr).toContain("Did you mean '--entry'?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "info" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--outpyt']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--outpyt'"); - expect(stderr).toContain("Did you mean '--output'?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log an error if an unknown flag is passed and suggests the closest match to an unknown flag using "i" command', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['i', '--outpyt']); expect(exitCode).toBe(2); - expect(stderr).toContain("Error: Unknown option '--outpyt'"); - expect(stderr).toContain("Did you mean '--output'?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error if an unknown command passed', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['qqq'], true, [], { TERM_PROGRAM: false }); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command or entry 'qqq'"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); it('should log error and provide suggestion if an unknown command passed', async () => { const { exitCode, stderr, stdout } = await run(__dirname, ['serverr'], true, [], { TERM_PROGRAM: false }); expect(exitCode).toBe(2); - expect(stderr).toContain("Unknown command or entry 'serverr'"); - expect(stderr).toContain("Did you mean 'serve' (alias 'server, s')?"); - expect(stderr).toContain("Run 'webpack --help' to see available commands and options"); - expect(stdout).toBeFalsy(); + expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); + expect(normalizeStdout(stdout)).toMatchSnapshot('stdout'); }); }); From ca2bff330b396618aebdd4ef53acc75604ebfe37 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Mon, 26 Apr 2021 21:54:16 +0530 Subject: [PATCH 082/103] chore: fix devServer types (#2662) --- packages/serve/src/types.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/serve/src/types.ts b/packages/serve/src/types.ts index c2d22d8ee86..2195684f43d 100644 --- a/packages/serve/src/types.ts +++ b/packages/serve/src/types.ts @@ -1,9 +1,12 @@ export type devServerOptionsType = { - bonjour?: boolean; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + bonjour?: boolean | Record; client?: devServerClientOptions; compress?: boolean; // eslint-disable-next-line @typescript-eslint/no-explicit-any - dev?: Record; + dev?: Record; // drop in dev-server v4 + // eslint-disable-next-line @typescript-eslint/no-explicit-any + devMiddleware?: Record; firewall?: boolean | string[]; headers?: Record; historyApiFallback?: boolean | Record; @@ -17,7 +20,7 @@ export type devServerOptionsType = { onAfterSetupMiddleware?: () => void; onBeforeSetupMiddleware?: () => void; onListening?: () => void; - open?: string | boolean | Record; + open?: string | boolean | openOptionObject; openPage?: string | string[]; overlay?: boolean | Record; port?: number | string | null; @@ -48,6 +51,11 @@ type devServerClientOptions = { needHotEntry?: boolean | (() => void); }; +type openOptionObject = { + target?: string; + app?: string; +}; + type clientOverlay = { errors?: boolean; warnings?: boolean; From 2011c68d63212b516ce46ba4db659097c66a2339 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Tue, 27 Apr 2021 16:10:20 +0530 Subject: [PATCH 083/103] chore: cleanup CI logs (#2669) --- test/api/get-package-manager.test.js | 3 +++ test/api/prompt-installation.test.js | 2 +- test/build/mode/mode-with-config/mode-with-config.test.js | 1 - test/build/mode/mode-with-config/webpack.config2.js | 1 - test/build/mode/mode-with-config/webpack.config3.js | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/api/get-package-manager.test.js b/test/api/get-package-manager.test.js index 814c247c392..1c3d03af5ed 100644 --- a/test/api/get-package-manager.test.js +++ b/test/api/get-package-manager.test.js @@ -99,8 +99,11 @@ describe('packageUtils', () => { throw new Error(); }); const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {}); + // Do not print warning in CI + const consoleMock = jest.spyOn(console, 'error').mockImplementation(() => {}); expect(getPackageManager()).toBeFalsy(); expect(mockExit).toBeCalledWith(2); + expect(consoleMock).toHaveBeenCalledTimes(1); expect(syncMock.mock.calls.length).toEqual(3); // 3 calls for npm, yarn and pnpm }); }); diff --git a/test/api/prompt-installation.test.js b/test/api/prompt-installation.test.js index 44eb2082bb5..666b218fc0f 100644 --- a/test/api/prompt-installation.test.js +++ b/test/api/prompt-installation.test.js @@ -2,7 +2,7 @@ const path = require('path'); -// eslint-disable-next-line node/no-extraneous-require,node/no-unpublished-require +// eslint-disable-next-line node/no-unpublished-require const stripAnsi = require('strip-ansi'); const globalModulesNpmValue = 'test-npm'; const utilsDirectory = path.resolve(__dirname, '../../packages/webpack-cli/lib/utils/'); diff --git a/test/build/mode/mode-with-config/mode-with-config.test.js b/test/build/mode/mode-with-config/mode-with-config.test.js index 7935ef0ef87..f13ecc9af75 100644 --- a/test/build/mode/mode-with-config/mode-with-config.test.js +++ b/test/build/mode/mode-with-config/mode-with-config.test.js @@ -1,6 +1,5 @@ 'use strict'; -// eslint-disable-next-line node/no-unpublished-require const { run } = require('../../../utils/test-utils'); describe('mode flags with config', () => { diff --git a/test/build/mode/mode-with-config/webpack.config2.js b/test/build/mode/mode-with-config/webpack.config2.js index a896134599d..f06b817c4bf 100644 --- a/test/build/mode/mode-with-config/webpack.config2.js +++ b/test/build/mode/mode-with-config/webpack.config2.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/build/mode/mode-with-config/webpack.config3.js b/test/build/mode/mode-with-config/webpack.config3.js index 65059b352ec..996241cb577 100644 --- a/test/build/mode/mode-with-config/webpack.config3.js +++ b/test/build/mode/mode-with-config/webpack.config3.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../../utils/webpack-cli-test-plugin'); module.exports = { From 65ae77d98e918ea5907de89c9c87b797f57f1b2f Mon Sep 17 00:00:00 2001 From: Alexey Lavinsky Date: Tue, 27 Apr 2021 21:41:07 -0700 Subject: [PATCH 084/103] test: update (#2668) * test: update * test: update * test: update --- test/api/capitalizeFirstLetter.test.js | 11 ++++ test/api/prompt.test.js | 66 +++++++++++++++++++ .../function-with-env.test.js | 19 ++++++ 3 files changed, 96 insertions(+) create mode 100755 test/api/capitalizeFirstLetter.test.js create mode 100755 test/api/prompt.test.js diff --git a/test/api/capitalizeFirstLetter.test.js b/test/api/capitalizeFirstLetter.test.js new file mode 100755 index 00000000000..13bb7f2137b --- /dev/null +++ b/test/api/capitalizeFirstLetter.test.js @@ -0,0 +1,11 @@ +const capitalizeFirstLetter = require('../../packages/webpack-cli/lib/utils/capitalize-first-letter'); + +describe('capitalizeFirstLetter', () => { + it('should capitalize first letter', () => { + expect(capitalizeFirstLetter('webpack')).toEqual('Webpack'); + }); + + it('should return an empty string on passing a non-string value', () => { + expect(capitalizeFirstLetter(true)).toEqual(''); + }); +}); diff --git a/test/api/prompt.test.js b/test/api/prompt.test.js new file mode 100755 index 00000000000..2ebf672b306 --- /dev/null +++ b/test/api/prompt.test.js @@ -0,0 +1,66 @@ +const prompt = require('../../packages/webpack-cli/lib/utils/prompt'); +const { Writable } = require('stream'); + +describe('prompt', () => { + class MyWritable extends Writable { + constructor(answer) { + super(); + this.answer = answer; + } + _write(data, e, cb) { + process.stdin.push(this.answer); + cb(null, data); + } + } + + it('should work with default response', async () => { + const myWritable = new MyWritable('\r'); + + const resultSuccess = await prompt({ + message: 'message', + defaultResponse: 'yes', + stream: myWritable, + }); + + const resultFail = await prompt({ + message: 'message', + defaultResponse: 'no', + stream: myWritable, + }); + + expect(resultSuccess).toBe(true); + expect(resultFail).toBe(false); + }); + + it('should work with "yes" && "y" response', async () => { + const myWritable1 = new MyWritable('yes\r'); + const myWritable2 = new MyWritable('y\r'); + + const resultSuccess1 = await prompt({ + message: 'message', + defaultResponse: 'no', + stream: myWritable1, + }); + + const resultSuccess2 = await prompt({ + message: 'message', + defaultResponse: 'no', + stream: myWritable2, + }); + + expect(resultSuccess1).toBe(true); + expect(resultSuccess2).toBe(true); + }); + + it('should work with unknown response', async () => { + const myWritable = new MyWritable('unknown\r'); + + const result = await prompt({ + message: 'message', + defaultResponse: 'yes', + stream: myWritable, + }); + + expect(result).toBe(false); + }); +}); diff --git a/test/build/config/type/function-with-env/function-with-env.test.js b/test/build/config/type/function-with-env/function-with-env.test.js index 539cc160684..f5050d481c0 100644 --- a/test/build/config/type/function-with-env/function-with-env.test.js +++ b/test/build/config/type/function-with-env/function-with-env.test.js @@ -167,4 +167,23 @@ describe('function configuration', () => { // check if the values from DefinePlugin make it to the compiled code expect(data).toContain('env message present'); }); + + it('is able to apply last flag with same name', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ + '--env', + 'name.=foo', + '--env', + 'name.=baz', + '--env', + 'environment=dot', + '-c', + 'webpack.env.config.js', + ]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toBeTruthy(); + // Should generate the appropriate files + expect(existsSync(resolve(__dirname, './dist/baz.js'))).toBeTruthy(); + }); }); From 71b4b59b80e7fccdf04ec8ebcd340dfbfb8ff54f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 13:57:54 +0300 Subject: [PATCH 085/103] chore(deps-dev): bump webpack from 5.35.1 to 5.36.0 (#2672) Bumps [webpack](https://github.com/webpack/webpack) from 5.35.1 to 5.36.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.35.1...v5.36.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 13bd8d59ccd..929d9791d3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2226,10 +2226,10 @@ acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff" - integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g== +acorn@^8.0.4, acorn@^8.1.0, acorn@^8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.1.tgz#0d36af126fb6755095879c1dc6fd7edf7d60a5fb" + integrity sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg== add-stream@^1.0.0: version "1.0.0" @@ -10833,16 +10833,16 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.35.1: - version "5.35.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.35.1.tgz#857670799465c8a5cbb94c4c175d60ac42d18ba3" - integrity sha512-uWKYStqJ23+N6/EnMEwUjPSSKUG1tFmcuKhALEh/QXoUxwN8eb3ATNIZB38A+fO6QZ0xfc7Cu7KNV9LXNhDCsw== + version "5.36.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.0.tgz#d008da31b721f8fecce88ef2adaf1b16dc2161d1" + integrity sha512-HdOhLXClUEwTnzQnzpSG9iL00ej23ojvfnGpF49ba0MkuAT2q+WhQilHFFJHOIVRBqbzakQ1vCWQV2K+QLX0Qw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" "@webassemblyjs/ast" "1.11.0" "@webassemblyjs/wasm-edit" "1.11.0" "@webassemblyjs/wasm-parser" "1.11.0" - acorn "^8.0.4" + acorn "^8.2.1" browserslist "^4.14.5" chrome-trace-event "^1.0.2" enhanced-resolve "^5.8.0" From 74c027b6ef39d8a42713e14aa587a827061e013c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 13:58:11 +0300 Subject: [PATCH 086/103] chore(deps-dev): bump @types/jest Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.22 to 26.0.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 929d9791d3c..85c665045da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1804,9 +1804,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^26.0.15": - version "26.0.22" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" - integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== + version "26.0.23" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" + integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From debb227190ca9da6cb6c45149f03f999fa09a01e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 15:14:07 +0300 Subject: [PATCH 087/103] chore(deps-dev): bump @types/node Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.41 to 14.14.43. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 85c665045da..f730369b43f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1854,9 +1854,9 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@^14.14.40": - version "14.14.41" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" - integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" From ed9ffa8b46141a053075abd01c1ecd8479a0b164 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 15:19:48 +0300 Subject: [PATCH 088/103] chore(deps-dev): bump webpack from 5.36.0 to 5.36.1 (#2675) Bumps [webpack](https://github.com/webpack/webpack) from 5.36.0 to 5.36.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.36.0...v5.36.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f730369b43f..4af7bbc6598 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10833,9 +10833,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.35.1: - version "5.36.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.0.tgz#d008da31b721f8fecce88ef2adaf1b16dc2161d1" - integrity sha512-HdOhLXClUEwTnzQnzpSG9iL00ej23ojvfnGpF49ba0MkuAT2q+WhQilHFFJHOIVRBqbzakQ1vCWQV2K+QLX0Qw== + version "5.36.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.1.tgz#d82bad3384f84ed45a8de3844c31730f56361ab7" + integrity sha512-2u25a82T+6quAxSlzEpN/R/RICwt20ONU3z3Ko05S8KVH9FXILcBYb2hD/rQtZT5y7lRAIsIIs05pdndY7ourQ== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 0ac231c27f058ae88ee08f1fb54246198349fd4e Mon Sep 17 00:00:00 2001 From: James George Date: Thu, 29 Apr 2021 20:22:59 +0530 Subject: [PATCH 089/103] refactor(generators): remove extraneous args to addon-generator (#2674) * refactor(generators): remove extraneous args to addon-generator * chore: handle exceptions --- packages/generators/src/addon-generator.ts | 48 ++++++++++++++------- packages/generators/src/loader-generator.ts | 12 ------ packages/generators/src/plugin-generator.ts | 9 ---- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index 67fcd56159e..7206853e592 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -4,6 +4,16 @@ import Generator from 'yeoman-generator'; import { List } from './utils/scaffold-utils'; +// Helper to get the template-directory content + +const getFiles = (dir) => { + return fs.readdirSync(dir).reduce((list, file) => { + const filePath = path.join(dir, file); + const isDir = fs.statSync(filePath).isDirectory(); + return list.concat(isDir ? getFiles(filePath) : filePath); + }, []); +}; + /** * Creates a Yeoman Generator that generates a project conforming * to webpack-defaults. @@ -12,14 +22,6 @@ import { List } from './utils/scaffold-utils'; * * @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. * @@ -28,8 +30,6 @@ import { List } from './utils/scaffold-utils'; const addonGenerator = ( prompts: Generator.Questions, templateDir: string, - copyFiles: string[], - copyTemplateFiles: string[], // eslint-disable-next-line @typescript-eslint/no-explicit-any templateFn: (instance: any) => Record, ): Generator.GeneratorConstructor => { @@ -100,13 +100,31 @@ const addonGenerator = ( // eslint-disable-next-line @typescript-eslint/no-var-requires this.fs.extendJSON(this.destinationPath('package.json'), require(packageJsonTemplatePath)(this.props.name)); - copyFiles.forEach((filePath) => - this.fs.copyTpl(path.join(this.resolvedTemplatePath, filePath), this.destinationPath(filePath.replace('.tpl', ''))), - ); + let files = []; + try { + // An array of file paths (relative to `./templates`) of files to be copied to the generated project + files = getFiles(this.resolvedTemplatePath); + } catch (error) { + this.utils.logger.error(`Failed to generate starter template.\n ${error}`); + process.exit(2); + } + + // Template file paths should be of the form `path/to/_file.js.tpl` + const copyTemplateFiles = files.filter((filePath) => path.basename(filePath).startsWith('_')); + + // File paths should be of the form `path/to/file.js.tpl` + const copyFiles = files.filter((filePath) => !copyTemplateFiles.includes(filePath)); + + copyFiles.forEach((filePath) => { + // `absolute-path/to/file.js.tpl` -> `destination-path/file.js` + const destFilePath = path.relative(this.resolvedTemplatePath, filePath).replace('.tpl', ''); + this.fs.copyTpl(filePath, this.destinationPath(destFilePath)); + }); copyTemplateFiles.forEach((filePath) => { - const destFilePath = filePath.replace('_', '').replace('.tpl', ''); - this.fs.copyTpl(path.join(this.resolvedTemplatePath, filePath), this.destinationPath(destFilePath), templateFn(this)); + // `absolute-path/to/_file.js.tpl` -> `destination-path/file.js` + const destFilePath = path.relative(this.resolvedTemplatePath, filePath).replace('_', '').replace('.tpl', ''); + this.fs.copyTpl(filePath, this.destinationPath(destFilePath), templateFn(this)); }); } diff --git a/packages/generators/src/loader-generator.ts b/packages/generators/src/loader-generator.ts index debf22a3d2b..4131e0b1474 100644 --- a/packages/generators/src/loader-generator.ts +++ b/packages/generators/src/loader-generator.ts @@ -40,18 +40,6 @@ export const LoaderGenerator = addonGenerator( }, ], path.resolve(__dirname, '../loader-template'), - [ - '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): Record => ({ name: gen.props.name }), ); diff --git a/packages/generators/src/plugin-generator.ts b/packages/generators/src/plugin-generator.ts index f33298f5bad..832775e3e32 100644 --- a/packages/generators/src/plugin-generator.ts +++ b/packages/generators/src/plugin-generator.ts @@ -22,15 +22,6 @@ export const PluginGenerator = addonGenerator( }, ], path.resolve(__dirname, '../plugin-template'), - [ - '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): Record => ({ name: toUpperCamelCase(gen.props.name) }), ); From c8a7a6b8e649009e25319458899b2c84d61a41f3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 20:34:30 +0300 Subject: [PATCH 090/103] chore(deps-dev): bump eslint-config-prettier Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.2.0 to 8.3.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.2.0...v8.3.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4af7bbc6598..945ebce6349 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4165,9 +4165,9 @@ escodegen@^2.0.0: source-map "~0.6.1" eslint-config-prettier@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz#78de77d63bca8e9e59dae75a614b5299925bb7b3" - integrity sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw== + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== eslint-plugin-es@^3.0.0: version "3.0.1" From f13adaec5761c2c42493d391f6e406ee1c44eef5 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Thu, 29 Apr 2021 22:39:16 +0300 Subject: [PATCH 091/103] docs: remove `webpack-scaffold` (#2677) --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index e47e40ab364..f1ee36e90a8 100644 --- a/README.md +++ b/README.md @@ -84,12 +84,6 @@ npx webpack-cli init You will be prompted for some questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration. -## webpack CLI Scaffolds - -With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack, we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these scaffolds. It contains functions that could be of use for creating a scaffold yourself. - -You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding), learn [How to compose a webpack-scaffold?](https://webpack.js.org/contribute/writing-a-scaffold) or generate one with [webpack-scaffold-starter](https://github.com/rishabh3112/webpack-scaffold-starter). - ## Exit codes and their meanings | Exit Code | Description | From ea2bbfd73fbcd25be7c957b712bc21e8a5a51771 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Fri, 30 Apr 2021 08:35:08 +0530 Subject: [PATCH 092/103] docs: remove scaffold guide (#2678) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f1ee36e90a8..92506eccba1 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ - [Commands](#commands) - [Utilities](#utilities) - [Getting started](#getting-started) -- [webpack CLI Scaffolds](#webpack-cli-scaffolds) - [Exit codes and their meanings](#exit-codes-and-their-meanings) - [Contributing and Internal Documentation](#contributing-and-internal-documentation) - [Open Collective](#open-collective) From 0fc3eecfe0a1ea1a02e00bf21ad00b8c0ce48016 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:15:18 +0300 Subject: [PATCH 093/103] chore(deps-dev): bump webpack from 5.36.1 to 5.36.2 (#2680) Bumps [webpack](https://github.com/webpack/webpack) from 5.36.1 to 5.36.2. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.36.1...v5.36.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 945ebce6349..03aa48426e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10833,9 +10833,9 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.35.1: - version "5.36.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.1.tgz#d82bad3384f84ed45a8de3844c31730f56361ab7" - integrity sha512-2u25a82T+6quAxSlzEpN/R/RICwt20ONU3z3Ko05S8KVH9FXILcBYb2hD/rQtZT5y7lRAIsIIs05pdndY7ourQ== + version "5.36.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.2.tgz#6ef1fb2453ad52faa61e78d486d353d07cca8a0f" + integrity sha512-XJumVnnGoH2dV+Pk1VwgY4YT6AiMKpVoudUFCNOXMIVrEKPUgEwdIfWPjIuGLESAiS8EdIHX5+TiJz/5JccmRg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 9d46b72065cedf04c45c4e71a3f34453154eaf41 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sat, 1 May 2021 19:21:06 +0530 Subject: [PATCH 094/103] docs: add more information (#2683) --- packages/webpack-cli/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 9c6e0010146..8ec8b13e69d 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -115,3 +115,32 @@ Global options: ### webpack 5 Checkout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md) to see list of all available options. + +## Exit codes and their meanings + +| Exit Code | Description | +| --------- | -------------------------------------------------- | +| `0` | Success | +| `1` | Errors from webpack | +| `2` | Configuration/options problem or an internal error | + +## CLI Environment Variables + +| Environment Variable | Description | +| ----------------------------------- | ------------------------------------------------------------------- | +| `WEBPACK_CLI_SKIP_IMPORT_LOCAL` | when `true` it will skip using the local instance of `webpack-cli`. | +| `WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG` | when `true` it will force load the ESM config. | +| `WEBPACK_PACKAGE` | Use a custom webpack version in CLI. | +| `WEBPACK_CLI_HELP_WIDTH` | Use custom width for help output. | + +## Configuration Environment Variables + +You can use the following environment variables inside your webpack configuration: + +| Environment Variable | Description | +| -------------------- | -------------------------------------------- | +| `WEBPACK_SERVE` | `true` if `serve\|s` is being used. | +| `WEBPACK_BUILD` | `true` if `build\|bundle\|b` is being used. | +| `WEBPACK_WATCH` | `true` if `--watch\|watch\|w` is being used. | + +Checkout [webpack.js.org](https://webpack.js.org/api/cli/) for more detailed documentation of `webpack-cli`. From 509604f0800e49ef568f72315f8731b530558990 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 17:19:14 +0300 Subject: [PATCH 095/103] chore(deps-dev): bump @types/yeoman-generator Bumps [@types/yeoman-generator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yeoman-generator) from 4.11.3 to 4.11.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yeoman-generator) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 03aa48426e2..aa266a6e40c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1931,16 +1931,16 @@ rxjs ">=6.4.0" "@types/yeoman-generator@*", "@types/yeoman-generator@^4.11.3": - version "4.11.3" - resolved "https://registry.yarnpkg.com/@types/yeoman-generator/-/yeoman-generator-4.11.3.tgz#3b4c0040cf0c28237dd9f535a15c620d3f68c5f4" - integrity sha512-bZRBRahUEs10YhPC4zTKwX5h1mfoFT4Qvav+z0WyT37SgKK9IgIozn8/k6IF9h9PNkxpAhFcER5llwdzCyFZnw== + version "4.11.4" + resolved "https://registry.yarnpkg.com/@types/yeoman-generator/-/yeoman-generator-4.11.4.tgz#bc0ff86a5d28cb2c6456ecb3dcef1364ffbc764e" + integrity sha512-JB0rxFS8oskkKLALii9y3Tb6DQaLQ/bxBU6nUIAh9e/47T1PvVODfMlj1Hkxrw/rzNhgGOzkG/xiOHL5EsqCag== dependencies: "@types/debug" "*" "@types/ejs" "*" "@types/inquirer" "*" "@types/mem-fs-editor" "*" "@types/yeoman-environment" "*" - rxjs ">=6.4.0" + rxjs "^6.4.0" "@typescript-eslint/eslint-plugin@^4.14.1": version "4.22.0" From 60abcd40d66e20e5c6c6c002959cf2f86efc721b Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 1 May 2021 20:45:30 +0530 Subject: [PATCH 096/103] feat: upgrade to GitHub native dependabot (#2682) --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..8323e7c9467 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + time: '04:00' + timezone: Europe/Berlin + open-pull-requests-limit: 10 + versioning-strategy: lockfile-only From af6c02b130a35b62b94542680aa7ea41561e77d7 Mon Sep 17 00:00:00 2001 From: James George Date: Mon, 3 May 2021 21:08:28 +0530 Subject: [PATCH 097/103] test: cleanup (#2688) --- test/build/basic/basic.test.js | 46 +++++++------------ .../build-variable/build-variable.test.js | 2 +- .../bundle-variable/bundle-variable.test.js | 2 +- .../commonjs-default/commonjs-default.test.js | 2 +- .../config-format/commonjs/commonjs.test.js | 2 +- .../dotfolder-array/dotfolder-array.test.js | 2 +- .../dotfolder-single/dotfolder-single.test.js | 2 +- .../relative/basic-config.test.js | 4 +- test/build/config-name/config-name.test.js | 12 ++--- .../build/config/absent/config-absent.test.js | 2 +- test/build/config/basic/basic-config.test.js | 11 +++-- .../basic-config/default-js-config.test.js | 2 +- .../cjs-config/default-cjs-config.test.js | 2 +- .../multiple-location-config.test.js | 2 +- .../dev-none-config.test.js | 2 +- .../with-mode/multiple-config.test.js | 2 +- .../config/invalid-path/invalid-path.test.js | 2 +- .../multiple-with-one-compilation.test.js | 11 +++-- .../config/multiple/multiple-config.test.js | 6 +-- .../no-config-array/no-config-array.test.js | 2 +- .../no-config-object/no-config-object.test.js | 6 +-- .../function-with-argv.test.js | 2 +- .../array-function-with-env.test.js | 2 +- .../array-functions/array-functions.test.js | 2 +- .../array-promises/array-promises.test.js | 2 +- test/build/config/type/array/array.test.js | 4 +- .../function-array/function-array.test.js | 2 +- .../function-async/function-async.test.js | 2 +- .../function-promise/function-promise.test.js | 2 +- .../function-with-argv.test.js | 2 +- .../config/type/function/function.test.js | 2 +- .../type/promise-array/promise-array.test.js | 2 +- .../promise-function/promise-function.test.js | 2 +- .../build/config/type/promise/promise.test.js | 2 +- test/build/defaults/output-defaults.test.js | 6 +-- .../devtool/array/source-map-array.test.js | 4 +- .../devtool/object/source-map-object.test.js | 2 +- .../entry-with-config.test.js | 2 +- .../entry-with-config.test.js | 2 +- .../config-absent/merge-config-absent.test.js | 2 +- test/build/merge/config/merge-config.test.js | 6 +-- .../mode-with-config/mode-with-config.test.js | 2 +- test/build/name/name.test.js | 2 +- .../build/output/output-named-bundles.test.js | 4 +- test/build/prefetch/prefetch.test.js | 6 +-- .../entry-absent/zero-config.test.js | 2 +- .../entry-present/zero-config.test.js | 2 +- test/info/info-output.test.js | 10 ++-- test/info/info-unknown.test.js | 2 +- test/loader/loader.test.js | 8 ++-- test/plugin/plugin.test.js | 8 ++-- test/utils/test-utils.test.js | 4 +- 52 files changed, 104 insertions(+), 122 deletions(-) diff --git a/test/build/basic/basic.test.js b/test/build/basic/basic.test.js index 355b8084f57..a21fcb50af2 100644 --- a/test/build/basic/basic.test.js +++ b/test/build/basic/basic.test.js @@ -5,7 +5,7 @@ const { run } = require('../../utils/test-utils'); describe('bundle command', () => { it('should work without command (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -13,7 +13,7 @@ describe('bundle command', () => { }); it('should work without command and options (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -21,7 +21,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -29,7 +29,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -37,7 +37,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options #2 (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development', './src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development', './src/index.js', './src/other.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -45,7 +45,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax without command with options #3 (default command)', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--entry', './src/again.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--entry', './src/again.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -53,11 +53,7 @@ describe('bundle command', () => { }); it('should work with and override entries from the configuration', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['./src/index.js', './src/other.js', '--config', './entry.config.js'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, ['./src/index.js', './src/other.js', '--config', './entry.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -65,7 +61,7 @@ describe('bundle command', () => { }); it('should work with the "build" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['build'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -73,7 +69,7 @@ describe('bundle command', () => { }); it('should work with "bundle" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['bundle'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -81,7 +77,7 @@ describe('bundle command', () => { }); it('should work with the "b" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['b'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['b']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -89,7 +85,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "build" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -97,7 +93,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "bundle" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['bundle', './src/index.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -105,7 +101,7 @@ describe('bundle command', () => { }); it('should work with entries syntax using the "b" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['b', './src/index.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['b', './src/index.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -113,7 +109,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js', './src/other.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js', './src/other.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -121,11 +117,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias and options', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['build', './src/index.js', './src/other.js', '--mode', 'development'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', './src/index.js', './src/other.js', '--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -133,11 +125,7 @@ describe('bundle command', () => { }); it('should work with multiple entries syntax using the "build" alias and options', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['build', '--mode', 'development', './src/index.js', './src/other.js'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, ['build', '--mode', 'development', './src/index.js', './src/other.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -145,7 +133,7 @@ describe('bundle command', () => { }); it('should log error and suggest right name on the "buil" command', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['buil'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['buil']); expect(exitCode).toBe(2); expect(stderr).toContain("Unknown command or entry 'buil'"); diff --git a/test/build/build-variable/build-variable.test.js b/test/build/build-variable/build-variable.test.js index 9dc9e29a6df..8810b29bb40 100644 --- a/test/build/build-variable/build-variable.test.js +++ b/test/build/build-variable/build-variable.test.js @@ -4,7 +4,7 @@ const { run } = require('../../utils/test-utils'); describe('bundle variable', () => { it('compiles without flags and export variable', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/bundle-variable/bundle-variable.test.js b/test/build/bundle-variable/bundle-variable.test.js index 9dc9e29a6df..8810b29bb40 100644 --- a/test/build/bundle-variable/bundle-variable.test.js +++ b/test/build/bundle-variable/bundle-variable.test.js @@ -4,7 +4,7 @@ const { run } = require('../../utils/test-utils'); describe('bundle variable', () => { it('compiles without flags and export variable', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/commonjs-default/commonjs-default.test.js b/test/build/config-format/commonjs-default/commonjs-default.test.js index d829c878407..1e663dbc2b4 100644 --- a/test/build/config-format/commonjs-default/commonjs-default.test.js +++ b/test/build/config-format/commonjs-default/commonjs-default.test.js @@ -2,7 +2,7 @@ const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { it('should support CommonJS file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-format/commonjs/commonjs.test.js b/test/build/config-format/commonjs/commonjs.test.js index d829c878407..1e663dbc2b4 100644 --- a/test/build/config-format/commonjs/commonjs.test.js +++ b/test/build/config-format/commonjs/commonjs.test.js @@ -2,7 +2,7 @@ const { run } = require('../../../utils/test-utils'); describe('webpack cli', () => { it('should support CommonJS file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.cjs']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js b/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js index c1f0f2b4ce6..81bc489fbfa 100644 --- a/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js +++ b/test/build/config-lookup/dotfolder-array/dotfolder-array.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../utils/test-utils'); describe('dotfolder array config lookup', () => { it('should find a webpack array configuration in a dotfolder', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js b/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js index f209bf6d0bc..ebcf68f4ff2 100644 --- a/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js +++ b/test/build/config-lookup/dotfolder-single/dotfolder-single.test.js @@ -7,7 +7,7 @@ const { run } = require('../../../utils/test-utils'); describe('dotfolder single config lookup', () => { it('should find a webpack configuration in a dotfolder', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-lookup/relative/basic-config.test.js b/test/build/config-lookup/relative/basic-config.test.js index 6e4332131e1..d75b77c935b 100644 --- a/test/build/config-lookup/relative/basic-config.test.js +++ b/test/build/config-lookup/relative/basic-config.test.js @@ -4,7 +4,7 @@ const { run } = require('../../../utils/test-utils'); describe('relative path to config', () => { it('should work', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.js', '--output-path', './binary/a'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', 'webpack.config.js', '--output-path', './binary/a']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -12,7 +12,7 @@ describe('relative path to config', () => { }); it('should work #2', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js', '--output-path', './binary/b'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js', '--output-path', './binary/b']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config-name/config-name.test.js b/test/build/config-name/config-name.test.js index ffc8237e51d..ed9f5da36b9 100644 --- a/test/build/config-name/config-name.test.js +++ b/test/build/config-name/config-name.test.js @@ -4,7 +4,7 @@ const { run } = require('../../utils/test-utils'); describe('--config-name flag', () => { it('should select only the config whose name is passed with --config-name', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -14,7 +14,7 @@ describe('--config-name flag', () => { }); it('should work with multiple values for --config-name', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first', '--config-name', 'third'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'first', '--config-name', 'third']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -39,7 +39,7 @@ describe('--config-name flag', () => { }); it('should log error if invalid config name is provided', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test']); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); @@ -47,7 +47,7 @@ describe('--config-name flag', () => { }); it('should log error if multiple configurations are not found', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test', '-c', 'single-config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config-name', 'test', '-c', 'single-config.js']); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); @@ -80,7 +80,7 @@ describe('--config-name flag', () => { }); it('should work with config as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'first'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'first']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -104,7 +104,7 @@ describe('--config-name flag', () => { }); it('should log error if invalid config name is provided ', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'test'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'function-config.js', '--config-name', 'test']); expect(exitCode).toBe(2); expect(stderr).toContain('Configuration with the name "test" was not found.'); diff --git a/test/build/config/absent/config-absent.test.js b/test/build/config/absent/config-absent.test.js index a3c8ef9c72d..61fcf448dc7 100644 --- a/test/build/config/absent/config-absent.test.js +++ b/test/build/config/absent/config-absent.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../utils/test-utils'); describe('Config:', () => { it('supplied config file is absent', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'webpack.config.js')]); // should throw with correct exit code expect(exitCode).toBe(2); diff --git a/test/build/config/basic/basic-config.test.js b/test/build/config/basic/basic-config.test.js index e3f88f4115d..3c7efd29718 100644 --- a/test/build/config/basic/basic-config.test.js +++ b/test/build/config/basic/basic-config.test.js @@ -5,11 +5,12 @@ const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { it('is able to understand and parse a very basic configuration file', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', './binary'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, [ + '-c', + resolve(__dirname, 'webpack.config.js'), + '--output-path', + './binary', + ]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/build/config/defaults/basic-config/default-js-config.test.js b/test/build/config/defaults/basic-config/default-js-config.test.js index a4e51558084..2fa41973d10 100644 --- a/test/build/config/defaults/basic-config/default-js-config.test.js +++ b/test/build/config/defaults/basic-config/default-js-config.test.js @@ -4,7 +4,7 @@ const { run, isWebpack5 } = require('../../../../utils/test-utils'); describe('Zero Config', () => { it('runs when config is present but not supplied via flag', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/defaults/cjs-config/default-cjs-config.test.js b/test/build/config/defaults/cjs-config/default-cjs-config.test.js index 90ac1debc57..ef25d0ad564 100644 --- a/test/build/config/defaults/cjs-config/default-cjs-config.test.js +++ b/test/build/config/defaults/cjs-config/default-cjs-config.test.js @@ -4,7 +4,7 @@ const { run, isWebpack5 } = require('../../../../utils/test-utils'); describe('Default Config:', () => { it('Should be able to pick cjs config by default', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js b/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js index 3bf4009af22..5b68f73dc03 100644 --- a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('multiple dev config files with webpack.config.js', () => { it('Uses webpack.config.development.js', async () => { - const { stdout, stderr, exitCode } = await run(__dirname, [], false); + const { stdout, stderr, exitCode } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js b/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js index 7faab90db07..5c59efbbc78 100644 --- a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('multiple config files', () => { it('Uses dev config when both dev and none are present', async () => { - const { stdout, stderr, exitCode } = await run(__dirname, [], false); + const { stdout, stderr, exitCode } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/defaults/with-mode/multiple-config.test.js b/test/build/config/defaults/with-mode/multiple-config.test.js index 4cc5101fc1c..f95169c84ca 100644 --- a/test/build/config/defaults/with-mode/multiple-config.test.js +++ b/test/build/config/defaults/with-mode/multiple-config.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('multiple config files', () => { it('Uses dev config when development mode is supplied', async () => { - const { stdout, stderr, exitCode } = await run(__dirname, ['--mode', 'development'], false); + const { stdout, stderr, exitCode } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); expect(stdout).not.toBe(undefined); diff --git a/test/build/config/invalid-path/invalid-path.test.js b/test/build/config/invalid-path/invalid-path.test.js index 5366ecc35ca..4350753aaef 100644 --- a/test/build/config/invalid-path/invalid-path.test.js +++ b/test/build/config/invalid-path/invalid-path.test.js @@ -4,7 +4,7 @@ const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { it('is able to understand and parse a very basic configuration file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'invalid-webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', path.resolve(__dirname, 'invalid-webpack.config.js')]); expect(exitCode).toBe(2); expect(stderr).toContain(`Failed to load '${path.resolve(__dirname, 'invalid-webpack.config.js')}' config`); diff --git a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js index e3f88f4115d..3c7efd29718 100644 --- a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js +++ b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js @@ -5,11 +5,12 @@ const { run } = require('../../../utils/test-utils'); describe('basic config file', () => { it('is able to understand and parse a very basic configuration file', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['-c', resolve(__dirname, 'webpack.config.js'), '--output-path', './binary'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, [ + '-c', + resolve(__dirname, 'webpack.config.js'), + '--output-path', + './binary', + ]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/build/config/multiple/multiple-config.test.js b/test/build/config/multiple/multiple-config.test.js index 086d37c1e8a..53ecd6edb02 100644 --- a/test/build/config/multiple/multiple-config.test.js +++ b/test/build/config/multiple/multiple-config.test.js @@ -4,11 +4,7 @@ const { run } = require('../../../utils/test-utils'); describe('Multiple config flag: ', () => { it('spawns multiple compilers for multiple configs', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['--config', 'webpack1.config.js', '--config', 'webpack2.config.js'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', 'webpack1.config.js', '--config', 'webpack2.config.js']); // Should contain the correct exit code expect(exitCode).toEqual(0); diff --git a/test/build/config/no-config-array/no-config-array.test.js b/test/build/config/no-config-array/no-config-array.test.js index a486a59e1b5..406199c785c 100644 --- a/test/build/config/no-config-array/no-config-array.test.js +++ b/test/build/config/no-config-array/no-config-array.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../utils/test-utils'); describe('no configs in array', () => { it('is able to understand and parse a very basic configuration file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/no-config-object/no-config-object.test.js b/test/build/config/no-config-object/no-config-object.test.js index c9f3753e8f6..fc83afb8626 100644 --- a/test/build/config/no-config-object/no-config-object.test.js +++ b/test/build/config/no-config-object/no-config-object.test.js @@ -5,11 +5,7 @@ const { run } = require('../../../utils/test-utils'); describe('empty config', () => { it('should work', async () => { - const { exitCode, stderr, stdout } = await run( - __dirname, - ['-c', resolve(__dirname, 'webpack.config.js'), '--mode', 'development'], - false, - ); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-function-with-argv/function-with-argv.test.js b/test/build/config/type/array-function-with-argv/function-with-argv.test.js index 75845d00462..72b2a36bbb3 100644 --- a/test/build/config/type/array-function-with-argv/function-with-argv.test.js +++ b/test/build/config/type/array-function-with-argv/function-with-argv.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('array of function with args', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-function-with-env/array-function-with-env.test.js b/test/build/config/type/array-function-with-env/array-function-with-env.test.js index b9d7f7678f2..6dd1804a6a8 100644 --- a/test/build/config/type/array-function-with-env/array-function-with-env.test.js +++ b/test/build/config/type/array-function-with-env/array-function-with-env.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('array of functions with env', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-functions/array-functions.test.js b/test/build/config/type/array-functions/array-functions.test.js index b3fefc51e80..de62cab46b8 100644 --- a/test/build/config/type/array-functions/array-functions.test.js +++ b/test/build/config/type/array-functions/array-functions.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('array of functions', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array-promises/array-promises.test.js b/test/build/config/type/array-promises/array-promises.test.js index 9956bf43022..828c0207f4b 100644 --- a/test/build/config/type/array-promises/array-promises.test.js +++ b/test/build/config/type/array-promises/array-promises.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('array of promises', () => { it('is able to understand a configuration file as a promise', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/array/array.test.js b/test/build/config/type/array/array.test.js index 9f6cb55866a..44d5f5dcef4 100644 --- a/test/build/config/type/array/array.test.js +++ b/test/build/config/type/array/array.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('array config', () => { it('is able to understand a configuration file in array format', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -15,7 +15,7 @@ describe('array config', () => { }); it('respect cli args with config as an array', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', 'none'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--stats', 'none']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-array/function-array.test.js b/test/build/config/type/function-array/function-array.test.js index d7932f3e7c5..12169a05639 100644 --- a/test/build/config/type/function-array/function-array.test.js +++ b/test/build/config/type/function-array/function-array.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('function array', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-async/function-async.test.js b/test/build/config/type/function-async/function-async.test.js index f8bf9f10c40..d3eb48eb837 100644 --- a/test/build/config/type/function-async/function-async.test.js +++ b/test/build/config/type/function-async/function-async.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('function async', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-promise/function-promise.test.js b/test/build/config/type/function-promise/function-promise.test.js index 60e5dbe6a17..15bfa3c4abb 100644 --- a/test/build/config/type/function-promise/function-promise.test.js +++ b/test/build/config/type/function-promise/function-promise.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('function promise', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function-with-argv/function-with-argv.test.js b/test/build/config/type/function-with-argv/function-with-argv.test.js index c2a0c5c7fb0..1ad6ce20b6f 100644 --- a/test/build/config/type/function-with-argv/function-with-argv.test.js +++ b/test/build/config/type/function-with-argv/function-with-argv.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('function configuration', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/function/function.test.js b/test/build/config/type/function/function.test.js index 9b24eba0faf..4f961672f8b 100644 --- a/test/build/config/type/function/function.test.js +++ b/test/build/config/type/function/function.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('function', () => { it('is able to understand a configuration file as a function', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/promise-array/promise-array.test.js b/test/build/config/type/promise-array/promise-array.test.js index ae8aaf52a29..e2a2dc8dbde 100644 --- a/test/build/config/type/promise-array/promise-array.test.js +++ b/test/build/config/type/promise-array/promise-array.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('promise array', () => { it('is able to understand a configuration file as a promise', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stdout).toBeTruthy(); diff --git a/test/build/config/type/promise-function/promise-function.test.js b/test/build/config/type/promise-function/promise-function.test.js index 1d1801492e4..74a44f2bf98 100644 --- a/test/build/config/type/promise-function/promise-function.test.js +++ b/test/build/config/type/promise-function/promise-function.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('promise function', () => { it('is able to understand a configuration file as a promise', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/config/type/promise/promise.test.js b/test/build/config/type/promise/promise.test.js index 238eb10b01a..e3b0ee3c1b2 100644 --- a/test/build/config/type/promise/promise.test.js +++ b/test/build/config/type/promise/promise.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('promise', () => { it('is able to understand a configuration file as a promise', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/defaults/output-defaults.test.js b/test/build/defaults/output-defaults.test.js index 1fa0c532862..1d8afe1ea7c 100644 --- a/test/build/defaults/output-defaults.test.js +++ b/test/build/defaults/output-defaults.test.js @@ -6,7 +6,7 @@ const { run } = require('../../utils/test-utils'); describe('output flag defaults', () => { it('should create default file for a given directory', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path', './binary'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path', './binary']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -17,7 +17,7 @@ describe('output flag defaults', () => { }); it('set default output directory on no output flag', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -26,7 +26,7 @@ describe('output flag defaults', () => { }); it('throw error on empty output flag', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--entry', './a.js', '--output-path']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Option '-o, --output-path ' argument missing"); diff --git a/test/build/devtool/array/source-map-array.test.js b/test/build/devtool/array/source-map-array.test.js index d7585ae20d5..c15d94c0b5f 100644 --- a/test/build/devtool/array/source-map-array.test.js +++ b/test/build/devtool/array/source-map-array.test.js @@ -5,7 +5,7 @@ const { run, readdir } = require('../../../utils/test-utils'); describe('source-map object', () => { it('should treat source-map settings right', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -25,7 +25,7 @@ describe('source-map object', () => { }); it('should override entire array on flag', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--devtool', 'source-map', '--output-path', './binary'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--devtool', 'source-map', '--output-path', './binary']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/devtool/object/source-map-object.test.js b/test/build/devtool/object/source-map-object.test.js index 9d8c79b9d54..33caeb866ee 100644 --- a/test/build/devtool/object/source-map-object.test.js +++ b/test/build/devtool/object/source-map-object.test.js @@ -23,7 +23,7 @@ describe('source-map object', () => { }); it('should write a sourcemap file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.source.config.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.source.config.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js b/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js index 124cae7a33c..ebf897aee24 100644 --- a/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js +++ b/test/build/entry/config-entry/entry-with-config/entry-with-config.test.js @@ -5,7 +5,7 @@ const { run } = require('../../../../utils/test-utils'); describe('default entry and config entry all exist', () => { it('should use config entry if config entry existed', async () => { - const { stdout, stderr, exitCode } = await run(__dirname, ['-c', '../1.js'], false); + const { stdout, stderr, exitCode } = await run(__dirname, ['-c', '../1.js']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js b/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js index c99baab22dd..685486c05be 100644 --- a/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js +++ b/test/build/entry/config-entry/entry-with-index/entry-with-config.test.js @@ -4,7 +4,7 @@ const { run } = require('../../../../utils/test-utils'); describe('default entry and config entry all exist', () => { it('should use config entry if config entry existed', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/merge/config-absent/merge-config-absent.test.js b/test/build/merge/config-absent/merge-config-absent.test.js index 2aa164ade24..f2ad6d92c7e 100644 --- a/test/build/merge/config-absent/merge-config-absent.test.js +++ b/test/build/merge/config-absent/merge-config-absent.test.js @@ -7,7 +7,7 @@ const { run } = require('../../../utils/test-utils'); describe('merge flag configuration', () => { it('Show warning message when the merge config is absent', async () => { // 2.js doesn't exist, let's try merging with it - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge']); expect(exitCode).toEqual(2); // Since the process will exit, nothing on stdout diff --git a/test/build/merge/config/merge-config.test.js b/test/build/merge/config/merge-config.test.js index 6b7f8e50f87..7583fbd6940 100644 --- a/test/build/merge/config/merge-config.test.js +++ b/test/build/merge/config/merge-config.test.js @@ -4,7 +4,7 @@ const { run } = require('../../../utils/test-utils'); describe('merge flag configuration', () => { it('merges two configurations together', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '--merge']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -27,7 +27,7 @@ describe('merge flag configuration', () => { }); it('merges two configurations together with flag alias', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '-m'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--config', './2.js', '-m']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -36,7 +36,7 @@ describe('merge flag configuration', () => { }); it('fails when there are less than 2 configurations to merge', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--merge'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--config', './1.js', '--merge']); expect(exitCode).toBe(2); expect(stderr).toContain('At least two configurations are required for merge.'); diff --git a/test/build/mode/mode-with-config/mode-with-config.test.js b/test/build/mode/mode-with-config/mode-with-config.test.js index f13ecc9af75..aa98f9cd9cc 100644 --- a/test/build/mode/mode-with-config/mode-with-config.test.js +++ b/test/build/mode/mode-with-config/mode-with-config.test.js @@ -31,7 +31,7 @@ describe('mode flags with config', () => { }); it('should use mode from flag over "process.env.NODE_ENV"', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none', '-c', 'webpack.config2.js'], false, [], { + const { exitCode, stderr, stdout } = await run(__dirname, ['--mode', 'none', '-c', 'webpack.config2.js'], [], { NODE_ENV: 'production', }); diff --git a/test/build/name/name.test.js b/test/build/name/name.test.js index 7ada2e24c26..e937735a610 100644 --- a/test/build/name/name.test.js +++ b/test/build/name/name.test.js @@ -3,7 +3,7 @@ const { run } = require('../../utils/test-utils'); describe('name flag', () => { it('should set the flag in the config', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--name', 'config-name'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--name', 'config-name']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/build/output/output-named-bundles.test.js b/test/build/output/output-named-bundles.test.js index 2c22e8492b1..23cafb259fd 100644 --- a/test/build/output/output-named-bundles.test.js +++ b/test/build/output/output-named-bundles.test.js @@ -41,7 +41,7 @@ describe('output flag named bundles', () => { }); it('should successfully compile multiple entries', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.multiple.config.js')], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['-c', resolve(__dirname, 'webpack.multiple.config.js')]); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -49,7 +49,7 @@ describe('output flag named bundles', () => { }); it('should output file in bin directory using default webpack config with warning for empty output value', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--output-path']); expect(exitCode).toEqual(2); expect(normalizeStderr(stderr)).toMatchSnapshot('stderr'); diff --git a/test/build/prefetch/prefetch.test.js b/test/build/prefetch/prefetch.test.js index efb749899fe..3f4547daa9a 100644 --- a/test/build/prefetch/prefetch.test.js +++ b/test/build/prefetch/prefetch.test.js @@ -11,7 +11,7 @@ describe('prefetch', () => { }); it('should load the prefetched file', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/p.js', '--mode', 'development'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/p.js', '--mode', 'development']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -23,7 +23,7 @@ describe('prefetch', () => { }); it('should log error when the prefetched file is absent', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/somefile.js'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch', './src/somefile.js']); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); @@ -32,7 +32,7 @@ describe('prefetch', () => { }); it('should log error when flag value is not supplied', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['--prefetch']); expect(exitCode).toBe(2); expect(stderr).toContain(`Error: Option '--prefetch ' argument missing`); diff --git a/test/build/zero-config/entry-absent/zero-config.test.js b/test/build/zero-config/entry-absent/zero-config.test.js index bec0f508022..8b3bf361318 100644 --- a/test/build/zero-config/entry-absent/zero-config.test.js +++ b/test/build/zero-config/entry-absent/zero-config.test.js @@ -4,7 +4,7 @@ const { run } = require('../../../utils/test-utils'); describe('Zero Config tests', () => { it('runs when config and entry are both absent', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(1); expect(stderr).toBeFalsy(); diff --git a/test/build/zero-config/entry-present/zero-config.test.js b/test/build/zero-config/entry-present/zero-config.test.js index 3457bfce3b5..4597d246009 100644 --- a/test/build/zero-config/entry-present/zero-config.test.js +++ b/test/build/zero-config/entry-present/zero-config.test.js @@ -2,7 +2,7 @@ const { run } = require('../../../utils/test-utils'); describe('Zero Config tests', () => { it('runs when no config is supplied but entry is present', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, [], false); + const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); diff --git a/test/info/info-output.test.js b/test/info/info-output.test.js index e720bd21446..5105f6c2d75 100644 --- a/test/info/info-output.test.js +++ b/test/info/info-output.test.js @@ -5,7 +5,7 @@ const { run } = require('../utils/test-utils'); describe('basic info usage', () => { it('gets info without flags', async () => { - const { exitCode, stdout, stderr } = await run(__dirname, ['info'], false); + const { exitCode, stdout, stderr } = await run(__dirname, ['info']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -16,7 +16,7 @@ describe('basic info usage', () => { }); it('gets more info in project root', async () => { - const { exitCode, stderr, stdout } = await run(join(__dirname, '../../'), ['info'], false); + const { exitCode, stderr, stdout } = await run(join(__dirname, '../../'), ['info']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -29,7 +29,7 @@ describe('basic info usage', () => { }); it('gets info as json', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output=json'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output=json']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -47,7 +47,7 @@ describe('basic info usage', () => { }); it('gets info as markdown', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'markdown'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'markdown']); expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); @@ -55,7 +55,7 @@ describe('basic info usage', () => { }); it('shows a warning if an invalid value is supplied', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'unknown'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--output', 'unknown']); expect(exitCode).toBe(2); expect(stderr).toContain(`'unknown' is not a valid value for output`); diff --git a/test/info/info-unknown.test.js b/test/info/info-unknown.test.js index e3be8a73e08..2599a8083f2 100644 --- a/test/info/info-unknown.test.js +++ b/test/info/info-unknown.test.js @@ -2,7 +2,7 @@ const { run } = require('../utils/test-utils'); describe('should handle unknown args', () => { it('shows an appropriate warning on supplying unknown args', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--unknown'], false); + const { exitCode, stderr, stdout } = await run(__dirname, ['info', '--unknown']); expect(exitCode).toBe(2); expect(stderr).toContain("Error: Unknown option '--unknown'"); diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 707ae7a7f8d..e41af9401eb 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -49,7 +49,7 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './my-loader/examples/simple/'); - ({ stdout } = await run(path, [], false)); + ({ stdout } = await run(path, [])); expect(stdout).toContain('my-loader'); }); @@ -79,7 +79,7 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(__dirname, './test-loader/examples/simple/'); - ({ stdout } = await run(path, [], false)); + ({ stdout } = await run(path, [])); expect(stdout).toContain('test-loader'); }); @@ -109,7 +109,7 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); - ({ stdout } = await run(path, [], false)); + ({ stdout } = await run(path, [])); expect(stdout).toContain('test-loader'); }); @@ -140,7 +140,7 @@ describe('loader command', () => { // Check if the the generated loader works successfully const path = resolve(customLoaderPath, './examples/simple/'); - ({ stdout } = await run(path, [], false)); + ({ stdout } = await run(path, [])); expect(stdout).toContain('test-loader'); }); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 1ba9e02f150..2373fb5d91f 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -44,7 +44,7 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(__dirname, ['--config', './my-webpack-plugin/examples/simple/webpack.config.js'], false); + const { stdout: stdout2 } = await run(__dirname, ['--config', './my-webpack-plugin/examples/simple/webpack.config.js']); expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); @@ -71,7 +71,7 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(__dirname, ['--config', './test-plugin/examples/simple/webpack.config.js'], false); + const { stdout: stdout2 } = await run(__dirname, ['--config', './test-plugin/examples/simple/webpack.config.js']); expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); @@ -98,7 +98,7 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false); + const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js']); expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); @@ -130,7 +130,7 @@ describe('plugin command', () => { }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js'], false); + const { stdout: stdout2 } = await run(customPluginPath, ['--config', './examples/simple/webpack.config.js']); expect(normalizeStdout(stdout2)).toContain('Hello World!'); }); diff --git a/test/utils/test-utils.test.js b/test/utils/test-utils.test.js index 2055f246242..5f16439d554 100644 --- a/test/utils/test-utils.test.js +++ b/test/utils/test-utils.test.js @@ -16,7 +16,7 @@ describe('run function', () => { }); it('executes cli with passed commands and params', async () => { - const { stdout, stderr, command } = await run(__dirname, ['info', '--output', 'markdown'], false); + const { stdout, stderr, command } = await run(__dirname, ['info', '--output', 'markdown']); // execution command contains info command expect(command).toContain('info'); @@ -30,7 +30,7 @@ describe('run function', () => { }); it('uses default output when output param is false', async () => { - const { stdout, stderr, command } = await run(__dirname, [], false); + const { stdout, stderr, command } = await run(__dirname, []); // execution command contains info command expect(command).not.toContain('--output-path'); From a91df4f369fcbc7e6db25152efd9f07fbca3d97b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 May 2021 15:43:33 +0300 Subject: [PATCH 098/103] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2689) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.0 to 4.22.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.1/packages/eslint-plugin) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 58 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index aa266a6e40c..9ba2a07d678 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1943,12 +1943,12 @@ rxjs "^6.4.0" "@typescript-eslint/eslint-plugin@^4.14.1": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz#3d5f29bb59e61a9dba1513d491b059e536e16dbc" - integrity sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA== + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.1.tgz#6bcdbaa4548553ab861b4e5f34936ead1349a543" + integrity sha512-kVTAghWDDhsvQ602tHBc6WmQkdaYbkcTwZu+7l24jtJiYvm9l+/y/b2BZANEezxPDiX5MK2ZecE+9BFi/YJryw== dependencies: - "@typescript-eslint/experimental-utils" "4.22.0" - "@typescript-eslint/scope-manager" "4.22.0" + "@typescript-eslint/experimental-utils" "4.22.1" + "@typescript-eslint/scope-manager" "4.22.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -1956,15 +1956,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz#68765167cca531178e7b650a53456e6e0bef3b1f" - integrity sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg== +"@typescript-eslint/experimental-utils@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.1.tgz#3938a5c89b27dc9a39b5de63a62ab1623ab27497" + integrity sha512-svYlHecSMCQGDO2qN1v477ax/IDQwWhc7PRBiwAdAMJE7GXk5stF4Z9R/8wbRkuX/5e9dHqbIWxjeOjckK3wLQ== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.22.0" - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/typescript-estree" "4.22.0" + "@typescript-eslint/scope-manager" "4.22.1" + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/typescript-estree" "4.22.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1986,11 +1986,24 @@ "@typescript-eslint/types" "4.22.0" "@typescript-eslint/visitor-keys" "4.22.0" +"@typescript-eslint/scope-manager@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz#5bb357f94f9cd8b94e6be43dd637eb73b8f355b4" + integrity sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g== + dependencies: + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/visitor-keys" "4.22.1" + "@typescript-eslint/types@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== +"@typescript-eslint/types@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.1.tgz#bf99c6cec0b4a23d53a61894816927f2adad856a" + integrity sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw== + "@typescript-eslint/typescript-estree@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" @@ -2004,6 +2017,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz#dca379eead8cdfd4edc04805e83af6d148c164f9" + integrity sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A== + dependencies: + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/visitor-keys" "4.22.1" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" @@ -2012,6 +2038,14 @@ "@typescript-eslint/types" "4.22.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz#6045ae25a11662c671f90b3a403d682dfca0b7a6" + integrity sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ== + dependencies: + "@typescript-eslint/types" "4.22.1" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" From 73cd5739f86f1be7c5dd52ea45529d8734589cb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 May 2021 15:46:57 +0300 Subject: [PATCH 099/103] chore(deps-dev): bump @typescript-eslint/parser Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.22.0 to 4.22.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.1/packages/parser) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9ba2a07d678..e6eb9393dfc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1969,13 +1969,13 @@ eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.14.1": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.0.tgz#e1637327fcf796c641fe55f73530e90b16ac8fe8" - integrity sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q== + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.1.tgz#a95bda0fd01d994a15fc3e99dc984294f25c19cc" + integrity sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw== dependencies: - "@typescript-eslint/scope-manager" "4.22.0" - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/typescript-estree" "4.22.0" + "@typescript-eslint/scope-manager" "4.22.1" + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/typescript-estree" "4.22.1" debug "^4.1.1" "@typescript-eslint/scope-manager@4.22.0": From a8475f17609374444f79c883e4ff53d9581f1499 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 May 2021 15:47:11 +0300 Subject: [PATCH 100/103] chore(deps-dev): bump @types/node Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.43 to 14.14.44. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index e6eb9393dfc..a6f91525df9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1854,9 +1854,9 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@^14.14.40": - version "14.14.43" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" - integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + version "14.14.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" + integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== "@types/normalize-package-data@^2.4.0": version "2.4.0" From dc0481becfde5553fa95a393d1167539b2e14ec2 Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 5 May 2021 18:31:41 +0530 Subject: [PATCH 101/103] fix: send warning regarding invalid template to stderr (#2687) --- packages/generators/src/init-generator.ts | 2 +- test/init/init.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/generators/src/init-generator.ts b/packages/generators/src/init-generator.ts index 3466e77ea18..2032b95f353 100644 --- a/packages/generators/src/init-generator.ts +++ b/packages/generators/src/init-generator.ts @@ -58,7 +58,7 @@ export default class InitGenerator extends CustomGenerator { } if (!this.supportedTemplates.includes(this.template)) { - this.utils.logger.log(`${yellow(`⚠ ${this.template} is not a valid template, please select one from below`)}`); + this.utils.logger.warn(`⚠ ${this.template} is not a valid template, please select one from below`); const { selectedTemplate } = await Question.List( this, diff --git a/test/init/init.test.js b/test/init/init.test.js index 05b6c8bc350..14840bc5b5b 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -112,7 +112,7 @@ describe('init command', () => { const { stdout, stderr } = await runPromptWithAnswers(assetsPath, ['init', '--force', '--template=apple'], [`${ENTER}`]); expect(stdout).toContain('Project has been initialised with webpack!'); - expect(stdout).toContain('apple is not a valid template, please select one from below'); + expect(stderr).toContain('apple is not a valid template, please select one from below'); expect(stderr).toContain('webpack.config.js'); // Test files From ea4c1596efae4ebb1be95f301cee6328842c01f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 May 2021 14:39:06 +0300 Subject: [PATCH 102/103] chore(deps-dev): bump ts-jest from 26.5.5 to 26.5.6 (#2692) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.5 to 26.5.6. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.5...v26.5.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6f91525df9..1c999725484 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1978,14 +1978,6 @@ "@typescript-eslint/typescript-estree" "4.22.1" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz#ed411545e61161a8d702e703a4b7d96ec065b09a" - integrity sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q== - dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" - "@typescript-eslint/scope-manager@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz#5bb357f94f9cd8b94e6be43dd637eb73b8f355b4" @@ -1994,29 +1986,11 @@ "@typescript-eslint/types" "4.22.1" "@typescript-eslint/visitor-keys" "4.22.1" -"@typescript-eslint/types@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" - integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== - "@typescript-eslint/types@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.1.tgz#bf99c6cec0b4a23d53a61894816927f2adad856a" integrity sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw== -"@typescript-eslint/typescript-estree@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" - integrity sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg== - dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz#dca379eead8cdfd4edc04805e83af6d148c164f9" @@ -2030,14 +2004,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" - integrity sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw== - dependencies: - "@typescript-eslint/types" "4.22.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz#6045ae25a11662c671f90b3a403d682dfca0b7a6" @@ -10352,9 +10318,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.5: - version "26.5.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" - integrity sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg== + version "26.5.6" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.6.tgz#c32e0746425274e1dfe333f43cd3c800e014ec35" + integrity sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA== dependencies: bs-logger "0.x" buffer-from "1.x" From 4edf3acf1541344f71cf7da7c3c654347f19aea7 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Thu, 6 May 2021 16:08:55 +0300 Subject: [PATCH 103/103] chore(release): publish new version - @webpack-cli/configtest@1.0.3 - @webpack-cli/generators@2.1.0 - @webpack-cli/info@1.2.4 - @webpack-cli/serve@1.4.0 - webpack-cli@4.7.0 --- packages/configtest/CHANGELOG.md | 4 ++++ packages/configtest/package.json | 2 +- packages/generators/CHANGELOG.md | 23 +++++++++++++++++++++++ packages/generators/package.json | 2 +- packages/info/CHANGELOG.md | 4 ++++ packages/info/package.json | 2 +- packages/serve/CHANGELOG.md | 11 +++++++++++ packages/serve/package.json | 2 +- packages/webpack-cli/CHANGELOG.md | 15 +++++++++++++++ packages/webpack-cli/package.json | 8 ++++---- 10 files changed, 65 insertions(+), 8 deletions(-) diff --git a/packages/configtest/CHANGELOG.md b/packages/configtest/CHANGELOG.md index e46d057e784..16433bac9f4 100644 --- a/packages/configtest/CHANGELOG.md +++ b/packages/configtest/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.3](https://github.com/webpack/webpack-cli/compare/@webpack-cli/configtest@1.0.2...@webpack-cli/configtest@1.0.3) (2021-05-06) + +**Note:** Version bump only for package @webpack-cli/configtest + ## [1.0.2](https://github.com/webpack/webpack-cli/compare/@webpack-cli/configtest@1.0.1...@webpack-cli/configtest@1.0.2) (2021-03-27) **Note:** Version bump only for package @webpack-cli/configtest diff --git a/packages/configtest/package.json b/packages/configtest/package.json index 6bf01763a01..c41b00c5b1a 100644 --- a/packages/configtest/package.json +++ b/packages/configtest/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/configtest", - "version": "1.0.2", + "version": "1.0.3", "description": "Validate a webpack configuration.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/generators/CHANGELOG.md b/packages/generators/CHANGELOG.md index 0bb5c22c7df..add4d89f9a6 100644 --- a/packages/generators/CHANGELOG.md +++ b/packages/generators/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.1.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/generators@2.0.0...@webpack-cli/generators@2.1.0) (2021-05-06) + +### Bug Fixes + +- add node env as prod in default template ([#2614](https://github.com/webpack/webpack-cli/issues/2614)) ([5ea478c](https://github.com/webpack/webpack-cli/commit/5ea478ca9e8fda691e37fdd6d0ad8d1df074e224)) +- broken URL in generated webpack.config.js ([#2600](https://github.com/webpack/webpack-cli/issues/2600)) ([6e207bc](https://github.com/webpack/webpack-cli/commit/6e207bc24886f7f8a87a19119924a682f66e575b)) +- comment typo in webpack.config.js template file ([#2639](https://github.com/webpack/webpack-cli/issues/2639)) ([d2ab57d](https://github.com/webpack/webpack-cli/commit/d2ab57d2268d8cc8df628f35d75774c88330a5f8)) +- correct webpack config for `babel-loader` and `ts-loader` ([#2577](https://github.com/webpack/webpack-cli/issues/2577)) ([177dca7](https://github.com/webpack/webpack-cli/commit/177dca7c20fff0708721426598fcd5a89384eb8e)) +- send warning regarding invalid template to stderr ([#2687](https://github.com/webpack/webpack-cli/issues/2687)) ([dc0481b](https://github.com/webpack/webpack-cli/commit/dc0481becfde5553fa95a393d1167539b2e14ec2)) +- update usage info ([#2594](https://github.com/webpack/webpack-cli/issues/2594)) ([9d07d67](https://github.com/webpack/webpack-cli/commit/9d07d67faf147cbaf0dddb95038403963e5f2afb)) +- **generators:** use correct exit code ([#2569](https://github.com/webpack/webpack-cli/issues/2569)) ([9a18e7f](https://github.com/webpack/webpack-cli/commit/9a18e7f6cdf8524ecee3cfaf09595983eebf35b9)) + +### Features + +- add --template flag for addon generator ([#2576](https://github.com/webpack/webpack-cli/issues/2576)) ([c8f702a](https://github.com/webpack/webpack-cli/commit/c8f702ac399252b8e5da899e6014a2832321caa3)) +- add `create` and `new` alias for `init` ([#2616](https://github.com/webpack/webpack-cli/issues/2616)) ([5a9789d](https://github.com/webpack/webpack-cli/commit/5a9789db237b7696adfdc9826b0dda749fedfa9a)) +- add support for mini-css-extract-plugin on demand ([#2571](https://github.com/webpack/webpack-cli/issues/2571)) ([ed201c0](https://github.com/webpack/webpack-cli/commit/ed201c0744d08dc376a234ddafe32f6b5fe60082)) +- add support for mode specific config ([#2585](https://github.com/webpack/webpack-cli/issues/2585)) ([993a7f0](https://github.com/webpack/webpack-cli/commit/993a7f02ec1546a7aca1ee537366faa8ac18de84)) +- added support arguments description ([#2659](https://github.com/webpack/webpack-cli/issues/2659)) ([4dfd166](https://github.com/webpack/webpack-cli/commit/4dfd166f757ce94130bf9b7580f2dbe2868b8f4f)) +- allow setup extract plugin ([#2644](https://github.com/webpack/webpack-cli/issues/2644)) ([71bfaa8](https://github.com/webpack/webpack-cli/commit/71bfaa8ef5e9de4d4f0cbee4ba7e57a5b1b69d90)) +- make extention case insensitive ([#2572](https://github.com/webpack/webpack-cli/issues/2572)) ([67eeaaf](https://github.com/webpack/webpack-cli/commit/67eeaaf66ed5b6b3b705c2b595e3923f2cb725e6)) +- prettify generated config ([#2640](https://github.com/webpack/webpack-cli/issues/2640)) ([c3c069e](https://github.com/webpack/webpack-cli/commit/c3c069e1cc7958a6f7b5d4cdb74acb12bc25d8c7)) + # [2.0.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/generators@1.3.1...@webpack-cli/generators@2.0.0) (2021-03-27) ### BREAKING CHANGES diff --git a/packages/generators/package.json b/packages/generators/package.json index a9665dc2e5d..a822470d4e9 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/generators", - "version": "2.0.0", + "version": "2.1.0", "description": "Webpack-CLI generators", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/info/CHANGELOG.md b/packages/info/CHANGELOG.md index a3d8b7fbc13..07c03504a95 100644 --- a/packages/info/CHANGELOG.md +++ b/packages/info/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.4](https://github.com/webpack/webpack-cli/compare/@webpack-cli/info@1.2.3...@webpack-cli/info@1.2.4) (2021-05-06) + +**Note:** Version bump only for package @webpack-cli/info + ## [1.2.3](https://github.com/webpack/webpack-cli/compare/@webpack-cli/info@1.2.2...@webpack-cli/info@1.2.3) (2021-03-27) ### Bug Fixes diff --git a/packages/info/package.json b/packages/info/package.json index ddcb4ec7691..0fdbae5baef 100644 --- a/packages/info/package.json +++ b/packages/info/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/info", - "version": "1.2.3", + "version": "1.2.4", "description": "Outputs info about system and webpack config", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/serve/CHANGELOG.md b/packages/serve/CHANGELOG.md index 021d00bc6b8..7fc1065c03a 100644 --- a/packages/serve/CHANGELOG.md +++ b/packages/serve/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.4.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.3.1...@webpack-cli/serve@1.4.0) (2021-05-06) + +### Bug Fixes + +- avoid unnecessary searching port ([#2648](https://github.com/webpack/webpack-cli/issues/2648)) ([5063ed7](https://github.com/webpack/webpack-cli/commit/5063ed7970cd12fd042308edfccca8dbf249f0fc)) +- **serve:** do not set port client port directly ([#2624](https://github.com/webpack/webpack-cli/issues/2624)) ([ec18b8e](https://github.com/webpack/webpack-cli/commit/ec18b8e478ff1a5f8d85bbddc599001dfd69eba3)) + +### Features + +- add `server` alias for `serve` command ([#2631](https://github.com/webpack/webpack-cli/issues/2631)) ([c9ee947](https://github.com/webpack/webpack-cli/commit/c9ee947618c06447bc1f949e4d401e63f737f38d)) + ## [1.3.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.3.0...@webpack-cli/serve@1.3.1) (2021-03-27) **Note:** Version bump only for package @webpack-cli/serve diff --git a/packages/serve/package.json b/packages/serve/package.json index 58abc421623..a792278f363 100644 --- a/packages/serve/package.json +++ b/packages/serve/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/serve", - "version": "1.3.1", + "version": "1.4.0", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/webpack-cli/CHANGELOG.md b/packages/webpack-cli/CHANGELOG.md index f28f8c0b247..a846be43228 100644 --- a/packages/webpack-cli/CHANGELOG.md +++ b/packages/webpack-cli/CHANGELOG.md @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.7.0](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.6.0...webpack-cli@4.7.0) (2021-05-06) + +### Bug Fixes + +- parsing of empty `--env` flags ([#2643](https://github.com/webpack/webpack-cli/issues/2643)) ([bc12f1a](https://github.com/webpack/webpack-cli/commit/bc12f1a2a833f09a0585050a0f5dd854da188f1d)) +- update usage info ([#2594](https://github.com/webpack/webpack-cli/issues/2594)) ([9d07d67](https://github.com/webpack/webpack-cli/commit/9d07d67faf147cbaf0dddb95038403963e5f2afb)) + +### Features + +- add `create` and `new` alias for `init` ([#2616](https://github.com/webpack/webpack-cli/issues/2616)) ([5a9789d](https://github.com/webpack/webpack-cli/commit/5a9789db237b7696adfdc9826b0dda749fedfa9a)) +- add `server` alias for `serve` command ([#2631](https://github.com/webpack/webpack-cli/issues/2631)) ([c9ee947](https://github.com/webpack/webpack-cli/commit/c9ee947618c06447bc1f949e4d401e63f737f38d)) +- add flag to force start finish log ([#2566](https://github.com/webpack/webpack-cli/issues/2566)) ([281aad3](https://github.com/webpack/webpack-cli/commit/281aad3ee4961f1643453eb1a926e88e0b7f019c)) +- added `--no-devtool` to webpack v4([#2603](https://github.com/webpack/webpack-cli/issues/2603)) ([7c6f390](https://github.com/webpack/webpack-cli/commit/7c6f390a1d64d562065ffc31d8b23d833813ee9d)) +- added support arguments description ([#2659](https://github.com/webpack/webpack-cli/issues/2659)) ([4dfd166](https://github.com/webpack/webpack-cli/commit/4dfd166f757ce94130bf9b7580f2dbe2868b8f4f)) + # [4.6.0](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.5.0...webpack-cli@4.6.0) (2021-03-27) ### Bug Fixes diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index ead8b78d314..2707920aed6 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "4.6.0", + "version": "4.7.0", "description": "CLI for webpack & friends", "license": "MIT", "repository": { @@ -30,9 +30,9 @@ ], "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.0.2", - "@webpack-cli/info": "^1.2.3", - "@webpack-cli/serve": "^1.3.1", + "@webpack-cli/configtest": "^1.0.3", + "@webpack-cli/info": "^1.2.4", + "@webpack-cli/serve": "^1.4.0", "colorette": "^1.2.1", "commander": "^7.0.0", "execa": "^5.0.0",