diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ddeb6e45a76..9babe882e1e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 - name: Using Node v${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} @@ -67,20 +67,10 @@ jobs: fetch-depth: 0 - name: Using Node v${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - - name: Restore lerna cache - id: cache - uses: actions/cache@v2 - with: - path: | - node_modules - */*/node_modules - key: c-${{ runner.os }}-${{ matrix.webpack-version }}-yarn-${{ hashFiles('**/yarn.lock', './yarn.lock') }} - restore-keys: | - c-${{ runner.os }}-${{ matrix.webpack-version }}-yarn- + cache: "yarn" - name: Install dependencies run: yarn @@ -103,7 +93,7 @@ jobs: yarn test:coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v2 commitlint: name: Lint Commit Messages @@ -113,7 +103,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: node-version: "12.x" @@ -123,4 +113,4 @@ jobs: # $GITHUB_WORKSPACE is the path to your repository run: echo "NODE_PATH=$GITHUB_WORKSPACE/node_modules" >> $GITHUB_ENV - - uses: wagoid/commitlint-github-action@v2 + - uses: wagoid/commitlint-github-action@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 15148a6e885..b97bc7e1135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.7.2](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.1...webpack-cli@4.7.2) (2021-06-07) + +**Note:** Version bump only for package webpack-cli (due `@webpack-cli/serve`) + ## [4.7.1](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.0...webpack-cli@4.7.1) (2021-06-07) ### Bug Fixes diff --git a/OPTIONS.md b/OPTIONS.md index f0c25ad650d..01e7f8baa56 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -27,13 +27,16 @@ Options: --no-cache-allow-collecting-memory Negative 'cache-allow-collecting-memory' option. --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-compression Compression type used for the cache files. + --no-cache-compression Negative 'cache-compression' option. --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'). - --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen (only for store: 'pack'). + --cache-idle-timeout Time in ms after which idle period the cache storing should happen. + --cache-idle-timeout-after-large-changes Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time). + --cache-idle-timeout-for-initial-store Time in ms after which idle period the initial cache storing should happen. --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-immutable-paths-reset Clear all items provided in 'cache.immutablePaths' 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-managed-paths-reset Clear all items provided in 'cache.managedPaths' 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. @@ -43,15 +46,24 @@ Options: --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. + --dependencies-reset Clear all items provided in 'dependencies' 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. + --entry-reset Clear all items provided in 'entry' 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-build-http Build http(s): urls using a lockfile and resource content cache. + --no-experiments-build-http Negative 'experiments-build-http' option. + --experiments-build-http-cache-location Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false. + --no-experiments-build-http-cache-location Negative 'experiments-build-http-cache-location' option. + --experiments-build-http-frozen When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error. + --no-experiments-build-http-frozen Negative 'experiments-build-http-frozen' option. + --experiments-build-http-lockfile-location Location of the lockfile. + --experiments-build-http-upgrade When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed. + --no-experiments-build-http-upgrade Negative 'experiments-build-http-upgrade' option. --experiments-execute-module Enable build-time execution of modules from the module graph for plugins and loaders. --no-experiments-execute-module Negative 'experiments-execute-module' option. --experiments-layers Enable module and chunk layers. @@ -71,7 +83,7 @@ Options: --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-reset Clear all items provided in 'externals' 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. @@ -93,14 +105,14 @@ Options: --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. + --ignore-warnings-reset Clear all items provided in 'ignoreWarnings' 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. + --infrastructure-logging-debug-reset Clear all items provided in 'infrastructureLogging.debug' 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. @@ -125,7 +137,7 @@ Options: --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-no-parse-reset Clear all items provided in 'module.noParse' 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. @@ -177,7 +189,7 @@ Options: --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-worker-reset Clear all items provided in 'module.parser.javascript.worker' 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. @@ -233,7 +245,7 @@ Options: --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-worker-reset Clear all items provided in 'module.parser.javascript/auto.worker' 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. @@ -289,7 +301,7 @@ Options: --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-worker-reset Clear all items provided in 'module.parser.javascript/dynamic.worker' 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. @@ -345,7 +357,7 @@ Options: --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-worker-reset Clear all items provided in 'module.parser.javascript/esm.worker' 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. @@ -387,7 +399,7 @@ Options: --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-rules-reset Clear all items provided in 'module.rules' 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'. @@ -457,7 +469,7 @@ Options: --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-default-size-types-reset Clear all items provided in 'optimization.splitChunks.defaultSizeTypes' 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. @@ -485,10 +497,10 @@ Options: --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). + --output-chunk-format The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), 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). + --output-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), '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. @@ -503,12 +515,12 @@ Options: --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-chunk-loading-types The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), '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 'output.enabledChunkLoadingTypes' 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-library-types-reset Clear all items provided in 'output.enabledLibraryTypes' 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-enabled-wasm-loading-types-reset Clear all items provided in 'output.enabledWasmLoadingTypes' 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). @@ -537,24 +549,24 @@ Options: --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-reset Clear all items provided in 'output.library' 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-root-reset Clear all items provided in 'output.library.root' 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-export-reset Clear all items provided in 'output.library.export' 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-reset Clear all items provided in 'output.library.name' 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-name-root-reset Clear all items provided in 'output.library.name.root' 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. @@ -578,7 +590,7 @@ Options: --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). + --output-worker-chunk-loading The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), '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. @@ -601,47 +613,47 @@ Options: --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-reset Clear all items provided in 'resolve.alias' 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-alias-fields-reset Clear all items provided in 'resolve.aliasFields' 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-condition-names-reset Clear all items provided in 'resolve.conditionNames' 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-description-files-reset Clear all items provided in 'resolve.descriptionFiles' 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-exports-fields-reset Clear all items provided in 'resolve.exportsFields' 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-extensions-reset Clear all items provided in 'resolve.extensions' 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-fallback-reset Clear all items provided in 'resolve.fallback' 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-imports-fields-reset Clear all items provided in 'resolve.importsFields' 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-fields-reset Clear all items provided in 'resolve.mainFields' 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-main-files-reset Clear all items provided in 'resolve.mainFiles' 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-modules-reset Clear all items provided in 'resolve.modules' 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-restrictions-reset Clear all items provided in 'resolve.restrictions' 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-roots-reset Clear all items provided in 'resolve.roots' 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). @@ -653,47 +665,47 @@ Options: --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-reset Clear all items provided in 'resolveLoader.alias' 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-alias-fields-reset Clear all items provided in 'resolveLoader.aliasFields' 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-condition-names-reset Clear all items provided in 'resolveLoader.conditionNames' 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-description-files-reset Clear all items provided in 'resolveLoader.descriptionFiles' 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-exports-fields-reset Clear all items provided in 'resolveLoader.exportsFields' 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-extensions-reset Clear all items provided in 'resolveLoader.extensions' 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-fallback-reset Clear all items provided in 'resolveLoader.fallback' 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-imports-fields-reset Clear all items provided in 'resolveLoader.importsFields' 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-fields-reset Clear all items provided in 'resolveLoader.mainFields' 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-main-files-reset Clear all items provided in 'resolveLoader.mainFiles' 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-modules-reset Clear all items provided in 'resolveLoader.modules' 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-restrictions-reset Clear all items provided in 'resolveLoader.restrictions' 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-roots-reset Clear all items provided in 'resolveLoader.roots' 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). @@ -705,9 +717,9 @@ Options: --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-immutable-paths-reset Clear all items provided in 'snapshot.immutablePaths' 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-managed-paths-reset Clear all items provided in 'snapshot.managedPaths' 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. @@ -781,10 +793,10 @@ Options: --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-assets-reset Clear all items provided in 'stats.excludeAssets' 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-exclude-modules-reset Clear all items provided in 'stats.excludeModules' 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). @@ -807,6 +819,8 @@ Options: --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-group-reasons-by-origin Group reasons by their origin module. + --no-stats-group-reasons-by-origin Negative 'stats-group-reasons-by-origin' option. --stats-hash Add the hash of the compilation. --no-stats-hash Negative 'stats-hash' option. --stats-ids Add ids. @@ -815,7 +829,7 @@ Options: --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-debug-reset Clear all items provided in 'stats.loggingDebug' 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. @@ -845,6 +859,7 @@ Options: --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-reasons-space Space to display reasons (groups will be collapsed to fit this space). --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). @@ -864,17 +879,17 @@ Options: --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. + --stats-warnings-filter-reset Clear all items provided in 'stats.warningsFilter' 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. + --target-reset Clear all items provided in 'target' 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-ignored-reset Clear all items provided in 'watchOptions.ignored' 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. diff --git a/README.md b/README.md index 92506eccba1..3bf5bf3819c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ ## About -webpack CLI provides a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file, but often developers want to create a more custom webpack configuration based on their use-cases and needs. webpack CLI addresses these needs by providing a set of tools to improve the setup of custom webpack configuration. +webpack CLI provides the interface of options webpack uses in its configuration file. The CLI options override options passed in the configuration file. + +The CLI provides a rich set of commands that helps you develop your application faster. ### How to install @@ -47,7 +49,7 @@ Get to know what are the available commands and arguments [here](./packages/webp ## Packages -We organize webpack CLI as a multi-package repository using [lerna](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` folder. Here's a summary of commands provided by the CLI. +We organize webpack CLI as a multi-package repository using [lerna](https://github.com/lerna/lerna). The main CLI logic resides in `packages/webpack-cli`, while commands supported by the CLI, has dedicated subfolders in the folder `packages`. A summary of supported commands is described below. ### Commands @@ -57,7 +59,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|create|new|c|n [generation-path] [options]`](./INIT.md#webpack-cli-init) - Create a new webpack project. +- [`init|create|new|c|n [generation-path] [options]`](./packages/generators/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. @@ -68,20 +70,22 @@ Thus, webpack CLI provides different commands for many common tasks. ### Utilities -The project also has several utility packages which are used by other commands +The project has several utility packages which are used by other commands - [`generators`](./packages/generators/README.md) - Contains all webpack-cli related yeoman generators. ## Getting started -When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If you want to use the `init` command to create a new `webpack.config.js` configuration file: +When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack, then webpack CLI is already installed! + +Otherwise, you would need to install webpack CLI and the packages you want to use. If you want to use the `init` command to create a new configuration file: ```sh npm i webpack-cli @webpack-cli/init 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. +You will be prompted for some questions about which features you want to use, such as `scss`, PWA support or multiple entry-points. ## Exit codes and their meanings @@ -93,7 +97,7 @@ You will be prompted for some questions about what how you want to generate your ## Contributing and Internal Documentation -The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](./.github/CONTRIBUTING.md). +The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [contribution documentation](./.github/CONTRIBUTING.md). ## Open Collective @@ -111,3 +115,7 @@ If you like **webpack**, please consider donating to our [Open Collective](https [size-url]: https://packagephobia.com/result?p=webpack-cli [chat]: https://badges.gitter.im/webpack/webpack.svg [chat-url]: https://gitter.im/webpack/webpack + +## Code of Conduct + +Guidelines to how the webpack organization expects you to behave is documented under [Code of Conduct](./CODE_OF_CONDUCT.md) diff --git a/SECURITY.md b/SECURITY.md index 9f3479c7a72..8722a8127b0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -18,4 +18,4 @@ webpack CLI is currently supporting webpack v4 and webpack v5. Security fixes ar ## Reporting a Vulnerability -To report a vulnerability, please contact one of webpack maintainers through the email provided from either npm, GitHub or reach out at other social media platforms. For third party security vulnerabilities, submitting an issue or Pull Request to fix the security vulnerability is much appreciated. +To report a vulnerability, please contact one of webpack maintainers through the email provided from either npm, GitHub or reach out at other social media platforms. For third party security vulnerabilities, submitting an issue or Pull Request to fix the security vulnerability is much appreciated. We also use dependabot from GitHub to avoid vulnerabilities. diff --git a/SERVE-OPTIONS.md b/SERVE-OPTIONS-v3.md similarity index 100% rename from SERVE-OPTIONS.md rename to SERVE-OPTIONS-v3.md diff --git a/SERVE-OPTIONS-v4.md b/SERVE-OPTIONS-v4.md new file mode 100644 index 00000000000..25a04630988 --- /dev/null +++ b/SERVE-OPTIONS-v4.md @@ -0,0 +1,104 @@ +``` +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. + --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --bonjour Allows to broadcasts dev server via ZeroConf networking on start. + --no-bonjour Negative 'bonjour' option. + --no-client Negative 'client' option. + --client-logging Allows to specify options for client script in the browser or disable client script. + --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. + --no-client-overlay Negative 'client-overlay' option. + --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. + --no-client-overlay-errors Negative 'client-overlay-errors' option. + --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. + --no-client-overlay-warnings Negative 'client-overlay-warnings' option. + --client-progress Prints compilation progress in percentage in the browser. + --no-client-progress Negative 'client-progress' option. + --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. + --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). + --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. + --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. + --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. + --client-web-socket-url-port Tells clients connected to devServer to use the provided port. + --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. + --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. + --compress Enables gzip compression for everything served. + --no-compress Negative 'compress' option. + --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. + --no-history-api-fallback Negative 'history-api-fallback' option. + --host Allows to specify a hostname to use. + --hot [value] Enables Hot Module Replacement. + --no-hot Negative 'hot' option. + --http2 Allows to serve over HTTP/2 using SPDY. + --no-http2 Negative 'http2' option. + --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + --no-https Negative 'https' option. + --https-passphrase Passphrase for a pfx file. + --https-request-cert Request for an SSL certificate. + --no-https-request-cert Negative 'https-request-cert' option. + --https-cacert Path to an SSL CA certificate. + --https-key Path to an SSL key. + --https-pfx Path to an SSL pfx file. + --https-cert Path to an SSL certificate. + --ipc [value] Listen to a unix socket. + --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). + --no-live-reload Negative 'live-reload' option. + --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + --no-open Negative 'open' option. + --open-target Opens specified page in browser. + --open-app-name Open specified browser. + --open-app Open specified browser. + --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. + --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. + --port Allows to specify a port to use. + --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). + --no-static Negative 'static' option. + --static-directory Directory for static contents. + --static-public-path The static files will be available in the browser under this public path. + --static-serve-index Tells dev server to use serveIndex middleware when enabled. + --no-static-serve-index Negative 'static-serve-index' option. + --static-watch Watches for files in static content directory. + --no-static-watch Negative 'static-watch' option. + --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). + --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. + --watch-files Allows to configure list of globs/directories/files to watch for file changes. + --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. + --web-socket-server Allows to set web socket server and options (by default 'ws'). + --no-web-socket-server Negative 'web-socket-server' option. + +Global options: + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. + +To see list of all supported commands and options 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/package.json b/package.json index 5e8c1131207..82347c0b686 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "ts-jest": "^27.0.2", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "webpack": "^5.38.1", + "webpack": "^5.45.1", "webpack-bundle-analyzer": "^4.3.0", "webpack-dev-server": "^3.11.2" } diff --git a/packages/generators/CHANGELOG.md b/packages/generators/CHANGELOG.md index f18f03f3850..7cd22479c6f 100644 --- a/packages/generators/CHANGELOG.md +++ b/packages/generators/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.3.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/generators@2.2.0...@webpack-cli/generators@2.3.0) (2021-08-15) + +### Features + +- add prompt to select a package manager of choice ([#2779](https://github.com/webpack/webpack-cli/issues/2779)) ([5bd0df4](https://github.com/webpack/webpack-cli/commit/5bd0df42dea72203f3042405d6ff35b4422df763)) +- **init-generator:** add ability to specify a package manager of choice ([#2769](https://github.com/webpack/webpack-cli/issues/2769)) ([e53f164](https://github.com/webpack/webpack-cli/commit/e53f1645c729c3bbcb27ffd41c999ed321f86f9d)) + # [2.2.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/generators@2.1.0...@webpack-cli/generators@2.2.0) (2021-06-07) ### Bug Fixes diff --git a/INIT.md b/packages/generators/INIT.md similarity index 100% rename from INIT.md rename to packages/generators/INIT.md diff --git a/packages/generators/package.json b/packages/generators/package.json index 0059d899379..4e0c6876b82 100644 --- a/packages/generators/package.json +++ b/packages/generators/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/generators", - "version": "2.2.0", + "version": "2.3.0", "description": "Webpack-CLI generators", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index 270cdffcbc4..02720b5dbed 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; import Generator from "yeoman-generator"; -import { List } from "./utils/scaffold-utils"; +import { getInstaller, getTemplate } from "./utils/helpers"; // Helper to get the template-directory content @@ -34,9 +34,10 @@ const addonGenerator = ( templateFn: (instance: any) => Record, ): Generator.GeneratorConstructor => { return class extends Generator { - public template: string; + public packageManager: string; public resolvedTemplatePath: string; public supportedTemplates: string[]; + public template: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any public utils: any; @@ -56,27 +57,12 @@ const addonGenerator = ( public copyTpl: (value: string, index: number, array: string[]) => void; 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.template = await getTemplate.call(this); this.resolvedTemplatePath = path.join(templateDir, this.template); - return this.prompt(prompts).then((props: Generator.Question): void => { - this.props = props; - }); + this.props = await this.prompt(prompts); + + this.packageManager = await getInstaller.call(this); } public default(): void { @@ -141,13 +127,12 @@ const addonGenerator = ( } public install(): void { - const packager = this.utils.getPackageManager(); const opts: { dev?: boolean; "save-dev"?: boolean; - } = packager === "yarn" ? { dev: true } : { "save-dev": true }; + } = this.packageManager === "yarn" ? { dev: true } : { "save-dev": true }; - this.scheduleInstallTask(packager, ["webpack-defaults", "bluebird"], opts); + this.scheduleInstallTask(this.packageManager, ["webpack-defaults", "bluebird"], opts); } }; }; diff --git a/packages/generators/src/init-generator.ts b/packages/generators/src/init-generator.ts index 1006e2aeb5a..8196e104884 100644 --- a/packages/generators/src/init-generator.ts +++ b/packages/generators/src/init-generator.ts @@ -1,13 +1,12 @@ import { blue, yellow } from "colorette"; +import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; import path from "path"; -import * as Question from "./utils/scaffold-utils"; import { CustomGenerator } from "./types"; -import { existsSync, mkdirSync } from "fs"; +import { getInstaller, getTemplate } from "./utils/helpers"; +import * as Question from "./utils/scaffold-utils"; import handlers from "./handlers"; -import { readFileSync, writeFileSync } from "fs"; - /** * * Generator for initializing a webpack config @@ -18,13 +17,14 @@ import { readFileSync, writeFileSync } from "fs"; * */ export default class InitGenerator extends CustomGenerator { - public template: string; + public answers: Record; + public configurationPath: string; + public force: boolean; public generationPath: string; + public packageManager: string; public resolvedGenerationPath: string; - public configurationPath: string; public supportedTemplates: string[]; - public answers: Record; - public force: boolean; + public template: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any public utils: any; @@ -61,22 +61,7 @@ export default class InitGenerator extends CustomGenerator { } } - 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 Question.List( - this, - "selectedTemplate", - "Select a valid template from below:", - this.supportedTemplates, - "default", - false, - ); - - this.template = selectedTemplate; - } + this.template = await getTemplate.call(this); await handlers[this.template].questions(this, Question); @@ -99,14 +84,15 @@ export default class InitGenerator extends CustomGenerator { } } - public installPlugins(): void { - const packager = this.utils.getPackageManager(); + public async installPlugins(): Promise { + this.packageManager = await getInstaller.call(this); + const opts: { dev?: boolean; "save-dev"?: boolean; - } = packager === "yarn" ? { dev: true } : { "save-dev": true }; + } = this.packageManager === "yarn" ? { dev: true } : { "save-dev": true }; - this.scheduleInstallTask(packager, this.dependencies, opts, { + this.scheduleInstallTask(this.packageManager, this.dependencies, opts, { cwd: this.generationPath, }); } diff --git a/packages/generators/src/utils/helpers.ts b/packages/generators/src/utils/helpers.ts index 1c6291d7877..98f59794015 100644 --- a/packages/generators/src/utils/helpers.ts +++ b/packages/generators/src/utils/helpers.ts @@ -1,3 +1,5 @@ +import { List } from "./scaffold-utils"; + const regex = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g; /** @@ -20,3 +22,44 @@ export function toUpperCamelCase(str: string): string { .map((x) => x.slice(0, 1).toUpperCase() + x.slice(1).toLowerCase()) .join(""); } + +export async function getInstaller(): Promise { + const installers = this.utils.getAvailableInstallers(); + + if (installers.length === 1) { + return installers[0]; + } + + // Prompt for the package manager of choice + const defaultPackager = this.utils.getPackageManager(); + const { packager } = await List( + this, + "packager", + "Pick a package manager:", + installers, + defaultPackager, + this.force, + ); + return packager; +} + +export async function getTemplate(): Promise { + if (this.supportedTemplates.includes(this.template)) { + return 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, + ); + + return selectedTemplate; +} diff --git a/packages/serve/CHANGELOG.md b/packages/serve/CHANGELOG.md index ef8bdab199a..5090464e3d4 100644 --- a/packages/serve/CHANGELOG.md +++ b/packages/serve/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.2](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.5.1...@webpack-cli/serve@1.5.2) (2021-08-15) + +### Bug Fixes + +- ci for dev server next ([#2841](https://github.com/webpack/webpack-cli/issues/2841)) ([54d34b7](https://github.com/webpack/webpack-cli/commit/54d34b723cbeaf8cc13cff45398530be1db911e4)) +- respect dev server CLI options for multi compiler mode ([de48278](https://github.com/webpack/webpack-cli/commit/de482784a4f8cbb9eacbbe1c6b6f3c62ef60567a)) +- using new dev server API for v4 ([#2886](https://github.com/webpack/webpack-cli/issues/2886)) ([f66d01f](https://github.com/webpack/webpack-cli/commit/f66d01f0e382b0b3ffc753ac7549eb252e19e26c)) + ## [1.5.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.5.0...@webpack-cli/serve@1.5.1) (2021-06-07) ### Bug Fixes diff --git a/packages/serve/README.md b/packages/serve/README.md index 5566baf0710..44757464e4e 100644 --- a/packages/serve/README.md +++ b/packages/serve/README.md @@ -24,7 +24,7 @@ npx webpack-cli serve ### Options -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. +Checkout [`SERVE-OPTIONS-v3.md`](https://github.com/webpack/webpack-cli/blob/master/SERVE-OPTIONS-v3.md) or [`SERVE-OPTIONS-v4.md`](https://github.com/webpack/webpack-cli/blob/master/SERVE-OPTIONS-v4.md) to see list of all available options for `serve` command for respective [`webpack-dev-server`](https://github.com/webpack/webpack-dev-server) version. [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 46186e5067e..db9e4b4e33a 100644 --- a/packages/serve/package.json +++ b/packages/serve/package.json @@ -1,6 +1,6 @@ { "name": "@webpack-cli/serve", - "version": "1.5.1", + "version": "1.5.2", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/serve/src/index.ts b/packages/serve/src/index.ts index d310cc4f01b..99aa17473c2 100644 --- a/packages/serve/src/index.ts +++ b/packages/serve/src/index.ts @@ -1,4 +1,4 @@ -import startDevServer from "./startDevServer"; +import { devServerOptionsType } from "./types"; class ServeCommand { // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any @@ -81,9 +81,9 @@ class ServeCommand { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - const webpackOptions: Record = {}; + const webpackCLIOptions: Record = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any - let devServerOptions: Record = {}; + const devServerCLIOptions: Record = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any const processors: Array<(opts: Record) => void> = []; @@ -98,7 +98,7 @@ class ServeCommand { ); if (isBuiltInOption) { - webpackOptions[optionName] = options[optionName]; + webpackCLIOptions[optionName] = options[optionName]; } else { const needToProcess = devServerFlags.find( (devServerOption) => @@ -109,42 +109,47 @@ class ServeCommand { processors.push(needToProcess.processor); } - devServerOptions[optionName] = options[optionName]; + devServerCLIOptions[optionName] = options[optionName]; } } for (const processor of processors) { - processor(devServerOptions); + processor(devServerCLIOptions); } if (entries.length > 0) { - webpackOptions.entry = [...entries, ...(webpackOptions.entry || [])]; + webpackCLIOptions.entry = [...entries, ...(webpackCLIOptions.entry || [])]; } - webpackOptions.argv = { + webpackCLIOptions.argv = { ...options, env: { WEBPACK_SERVE: true, ...options.env }, }; - const compiler = await cli.createCompiler(webpackOptions); + const compiler = await cli.createCompiler(webpackCLIOptions); if (!compiler) { return; } - let servers; + const servers = []; - if (cli.needWatchStdin(compiler) || devServerOptions.stdin) { + if (cli.needWatchStdin(compiler) || devServerCLIOptions.stdin) { // TODO remove in the next major release // Compatibility with old `stdin` option for `webpack-dev-server` // Should be removed for the next major release on both sides - if (devServerOptions.stdin) { - delete devServerOptions.stdin; + if (devServerCLIOptions.stdin) { + delete devServerCLIOptions.stdin; } process.stdin.on("end", () => { Promise.all( servers.map((server) => { + if (typeof server.stop === "function") { + return server.stop(); + } + + // TODO remove in the next major release return new Promise((resolve) => { server.close(() => { resolve(); @@ -159,74 +164,205 @@ class ServeCommand { } // eslint-disable-next-line @typescript-eslint/no-var-requires, node/no-extraneous-require - const devServer = require("webpack-dev-server"); - const isNewDevServerCLIAPI = typeof devServer.schema !== "undefined"; - - if (isNewDevServerCLIAPI) { - const args = devServerFlags.reduce((accumulator, flag) => { - accumulator[flag.name] = flag; - return accumulator; - }, {}); - const values = Object.keys(devServerOptions).reduce((accumulator, name) => { - const kebabName = cli.utils.toKebabCase(name); - if (args[kebabName]) { - accumulator[kebabName] = options[name]; + const DevServer = require("webpack-dev-server"); + const isNewDevServerCLIAPI = typeof DevServer.schema !== "undefined"; + + let devServerVersion; + + try { + // eslint-disable-next-line node/no-extraneous-require, @typescript-eslint/no-var-requires + devServerVersion = require("webpack-dev-server/package.json").version; + } catch (err) { + logger.error( + `You need to install 'webpack-dev-server' for running 'webpack serve'.\n${err}`, + ); + process.exit(2); + } + + const compilers = + typeof compiler.compilers !== "undefined" ? compiler.compilers : [compiler]; + const possibleCompilers = compilers.filter( + (compiler) => compiler.options.devServer, + ); + const compilersForDevServer = + possibleCompilers.length > 0 ? possibleCompilers : [compilers[0]]; + const isDevServer4 = devServerVersion.startsWith("4"); + const usedPorts = []; + + for (const compilerForDevServer of compilersForDevServer) { + let devServerOptions: devServerOptionsType; + + if (isNewDevServerCLIAPI) { + const args = devServerFlags.reduce((accumulator, flag) => { + accumulator[flag.name] = flag; + return accumulator; + }, {}); + const values = Object.keys(devServerCLIOptions).reduce( + (accumulator, name) => { + const kebabName = cli.utils.toKebabCase(name); + if (args[kebabName]) { + accumulator[kebabName] = options[name]; + } + return accumulator; + }, + {}, + ); + const result = { ...(compilerForDevServer.options.devServer || {}) }; + const problems = ( + webpack.cli && typeof webpack.cli.processArguments === "function" + ? webpack.cli + : DevServer.cli + ).processArguments(args, result, values); + + if (problems) { + const groupBy = (xs, key) => { + return xs.reduce((rv, x) => { + (rv[x[key]] = rv[x[key]] || []).push(x); + + return rv; + }, {}); + }; + + const problemsByPath = groupBy(problems, "path"); + + for (const path in problemsByPath) { + const problems = problemsByPath[path]; + problems.forEach((problem) => { + cli.logger.error( + `${cli.utils.capitalizeFirstLetter( + problem.type.replace(/-/g, " "), + )}${ + problem.value ? ` '${problem.value}'` : "" + } for the '--${problem.argument}' option${ + problem.index ? ` by index '${problem.index}'` : "" + }`, + ); + + if (problem.expected) { + cli.logger.error(`Expected: '${problem.expected}'`); + } + }); + } + + process.exit(2); } - return accumulator; - }, {}); - const result = Object.assign({}, compiler.options.devServer); - const problems = ( - webpack.cli && typeof webpack.cli.processArguments === "function" - ? webpack.cli - : devServer.cli - ).processArguments(args, result, values); - - if (problems) { - const groupBy = (xs, key) => { - return xs.reduce((rv, x) => { - (rv[x[key]] = rv[x[key]] || []).push(x); - - return rv; - }, {}); + + devServerOptions = result; + } else { + // TODO remove in the next major release + const mergeOptions = ( + devServerOptions: devServerOptionsType, + devServerCliOptions: devServerOptionsType, + ): devServerOptionsType => { + // CLI options should take precedence over devServer options, + // and CLI options should have no default values included + const options = { ...devServerOptions, ...devServerCliOptions }; + + if (devServerOptions.client && devServerCliOptions.client) { + // the user could set some client options in their devServer config, + // then also specify client options on the CLI + options.client = { + ...devServerOptions.client, + ...devServerCliOptions.client, + }; + } + + return options; }; - const problemsByPath = groupBy(problems, "path"); - - for (const path in problemsByPath) { - const problems = problemsByPath[path]; - problems.forEach((problem) => { - cli.logger.error( - `${cli.utils.capitalizeFirstLetter( - problem.type.replace(/-/g, " "), - )}${problem.value ? ` '${problem.value}'` : ""} for the '--${ - problem.argument - }' option${ - problem.index ? ` by index '${problem.index}'` : "" - }`, + devServerOptions = mergeOptions( + compilerForDevServer.options.devServer || {}, + devServerCLIOptions, + ); + } + + // TODO remove in the next major release + if (!isDevServer4) { + const getPublicPathOption = (): string => { + const normalizePublicPath = (publicPath): string => + typeof publicPath === "undefined" || publicPath === "auto" + ? "/" + : publicPath; + + if (options.outputPublicPath) { + return normalizePublicPath( + compilerForDevServer.options.output.publicPath, ); + } - if (problem.expected) { - cli.logger.error(`Expected: '${problem.expected}'`); - } - }); - } + if (devServerOptions.publicPath) { + return normalizePublicPath(devServerOptions.publicPath); + } - process.exit(2); + return normalizePublicPath( + compilerForDevServer.options.output.publicPath, + ); + }; + const getStatsOption = (): string | boolean => { + if (options.stats) { + return options.stats; + } + + if (devServerOptions.stats) { + return devServerOptions.stats; + } + + return compilerForDevServer.options.stats; + }; + + devServerOptions.host = devServerOptions.host || "localhost"; + devServerOptions.port = devServerOptions.port || 8080; + devServerOptions.stats = getStatsOption(); + devServerOptions.publicPath = getPublicPathOption(); } - devServerOptions = result; - } + if (devServerOptions.port) { + const portNumber = Number(devServerOptions.port); - try { - servers = await startDevServer(compiler, devServerOptions, options, logger); - } catch (error) { - if (cli.isValidationError(error)) { - logger.error(error.message); - } else { - logger.error(error); + if (usedPorts.find((port) => portNumber === port)) { + throw new 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.", + ); + } + + usedPorts.push(portNumber); } - process.exit(2); + try { + let server; + + // TODO: remove after dropping webpack-dev-server@v3 + if (isDevServer4) { + server = new DevServer(devServerOptions, compiler); + } else { + server = new DevServer(compiler, devServerOptions); + } + + if (typeof server.start === "function") { + await server.start(); + } else { + // TODO remove in the next major release + server.listen( + devServerOptions.port, + devServerOptions.host, + (error): void => { + if (error) { + throw error; + } + }, + ); + } + + servers.push(server); + } catch (error) { + if (cli.isValidationError(error)) { + logger.error(error.message); + } else { + logger.error(error); + } + + process.exit(2); + } } }, ); diff --git a/packages/serve/src/startDevServer.ts b/packages/serve/src/startDevServer.ts deleted file mode 100644 index 8795a299654..00000000000 --- a/packages/serve/src/startDevServer.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -/* eslint-disable @typescript-eslint/no-var-requires */ -import { devServerOptionsType } from "./types"; - -/** - * - * Starts the devServer - * - * @param {Object} compiler - a webpack compiler - * @param {Object} devServerCliOptions - dev server CLI options - * @param {Object} cliOptions - CLI options - * @param {Object} logger - logger - * - * @returns {Object[]} array of resulting servers - */ - -export default async function startDevServer( - compiler: any, - devServerCliOptions: any, - cliOptions: any, - logger: any, -): Promise[]> { - 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"); - } catch (err) { - logger.error( - `You need to install 'webpack-dev-server' for running 'webpack serve'.\n${err}`, - ); - process.exit(2); - } - - const mergeOptions = ( - devServerOptions: devServerOptionsType, - devServerCliOptions: devServerOptionsType, - ): devServerOptionsType => { - // CLI options should take precedence over devServer options, - // and CLI options should have no default values included - const options = { ...devServerOptions, ...devServerCliOptions }; - - if (devServerOptions.client && devServerCliOptions.client) { - // the user could set some client options in their devServer config, - // then also specify client options on the CLI - options.client = { - ...devServerOptions.client, - ...devServerCliOptions.client, - }; - } - - return options; - }; - - const isMultiCompiler = Boolean(compiler.compilers); - - let compilersWithDevServerOption; - - if (isMultiCompiler) { - compilersWithDevServerOption = compiler.compilers.filter( - (compiler) => compiler.options.devServer, - ); - - // No compilers found with the `devServer` option, let's use first compiler - if (compilersWithDevServerOption.length === 0) { - compilersWithDevServerOption = [compiler.compilers[0]]; - } - } else { - compilersWithDevServerOption = [compiler]; - } - - const isDevServer4 = devServerVersion.startsWith("4"); - const usedPorts = []; - const devServersOptions = []; - - for (const compilerWithDevServerOption of compilersWithDevServerOption) { - const options = mergeOptions( - compilerWithDevServerOption.options.devServer || {}, - devServerCliOptions, - ); - - if (!isDevServer4) { - const getPublicPathOption = (): string => { - const normalizePublicPath = (publicPath): string => - typeof publicPath === "undefined" || publicPath === "auto" ? "/" : publicPath; - - if (cliOptions.outputPublicPath) { - return normalizePublicPath( - compilerWithDevServerOption.options.output.publicPath, - ); - } - - // webpack-dev-server@3 - if (options.publicPath) { - return normalizePublicPath(options.publicPath); - } - - return normalizePublicPath(compilerWithDevServerOption.options.output.publicPath); - }; - const getStatsOption = (): string | boolean => { - if (cliOptions.stats) { - return compilerWithDevServerOption.options.stats; - } - - if (options.stats) { - return options.stats; - } - - return compilerWithDevServerOption.options.stats; - }; - - options.host = options.host || "localhost"; - options.port = options.port || 8080; - options.stats = getStatsOption(); - options.publicPath = getPublicPathOption(); - } - - if (options.port) { - const portNumber = Number(options.port); - - if (usedPorts.find((port) => portNumber === port)) { - throw new 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.", - ); - } - - usedPorts.push(portNumber); - } - - devServersOptions.push({ compiler, options }); - } - - const servers = []; - - for (const devServerOptions of devServersOptions) { - const { compiler, options } = devServerOptions; - const server = new Server(compiler, options); - - server.listen(options.port, options.host, (error): void => { - if (error) { - throw error; - } - }); - - servers.push(server); - } - - return servers; -} diff --git a/packages/serve/src/types.ts b/packages/serve/src/types.ts index 8eefb21c0ca..b3b9ce7e3b0 100644 --- a/packages/serve/src/types.ts +++ b/packages/serve/src/types.ts @@ -1,21 +1,26 @@ export type devServerOptionsType = { + allowedHosts?: string[] | allowedHostsEnum; // eslint-disable-next-line @typescript-eslint/no-explicit-any bonjour?: boolean | Record; - client?: devServerClientOptions; + client?: false | devServerClientOptions; compress?: boolean; // eslint-disable-next-line @typescript-eslint/no-explicit-any dev?: Record; // drop in dev-server v4 // eslint-disable-next-line @typescript-eslint/no-explicit-any devMiddleware?: Record; firewall?: boolean | string[]; - headers?: Record; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + headers?: + | Record + | ((request: any, response: any, middlewareContext: any) => Record); historyApiFallback?: boolean | Record; - host?: string | null; + host?: string | null | hostEnum; hot?: boolean | hotOptionEnum; http2?: boolean; https?: boolean | Record; injectClient?: boolean | (() => void); injectHot?: boolean | (() => void); + ipc?: string | true; liveReload?: boolean; onAfterSetupMiddleware?: () => void; onBeforeSetupMiddleware?: () => void; @@ -28,27 +33,62 @@ export type devServerOptionsType = { progress?: boolean; proxy?: Record | (Record | (() => void))[]; public?: string; + setupExitSignals?: boolean; static?: boolean | string | Record | (string | Record)[]; transportMode?: Record | string; useLocalIp?: boolean; publicPath?: string | (() => void); stats?: string | boolean; watchFiles?: string | Record; + webSocketServer?: + | false + | string + | transportModeEnum + | (() => any) + | Record + | (Record | (() => void))[]; }; enum hotOptionEnum { only = "only", } +enum hostEnum { + LocalIp = "local-ip", + LocalIpv4 = "local-ipv4", + LocalIpv6 = "local-ipv6", +} + +enum allowedHostsEnum { + Auto = "auto", + All = "all", +} + +enum transportModeEnum { + SockJS = "sockjs", + Ws = "ws", +} + type devServerClientOptions = { host?: string; path?: string; port?: string | number | null; - logging?: devServerClientLogging; - progress?: boolean; - overlay?: boolean | clientOverlay; needClientEntry?: boolean | (() => void); needHotEntry?: boolean | (() => void); + logging?: devServerClientLogging; + overlay?: boolean | clientOverlay; + progress?: boolean; + webSocketTransport?: string | transportModeEnum; + webSocketURL?: string | webSocketURLOptions; +}; + +type webSocketURLOptions = { + hostname?: string; + pathname?: string; + port?: string | number; + password?: string; + protocol?: string | "auto"; + username?: string; }; type openOptionObject = { diff --git a/packages/webpack-cli/CHANGELOG.md b/packages/webpack-cli/CHANGELOG.md index 26ce028de7e..d241162ff7a 100644 --- a/packages/webpack-cli/CHANGELOG.md +++ b/packages/webpack-cli/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.8.0](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.2...webpack-cli@4.8.0) (2021-08-15) + +### Bug Fixes + +- show default value in help output if available ([#2814](https://github.com/webpack/webpack-cli/issues/2814)) ([7f50948](https://github.com/webpack/webpack-cli/commit/7f50948bb984821449277d6b5632b98a695eb029)) +- support top multi compiler options ([#2874](https://github.com/webpack/webpack-cli/issues/2874)) ([82b1fb7](https://github.com/webpack/webpack-cli/commit/82b1fb7441f04595ac90626235d506f29e5bb107)) + +### Features + +- show possible values for option in help output ([#2819](https://github.com/webpack/webpack-cli/issues/2819)) ([828e5c9](https://github.com/webpack/webpack-cli/commit/828e5c923719982dfc828f9935f65384d6ede2d1)) +- **init-generator:** add ability to specify a package manager of choice ([#2769](https://github.com/webpack/webpack-cli/issues/2769)) ([e53f164](https://github.com/webpack/webpack-cli/commit/e53f1645c729c3bbcb27ffd41c999ed321f86f9d)) + ## [4.7.2](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.1...webpack-cli@4.7.2) (2021-06-07) **Note:** Version bump only for package webpack-cli diff --git a/packages/webpack-cli/lib/utils/get-available-installers.js b/packages/webpack-cli/lib/utils/get-available-installers.js new file mode 100644 index 00000000000..d2ee92414c5 --- /dev/null +++ b/packages/webpack-cli/lib/utils/get-available-installers.js @@ -0,0 +1,25 @@ +const { sync } = require("execa"); + +const utils = require("./"); + +function hasPmInstalled(packageManager) { + try { + sync(packageManager, ["--version"]); + return packageManager; + } catch (err) { + return false; + } +} + +function getAvailableInstallers() { + const installers = ["npm", "yarn", "pnpm"]; + const availableInstallers = installers.filter((installer) => hasPmInstalled(installer)); + + if (!availableInstallers.length) { + utils.logger.error("No package manager found."); + process.exit(2); + } + return availableInstallers; +} + +module.exports = getAvailableInstallers; diff --git a/packages/webpack-cli/lib/utils/index.js b/packages/webpack-cli/lib/utils/index.js index 800174bec22..e5ac14c3407 100644 --- a/packages/webpack-cli/lib/utils/index.js +++ b/packages/webpack-cli/lib/utils/index.js @@ -23,6 +23,10 @@ module.exports = { return require("./dynamic-import-loader"); }, + get getAvailableInstallers() { + return require("./get-available-installers"); + }, + get getPackageManager() { return require("./get-package-manager"); }, diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 5ab16847c01..168d75d45da 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -847,7 +847,7 @@ class WebpackCLI { options.entry = [...entries, ...(options.entry || [])]; } - await this.buildCommand(options, isWatchCommandUsed); + await this.runWebpack(options, isWatchCommandUsed); }, ); } else if (isCommand(commandName, helpCommandOptions)) { @@ -1357,16 +1357,37 @@ class WebpackCLI { this.logger.raw(`${bold("Description:")} ${option.description}`); } - if (!option.negate && options.defaultValue) { + if (!option.negate && option.defaultValue) { this.logger.raw( `${bold("Default value:")} ${JSON.stringify(option.defaultValue)}`, ); } + const flag = this.getBuiltInOptions().find( + (flag) => option.long === `--${flag.name}`, + ); + + if (flag && flag.configs) { + const possibleValues = flag.configs.reduce((accumulator, currentValue) => { + if (currentValue.values) { + return accumulator.concat(currentValue.values); + } else { + return accumulator; + } + }, []); + + if (possibleValues.length > 0) { + this.logger.raw( + `${bold("Possible values:")} ${JSON.stringify( + possibleValues.join(" | "), + )}`, + ); + } + } + this.logger.raw(""); // TODO implement this after refactor cli arguments - // logger.raw('Possible values: foo | bar'); // logger.raw('Documentation: https://webpack.js.org/option/name/'); } else { outputIncorrectUsageOfHelp(); @@ -1500,107 +1521,124 @@ class WebpackCLI { await this.program.parseAsync(args, parseOptions); } - async resolveConfig(options) { - const loadConfig = async (configPath) => { - const { interpret } = this.utils; - const ext = path.extname(configPath); - const interpreted = Object.keys(interpret.jsVariants).find( - (variant) => variant === ext, - ); - - if (interpreted) { - const { rechoir } = this.utils; - - try { - rechoir.prepare(interpret.extensions, configPath); - } catch (error) { - if (error.failures) { - this.logger.error(`Unable load '${configPath}'`); - this.logger.error(error.message); - - error.failures.forEach((failure) => { - this.logger.error(failure.error.message); - }); - this.logger.error("Please install one of them"); - process.exit(2); - } - - this.logger.error(error); - process.exit(2); - } - } + async loadConfig(configPath, argv = {}) { + const { interpret } = this.utils; + const ext = path.extname(configPath); + const interpreted = Object.keys(interpret.jsVariants).find((variant) => variant === ext); - let options; + if (interpreted) { + const { rechoir } = this.utils; try { - options = await this.tryRequireThenImport(configPath, false); + rechoir.prepare(interpret.extensions, configPath); } catch (error) { - this.logger.error(`Failed to load '${configPath}' config`); - - if (this.isValidationError(error)) { + if (error.failures) { + this.logger.error(`Unable load '${configPath}'`); this.logger.error(error.message); - } else { - this.logger.error(error); + + error.failures.forEach((failure) => { + this.logger.error(failure.error.message); + }); + this.logger.error("Please install one of them"); + process.exit(2); } + this.logger.error(error); process.exit(2); } + } - return { options, path: configPath }; - }; + let options; + + try { + options = await this.tryRequireThenImport(configPath, false); + } catch (error) { + this.logger.error(`Failed to load '${configPath}' config`); + + if (this.isValidationError(error)) { + this.logger.error(error.message); + } else { + this.logger.error(error); + } - const evaluateConfig = async (loadedConfig, argv) => { - const isMultiCompiler = Array.isArray(loadedConfig.options); - const config = isMultiCompiler ? loadedConfig.options : [loadedConfig.options]; + process.exit(2); + } - const evaluatedConfig = await Promise.all( - config.map(async (rawConfig) => { - if (typeof rawConfig.then === "function") { - rawConfig = await rawConfig; + if (Array.isArray(options)) { + await Promise.all( + options.map(async (_, i) => { + if (typeof options[i].then === "function") { + options[i] = await options[i]; } // `Promise` may return `Function` - if (typeof rawConfig === "function") { + if (typeof options[i] === "function") { // when config is a function, pass the env from args to the config function - rawConfig = await rawConfig(argv.env, argv); + options[i] = await options[i](argv.env, argv); } - - return rawConfig; }), ); + } else { + if (typeof options.then === "function") { + options = await options; + } - loadedConfig.options = isMultiCompiler ? evaluatedConfig : evaluatedConfig[0]; + // `Promise` may return `Function` + if (typeof options === "function") { + // when config is a function, pass the env from args to the config function + options = await options(argv.env, argv); + } + } - const isObject = (value) => typeof value === "object" && value !== null; + const isObject = (value) => typeof value === "object" && value !== null; - if (!isObject(loadedConfig.options) && !Array.isArray(loadedConfig.options)) { - this.logger.error(`Invalid configuration in '${loadedConfig.path}'`); - process.exit(2); - } + if (!isObject(options) && !Array.isArray(options)) { + this.logger.error(`Invalid configuration in '${configPath}'`); - return loadedConfig; - }; + process.exit(2); + } + + return { options, path: configPath }; + } + async resolveConfig(options) { const config = { options: {}, path: new WeakMap() }; if (options.config && options.config.length > 0) { - const evaluatedConfigs = await Promise.all( - options.config.map(async (value) => - evaluateConfig(await loadConfig(path.resolve(value)), options.argv || {}), + const loadedConfigs = await Promise.all( + options.config.map((configPath) => + this.loadConfig(path.resolve(configPath), options.argv), ), ); config.options = []; - evaluatedConfigs.forEach((evaluatedConfig) => { - if (Array.isArray(evaluatedConfig.options)) { - evaluatedConfig.options.forEach((options) => { - config.options.push(options); - config.path.set(options, evaluatedConfig.path); + loadedConfigs.forEach((loadedConfig) => { + const isArray = Array.isArray(loadedConfig.options); + + // TODO we should run webpack multiple times when the `--config` options have multiple values with `--merge`, need to solve for the next major release + if (config.options.length === 0) { + config.options = loadedConfig.options; + } else { + if (!Array.isArray(config.options)) { + config.options = [config.options]; + } + + if (isArray) { + loadedConfig.options.forEach((item) => { + config.options.push(item); + }); + } else { + config.options.push(loadedConfig.options); + } + } + + if (isArray) { + loadedConfig.options.forEach((options) => { + config.path.set(options, loadedConfig.path); }); } else { - config.options.push(evaluatedConfig.options); - config.path.set(evaluatedConfig.options, evaluatedConfig.path); + config.path.set(loadedConfig.options, loadedConfig.path); } }); @@ -1636,23 +1674,25 @@ class WebpackCLI { } if (foundDefaultConfigFile) { - const loadedConfig = await loadConfig(foundDefaultConfigFile.path); - const evaluatedConfig = await evaluateConfig(loadedConfig, options.argv || {}); + const loadedConfig = await this.loadConfig( + foundDefaultConfigFile.path, + options.argv, + ); - config.options = evaluatedConfig.options; + config.options = loadedConfig.options; if (Array.isArray(config.options)) { - config.options.forEach((options) => { - config.path.set(options, evaluatedConfig.path); + config.options.forEach((item) => { + config.path.set(item, loadedConfig.path); }); } else { - config.path.set(evaluatedConfig.options, evaluatedConfig.path); + config.path.set(loadedConfig.options, loadedConfig.path); } } } if (options.configName) { - const notfoundConfigNames = []; + const notFoundConfigNames = []; config.options = options.configName.map((configName) => { let found; @@ -1664,15 +1704,15 @@ class WebpackCLI { } if (!found) { - notfoundConfigNames.push(configName); + notFoundConfigNames.push(configName); } return found; }); - if (notfoundConfigNames.length > 0) { + if (notFoundConfigNames.length > 0) { this.logger.error( - notfoundConfigNames + notFoundConfigNames .map( (configName) => `Configuration with the name "${configName}" was not found.`, @@ -1710,6 +1750,18 @@ class WebpackCLI { return config; } + runFunctionOnOptions(options, fn) { + if (Array.isArray(options)) { + for (let item of options) { + item = fn(item); + } + } else { + options = fn(options); + } + + return options; + } + // TODO refactor async applyOptions(config, options) { if (options.analyze) { @@ -1765,9 +1817,7 @@ class WebpackCLI { return configOptions; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => outputHints(options)) - : outputHints(config.options); + this.runFunctionOnOptions(config.options, outputHints); if (this.webpack.cli) { const processArguments = (configOptions) => { @@ -1829,9 +1879,7 @@ class WebpackCLI { return configOptions; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => processArguments(options)) - : processArguments(config.options); + this.runFunctionOnOptions(config.options, processArguments); const setupDefaultOptions = (configOptions) => { // No need to run for webpack@4 @@ -1860,9 +1908,7 @@ class WebpackCLI { return configOptions; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => setupDefaultOptions(options)) - : setupDefaultOptions(config.options); + this.runFunctionOnOptions(config.options, setupDefaultOptions); } // Logic for webpack@4 @@ -1922,12 +1968,10 @@ class WebpackCLI { return configOptions; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => processLegacyArguments(options)) - : processLegacyArguments(config.options); + this.runFunctionOnOptions(config.options, processLegacyArguments); // Apply `stats` and `stats.colors` options - const applyStatsColors = (configOptions) => { + const applyStatsOption = (configOptions) => { // TODO remove after drop webpack@4 const statsForWebpack4 = this.webpack.Stats && this.webpack.Stats.presetToOptions; @@ -1984,9 +2028,7 @@ class WebpackCLI { return configOptions; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => applyStatsColors(options)) - : applyStatsColors(config.options); + this.runFunctionOnOptions(config.options, applyStatsOption); return config; } @@ -1994,14 +2036,14 @@ class WebpackCLI { async applyCLIPlugin(config, cliOptions) { const CLIPlugin = await this.tryRequireThenImport("./plugins/CLIPlugin"); - const addCLIPlugin = (configOptions) => { - if (!configOptions.plugins) { - configOptions.plugins = []; + const addCLIPlugin = (options) => { + if (!options.plugins) { + options.plugins = []; } - configOptions.plugins.unshift( + options.plugins.unshift( new CLIPlugin({ - configPath: config.path.get(configOptions), + configPath: config.path.get(options), helpfulOutput: !cliOptions.json, hot: cliOptions.hot, progress: cliOptions.progress, @@ -2010,12 +2052,10 @@ class WebpackCLI { }), ); - return configOptions; + return options; }; - config.options = Array.isArray(config.options) - ? config.options.map((options) => addCLIPlugin(options)) - : addCLIPlugin(config.options); + this.runFunctionOnOptions(config.options, addCLIPlugin); return config; } @@ -2081,7 +2121,7 @@ class WebpackCLI { return compiler; } - async buildCommand(options, isWatchCommand) { + async runWebpack(options, isWatchCommand) { // eslint-disable-next-line prefer-const let compiler; let createJsonStringifyStream; diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index 10aca903e59..c49836bed2a 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "4.7.2", + "version": "4.8.0", "description": "CLI for webpack & friends", "license": "MIT", "repository": { @@ -32,7 +32,7 @@ "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.0.4", "@webpack-cli/info": "^1.3.0", - "@webpack-cli/serve": "^1.5.1", + "@webpack-cli/serve": "^1.5.2", "colorette": "^1.2.1", "commander": "^7.0.0", "execa": "^5.0.0", diff --git a/scripts/updateDocs.js b/scripts/updateDocs.js index 6193903a675..84bdcf12f06 100644 --- a/scripts/updateDocs.js +++ b/scripts/updateDocs.js @@ -2,6 +2,10 @@ const { sync } = require("execa"); const { resolve } = require("path"); const { writeFileSync } = require("fs"); +//eslint-disable-next-line node/no-unpublished-require +const { version } = require("webpack-dev-server/package.json"); + +const majorDevServerVersion = version.split(".")[0]; try { const { stdout: cliOptions } = sync( @@ -33,7 +37,7 @@ try { const serveContent = ["```\n", serveOptions, "\n```"].join(""); // create SERVE.md - writeFileSync("SERVE-OPTIONS.md", serveContent); + writeFileSync(`SERVE-OPTIONS-v${majorDevServerVersion}.md`, serveContent); console.log('Successfully updated "OPTIONS.md" and "SERVE-OPTIONS.md"'); } catch (err) { diff --git a/test/api/CLI.test.js b/test/api/CLI.test.js index b785fa4f90a..0896c989deb 100644 --- a/test/api/CLI.test.js +++ b/test/api/CLI.test.js @@ -1699,4 +1699,34 @@ describe("CLI API", () => { expect(command.helpInformation()).toContain("--no-boolean Negated description"); }); }); + + describe("custom help output", () => { + let consoleSpy; + let exitSpy; + + beforeEach(async () => { + consoleSpy = jest.spyOn(global.console, "log"); + exitSpy = jest.spyOn(process, "exit").mockImplementation(() => {}); + + cli.program.option("--color [value]", "any color", "blue"); + await new Promise((resolve, reject) => { + try { + cli.run(["help", "--color"], { from: "user" }); + resolve(); + } catch (error) { + reject(error); + } + }); + }); + + afterEach(async () => { + consoleSpy.mockRestore(); + exitSpy.mockRestore(); + }); + + it("should display help information", () => { + expect(exitSpy).toHaveBeenCalledWith(0); + expect(consoleSpy.mock.calls).toMatchSnapshot(); + }); + }); }); diff --git a/test/api/__snapshots__/CLI.test.js.snap.webpack4 b/test/api/__snapshots__/CLI.test.js.snap.webpack4 new file mode 100644 index 00000000000..50607abaa35 --- /dev/null +++ b/test/api/__snapshots__/CLI.test.js.snap.webpack4 @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`CLI API custom help output should display help information 1`] = ` +Array [ + Array [ + "Usage: webpack --color [value]", + ], + Array [ + "Description: any color", + ], + Array [ + "Default value: \\"blue\\"", + ], + Array [ + "", + ], + Array [ + "To see list of all supported commands and options run 'webpack --help=verbose'. +", + ], + Array [ + "Webpack documentation: https://webpack.js.org/.", + ], + Array [ + "CLI documentation: https://webpack.js.org/api/cli/.", + ], + Array [ + "Made with ♥ by the webpack team.", + ], +] +`; diff --git a/test/api/__snapshots__/CLI.test.js.snap.webpack5 b/test/api/__snapshots__/CLI.test.js.snap.webpack5 new file mode 100644 index 00000000000..50607abaa35 --- /dev/null +++ b/test/api/__snapshots__/CLI.test.js.snap.webpack5 @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`CLI API custom help output should display help information 1`] = ` +Array [ + Array [ + "Usage: webpack --color [value]", + ], + Array [ + "Description: any color", + ], + Array [ + "Default value: \\"blue\\"", + ], + Array [ + "", + ], + Array [ + "To see list of all supported commands and options run 'webpack --help=verbose'. +", + ], + Array [ + "Webpack documentation: https://webpack.js.org/.", + ], + Array [ + "CLI documentation: https://webpack.js.org/api/cli/.", + ], + Array [ + "Made with ♥ by the webpack team.", + ], +] +`; diff --git a/test/api/__snapshots__/scaffold-utils.test.js.snap.webpack4 b/test/api/generators/__snapshots__/scaffold-utils.test.js.snap.webpack4 similarity index 100% rename from test/api/__snapshots__/scaffold-utils.test.js.snap.webpack4 rename to test/api/generators/__snapshots__/scaffold-utils.test.js.snap.webpack4 diff --git a/test/api/__snapshots__/scaffold-utils.test.js.snap.webpack5 b/test/api/generators/__snapshots__/scaffold-utils.test.js.snap.webpack5 similarity index 100% rename from test/api/__snapshots__/scaffold-utils.test.js.snap.webpack5 rename to test/api/generators/__snapshots__/scaffold-utils.test.js.snap.webpack5 diff --git a/test/api/generators/helpers.test.js b/test/api/generators/helpers.test.js new file mode 100644 index 00000000000..3996c9bb275 --- /dev/null +++ b/test/api/generators/helpers.test.js @@ -0,0 +1,73 @@ +const path = require("path"); + +const utilsDirectory = { + cli: "../../../packages/webpack-cli/lib/utils", + generators: "../../../packages/generators/src/utils", +}; + +jest.setMock(path.join(utilsDirectory.cli, "get-available-installers"), jest.fn()); +jest.mock(path.join(utilsDirectory.generators, "scaffold-utils"), () => ({ + List: jest.fn(), +})); + +const getAvailableInstallers = require(path.join(utilsDirectory.cli, "get-available-installers")); +const getPackageManager = require(path.join(utilsDirectory.cli, "get-package-manager")); +const logger = require(path.join(utilsDirectory.cli, "logger")); + +const { getInstaller, getTemplate } = require(path.join(utilsDirectory.generators, "helpers")); +const { List } = require(path.join(utilsDirectory.generators, "scaffold-utils")); + +const context = { + prompt: () => {}, + supportedTemplates: ["default"], + utils: { + getAvailableInstallers, + getPackageManager, + logger, + }, +}; + +describe("helpers", () => { + it("getInstaller() returns the available installer", async () => { + // Multiple installers are not available + getAvailableInstallers.mockReturnValue(["npm"]); + + // Invoke the helper function + const installer = await getInstaller.call(context); + expect(installer).toBe("npm"); + }); + + it("getInstaller() invokes a List prompt if multiple installers are available", async () => { + // Multiple installers are available + getAvailableInstallers.mockReturnValue(["npm", "yarn", "pnpm"]); + + // User chose "pnpm" + List.mockReturnValue({ packager: "pnpm" }); + + // Invoke the helper function + const installer = await getInstaller.call(context); + expect(installer).toBe("pnpm"); + }); + + it("getTemplate() returns with the valid template", async () => { + context.template = "default"; + + // Invoke the helper function + const template = await getTemplate.call(context); + expect(template).toBe("default"); + }); + + it("getTemplate() invokes a List prompt on supplying an invalid template", async () => { + context.template = "unknown"; + + // User chose "default" + List.mockReturnValue({ selectedTemplate: "default" }); + + const loggerMock = jest.spyOn(logger, "warn").mockImplementation(() => {}); + + // Invoke the helper function` + const template = await getTemplate.call(context); + expect(template).toBe("default"); + expect(loggerMock).toHaveBeenCalled(); + }); +}); diff --git a/test/api/scaffold-utils.test.js b/test/api/generators/scaffold-utils.test.js similarity index 97% rename from test/api/scaffold-utils.test.js rename to test/api/generators/scaffold-utils.test.js index 06cdc64bfcb..93860e47743 100755 --- a/test/api/scaffold-utils.test.js +++ b/test/api/generators/scaffold-utils.test.js @@ -4,7 +4,7 @@ const { InputValidate, Input, // eslint-disable-next-line node/no-missing-require -} = require("../../packages/generators/src/utils/scaffold-utils"); +} = require("../../../packages/generators/src/utils/scaffold-utils"); describe("utils", () => { let mockSelf; diff --git a/test/build/colors/colors.test.js b/test/build/colors/colors.test.js index 9d332515c6d..0132bc6fef1 100644 --- a/test/build/colors/colors.test.js +++ b/test/build/colors/colors.test.js @@ -144,6 +144,41 @@ describe("colors", () => { expect(stdout).toContain(output); }); + it('should work with the "stats" option from the configuration #5', async () => { + const { exitCode, stderr, stdout } = await run( + __dirname, + ["--config=stats-colors.webpack.config.js"], + { + env: { FORCE_COLOR: true }, + }, + ); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + const output = isWebpack5 ? "successfully" : "main.js"; + expect(stdout).toContain(`\u001b[31m${output}\u001b[39m\u001b[22m`); + }); + + it('should work with the "stats" option from the configuration in multi compiler mode', async () => { + const { exitCode, stderr, stdout } = await run( + __dirname, + ["--config=multi-stats-colors.webpack.config.js"], + { + env: { FORCE_COLOR: true }, + }, + ); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + + if (isWebpack5) { + // red from first config + expect(stdout).toContain(`\u001b[31msuccessfully`); + // blue from second config + expect(stdout).toContain(`\u001b[34msuccessfully`); + } + }); + it("should prioritize --color over colors in config", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--config=colors-false.webpack.config.js", diff --git a/test/build/colors/multi-stats-colors.webpack.config.js b/test/build/colors/multi-stats-colors.webpack.config.js new file mode 100644 index 00000000000..c9675f190a2 --- /dev/null +++ b/test/build/colors/multi-stats-colors.webpack.config.js @@ -0,0 +1,22 @@ +module.exports = [ + { + name: "first-config", + entry: "./src/first.js", + stats: { + colors: { + green: "\u001b[31m", // overwriting with red for test + }, + }, + mode: "development", + }, + { + name: "second-config", + entry: "./src/second.js", + stats: { + colors: { + green: "\u001b[34m", // overwriting with blue for test + }, + }, + mode: "development", + }, +]; diff --git a/test/build/colors/stats-colors.webpack.config.js b/test/build/colors/stats-colors.webpack.config.js new file mode 100644 index 00000000000..210b807952f --- /dev/null +++ b/test/build/colors/stats-colors.webpack.config.js @@ -0,0 +1,8 @@ +module.exports = { + stats: { + colors: { + green: "\u001b[31m", // overwriting with red for test + }, + }, + mode: "development", +}; diff --git a/test/build/config/top-multi-compilers-options/index.js b/test/build/config/top-multi-compilers-options/index.js new file mode 100644 index 00000000000..97f0cb45e3a --- /dev/null +++ b/test/build/config/top-multi-compilers-options/index.js @@ -0,0 +1,6 @@ +console.log(`test ${Math.random()}`); +console.log(`test ${Math.random()}`); +console.log(`test ${Math.random()}`); +console.log(`test ${Math.random()}`); +console.log(`test ${Math.random()}`); +console.log(`test ${Math.random()}`); diff --git a/test/build/config/top-multi-compilers-options/top-multi-compilers-options.test.js b/test/build/config/top-multi-compilers-options/top-multi-compilers-options.test.js new file mode 100644 index 00000000000..607a82e3e3c --- /dev/null +++ b/test/build/config/top-multi-compilers-options/top-multi-compilers-options.test.js @@ -0,0 +1,35 @@ +"use strict"; + +const { resolve } = require("path"); +const { run, isWebpack5 } = require("../../../utils/test-utils"); + +describe("top multi compiler options", () => { + it("should work without provided configuration", async () => { + const { exitCode, stderr, stdout } = await run(__dirname); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + + if (isWebpack5) { + expect(stdout).toContain("Done build0\nDone build1\nDone build2\nDone build3"); + } else { + expect(stdout).toBeTruthy(); + } + }); + + it("should work with provided configuration", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, [ + "-c", + resolve(__dirname, "webpack.config.js"), + ]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + + if (isWebpack5) { + expect(stdout).toContain("Done build0\nDone build1\nDone build2\nDone build3"); + } else { + expect(stdout).toBeTruthy(); + } + }); +}); diff --git a/test/build/config/top-multi-compilers-options/webpack.config.js b/test/build/config/top-multi-compilers-options/webpack.config.js new file mode 100644 index 00000000000..42189f57083 --- /dev/null +++ b/test/build/config/top-multi-compilers-options/webpack.config.js @@ -0,0 +1,43 @@ +class SimpleProgressWebpackPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.done.tap("test", () => { + console.log("Done", this.options.name); + }); + } +} + +const configs = []; + +for (let i = 0; i < 3; i++) { + configs.push({ + mode: "development", + name: `build${i}`, + entry: "./index.js", + plugins: [ + new SimpleProgressWebpackPlugin({ + name: `build${i}`, + }), + ], + }); +} + +configs.push(async () => { + return { + mode: "development", + name: `build${3}`, + entry: "./index.js", + plugins: [ + new SimpleProgressWebpackPlugin({ + name: `build${3}`, + format: "simple", + }), + ], + }; +}); + +module.exports = configs; +module.exports.parallelism = 1; diff --git a/test/build/core-flags/core-flags.test.js b/test/build/core-flags/core-flags.test.js index 4ce5c0d9cbf..4e71ba4bd0d 100644 --- a/test/build/core-flags/core-flags.test.js +++ b/test/build/core-flags/core-flags.test.js @@ -93,6 +93,14 @@ describe("core flags", () => { expect(stderr).toBeFalsy(); expect(stdout).toContain("parallelism: 10"); }); + + it("should set parallelism option correctly using `=`", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["--parallelism=10"]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain("parallelism: 10"); + }); }); describe("enum type flags", () => { @@ -231,6 +239,22 @@ describe("core flags", () => { expect(stdout).toContain(`devtool: 'source-map'`); }); + it("should allow string value devtool option using alias", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["-d", "source-map"]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`devtool: 'source-map'`); + }); + + it("should allow string value devtool option using alias #1", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["-dsource-map"]); + + expect(exitCode).toBe(0); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`devtool: 'source-map'`); + }); + it("should allow --no-devtool", async () => { const { exitCode, stderr, stdout } = await run(__dirname, ["--no-devtool"]); 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 index 9299cf68cda..cc162eb7d7b 100644 --- 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 @@ -3,7 +3,10 @@ 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 +"[webpack-cli] Error: For the selected environment is no default script chunk format available: +JSONP Array push can be chosen when 'document' or 'importScripts' is available. +CommonJs exports can be chosen when 'require' or node builtins are available. +Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly. at stack" `; @@ -25,7 +28,7 @@ exports[`--target flag should throw an error for invalid target in multiple synt 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." + - configuration.target should be a non-empty array." `; exports[`--target flag should throw error if target is an empty array: stdout 1`] = `""`; diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 index 5e9c6cb436b..c8b13330a95 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 @@ -2530,8 +2530,6 @@ 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. @@ -2543,17 +2541,6 @@ 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`] = ` diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 index e64ba7ddde2..37c30d8aefb 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 @@ -2540,11 +2540,12 @@ 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 --cache-type" option: stderr 1`] = `""`; -exports[`help should show help information using the "help --color" option: stdout 1`] = ` -"Usage: webpack --color -Description: Enable colors on console. +exports[`help should show help information using the "help --cache-type" option: stdout 1`] = ` +"Usage: webpack --cache-type +Description: In memory caching. Filesystem caching. +Possible values: \\"memory | filesystem\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2553,13 +2554,11 @@ 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 --color" option: stderr 1`] = `""`; -exports[`help should show help information using the "help --mode" option: stdout 1`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. +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'. @@ -2568,9 +2567,12 @@ 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`] = ` +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` "Usage: webpack --mode Description: Defines the mode to pass to webpack. +Possible values: \\"development | production | none\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2610,6 +2612,7 @@ exports[`help should show help information using the "help --stats" option: stde 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. +Possible values: \\"none | summary | errors-only | errors-warnings | minimal | normal | detailed | verbose\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2624,6 +2627,7 @@ exports[`help should show help information using the "help --target" option: std "Usage: webpack --target Short: webpack -t Description: Sets the build target e.g. node. +Possible values: \\"false\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2678,6 +2682,7 @@ exports[`help should show help information using the "help serve --mode" option: 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. +Possible values: \\"development | production | none\\" To see list of all supported commands and options run 'webpack --help=verbose'. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 index 170369e3ff3..8e6d3c6e502 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 @@ -1517,724 +1517,20 @@ 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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the - browser under this path. - --static-serve-index Tells dev-server to use serveIndex - middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex - middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content - directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the - browser under this path. - --static-serve-index Tells dev-server to use serveIndex - middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex - middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content - directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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`] = ` @@ -2660,8 +1956,6 @@ 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. @@ -2673,17 +1967,6 @@ 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`] = ` diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index 3fa2c24e7bb..56259dec98e 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -1526,732 +1526,20 @@ 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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the - browser under this path. - --static-serve-index Tells dev-server to use serveIndex - middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex - middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content - directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the - browser under this path. - --static-serve-index Tells dev-server to use serveIndex - middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex - middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content - directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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`] = ` @@ -2670,11 +1958,12 @@ 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 --cache-type" option: stderr 1`] = `""`; -exports[`help should show help information using the "help --color" option: stdout 1`] = ` -"Usage: webpack --color -Description: Enable colors on console. +exports[`help should show help information using the "help --cache-type" option: stdout 1`] = ` +"Usage: webpack --cache-type +Description: In memory caching. Filesystem caching. +Possible values: \\"memory | filesystem\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2683,13 +1972,11 @@ 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 --color" option: stderr 1`] = `""`; -exports[`help should show help information using the "help --mode" option: stdout 1`] = ` -"Usage: webpack --mode -Description: Defines the mode to pass to webpack. +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'. @@ -2698,9 +1985,12 @@ 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`] = ` +exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; + +exports[`help should show help information using the "help --mode" option: stdout 1`] = ` "Usage: webpack --mode Description: Defines the mode to pass to webpack. +Possible values: \\"development | production | none\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2740,6 +2030,7 @@ exports[`help should show help information using the "help --stats" option: stde 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. +Possible values: \\"none | summary | errors-only | errors-warnings | minimal | normal | detailed | verbose\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2754,6 +2045,7 @@ exports[`help should show help information using the "help --target" option: std "Usage: webpack --target Short: webpack -t Description: Sets the build target e.g. node. +Possible values: \\"false\\" To see list of all supported commands and options run 'webpack --help=verbose'. @@ -2808,6 +2100,7 @@ exports[`help should show help information using the "help serve --mode" option: 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. +Possible values: \\"development | production | none\\" 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 627a1ab9929..ee29dcf5f32 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -1,6 +1,12 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../utils/test-utils"); +const { + run, + normalizeStderr, + normalizeStdout, + isWebpack5, + isDevServer4, +} = require("../utils/test-utils"); describe("help", () => { it('should show help information using the "--help" option', async () => { @@ -121,12 +127,18 @@ describe("help", () => { ]; commands.forEach(({ name, alias }) => { + // TODO fix it + const needSkip = name === "serve" && isDevServer4; + 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(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it.skip(`should show help information for '${name}' command using the "--help verbose" option`, async () => { @@ -134,7 +146,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it(`should show help information for '${name}' command using command syntax`, async () => { @@ -142,7 +157,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it(`should show help information for '${name}' and respect the "--color" flag using the "--help" option`, async () => { @@ -153,7 +171,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); expect(stdout).toContain("\x1b[1m"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it(`should show help information for '${name}' and respect the "--no-color" flag using the "--help" option`, async () => { @@ -166,7 +187,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); expect(stdout).not.toContain("\x1b[1m"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); const alises = Array.isArray(alias) ? alias : [alias]; @@ -177,7 +201,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it.skip(`should show help information for '${alias}' command using the "--help verbose" option`, async () => { @@ -189,7 +216,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); it(`should show help information for '${alias}' command using command syntax`, async () => { @@ -197,7 +227,10 @@ describe("help", () => { expect(exitCode).toBe(0); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + + if (!needSkip) { + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } }); }); }); @@ -242,16 +275,20 @@ describe("help", () => { 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"]); + it('should show help information using the "help --cache-type" option', async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["help", "--cache-type"]); - expect(exitCode).toBe(0); - expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + if (isWebpack5) { + expect(exitCode).toBe(0); + expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); + expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); + } else { + expect(exitCode).toBe(2); + } }); - it('should show help information using the "help --mode" option', async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ["help", "--mode"]); + 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(normalizeStderr(stderr)).toMatchSnapshot("stderr"); diff --git a/test/init/__snapshots__/init.test.js.snap.webpack4 b/test/init/__snapshots__/init.test.js.snap.webpack4 index 3964b35e9bf..57a47075545 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack4 +++ b/test/init/__snapshots__/init.test.js.snap.webpack4 @@ -1089,3 +1089,21 @@ Object { "version": "1.0.0", } `; + +exports[`init command uses yarn as the package manager when opted 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "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", +} +`; diff --git a/test/init/__snapshots__/init.test.js.snap.webpack5 b/test/init/__snapshots__/init.test.js.snap.webpack5 index 3964b35e9bf..57a47075545 100644 --- a/test/init/__snapshots__/init.test.js.snap.webpack5 +++ b/test/init/__snapshots__/init.test.js.snap.webpack5 @@ -1089,3 +1089,21 @@ Object { "version": "1.0.0", } `; + +exports[`init command uses yarn as the package manager when opted 1`] = ` +Object { + "description": "My webpack project", + "devDependencies": Object { + "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", +} +`; diff --git a/test/init/init.test.js b/test/init/init.test.js index a8ef6cca672..14553329ce5 100644 --- a/test/init/init.test.js +++ b/test/init/init.test.js @@ -14,6 +14,14 @@ jest.setTimeout(480000); const ENTER = "\x0D"; const DOWN = "\x1B\x5B\x42"; +const defaultTemplateFiles = [ + "package.json", + "package-lock.json", + "src", + "src/index.js", + "webpack.config.js", +]; + // Helper to read from package.json in a given path const readFromPkgJSON = (path) => { const pkgJSONPath = join(path, "package.json"); @@ -43,9 +51,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -61,9 +67,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -82,9 +86,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -103,9 +105,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -129,9 +129,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -144,7 +142,7 @@ describe("init command", () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ["init"], - [`${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, ENTER], + [`${DOWN}${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, ENTER, ENTER], ); expect(stdout).toContain("Project has been initialised with webpack!"); @@ -152,7 +150,11 @@ describe("init command", () => { expect(stderr).toContain("tsconfig.json"); // Test files - const files = ["package.json", "src", "src/index.ts", "webpack.config.js", "tsconfig.json"]; + const files = [ + ...defaultTemplateFiles.filter((file) => file !== "src/index.js"), + "src/index.ts", + "tsconfig.json", + ]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); @@ -170,7 +172,7 @@ describe("init command", () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ["init"], - [`${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, ENTER], + [`${DOWN}${ENTER}`, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, ENTER, ENTER], ); expect(stdout).toContain("Project has been initialised with webpack!"); @@ -178,7 +180,7 @@ describe("init command", () => { expect(stderr).toContain(".babelrc"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js", ".babelrc"]; + const files = [...defaultTemplateFiles, ".babelrc"]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); @@ -205,6 +207,7 @@ describe("init command", () => { `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, + ENTER, ], ); @@ -212,9 +215,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -239,6 +240,7 @@ describe("init command", () => { `n${ENTER}`, `y${ENTER}`, `n${ENTER}`, + ENTER, ], ); @@ -246,13 +248,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = [ - "package.json", - "src", - "src/index.js", - "webpack.config.js", - "postcss.config.js", - ]; + const files = [...defaultTemplateFiles, "postcss.config.js"]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); @@ -279,6 +275,7 @@ describe("init command", () => { `n${ENTER}`, `n${ENTER}`, `y${ENTER}`, + ENTER, ], ); @@ -286,9 +283,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -313,6 +308,7 @@ describe("init command", () => { `y${ENTER}`, `y${ENTER}`, `n${ENTER}`, + ENTER, ], ); @@ -320,13 +316,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = [ - "package.json", - "src", - "src/index.js", - "webpack.config.js", - "postcss.config.js", - ]; + const files = [...defaultTemplateFiles, "postcss.config.js"]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); @@ -353,6 +343,7 @@ describe("init command", () => { `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, + ENTER, ], ); @@ -360,9 +351,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -387,6 +376,7 @@ describe("init command", () => { `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, + ENTER, ], ); @@ -394,9 +384,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -412,7 +400,7 @@ describe("init command", () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ["init"], - [ENTER, ENTER, `n${ENTER}`, `n${ENTER}`, ENTER], + [ENTER, ENTER, `n${ENTER}`, `n${ENTER}`, ENTER, ENTER], ); expect(stdout).toContain("Do you want to use webpack-dev-server?"); @@ -420,8 +408,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -445,6 +432,7 @@ describe("init command", () => { `${DOWN}${ENTER}`, ENTER, `n${ENTER}`, + ENTER, ], ); @@ -452,13 +440,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = [ - "package.json", - "src", - "src/index.js", - "webpack.config.js", - "postcss.config.js", - ]; + const files = [...defaultTemplateFiles, "postcss.config.js"]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); @@ -476,7 +458,7 @@ describe("init command", () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ["init"], - [ENTER, `n${ENTER}`, ENTER, `n${ENTER}`, ENTER], + [ENTER, `n${ENTER}`, ENTER, `n${ENTER}`, ENTER, ENTER], ); expect(stdout).toContain( @@ -486,9 +468,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -504,7 +484,7 @@ describe("init command", () => { const { stdout, stderr } = await runPromptWithAnswers( assetsPath, ["init"], - [ENTER, `n${ENTER}`, ENTER, ENTER, ENTER], + [ENTER, `n${ENTER}`, ENTER, ENTER, ENTER, ENTER], ); expect(stdout).toContain("Do you want to add PWA support?"); @@ -512,9 +492,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -549,9 +527,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -567,9 +543,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -585,9 +559,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -603,9 +575,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -621,9 +591,7 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); }); @@ -639,7 +607,30 @@ describe("init command", () => { expect(stderr).toContain("webpack.config.js"); // Test files - const files = ["package.json", "src", "src/index.js", "webpack.config.js"]; + defaultTemplateFiles.forEach((file) => { + expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); + }); + + // Check if the generated package.json file content matches the snapshot + expect(readFromPkgJSON(assetsPath)).toMatchSnapshot(); + }); + + it("uses yarn as the package manager when opted", async () => { + const assetsPath = await uniqueDirectoryForTest(); + const { stdout, stderr } = await runPromptWithAnswers( + assetsPath, + ["init"], + [ENTER, `n${ENTER}`, `n${ENTER}`, `n${ENTER}`, ENTER, `${DOWN}${ENTER}`], + ); + + expect(stdout).toContain("Project has been initialised with webpack!"); + expect(stderr).toContain("webpack.config.js"); + + // Test files + const files = [ + ...defaultTemplateFiles.filter((file) => file !== "package-lock.json"), + "yarn.lock", + ]; files.forEach((file) => { expect(existsSync(resolve(assetsPath, file))).toBeTruthy(); diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 0656845c50a..c8d4644434e 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -11,12 +11,23 @@ const { const firstPrompt = "? Loader name (my-loader)"; const ENTER = "\x0D"; +const DOWN = "\x1B\x5B\x42"; + 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"), + defaultTemplateFiles: [ + "package.json", + "package-lock.json", + "examples", + "src", + "test", + "src/index.js", + "examples/simple/webpack.config.js", + ], }); describe("loader command", () => { @@ -31,13 +42,13 @@ describe("loader command", () => { it("should scaffold loader with default name if no loader name provided", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { defaultLoaderPath } = dataForTests(assetsPath); - let { stdout } = await runPromptWithAnswers(assetsPath, ["loader"], [`${ENTER}`]); + const { defaultLoaderPath, defaultTemplateFiles } = dataForTests(assetsPath); + let { stdout } = await runPromptWithAnswers(assetsPath, ["loader"], [ENTER, ENTER]); expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails - if (!existsSync(resolve(defaultLoaderPath, "./yarn.lock"))) { + if (!existsSync(resolve(defaultLoaderPath, "./package-lock.json"))) { return; } @@ -45,21 +56,12 @@ describe("loader command", () => { expect(existsSync(defaultLoaderPath)).toBeTruthy(); // All test files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(defaultLoaderPath, file)).toBeTruthy(); }); // Check if the the generated loader works successfully - const path = resolve(__dirname, "./my-loader/examples/simple/"); + const path = resolve(defaultLoaderPath, "./examples/simple/"); ({ stdout } = await run(path, [])); @@ -68,17 +70,17 @@ describe("loader command", () => { it("should scaffold loader template with a given name", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { loaderName, loaderPath } = dataForTests(assetsPath); + const { loaderName, loaderPath, defaultTemplateFiles } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers( assetsPath, ["loader"], - [`${loaderName}${ENTER}`], + [`${loaderName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails - if (!existsSync(resolve(loaderPath, "./yarn.lock"))) { + if (!existsSync(resolve(loaderPath, "./package-lock.json"))) { return; } @@ -86,21 +88,12 @@ describe("loader command", () => { expect(existsSync(loaderPath)).toBeTruthy(); // All test files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(loaderPath, file)).toBeTruthy(); }); // Check if the the generated loader works successfully - const path = resolve(__dirname, "./test-loader/examples/simple/"); + const path = resolve(loaderPath, "./examples/simple/"); ({ stdout } = await run(path, [])); @@ -109,17 +102,17 @@ describe("loader command", () => { it("should scaffold loader template in the specified path", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { loaderName, customLoaderPath } = dataForTests(assetsPath); + const { loaderName, customLoaderPath, defaultTemplateFiles } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers( assetsPath, ["loader", "test-assets"], - [`${loaderName}${ENTER}`], + [`${loaderName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails - if (!existsSync(resolve(customLoaderPath, "./yarn.lock"))) { + if (!existsSync(resolve(customLoaderPath, "./package-lock.json"))) { return; } @@ -127,16 +120,7 @@ describe("loader command", () => { expect(existsSync(customLoaderPath)).toBeTruthy(); // All test files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(customLoaderPath, file)).toBeTruthy(); }); @@ -150,18 +134,18 @@ describe("loader command", () => { it("should scaffold loader template in the current directory", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { loaderName, customLoaderPath } = dataForTests(assetsPath); + const { loaderName, customLoaderPath, defaultTemplateFiles } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers( assetsPath, ["loader", "./"], - [`${loaderName}${ENTER}`], + [`${loaderName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); // Skip test in case installation fails - if (!existsSync(resolve(customLoaderPath, "./yarn.lock"))) { + if (!existsSync(resolve(customLoaderPath, "./package-lock.json"))) { return; } @@ -169,16 +153,7 @@ describe("loader command", () => { expect(existsSync(customLoaderPath)).toBeTruthy(); // All test files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(customLoaderPath, file)).toBeTruthy(); }); @@ -199,11 +174,43 @@ describe("loader command", () => { it("recognizes '-t' as an alias for '--template'", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { defaultLoaderPath } = dataForTests(assetsPath); + const { defaultLoaderPath, defaultTemplateFiles } = dataForTests(assetsPath); + let { stdout } = await runPromptWithAnswers( + assetsPath, + ["loader", "-t", "default"], + [`${ENTER}`, ENTER], + ); + + expect(normalizeStdout(stdout)).toContain(firstPrompt); + + // Skip test in case installation fails + if (!existsSync(resolve(defaultLoaderPath, "./package-lock.json"))) { + return; + } + + // Check if the output directory exists with the appropriate loader name + expect(existsSync(defaultLoaderPath)).toBeTruthy(); + + // All test files are scaffolded + defaultTemplateFiles.forEach((file) => { + expect(existsSync(defaultLoaderPath, file)).toBeTruthy(); + }); + + // Check if the the generated loader works successfully + const path = resolve(assetsPath, "./my-loader/examples/simple/"); + + ({ stdout } = await run(path, [])); + + expect(stdout).toContain("my-loader"); + }); + + it("uses yarn as the package manager when opted", async () => { + const assetsPath = await uniqueDirectoryForTest(); + const { defaultLoaderPath, defaultTemplateFiles } = dataForTests(assetsPath); let { stdout } = await runPromptWithAnswers( assetsPath, ["loader", "-t", "default"], - [`${ENTER}`], + [`${ENTER}`, `${DOWN}${ENTER}`], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); @@ -218,12 +225,8 @@ describe("loader command", () => { // All test files are scaffolded const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", + ...defaultTemplateFiles.filter((file) => file !== "package-lock.json"), + "yarn.lock", ]; files.forEach((file) => { @@ -231,7 +234,7 @@ describe("loader command", () => { }); // Check if the the generated loader works successfully - const path = resolve(__dirname, "./my-loader/examples/simple/"); + const path = resolve(assetsPath, "./my-loader/examples/simple/"); ({ stdout } = await run(path, [])); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 080e03b3342..0599e6dacc3 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -8,6 +8,7 @@ const { } = require("../utils/test-utils"); const ENTER = "\x0D"; +const DOWN = "\x1B\x5B\x42"; const firstPrompt = "? Plugin name"; const dataForTests = (rootAssetsPath) => ({ @@ -16,6 +17,14 @@ const dataForTests = (rootAssetsPath) => ({ defaultPluginPath: join(rootAssetsPath, "my-webpack-plugin"), genPath: join(rootAssetsPath, "test-assets"), customPluginPath: join(rootAssetsPath, "test-assets", "test-plugin"), + defaultTemplateFiles: [ + "package.json", + "examples", + "src", + "test", + "src/index.js", + "examples/simple/webpack.config.js", + ], }); describe("plugin command", () => { @@ -30,8 +39,8 @@ describe("plugin command", () => { it("should scaffold plugin with default name if no plugin name provided", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { defaultPluginPath } = dataForTests(assetsPath); - const { stdout } = await runPromptWithAnswers(assetsPath, ["plugin"], [`${ENTER}`]); + const { defaultPluginPath, defaultTemplateFiles } = dataForTests(assetsPath); + const { stdout } = await runPromptWithAnswers(assetsPath, ["plugin"], [ENTER, ENTER]); expect(normalizeStdout(stdout)).toContain(firstPrompt); @@ -39,39 +48,30 @@ describe("plugin command", () => { expect(existsSync(defaultPluginPath)).toBeTruthy(); // Skip test in case installation fails - if (!existsSync(resolve(defaultPluginPath, "./yarn.lock"))) { + if (!existsSync(resolve(defaultPluginPath, "./package-lock.json"))) { return; } // Test regressively files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(join(defaultPluginPath, file))).toBeTruthy(); }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(__dirname, [ + const { stdout: stdout2 } = await run(defaultPluginPath, [ "--config", - "./my-webpack-plugin/examples/simple/webpack.config.js", + "./examples/simple/webpack.config.js", ]); expect(normalizeStdout(stdout2)).toContain("Hello World!"); }); it("should scaffold plugin template with a given name", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { pluginName, pluginPath } = dataForTests(assetsPath); + const { pluginName, pluginPath, defaultTemplateFiles } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers( assetsPath, ["plugin"], - [`${pluginName}${ENTER}`], + [`${pluginName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); @@ -80,39 +80,30 @@ describe("plugin command", () => { expect(existsSync(pluginPath)).toBeTruthy(); // Skip test in case installation fails - if (!existsSync(resolve(pluginPath, "./yarn.lock"))) { + if (!existsSync(resolve(pluginPath, "./package-lock.json"))) { return; } // Test regressively files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(join(pluginPath, file))).toBeTruthy(); }); // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(__dirname, [ + const { stdout: stdout2 } = await run(pluginPath, [ "--config", - "./test-plugin/examples/simple/webpack.config.js", + "./examples/simple/webpack.config.js", ]); expect(normalizeStdout(stdout2)).toContain("Hello World!"); }); it("should scaffold plugin template in the specified path", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { pluginName, customPluginPath } = dataForTests(assetsPath); + const { pluginName, customPluginPath, defaultTemplateFiles } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers( assetsPath, ["plugin", "test-assets"], - [`${pluginName}${ENTER}`], + [`${pluginName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); @@ -121,21 +112,12 @@ describe("plugin command", () => { expect(existsSync(customPluginPath)).toBeTruthy(); // Skip test in case installation fails - if (!existsSync(resolve(customPluginPath, "./yarn.lock"))) { + if (!existsSync(resolve(customPluginPath, "./package-lock.json"))) { return; } // Test regressively files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(join(customPluginPath, file))).toBeTruthy(); }); @@ -149,7 +131,8 @@ describe("plugin command", () => { it("should scaffold plugin template in the current directory", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { genPath, customPluginPath, pluginName } = dataForTests(assetsPath); + const { genPath, customPluginPath, pluginName, defaultTemplateFiles } = + dataForTests(assetsPath); if (!existsSync(genPath)) { mkdirSync(genPath); @@ -158,7 +141,7 @@ describe("plugin command", () => { const { stdout } = await runPromptWithAnswers( genPath, ["plugin", "./"], - [`${pluginName}${ENTER}`], + [`${pluginName}${ENTER}`, ENTER], ); expect(normalizeStdout(stdout)).toContain(firstPrompt); @@ -167,21 +150,12 @@ describe("plugin command", () => { expect(existsSync(customPluginPath)).toBeTruthy(); // Skip test in case installation fails - if (!existsSync(resolve(customPluginPath, "./yarn.lock"))) { + if (!existsSync(resolve(customPluginPath, "./package-lock.json"))) { return; } // Test regressively files are scaffolded - const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", - ]; - - files.forEach((file) => { + defaultTemplateFiles.forEach((file) => { expect(existsSync(join(customPluginPath, file))).toBeTruthy(); }); @@ -202,35 +176,69 @@ describe("plugin command", () => { it("recognizes '-t' as an alias for '--template'", async () => { const assetsPath = await uniqueDirectoryForTest(); - const { defaultPluginPath } = dataForTests(assetsPath); + const { defaultPluginPath, defaultTemplateFiles } = dataForTests(assetsPath); const { stdout } = await runPromptWithAnswers( assetsPath, ["plugin", "-t", "default"], - [`${ENTER}`], + [`${ENTER}`, ENTER], + ); + + expect(normalizeStdout(stdout)).toContain(firstPrompt); + + // Check if the output directory exists with the appropriate plugin name + expect(existsSync(defaultPluginPath)).toBeTruthy(); + + // Skip test in case installation fails + if (!existsSync(resolve(defaultPluginPath, "./package-lock.json"))) { + return; + } + + // Test regressively files are scaffolded + defaultTemplateFiles.forEach((file) => { + expect(existsSync(join(defaultPluginPath, file))).toBeTruthy(); + }); + + // Check if the the generated plugin works successfully + const { stdout: stdout2 } = await run(defaultPluginPath, [ + "--config", + "./examples/simple/webpack.config.js", + ]); + expect(normalizeStdout(stdout2)).toContain("Hello World!"); + }); + + it("uses yarn as the package manager when opted", async () => { + const assetsPath = await uniqueDirectoryForTest(); + const { defaultPluginPath, defaultTemplateFiles } = dataForTests(assetsPath); + const { stdout } = await runPromptWithAnswers( + assetsPath, + ["plugin"], + [`${ENTER}`, `${DOWN}${ENTER}`], ); + expect(normalizeStdout(stdout)).toContain(firstPrompt); + // Check if the output directory exists with the appropriate plugin name expect(existsSync(defaultPluginPath)).toBeTruthy(); + // Skip test in case installation fails if (!existsSync(resolve(defaultPluginPath, "./yarn.lock"))) { return; } + // Test regressively files are scaffolded const files = [ - "package.json", - "examples", - "src", - "test", - "src/index.js", - "examples/simple/webpack.config.js", + ...defaultTemplateFiles.filter((file) => file !== "package-lock.json"), + "yarn.lock", ]; + files.forEach((file) => { expect(existsSync(join(defaultPluginPath, file))).toBeTruthy(); }); + // Check if the the generated plugin works successfully - const { stdout: stdout2 } = await run(__dirname, [ + const { stdout: stdout2 } = await run(defaultPluginPath, [ "--config", - "./my-webpack-plugin/examples/simple/webpack.config.js", + "./examples/simple/webpack.config.js", ]); expect(normalizeStdout(stdout2)).toContain("Hello World!"); }); 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 e34efbf1bf6..19d8b4c21f7 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 @@ -36,76 +36,6 @@ 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" 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 43d3cfed3a2..661825da41d 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 @@ -36,77 +36,6 @@ 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" 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 index 117e8e5580e..17bee54b7b5 100644 --- a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack4 @@ -66,89 +66,6 @@ exports[`basic serve usage should respect the "publicPath" option from configura [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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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" 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 index 1dd6fc728ee..628436d4780 100644 --- a/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 +++ b/test/serve/basic/__snapshots__/serve-basic.test.js.snap.devServer4.webpack5 @@ -66,90 +66,6 @@ exports[`basic serve usage should respect the "publicPath" option from configura [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. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --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. - --https-passphrase Passphrase for a pfx file. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --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. - --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" 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 e1098ce284c..64761c54c2d 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 @@ -18,6 +18,7 @@ module.exports = [ }, } : {}, + plugins: [new WebpackCLITestPlugin(["mode", "output"], false, "hooks.compilation.taps")], }, { name: "two", diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index d714dc0db8e..b2fba51819b 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -356,21 +356,23 @@ describe("basic serve usage", () => { expect(stdout).toContain("main.js"); }); - // 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/", + "--stats", + "verbose", ]); expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); if (isWebpack5) { + expect(stdout).toContain("/my-public-path/"); + if (isDevServer4) { expect(stdout).toContain("HotModuleReplacementPlugin"); } else { - expect(stdout).toContain("/my-public-path/"); expect(stdout).not.toContain("HotModuleReplacementPlugin"); } @@ -533,14 +535,6 @@ describe("basic serve usage", () => { expect(stdout).toContain("development"); }); - 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 () => { const { stderr, stdout } = await runWatch( __dirname, 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 index 5d45ad3d218..6a6f81a5138 100644 --- 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 @@ -19,14 +19,14 @@ exports[`invalid schema should log webpack error and exit process on invalid fla 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 one of these: +"[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. + - options.bonjour should be one of these: boolean | object { … } - -> Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour - Details: - * configuration.bonjour should be a boolean. - * configuration.bonjour should be an object: - object { … }" + -> Allows to broadcasts dev server via ZeroConf networking on start. + -> Read more + at stack + -> Options for bonjour. + -> Read more at https://github.com/watson/bonjour#initializing" `; 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 index 764cb17a6d3..81550614e9e 100644 --- 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 @@ -17,14 +17,14 @@ exports[`invalid schema should log webpack error and exit process on invalid fla 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 one of these: +"[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. + - options.bonjour should be one of these: boolean | object { … } - -> Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour - Details: - * configuration.bonjour should be a boolean. - * configuration.bonjour should be an object: - object { … }" + -> Allows to broadcasts dev server via ZeroConf networking on start. + -> Read more + at stack + -> Options for bonjour. + -> Read more at https://github.com/watson/bonjour#initializing" `; exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index ed707c23691..58bf0de4bcf 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -361,8 +361,22 @@ const readdir = (path) => }); }); +const urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; + +const uuid = (size = 21) => { + let id = ""; + let i = size; + + while (i--) { + // `| 0` is more compact and faster than `Math.floor()`. + id += urlAlphabet[(Math.random() * 64) | 0]; + } + + return id; +}; + const uniqueDirectoryForTest = async () => { - const result = path.resolve(os.tmpdir(), Date.now().toString()); + const result = path.resolve(os.tmpdir(), uuid()); if (!fs.existsSync(result)) { fs.mkdirSync(result); diff --git a/yarn.lock b/yarn.lock index d3626735084..b1545e6b1d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -592,21 +592,35 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz#90420f9f9c6d3987f176a19a7d8e764271a2f55d" integrity sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g== -"@eslint/eslintrc@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" - integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== dependencies: ajv "^6.12.4" debug "^4.1.1" espree "^7.3.0" - globals "^12.1.0" + globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + "@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" @@ -635,94 +649,94 @@ jest-util "^27.0.1" slash "^3.0.0" -"@jest/console@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.2.tgz#b8eeff8f21ac51d224c851e1729d2630c18631e6" - integrity sha512-/zYigssuHLImGeMAACkjI4VLAiiJznHgAl3xnFT19iWyct2LhrH3KXOjHRmxBGTkiPLZKKAJAgaPpiU9EZ9K+w== +"@jest/console@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f" + integrity sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.0.2" - jest-util "^27.0.2" + jest-message-util "^27.0.6" + jest-util "^27.0.6" slash "^3.0.0" -"@jest/core@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.4.tgz#679bf9ac07900da2ddbb9667bb1afa8029038f53" - integrity sha512-+dsmV8VUs1h/Szb+rEWk8xBM1fp1I///uFy9nk3wXGvRsF2lBp8EVPmtWc+QFRb3MY2b7u2HbkGF1fzoDzQTLA== - dependencies: - "@jest/console" "^27.0.2" - "@jest/reporters" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" +"@jest/core@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.6.tgz#c5f642727a0b3bf0f37c4b46c675372d0978d4a1" + integrity sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow== + dependencies: + "@jest/console" "^27.0.6" + "@jest/reporters" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.0.2" - jest-config "^27.0.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-resolve-dependencies "^27.0.4" - jest-runner "^27.0.4" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - jest-watcher "^27.0.2" + jest-changed-files "^27.0.6" + jest-config "^27.0.6" + jest-haste-map "^27.0.6" + jest-message-util "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-resolve-dependencies "^27.0.6" + jest-runner "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" + jest-watcher "^27.0.6" micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.3.tgz#68769b1dfdd213e3456169d64fbe9bd63a5fda92" - integrity sha512-pN9m7fbKsop5vc3FOfH8NF7CKKdRbEZzcxfIo1n2TT6ucKWLFq0P6gCJH0GpnQp036++yY9utHOxpeT1WnkWTA== +"@jest/environment@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2" + integrity sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg== dependencies: - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" - jest-mock "^27.0.3" + jest-mock "^27.0.6" -"@jest/fake-timers@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.3.tgz#9899ba6304cc636734c74478df502e18136461dd" - integrity sha512-fQ+UCKRIYKvTCEOyKPnaPnomLATIhMnHC/xPZ7yT1Uldp7yMgMxoYIFidDbpSTgB79+/U+FgfoD30c6wg3IUjA== +"@jest/fake-timers@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" + integrity sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@sinonjs/fake-timers" "^7.0.2" "@types/node" "*" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-util "^27.0.2" + jest-message-util "^27.0.6" + jest-mock "^27.0.6" + jest-util "^27.0.6" -"@jest/globals@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.3.tgz#1cf8933b7791bba0b99305cbf39fd4d2e3fe4060" - integrity sha512-OzsIuf7uf+QalqAGbjClyezzEcLQkdZ+7PejUrZgDs+okdAK8GwRCGcYCirHvhMBBQh60Jr3NlIGbn/KBPQLEQ== +"@jest/globals@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" + integrity sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw== dependencies: - "@jest/environment" "^27.0.3" - "@jest/types" "^27.0.2" - expect "^27.0.2" + "@jest/environment" "^27.0.6" + "@jest/types" "^27.0.6" + expect "^27.0.6" -"@jest/reporters@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.4.tgz#95609b1be97afb80d55d8aa3d7c3179c15810e65" - integrity sha512-Xa90Nm3JnV0xCe4M6A10M9WuN9krb+WFKxV1A98Y4ePCw40n++r7uxFUNU7DT1i9Behj7fjrAIju9oU0t1QtCg== +"@jest/reporters@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" + integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.0.2" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/console" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -733,20 +747,20 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" + jest-haste-map "^27.0.6" + jest-resolve "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^7.0.0" + v8-to-istanbul "^8.0.0" -"@jest/source-map@^27.0.1": - version "27.0.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.1.tgz#2afbf73ddbaddcb920a8e62d0238a0a9e0a8d3e4" - integrity sha512-yMgkF0f+6WJtDMdDYNavmqvbHtiSpwRN2U/W+6uztgfqgkq/PXdKPqjBTUF1RD/feth4rH5N3NW0T5+wIuln1A== +"@jest/source-map@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" + integrity sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" @@ -762,41 +776,41 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10" - integrity sha512-gcdWwL3yP5VaIadzwQtbZyZMgpmes8ryBAJp70tuxghiA8qL4imJyZex+i+USQH2H4jeLVVszhwntgdQ97fccA== +"@jest/test-result@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.6.tgz#3fa42015a14e4fdede6acd042ce98c7f36627051" + integrity sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w== dependencies: - "@jest/console" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/console" "^27.0.6" + "@jest/types" "^27.0.6" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.4.tgz#976493b277594d81e589896f0ed21f198308928a" - integrity sha512-6UFEVwdmxYdyNffBxVVZxmXEdBE4riSddXYSnFNH0ELFQFk/bvagizim8WfgJTqF4EKd+j1yFxvhb8BMHfOjSQ== +"@jest/test-sequencer@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" + integrity sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA== dependencies: - "@jest/test-result" "^27.0.2" + "@jest/test-result" "^27.0.6" graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-runtime "^27.0.4" + jest-haste-map "^27.0.6" + jest-runtime "^27.0.6" -"@jest/transform@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.2.tgz#b073b7c589e3f4b842102468875def2bb722d6b5" - integrity sha512-H8sqKlgtDfVog/s9I4GG2XMbi4Ar7RBxjsKQDUhn2XHAi3NG+GoQwWMER+YfantzExbjNqQvqBHzo/G2pfTiPw== +"@jest/transform@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.6.tgz#189ad7107413208f7600f4719f81dd2f7278cc95" + integrity sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-regex-util "^27.0.1" - jest-util "^27.0.2" + jest-haste-map "^27.0.6" + jest-regex-util "^27.0.6" + jest-util "^27.0.6" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -825,10 +839,10 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" - integrity sha512-XpjCtJ/99HB4PmyJ2vgmN7vT+JLP7RW1FBT9RgnMFS4Dt7cvIyBee8O3/j98aUZ34ZpenPZFqmaaObWSeL65dg== +"@jest/types@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b" + integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1822,10 +1836,10 @@ "@types/estree" "*" "@types/json-schema" "*" -"@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/estree@*", "@types/estree@^0.0.50": + version "0.0.50" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== "@types/expect@^1.20.4": version "1.20.4" @@ -1880,14 +1894,14 @@ "@types/istanbul-lib-report" "*" "@types/jest@^26.0.15": - version "26.0.23" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" - integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== + version "26.0.24" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" + integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.7": +"@types/json-schema@*", "@types/json-schema@^7.0.7": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== @@ -1930,9 +1944,9 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@^15.0.3": - version "15.12.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.0.tgz#6a459d261450a300e6865faeddb5af01c3389bb3" - integrity sha512-+aHJvoCsVhO2ZCuT4o5JtcPrCPyDE3+1nvbDprYes+pPkEsbjH7AGUCNtjMOXS0fqH14t+B7yLzaqSz92FPWyw== + version "15.14.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.7.tgz#29fea9a5b14e2b75c19028e1c7a32edd1e89fe92" + integrity sha512-FA45p37/mLhpebgbPWWCKfOisTjxGK9lwcHlJ6XVLfu3NgfcazOJHdYUZCWPMK8QX4LhNZdmfo6iMz9FqpUbaw== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2026,194 +2040,193 @@ rxjs "^6.4.0" "@typescript-eslint/eslint-plugin@^4.14.1": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.0.tgz#12bbd6ebd5e7fabd32e48e1e60efa1f3554a3242" - integrity sha512-yA7IWp+5Qqf+TLbd8b35ySFOFzUfL7i+4If50EqvjT6w35X8Lv0eBHb6rATeWmucks37w+zV+tWnOXI9JlG6Eg== + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz#808d206e2278e809292b5de752a91105da85860b" + integrity sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw== dependencies: - "@typescript-eslint/experimental-utils" "4.26.0" - "@typescript-eslint/scope-manager" "4.26.0" + "@typescript-eslint/experimental-utils" "4.29.1" + "@typescript-eslint/scope-manager" "4.29.1" debug "^4.3.1" functional-red-black-tree "^1.0.1" - lodash "^4.17.21" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.26.0": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.26.0.tgz#ba7848b3f088659cdf71bce22454795fc55be99a" - integrity sha512-TH2FO2rdDm7AWfAVRB5RSlbUhWxGVuxPNzGT7W65zVfl8H/WeXTk1e69IrcEVsBslrQSTDKQSaJD89hwKrhdkw== +"@typescript-eslint/experimental-utils@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz#0af2b17b0296b60c6b207f11062119fa9c5a8994" + integrity sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.26.0" - "@typescript-eslint/types" "4.26.0" - "@typescript-eslint/typescript-estree" "4.26.0" + "@typescript-eslint/scope-manager" "4.29.1" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/typescript-estree" "4.29.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" "@typescript-eslint/parser@^4.14.1": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.26.0.tgz#31b6b732c9454f757b020dab9b6754112aa5eeaf" - integrity sha512-b4jekVJG9FfmjUfmM4VoOItQhPlnt6MPOBUL0AQbiTmm+SSpSdhHYlwayOm4IW9KLI/4/cRKtQCmDl1oE2OlPg== + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d" + integrity sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg== dependencies: - "@typescript-eslint/scope-manager" "4.26.0" - "@typescript-eslint/types" "4.26.0" - "@typescript-eslint/typescript-estree" "4.26.0" + "@typescript-eslint/scope-manager" "4.29.1" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/typescript-estree" "4.29.1" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.26.0": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.26.0.tgz#60d1a71df162404e954b9d1c6343ff3bee496194" - integrity sha512-G6xB6mMo4xVxwMt5lEsNTz3x4qGDt0NSGmTBNBPJxNsrTXJSm21c6raeYroS2OwQsOyIXqKZv266L/Gln1BWqg== +"@typescript-eslint/scope-manager@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz#f25da25bc6512812efa2ce5ebd36619d68e61358" + integrity sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A== dependencies: - "@typescript-eslint/types" "4.26.0" - "@typescript-eslint/visitor-keys" "4.26.0" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/visitor-keys" "4.29.1" -"@typescript-eslint/types@4.26.0": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.26.0.tgz#7c6732c0414f0a69595f4f846ebe12616243d546" - integrity sha512-rADNgXl1kS/EKnDr3G+m7fB9yeJNnR9kF7xMiXL6mSIWpr3Wg5MhxyfEXy/IlYthsqwBqHOr22boFbf/u6O88A== +"@typescript-eslint/types@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5" + integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA== -"@typescript-eslint/typescript-estree@4.26.0": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.0.tgz#aea17a40e62dc31c63d5b1bbe9a75783f2ce7109" - integrity sha512-GHUgahPcm9GfBuy3TzdsizCcPjKOAauG9xkz9TR8kOdssz2Iz9jRCSQm6+aVFa23d5NcSpo1GdHGSQKe0tlcbg== +"@typescript-eslint/typescript-estree@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f" + integrity sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw== dependencies: - "@typescript-eslint/types" "4.26.0" - "@typescript-eslint/visitor-keys" "4.26.0" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/visitor-keys" "4.29.1" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.26.0": - version "4.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.26.0.tgz#26d2583169222815be4dcd1da4fe5459bc3bcc23" - integrity sha512-cw4j8lH38V1ycGBbF+aFiLUls9Z0Bw8QschP3mkth50BbWzgFS33ISIgBzUMuQ2IdahoEv/rXstr8Zhlz4B1Zg== +"@typescript-eslint/visitor-keys@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d" + integrity sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag== dependencies: - "@typescript-eslint/types" "4.26.0" + "@typescript-eslint/types" "4.29.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" - integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== +"@webassemblyjs/ast@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" + integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== dependencies: - "@webassemblyjs/helper-numbers" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/helper-numbers" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" -"@webassemblyjs/floating-point-hex-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" - integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== +"@webassemblyjs/floating-point-hex-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" + integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== -"@webassemblyjs/helper-api-error@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" - integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== +"@webassemblyjs/helper-api-error@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" + integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== -"@webassemblyjs/helper-buffer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" - integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== +"@webassemblyjs/helper-buffer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" + integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== -"@webassemblyjs/helper-numbers@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" - integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== +"@webassemblyjs/helper-numbers@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" + integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" + "@webassemblyjs/floating-point-hex-parser" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" - integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== +"@webassemblyjs/helper-wasm-bytecode@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" + integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== -"@webassemblyjs/helper-wasm-section@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" - integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== +"@webassemblyjs/helper-wasm-section@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" + integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" -"@webassemblyjs/ieee754@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" - integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== +"@webassemblyjs/ieee754@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" + integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" - integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== +"@webassemblyjs/leb128@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" + integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" - integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== - -"@webassemblyjs/wasm-edit@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" - integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/helper-wasm-section" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-opt" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - "@webassemblyjs/wast-printer" "1.11.0" - -"@webassemblyjs/wasm-gen@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" - integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wasm-opt@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" - integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - -"@webassemblyjs/wasm-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" - integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wast-printer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" - integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" +"@webassemblyjs/utf8@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" + integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== + +"@webassemblyjs/wasm-edit@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" + integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/helper-wasm-section" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-opt" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + "@webassemblyjs/wast-printer" "1.11.1" + +"@webassemblyjs/wasm-gen@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" + integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wasm-opt@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" + integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + +"@webassemblyjs/wasm-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" + integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wast-printer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" + integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== + dependencies: + "@webassemblyjs/ast" "1.11.1" "@xtuc/long" "4.2.2" "@webpack-cli/migrate@^1.1.2": @@ -2289,6 +2302,11 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" +acorn-import-assertions@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz#580e3ffcae6770eebeec76c3b9723201e9d01f78" + integrity sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA== + acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" @@ -2309,15 +2327,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.2.1: - version "8.2.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" - integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== - -acorn@^8.2.4: - version "8.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.3.0.tgz#1193f9b96c4e8232f00b11a9edff81b2c8b98b88" - integrity sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw== +acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== add-stream@^1.0.0: version "1.0.0" @@ -2677,16 +2690,16 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== -babel-jest@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.2.tgz#7dc18adb01322acce62c2af76ea2c7cd186ade37" - integrity sha512-9OThPl3/IQbo4Yul2vMz4FYwILPQak8XelX4YGowygfHaOl5R5gfjm4iVx4d8aUugkW683t8aq0A74E7b5DU1Q== +babel-jest@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" + integrity sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA== dependencies: - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.0.1" + babel-preset-jest "^27.0.6" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -2709,10 +2722,10 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.1.tgz#a6d10e484c93abff0f4e95f437dad26e5736ea11" - integrity sha512-sqBF0owAcCDBVEDtxqfYr2F36eSHdx7lAVGyYuOBRnKdD6gzcy0I0XrAYCZgOA3CRrLhmR+Uae9nogPzmAtOfQ== +babel-plugin-jest-hoist@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" + integrity sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2737,12 +2750,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.1.tgz#7a50c75d16647c23a2cf5158d5bb9eb206b10e20" - integrity sha512-nIBIqCEpuiyhvjQs2mVNwTxQQa2xk70p9Dd/0obQGBf8FBzbnI8QhQKzLsWMN2i6q+5B0OcWDtrboBX5gmOLyA== +babel-preset-jest@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" + integrity sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw== dependencies: - babel-plugin-jest-hoist "^27.0.1" + babel-plugin-jest-hoist "^27.0.6" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -3333,9 +3346,9 @@ color-name@~1.1.4: integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 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== + version "1.3.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" + integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== colors@1.0.3: version "1.0.3" @@ -3945,10 +3958,10 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== -diff-sequences@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c" - integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg== +diff-sequences@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" + integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== diff@^3.5.0: version "3.5.0" @@ -4209,10 +4222,10 @@ es-abstract@^1.18.0-next.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.0" -es-module-lexer@^0.4.0: - 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-module-lexer@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.7.1.tgz#c2c8e0f46f2df06274cdaf0dd3f3b33e0a0b267d" + integrity sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw== es-to-primitive@^1.2.1: version "1.2.1" @@ -4330,12 +4343,13 @@ eslint-visitor-keys@^2.0.0: integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint@^7.12.1: - version "7.27.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" - integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA== + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.1" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -4352,7 +4366,7 @@ eslint@^7.12.1: fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" + glob-parent "^5.1.2" globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" @@ -4468,9 +4482,9 @@ execa@^4.0.0, execa@^4.1.0: strip-final-newline "^2.0.0" execa@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.1.tgz#aee63b871c9b2cb56bc9addcd3c70a785c6bf0d1" - integrity sha512-4hFTjFbFzQa3aCLobpbPJR/U+VoL1wdV5ozOWjeet0AWDeYr9UFGM1eUFWHX+VtOWFq4p0xXUXfW1YxUaP4fpw== + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.0" @@ -4507,17 +4521,17 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.2.tgz#e66ca3a4c9592f1c019fa1d46459a9d2084f3422" - integrity sha512-YJFNJe2+P2DqH+ZrXy+ydRQYO87oxRUonZImpDodR1G7qo3NYd3pL+NQ9Keqpez3cehczYwZDBC3A7xk3n7M/w== +expect@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.6.tgz#a4d74fbe27222c718fff68ef49d78e26a8fd4c05" + integrity sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" ansi-styles "^5.0.0" - jest-get-type "^27.0.1" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-regex-util "^27.0.1" + jest-get-type "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-regex-util "^27.0.6" express@^4.17.1: version "4.17.1" @@ -5139,7 +5153,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, glob-parent@^5.1.1: +glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -5216,17 +5230,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== - dependencies: - type-fest "^0.8.1" - -globals@^13.6.0: - version "13.8.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.8.0.tgz#3e20f504810ce87a8d72e55aecf8435b50f4c1b3" - integrity sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q== +globals@^13.6.0, globals@^13.9.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== dependencies: type-fest "^0.20.2" @@ -6324,84 +6331,84 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801" - integrity sha512-eMeb1Pn7w7x3wue5/vF73LPCJ7DKQuC9wQUR5ebP9hDPpk5hzcT/3Hmz3Q5BOFpR3tgbmaWhJcMTVgC8Z1NuMw== +jest-changed-files@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.6.tgz#bed6183fcdea8a285482e3b50a9a7712d49a7a8b" + integrity sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.4.tgz#3b261514ee3b3da33def736a6352c98ff56bb6e6" - integrity sha512-QD+eblDiRphta630WRKewuASLs/oY1Zki2G4bccntRvrTHQ63ljwFR5TLduuK4Zg0ZPzW0+8o6AP7KRd1yKOjw== +jest-circus@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668" + integrity sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q== dependencies: - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/environment" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.0.2" + expect "^27.0.6" is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" + jest-each "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.4.tgz#491b12c754c0d7c6873b13a66f26b3a80a852910" - integrity sha512-E0T+/i2lxsWAzV7LKYd0SB7HUAvePqaeIh5vX43/G5jXLhv1VzjYzJAGEkTfvxV774ll9cyE2ljcL73PVMEOXQ== +jest-cli@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.6.tgz#d021e5f4d86d6a212450d4c7b86cb219f1e6864f" + integrity sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg== dependencies: - "@jest/core" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/core" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-config "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" prompts "^2.0.1" yargs "^16.0.3" -jest-config@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.4.tgz#c4f41378acf40ca77860fb4e213b12109d87b8cf" - integrity sha512-VkQFAHWnPQefdvHU9A+G3H/Z3NrrTKqWpvxgQz3nkUdkDTWeKJE6e//BL+R7z79dXOMVksYgM/z6ndtN0hfChg== +jest-config@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" + integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.0.4" - "@jest/types" "^27.0.2" - babel-jest "^27.0.2" + "@jest/test-sequencer" "^27.0.6" + "@jest/types" "^27.0.6" + babel-jest "^27.0.6" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.0.4" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-get-type "^27.0.1" - jest-jasmine2 "^27.0.4" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-runner "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-circus "^27.0.6" + jest-environment-jsdom "^27.0.6" + jest-environment-node "^27.0.6" + jest-get-type "^27.0.6" + jest-jasmine2 "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-runner "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" micromatch "^4.0.4" - pretty-format "^27.0.2" + pretty-format "^27.0.6" jest-diff@^26.0.0: version "26.6.2" @@ -6413,130 +6420,130 @@ jest-diff@^26.0.0: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e" - integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw== +jest-diff@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" + integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== dependencies: chalk "^4.0.0" - diff-sequences "^27.0.1" - jest-get-type "^27.0.1" - pretty-format "^27.0.2" + diff-sequences "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" -jest-docblock@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.1.tgz#bd9752819b49fa4fab1a50b73eb58c653b962e8b" - integrity sha512-TA4+21s3oebURc7VgFV4r7ltdIJ5rtBH1E3Tbovcg7AV+oLfD5DcJ2V2vJ5zFA9sL5CFd/d2D6IpsAeSheEdrA== +jest-docblock@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3" + integrity sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA== dependencies: detect-newline "^3.0.0" -jest-each@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7" - integrity sha512-OLMBZBZ6JkoXgUenDtseFRWA43wVl2BwmZYIWQws7eS7pqsIvePqj/jJmEnfq91ALk3LNphgwNK/PRFBYi7ITQ== +jest-each@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b" + integrity sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" chalk "^4.0.0" - jest-get-type "^27.0.1" - jest-util "^27.0.2" - pretty-format "^27.0.2" - -jest-environment-jsdom@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.3.tgz#ed73e913ddc03864eb9f934b5cbabf1b63504e2e" - integrity sha512-5KLmgv1bhiimpSA8oGTnZYk6g4fsNyZiA/6gI2tAZUgrufd7heRUSVh4gRokzZVEj8zlwAQYT0Zs6tuJSW/ECA== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" + jest-get-type "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" + +jest-environment-jsdom@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" + integrity sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw== + dependencies: + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" + jest-mock "^27.0.6" + jest-util "^27.0.6" jsdom "^16.6.0" -jest-environment-node@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.3.tgz#b4acb3679d2552a4215732cab8b0ca7ec4398ee0" - integrity sha512-co2/IVnIFL3cItpFULCvXFg9us4gvWXgs7mutAMPCbFhcqh56QAOdKhNzC2+RycsC/k4mbMj1VF+9F/NzA0ROg== +jest-environment-node@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" + integrity sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w== dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" + jest-mock "^27.0.6" + jest-util "^27.0.6" jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-get-type@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815" - integrity sha512-9Tggo9zZbu0sHKebiAijyt1NM77Z0uO4tuWOxUCujAiSeXv30Vb5D4xVF4UR4YWNapcftj+PbByU54lKD7/xMg== +jest-get-type@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" + integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== -jest-haste-map@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.2.tgz#3f1819400c671237e48b4d4b76a80a0dbed7577f" - integrity sha512-37gYfrYjjhEfk37C4bCMWAC0oPBxDpG0qpl8lYg8BT//wf353YT/fzgA7+Dq0EtM7rPFS3JEcMsxdtDwNMi2cA== +jest-haste-map@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.6.tgz#4683a4e68f6ecaa74231679dca237279562c8dc7" + integrity sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" - jest-regex-util "^27.0.1" - jest-serializer "^27.0.1" - jest-util "^27.0.2" - jest-worker "^27.0.2" + jest-regex-util "^27.0.6" + jest-serializer "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.4.tgz#c669519ccf4904a485338555e1e66cad36bb0670" - integrity sha512-yj3WrjjquZwkJw+eA4c9yucHw4/+EHndHWSqgHbHGQfT94ihaaQsa009j1a0puU8CNxPDk0c1oAPeOpdJUElwA== +jest-jasmine2@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" + integrity sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/environment" "^27.0.6" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.0.2" + expect "^27.0.6" is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" + jest-each "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" throat "^6.0.1" -jest-leak-detector@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69" - integrity sha512-TZA3DmCOfe8YZFIMD1GxFqXUkQnIoOGQyy4hFCA2mlHtnAaf+FeOMxi0fZmfB41ZL+QbFG6BVaZF5IeFIVy53Q== +jest-leak-detector@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" + integrity sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ== dependencies: - jest-get-type "^27.0.1" - pretty-format "^27.0.2" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" -jest-matcher-utils@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0" - integrity sha512-Qczi5xnTNjkhcIB0Yy75Txt+Ez51xdhOxsukN7awzq2auZQGPHcQrJ623PZj0ECDEMOk2soxWx05EXdXGd1CbA== +jest-matcher-utils@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz#2a8da1e86c620b39459f4352eaa255f0d43e39a9" + integrity sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA== dependencies: chalk "^4.0.0" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - pretty-format "^27.0.2" + jest-diff "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" jest-message-util@^27.0.1: version "27.0.1" @@ -6553,27 +6560,27 @@ jest-message-util@^27.0.1: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c" - integrity sha512-rTqWUX42ec2LdMkoUPOzrEd1Tcm+R1KfLOmFK+OVNo4MnLsEaxO5zPDb2BbdSmthdM/IfXxOZU60P/WbWF8BTw== +jest-message-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.6.tgz#158bcdf4785706492d164a39abca6a14da5ab8b5" + integrity sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.0.2" + pretty-format "^27.0.6" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d" - integrity sha512-O5FZn5XDzEp+Xg28mUz4ovVcdwBBPfAhW9+zJLO0Efn2qNbYcDaJvSlRiQ6BCZUCVOJjALicuJQI9mRFjv1o9Q== +jest-mock@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" + integrity sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -6581,76 +6588,81 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^27.0.0, jest-regex-util@^27.0.1: +jest-regex-util@^27.0.0: version "27.0.1" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== -jest-resolve-dependencies@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.4.tgz#a07a242d70d668afd3fcf7f4270755eebb1fe579" - integrity sha512-F33UPfw1YGWCV2uxJl7wD6TvcQn5IC0LtguwY3r4L7R6H4twpLkp5Q2ZfzRx9A2I3G8feiy0O0sqcn/Qoym71A== +jest-regex-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" + integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== + +jest-resolve-dependencies@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz#3e619e0ef391c3ecfcf6ef4056207a3d2be3269f" + integrity sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA== dependencies: - "@jest/types" "^27.0.2" - jest-regex-util "^27.0.1" - jest-snapshot "^27.0.4" + "@jest/types" "^27.0.6" + jest-regex-util "^27.0.6" + jest-snapshot "^27.0.6" -jest-resolve@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.4.tgz#8a27bc3f2f00c8ea28f3bc99bbf6f468300a703d" - integrity sha512-BcfyK2i3cG79PDb/6gB6zFeFQlcqLsQjGBqznFCpA0L/3l1L/oOsltdUjs5eISAWA9HS9qtj8v2PSZr/yWxONQ== +jest-resolve@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.6.tgz#e90f436dd4f8fbf53f58a91c42344864f8e55bff" + integrity sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-util "^27.0.6" + jest-validate "^27.0.6" resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.4.tgz#2787170a9509b792ae129794f6944d27d5d12a4f" - integrity sha512-NfmvSYLCsCJk2AG8Ar2NAh4PhsJJpO+/r+g4bKR5L/5jFzx/indUpnVBdrfDvuqhGLLAvrKJ9FM/Nt8o1dsqxg== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" +jest-runner@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" + integrity sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ== + dependencies: + "@jest/console" "^27.0.6" + "@jest/environment" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-docblock "^27.0.1" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-haste-map "^27.0.2" - jest-leak-detector "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-runtime "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" + jest-docblock "^27.0.6" + jest-environment-jsdom "^27.0.6" + jest-environment-node "^27.0.6" + jest-haste-map "^27.0.6" + jest-leak-detector "^27.0.6" + jest-message-util "^27.0.6" + jest-resolve "^27.0.6" + jest-runtime "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.4.tgz#2e4a6aa77cac32ac612dfe12768387a8aa15c2f0" - integrity sha512-voJB4xbAjS/qYPboV+e+gmg3jfvHJJY4CagFWBOM9dQKtlaiTjcpD2tWwla84Z7PtXSQPeIpXY0qksA9Dum29A== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/globals" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" +jest-runtime@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" + integrity sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q== + dependencies: + "@jest/console" "^27.0.6" + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/globals" "^27.0.6" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/yargs" "^16.0.0" chalk "^4.0.0" cjs-module-lexer "^1.0.0" @@ -6658,30 +6670,30 @@ jest-runtime@^27.0.4: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-haste-map "^27.0.6" + jest-message-util "^27.0.6" + jest-mock "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.0.3" -jest-serializer@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020" - integrity sha512-svy//5IH6bfQvAbkAEg1s7xhhgHTtXu0li0I2fdKHDsLP2P2MOiscPQIENQep8oU2g2B3jqLyxKKzotZOz4CwQ== +jest-serializer@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1" + integrity sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.4.tgz#2b96e22ca90382b3e93bd0aae2ce4c78bf51fb5b" - integrity sha512-hnjrvpKGdSMvKfbHyaG5Kul7pDJGZvjVy0CKpzhu28MmAssDXS6GpynhXzgst1wBQoKD8c9b2VS2a5yhDLQRCA== +jest-snapshot@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf" + integrity sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6689,48 +6701,48 @@ jest-snapshot@^27.0.4: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.0.2" + expect "^27.0.6" graceful-fs "^4.2.4" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - jest-haste-map "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" + jest-diff "^27.0.6" + jest-get-type "^27.0.6" + jest-haste-map "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-resolve "^27.0.6" + jest-util "^27.0.6" natural-compare "^1.4.0" - pretty-format "^27.0.2" + pretty-format "^27.0.6" semver "^7.3.2" -jest-util@^27.0.0, jest-util@^27.0.1, jest-util@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7" - integrity sha512-1d9uH3a00OFGGWSibpNYr+jojZ6AckOMCXV2Z4K3YXDnzpkAaXQyIpY14FOJPiUmil7CD+A6Qs+lnnh6ctRbIA== +jest-util@^27.0.0, jest-util@^27.0.1, jest-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297" + integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^3.0.0" picomatch "^2.2.3" -jest-validate@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" - integrity sha512-UgBF6/oVu1ofd1XbaSotXKihi8nZhg0Prm8twQ9uCuAfo59vlxCXMPI/RKmrZEVgi3Nd9dS0I8A0wzWU48pOvg== +jest-validate@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.6.tgz#930a527c7a951927df269f43b2dc23262457e2a6" + integrity sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.0.1" + jest-get-type "^27.0.6" leven "^3.1.0" - pretty-format "^27.0.2" + pretty-format "^27.0.6" jest-watch-typeahead@^0.6.1: version "0.6.4" @@ -6758,28 +6770,19 @@ jest-watcher@^27.0.0: jest-util "^27.0.1" string-length "^4.0.1" -jest-watcher@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb" - integrity sha512-8nuf0PGuTxWj/Ytfw5fyvNn/R80iXY8QhIT0ofyImUvdnoaBdT6kob0GmhXR+wO+ALYVnh8bQxN4Tjfez0JgkA== +jest-watcher@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.6.tgz#89526f7f9edf1eac4e4be989bcb6dec6b8878d9c" + integrity sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ== dependencies: - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.0.2" + jest-util "^27.0.6" string-length "^4.0.1" -jest-worker@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - jest-worker@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" @@ -6789,14 +6792,23 @@ jest-worker@^27.0.2: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed" + integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.0.3: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" - integrity sha512-Px1iKFooXgGSkk1H8dJxxBIrM3tsc5SIuI4kfKYK2J+4rvCvPGr/cXktxh0e9zIPQ5g09kOMNfHQEmusBUf/ZA== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505" + integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA== dependencies: - "@jest/core" "^27.0.4" + "@jest/core" "^27.0.6" import-local "^3.0.2" - jest-cli "^27.0.4" + jest-cli "^27.0.6" js-tokens@^4.0.0: version "4.0.0" @@ -7265,7 +7277,7 @@ lodash.truncate@^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: +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.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -8637,9 +8649,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" @@ -8774,9 +8786,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-bytes@^5.2.0: version "5.6.0" @@ -8793,22 +8805,12 @@ pretty-format@^26.0.0, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.1.tgz#c4094621dfbd3e8ab751964d1cf01edc6f88474d" - integrity sha512-qE+0J6c/gd+R6XTcQgPJMc5hMJNsxzSF5p8iZSbMZ7GQzYGlSLNkh2P80Wa2dbF4gEVUsJEgcrBY+1L2/j265w== - dependencies: - "@jest/types" "^27.0.1" - ansi-regex "^5.0.0" - ansi-styles "^5.0.0" - react-is "^17.0.1" - -pretty-format@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4" - integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig== +pretty-format@^27.0.1, pretty-format@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" + integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" ansi-regex "^5.0.0" ansi-styles "^5.0.0" react-is "^17.0.1" @@ -9165,9 +9167,9 @@ rechoir@^0.6.2: resolve "^1.1.6" rechoir@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" - integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== dependencies: resolve "^1.9.0" @@ -9466,12 +9468,12 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== +schema-utils@^3.0.0, schema-utils@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.0.tgz#95986eb604f66daadeed56e379bfe7a7f963cdb9" + integrity sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w== dependencies: - "@types/json-schema" "^7.0.6" + "@types/json-schema" "^7.0.7" ajv "^6.12.5" ajv-keywords "^3.5.2" @@ -9569,9 +9571,9 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-getter@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" - integrity sha1-12nBgsnVpR9AkUXy+6guXoboA3Y= + version "0.1.1" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.1.tgz#a3110e1b461d31a9cfc8c5c9ee2e9737ad447102" + integrity sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw== dependencies: to-object-path "^0.3.0" @@ -9793,11 +9795,6 @@ sort-keys@^4.0.0: 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" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -10235,9 +10232,9 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== 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== + version "4.4.15" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" + integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" @@ -10298,12 +10295,12 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@^5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.2.tgz#51d295eb7cc56785a67a372575fdc46e42d5c20c" - integrity sha512-6QhDaAiVHIQr5Ab3XUWZyDmrIPCHMiqJVljMF91YKyqwKkL5QHnYMkrMBy96v9Z7ev1hGhSEw1HQZc2p/s5Z8Q== +terser-webpack-plugin@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz#30033e955ca28b55664f1e4b30a1347e61aa23af" + integrity sha512-cxGbMqr6+A2hrIB5ehFIF+F/iST5ZOxvOmy9zih9ySbP1C2oEWQSOUS+2SNBTjzx5xLKO4xnod9eywdfq1Nb9A== dependencies: - jest-worker "^26.6.2" + jest-worker "^27.0.2" p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" @@ -10485,9 +10482,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.2: - version "27.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.3.tgz#808492f022296cde19390bb6ad627c8126bf93f8" - integrity sha512-U5rdMjnYam9Ucw+h0QvtNDbc5+88nxt7tbIvqaZUhFrfG4+SkWhMXjejCLVGcpILTPuV+H3W/GZDZrnZFpPeXw== + version "27.0.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.4.tgz#df49683535831560ccb58f94c023d831b1b80df0" + integrity sha512-c4E1ECy9Xz2WGfTMyHbSaArlIva7Wi2p43QOMmCqjSSjHP06KXv+aT+eSY+yZMuqsMi3k7pyGsGj2q5oSl5WfQ== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -10616,9 +10613,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^4.1.3: - version "4.3.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" - integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== uglify-js@^3.1.4: version "3.13.6" @@ -10737,9 +10734,9 @@ url-parse-lax@^1.0.0: prepend-http "^1.0.1" 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== + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" @@ -10791,10 +10788,10 @@ v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-to-istanbul@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1" - integrity sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow== +v8-to-istanbul@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" + integrity sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -10979,36 +10976,34 @@ webpack-log@^2.0.0: uuid "^3.3.2" webpack-merge@^5.7.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" - integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== dependencies: clone-deep "^4.0.1" wildcard "^2.0.0" -webpack-sources@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.0.tgz#9ed2de69b25143a4c18847586ad9eccb19278cfa" - integrity sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ== - dependencies: - source-list-map "^2.0.1" - source-map "^0.6.1" +webpack-sources@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.0.tgz#b16973bcf844ebcdb3afde32eda1c04d0b90f89d" + integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== -webpack@^5.38.1: - version "5.38.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.38.1.tgz#5224c7f24c18e729268d3e3bc97240d6e880258e" - integrity sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g== +webpack@^5.45.1: + version "5.50.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.50.0.tgz#5562d75902a749eb4d75131f5627eac3a3192527" + integrity sha512-hqxI7t/KVygs0WRv/kTgUW8Kl3YC81uyWQSo/7WUs5LsuRw0htH/fCwbVBGCuiX/t4s7qzjXFcf41O8Reiypag== 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.2.1" + "@types/estree" "^0.0.50" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.4.1" + acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" enhanced-resolve "^5.8.0" - es-module-lexer "^0.4.0" + es-module-lexer "^0.7.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" @@ -11017,11 +11012,11 @@ webpack@^5.38.1: loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - schema-utils "^3.0.0" + schema-utils "^3.1.0" tapable "^2.1.1" - terser-webpack-plugin "^5.1.1" + terser-webpack-plugin "^5.1.3" watchpack "^2.2.0" - webpack-sources "^2.3.0" + webpack-sources "^3.2.0" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" @@ -11212,18 +11207,13 @@ write-pkg@^4.0.0: write-json-file "^3.2.0" ws@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + version "6.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" + integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== dependencies: async-limiter "~1.0.0" -ws@^7.3.1: - version "7.4.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" - integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== - -ws@^7.4.5: +ws@^7.3.1, ws@^7.4.5: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==