diff --git a/.eslintrc.js b/.eslintrc.js
index b584e0b742f..0c8e2e4f974 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,31 +1,29 @@
module.exports = {
- "root": true,
- "plugins": ["node"],
- "extends": ["eslint:recommended", "plugin:node/recommended"],
- "env": {
- "node": true,
- "es6": true,
- "jest": true
+ extends: ["eslint:recommended"],
+ env: {
+ node: true,
+ es6: true,
+ jest: true
},
- "parserOptions": { "ecmaVersion": 2017, "sourceType": "module"},
- "rules": {
+ parserOptions: { ecmaVersion: 2017, sourceType: "module" },
+ rules: {
"no-useless-escape": "off",
"quote-props": ["error", "as-needed"],
"no-dupe-keys": "error",
- "quotes": ["error", "double"],
+ quotes: ["error", "double"],
"no-undef": "error",
"no-extra-semi": "error",
- "semi": "error",
+ semi: "error",
"no-template-curly-in-string": "error",
"no-caller": "error",
- "yoda": "error",
- "eqeqeq": "error",
+ yoda: "error",
+ eqeqeq: "error",
"global-require": "off",
"brace-style": "error",
"key-spacing": "error",
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
- "indent": ["error", "tab", { "SwitchCase": 1 }],
+ indent: ["error", "tab", { SwitchCase: 1 }],
"no-extra-bind": "warn",
"no-empty": "off",
"no-multiple-empty-lines": "error",
@@ -33,78 +31,31 @@ module.exports = {
"no-process-exit": "off",
"no-trailing-spaces": "error",
"no-use-before-define": "off",
- "no-unused-vars": ["error", { "args": "none" }],
+ "no-unused-vars": ["error", { args: "none" }],
"no-unsafe-negation": "error",
"no-loop-func": "warn",
"space-before-function-paren": ["error", "never"],
"space-before-blocks": "error",
"object-curly-spacing": ["error", "always"],
- "object-curly-newline": ["error", { "consistent": true }],
- "keyword-spacing": ["error", {
- "after": true,
- "overrides": {
- "const": { "after": true },
- "try": { "after": true },
- "throw": { "after": true },
- "case": { "after": true },
- "return": { "after": true },
- "finally": { "after": true },
- "do": { "after": true }
- }
- }],
- "no-console": "off",
- "valid-jsdoc": "error",
- "node/no-unsupported-features": ["error", { "version": 6 }],
- "node/no-deprecated-api": "error",
- "node/no-missing-import": "error",
- "node/no-missing-require": [
- "error",
- {
- "resolvePaths": ["./packages"],
- "allowModules": [
- "webpack",
- "@webpack-cli/generators",
- "@webpack-cli/init",
- "@webpack-cli/migrate",
- "@webpack-cli/utils",
- "@webpack-cli/generate-loader",
- "@webpack-cli/generate-plugin",
- "@webpack-cli/webpack-scaffold"
- ]
- }
- ],
- "node/no-unpublished-bin": "error",
- "node/no-unpublished-require": [
+ "object-curly-newline": ["error", { consistent: true }],
+ "keyword-spacing": [
"error",
{
- "allowModules": [
- "webpack",
- "webpack-dev-server",
- "@webpack-cli/generators",
- "@webpack-cli/init",
- "@webpack-cli/migrate",
- "@webpack-cli/utils",
- "@webpack-cli/generate-loader",
- "@webpack-cli/generate-plugin",
- "@webpack-cli/webpack-scaffold"
- ]
- }
- ],
- "node/no-extraneous-require": [
- "error",
- {
- "allowModules": [
- "@webpack-cli/migrate",
- "@webpack-cli/generators",
- "@webpack-cli/utils",
- "@webpack-cli/generate-loader",
- "@webpack-cli/generate-plugin",
- "@webpack-cli/webpack-scaffold"
- ]
+ after: true,
+ overrides: {
+ const: { after: true },
+ try: { after: true },
+ throw: { after: true },
+ case: { after: true },
+ return: { after: true },
+ finally: { after: true },
+ do: { after: true }
+ }
}
],
+ "no-console": "off",
+ "valid-jsdoc": "error",
"eol-last": ["error", "always"],
- "newline-per-chained-call": "off",
- "node/process-exit-as-throw": "error"
+ "newline-per-chained-call": "off"
}
};
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 8f937259c0c..f3517a18489 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -5,6 +5,34 @@ appreciated and welcomed. If you're planning a new feature or changing
the API, please create an issue first. This way we can ensure that your precious
work is not in vain.
+Table of Contents
+
+- [Issues](#issues)
+- [Your first Contribution](#your-first-contribution)
+- [Setup](#setup)
+ - [Using npm](#using-npm)
+ - [Using yarn](#using-yarn)
+- [Running Tests](#running-tests)
+ - [Using npm](#using-npm-1)
+ - [Using yarn](#using-yarn-1)
+- [Editor Config](#editor-config)
+- [Dependencies](#dependencies)
+- [Branching Model](#branching-model)
+- [Naming a branch](#naming-a-branch)
+ - [Features](#features)
+ - [Fixes](#fixes)
+- [Testing](#testing)
+- [Pull Requests](#pull-requests)
+- [Submitting a good Pull Request](#submitting-a-good-pull-request)
+- [Commit message](#commit-message)
+ - [Commit Message Format](#commit-message-format)
+- [Migrate with the CLI](#migrate-with-the-cli)
+ - [How it's being done](#how-its-being-done)
+ - [Structure of a transform](#structure-of-a-transform)
+ - [Further Work](#further-work)
+- [Contributor License Agreement](#contributor-license-agreement)
+- [Documentation](#documentation)
+
## Issues
Most of the time, when webpack does not work correctly, it might be a configuration issue.
@@ -19,7 +47,7 @@ that include your `webpack.config.js` and relevant files. This way you help othe
First of all, you will need to create an issue in Github for the feature or bugfix that you want to work on. When you open a new issue, there will be a template that will be automatically added to the text of the issue, which you would need to fill in. Doing this will help us to understand better what the ticket is about.
-After you've created the issue, we will have a look, and provide feedback to your ticket.
+After you've created the issue, we will have a look, and provide feedback to your ticket.
In case it is a bug that you want to fix, we might help you with background information about the issue, so you can make an informed fix.
@@ -27,136 +55,141 @@ In case you are suggesting a new feature, we will match your idea with our curre
## Setup
-* Install [Node.js](https://nodejs.org/) if you don't have it already.
- *Note: Node 6 or greater would be better for "best results".*
-* Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
-* `git clone && cd webpack-cli`
+- Install [Node.js](https://nodejs.org/) if you don't have it already.
+ _Note: Node 6 or greater would be better for "best results"._
+- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
+- `git clone && cd webpack-cli`
### Using npm
-* Install the dependencies and link them:
+- Install the dependencies and link them:
- ```bash
- npm install
- npm link
- npm link webpack-cli
- ```
+ ```bash
+ npm install
+ npm link
+ npm link webpack-cli
+ ```
-* Bootstrap all the submodules before building for the first time
+- Bootstrap all the submodules before building for the first time
- ```bash
- npm run bootstrap
- npm run build
- ```
+ ```bash
+ npm run bootstrap
+ npm run build
+ ```
### Using yarn
-* If you don't have yarn yet:
-
- ```bash
- npm install -g yarn
- ```
-
-* Install the dependencies and link them
+- If you don't have yarn yet:
- ```bash
- yarn
- yarn link
- yarn link webpack-cli
- ```
+ ```bash
+ npm install -g yarn
+ ```
-* Bootstrap all the submodules before building for the first time
+- Install the dependencies and link them
- ```bash
- yarn bootstrap
- yarn build
- ```
+ ```bash
+ yarn
+ yarn link
+ yarn link webpack-cli
+ ```
+- Bootstrap all the submodules before building for the first time
-## Testing
+ ```bash
+ yarn bootstrap
+ yarn build
+ ```
+
+## Running Tests
### Using npm
-* Run all the tests with:
-
- ```bash
- npm run test
- ```
+- Run all the tests with:
+
+ ```bash
+ npm run test
+ ```
-* Run CLI tests with:
-
- ```bash
- npm run test:cli
- ```
+- Run CLI tests with:
-* Run tests of all packages:
-
- ```bash
- npm run test:packages
- ```
+ ```bash
+ npm run test:cli
+ ```
-* Test a single CLI test case:
-
- ```bash
- npx jest path/to/my-test.js
- ```
+- Run tests of all packages:
-* You can also install jest globally and run tests without npx:
+ ```bash
+ npm run test:packages
+ ```
- ```bash
- npm i -g jest
- jest path/to/my-test.js
- ```
+- Test a single CLI test case:
-* You can run the linters:
+ ```bash
+ npx jest path/to/my-test.js
+ ```
- ```bash
- npm run lint && npm run tslint
- ```
+- You can also install jest globally and run tests without npx:
+
+ ```bash
+ npm i -g jest
+ jest path/to/my-test.js
+ ```
+
+- You can run the linters:
+
+ ```bash
+ npm run lint
+ ```
### Using yarn
-* Run all the tests with:
-
- ```bash
- yarn test
- ```
-
-* Run CLI tests with:
-
- ```bash
- yarn test:cli`
- ```
-
-* Run tests of all packages:
-
- ```bash
- yarn test:packages
- ```
-
-* Test a single CLI test case:
-
- ```bash
- yarn jest path/to/my-test.js
- ```
-
-* You can also install jest globally and run tests:
-
- ```bash
- yarn global add jest
- jest path/to/my-test.js
- ```
-
-* You can run the linters:
-
- ```bash
- yarn lint && yarn tslint
- ```
+- Run all the tests with:
+
+ ```bash
+ yarn test
+ ```
+
+- Run CLI tests with:
+
+ ```bash
+ yarn test:cli`
+ ```
+
+- Run tests of all packages:
+
+ ```bash
+ yarn test:packages
+ ```
+
+- Test a single CLI test case:
+
+ ```bash
+ yarn jest path/to/my-test.js
+ ```
+
+- You can also install jest globally and run tests:
+
+ ```bash
+ yarn global add jest
+ jest path/to/my-test.js
+ ```
+
+- You can run the linters:
+
+ ```bash
+ yarn lint
+ ```
## Editor Config
The [.editorconfig](https://github.com/webpack/webpack-cli/blob/master/.editorconfig) in the root should ensure consistent formatting. Please make sure you've [installed the plugin](http://editorconfig.org/#download) if your text editor needs one.
+## Dependencies
+
+This is a multi-package repository and dependencies are managed using [lerna](https://lerna.js.org/)
+
+> If you are adding or updating any dependency, please commit the updated `package-lock.json` file.
+
## Branching Model
We base our branching model on [git flow](http://nvie.com/posts/a-successful-git-branching-model/). Instead of working with a `develop` base branch, we use the `master` branch. We do it to ease the workflow a bit. However, we find that adding prefixes to the branches is useful.
@@ -165,15 +198,15 @@ We base our branching model on [git flow](http://nvie.com/posts/a-successful-git
Making a branch in your fork for your contribution is helpful in the following ways:
-* It allows you to submit more than one contribution in a single PR.
-* It allows us to identify what your contribution is about from the branch name.
+- It allows you to submit more than one contribution in a single PR.
+- It allows us to identify what your contribution is about from the branch name.
You will want to checkout the `master` branch locally before creating your new branch.
There are two types of branches:
-* Feature
-* Bugfix
+- Feature
+- Bugfix
### Features
@@ -189,7 +222,7 @@ If you are fixing an existing bug, you can create a branch with the following pr
## Testing
-Every bugfix or feature that you submit, needs to be tested. Writing tests for code is very important to prevent future bugs, and help to discover possible new bugs promptly.
+Every bugfix or feature that you submit, needs to be tested. Writing tests for the code is very important to prevent future bugs, and help to discover possible new bugs promptly.
It is important that you test the logic of the code you're writing, and that your tests really go through all your lines, branches and statements. This is the only way to ensure that the code coverage is high enough to ensure the users of the cli, that they are using a solid tool.
@@ -204,11 +237,11 @@ In case you've got a small change in most of the cases, your pull request would
## Submitting a good Pull Request
-* Write tests
-* Follow the existing coding style
-* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
+- Write tests
+- Follow the existing coding style
+- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
-## Commit message format
+## Commit message
Our commit messages format follows the [angular.js commits format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format).
@@ -217,27 +250,30 @@ You can use `npm run commit` script to have an interactive way of making commits
We don't use the scope. The template of a commit would look like this:
### Commit Message Format
-Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
+
+Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type** and a **subject**:
-```
+```md
:
+
```
-This is the list of *type* of commits that we accept:
-* ast
-* break
-* chore
-* cli
-* docs
-* feat
-* fix
-* misc
-* tests
+This is the list of _type_ of commits that we accept:
+
+- ast
+- break
+- chore
+- cli
+- docs
+- feat
+- fix
+- misc
+- tests
The **header** is mandatory.
@@ -247,11 +283,11 @@ to read on GitHub as well as in several git tools.
For more information about what each part of the template mean, head up to the documentation in the
[angular repo](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format)
-## --migrate with the CLI
+## Migrate with the CLI
This is a new feature in development for the CLI.
-```
+```sh
webpack --migrate
```
@@ -259,7 +295,7 @@ The expected result of the above command is to take the mentioned `webpack` conf
It should be a valid new config and should keep intact all the features from the original config.
The new config will be as readable as possible (may add some comments).
-With [#40](https://github.com/webpack/webpack-cli/pull/40), we have been able to add basic scaffolding and do many of the conversions recommended in the [docs](https://webpack.js.org/guides/migrating/).
+With [#40](https://github.com/webpack/webpack-cli/pull/40), we have been able to add basic scaffolding and do many of the conversions recommended in the [docs](https://webpack.js.org/migrate).
### How it's being done
@@ -293,22 +329,23 @@ This is where you declare a new test case for your transformation.
Each test will refer to an input webpack config snippet.
Conventionally we write them in `\_\_testfixtures\_\_`.
-```
-const defineTest = require('../defineTest');
+```js
+const defineTest = require("../defineTest");
-defineTest(__dirname, 'transform-name.input1.js');
-defineTest(__dirname, 'transform-name.input2.js');
+defineTest(__dirname, "transform-name.input1.js");
+defineTest(__dirname, "transform-name.input2.js");
```
`defineTest` is a helper test method which helps us to run tests on all the transforms uniformly.
It takes the input file given as parameter and uses jest to create a snapshot of the output. This effectively tests the correctness of our transformation.
-### TODO
+### Further Work
This is still in a very raw form. We'd like to take this as close to a truly useful tool as possible.
We will still need to
- - Support all kinds of webpack configuration(made using merge tools)
- - Test these transforms against real-world configurations.
+
+- Support all kinds of webpack configuration(made using merge tools)
+- Test these transforms against real-world configurations.
## Contributor License Agreement
@@ -316,7 +353,6 @@ When submitting your contribution, a CLA (Contributor License Agreement) bot wil
Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails).
-
## Documentation
webpack is feature rich and documentation is a time sink. We
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000000..1152177bf46
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+open_collective: webpack
+
diff --git a/.gitignore b/.gitignore
index ef696edb785..6fd2e644f89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,4 @@ yarn.lock
# source maps of docs
docs/**/*.map
+junit.xml
diff --git a/.travis.yml b/.travis.yml
index 9209f6441a4..51d18a6c9ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,19 +3,19 @@ notifications:
email: false
language: node_js
node_js:
+ - "12"
- "10"
- "8"
- - "6"
cache:
directories:
- ~/.npm
matrix:
include:
- os: linux
- node_js: "stable"
+ node_js: "12"
env: JOB_PART=lint
- os: linux
- node_js: "stable"
+ node_js: "12"
env: JOB_PART=integration
- os: linux
node_js: "10"
@@ -23,9 +23,6 @@ matrix:
- os: linux
node_js: "8"
env: JOB_PART=integration
- - os: linux
- node_js: "6"
- env: JOB_PART=integration
before_install:
- "[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest" # skipped when using node 9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6eda649a0f3..1f17833d147 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,944 +1,1180 @@
-
+
+
+# 3.3.2 (2019-05-04)
+
+[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.5...v3.3.2)
+
+## New Features
+
+- opencollective prompt: add option to disable it + doc ([d4643ae](https://github.com/webpack/webpack-cli/commit/d4643ae))
+- terser: clean old files ([89e6b74](https://github.com/webpack/webpack-cli/commit/89e6b74))
+- terser: remove leftover files ([27d5b4d](https://github.com/webpack/webpack-cli/commit/27d5b4d))
+- terser: replace after merging master ([c404655](https://github.com/webpack/webpack-cli/commit/c404655))
+- replace Uglify with Terser in generators ([2b8651b](https://github.com/webpack/webpack-cli/commit/2b8651b))
+- use terserPlugin in loaderOptionsPlugin ([14f5337](https://github.com/webpack/webpack-cli/commit/14f5337))
+- use terserJsPlugin for transformations during migrate ([33c6185](https://github.com/webpack/webpack-cli/commit/33c6185))
+- replace uglifyJsPlugin with terserPlugin in migrate ([d467f3b](https://github.com/webpack/webpack-cli/commit/d467f3b))
+- opencollective prompt: work on windows setting atime by code ([3af73a8](https://github.com/webpack/webpack-cli/commit/3af73a8))
+- opencollective prompt: fix typo ([c2351b1](https://github.com/webpack/webpack-cli/commit/c2351b1))
+- opencollective prompt: remove .lastocprint file from fs ([b96ad56](https://github.com/webpack/webpack-cli/commit/b96ad56))
+- opencollective prompt: extract weekday to variable ([790d27a](https://github.com/webpack/webpack-cli/commit/790d27a))
+- opencollective prompt: set terminal cols to 80 ([badc32d](https://github.com/webpack/webpack-cli/commit/badc32d))
+- opencollective prompt: fix azure ci ([ea0039a](https://github.com/webpack/webpack-cli/commit/ea0039a))
+- opencollective prompt: lint ([ea906d8](https://github.com/webpack/webpack-cli/commit/ea906d8))
+- opencollective prompt: clear package.json modifications ([f080733](https://github.com/webpack/webpack-cli/commit/f080733))
+- opencollective prompt: add prompt in postinstall script ([dd9d528](https://github.com/webpack/webpack-cli/commit/dd9d528))
+
+## Ast
+
+- change tooltip property from uglify to terser ([ea9e4b8](https://github.com/webpack/webpack-cli/commit/ea9e4b8))
+- replace requires and inits for uglify with terser ([3011a6c](https://github.com/webpack/webpack-cli/commit/3011a6c))
+- replace UglifyJsPlugin with TerserPlugin ([21da35f](https://github.com/webpack/webpack-cli/commit/21da35f))
+
+## Chore
+
+- cli: move constants to a separate file ([#798](https://github.com/webpack/webpack-cli/pull/798))
+- deps: fix security vulnerabilities ([#857](https://github.com/webpack/webpack-cli/pull/857))
+- deps: upgrade lerna to fix vulnerabilities & update webpack-dev-server ([#823](https://github.com/webpack/webpack-cli/pull/823))
+- docs: minor fixes in the docs ([#874](https://github.com/webpack/webpack-cli/pull/874))
+- docs: removes scaffolding docs from the root ([8c1db03](https://github.com/webpack/webpack-cli/commit/8c1db03))
+- junit: reverting the junit.xml ([80fd4fa](https://github.com/webpack/webpack-cli/commit/80fd4fa))
+- travis: removed stable ([#871](https://github.com/webpack/webpack-cli/pull/871))
+- types: move to @types/yeoman-generator ([#869](https://github.com/webpack/webpack-cli/pull/869))
+- addon generator to async/await ([#849](https://github.com/webpack/webpack-cli/pull/849))
+- v.3.1.1 ([d3f8e20](https://github.com/webpack/webpack-cli/commit/d3f8e20))
+- tests: updated test regex, some helper scripts ([#809](https://github.com/webpack/webpack-cli/pull/809))
+- types: add type information ([#791](https://github.com/webpack/webpack-cli/pull/791))
+- replace instances of uglify with terser ([f9cb8ce](https://github.com/webpack/webpack-cli/commit/f9cb8ce))
+- use actual package name in comment about removing uglify ([b1cf4cc](https://github.com/webpack/webpack-cli/commit/b1cf4cc))
+- align file in the same way as other terserPlugin test fixtures ([b6c6484](https://github.com/webpack/webpack-cli/commit/b6c6484))
+- remove gitHash from package.json ([2af08be](https://github.com/webpack/webpack-cli/commit/2af08be))
+
+## Docs
+
+- code of conduct ([#873](https://github.com/webpack/webpack-cli/pull/873))
+- contribute: adds table of contents and info about dependencies. ([#842](https://github.com/webpack/webpack-cli/pull/842))
+- contributing: fixes dead link ([#835](https://github.com/webpack/webpack-cli/pull/835))
+- opencollective prompt: improve code clarity ([55992a4](https://github.com/webpack/webpack-cli/commit/55992a4))
+- packages: adds downloads/month shield ([6a0375a](https://github.com/webpack/webpack-cli/commit/6a0375a))
+- readme: fix typos, add summary of all commands ([#845](https://github.com/webpack/webpack-cli/pull/845))
+- readme: adds contributors shield ([958d064](https://github.com/webpack/webpack-cli/commit/958d064))
+- README: phrase change ([3a11a16](https://github.com/webpack/webpack-cli/commit/3a11a16))
+- README: add link to webpack-scaffold-starter ([e35a194](https://github.com/webpack/webpack-cli/commit/e35a194))
+- README: update scaffolding links ([74179b5](https://github.com/webpack/webpack-cli/commit/74179b5))
+- serve: link to webpack-dev-server ([cb68b1b](https://github.com/webpack/webpack-cli/commit/cb68b1b))
+- serve: update docs to use webpack-dev-server ([f7451d4](https://github.com/webpack/webpack-cli/commit/f7451d4))
+- replace tooltip link to terser plugin ([4254730](https://github.com/webpack/webpack-cli/commit/4254730))
+- replace Uglify with Terser in comments ([799577d](https://github.com/webpack/webpack-cli/commit/799577d))
+- replace UglifyJsPlugin with TerserPlugin in migrate docs ([326f783](https://github.com/webpack/webpack-cli/commit/326f783))
+
+## Enh
+
+- webpack-scaffold: improve prompt and doc ([#794](https://github.com/webpack/webpack-cli/pull/794))
+
+## Fix
+
+- add: add types ([d4ce6f2](https://github.com/webpack/webpack-cli/commit/d4ce6f2))
+- add: fix runTransform ([dbc3e9e](https://github.com/webpack/webpack-cli/commit/dbc3e9e))
+- add: lint code ([163b309](https://github.com/webpack/webpack-cli/commit/163b309))
+- add: add handling for topScope ([1162cf5](https://github.com/webpack/webpack-cli/commit/1162cf5))
+- bin, serve: force default package export, add serve default ([#815](https://github.com/webpack/webpack-cli/pull/815))
+- init: refactored the init.ts success message ([#810](https://github.com/webpack/webpack-cli/pull/810))
+- opencollective prompt: fix grammar ([246db42](https://github.com/webpack/webpack-cli/commit/246db42))
+- opencollective-prompt: check write permissions ([5284b7e](https://github.com/webpack/webpack-cli/commit/5284b7e))
+- scaffold: config file is always generated at the project root ([#801](https://github.com/webpack/webpack-cli/pull/801))
+- utils: refactors utils ([7fe3543](https://github.com/webpack/webpack-cli/commit/7fe3543))
+- clear up comment about default function purpose ([e48507d](https://github.com/webpack/webpack-cli/commit/e48507d))
+- remove unused files ([ec242ab](https://github.com/webpack/webpack-cli/commit/ec242ab))
+- reset files ([9863445](https://github.com/webpack/webpack-cli/commit/9863445))
+- replace lookups for TerserPlugin in webpack.optimise ([ef23fec](https://github.com/webpack/webpack-cli/commit/ef23fec))
+
+## Tests
+
+- update snapshots ([ce9fbc8](https://github.com/webpack/webpack-cli/commit/ce9fbc8))
+- replace uglify with terser in ast-utils tests ([73f493f](https://github.com/webpack/webpack-cli/commit/73f493f))
+- migration: typescript ([#613](https://github.com/webpack/webpack-cli/pull/613))
+
+## Misc
+
+- chore(docs): Refactors links for badges ([#859](https://github.com/webpack/webpack-cli/pull/859))
+- opencollective-prompt: improve grammar ([e17a26d](https://github.com/webpack/webpack-cli/commit/e17a26d))
+- Remove tslint in favour of eslint ([#834](https://github.com/webpack/webpack-cli/pull/834))
+- cli: refactor functions into utils and config dirs, merge yargs options ([#781](https://github.com/webpack/webpack-cli/pull/781))
+- utils: refactors scaffold ([0b28fb3](https://github.com/webpack/webpack-cli/commit/0b28fb3))
+
+
+
+# 3.3.1 (2019-04-21)
+
+[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.5...v3.3.1)
+
+## New Features
+
+- terser: clean old files ([89e6b74](https://github.com/webpack/webpack-cli/commit/89e6b74))
+- terser: remove leftover files ([27d5b4d](https://github.com/webpack/webpack-cli/commit/27d5b4d))
+- terser: replace after merging master ([c404655](https://github.com/webpack/webpack-cli/commit/c404655))
+- replace Uglify with Terser in generators ([2b8651b](https://github.com/webpack/webpack-cli/commit/2b8651b))
+- use terserPlugin in loaderOptionsPlugin ([14f5337](https://github.com/webpack/webpack-cli/commit/14f5337))
+- use terserJsPlugin for transformations during migrate ([33c6185](https://github.com/webpack/webpack-cli/commit/33c6185))
+- replace uglifyJsPlugin with terserPlugin in migrate ([d467f3b](https://github.com/webpack/webpack-cli/commit/d467f3b))
+- opencollective prompt: work on windows setting atime by code ([3af73a8](https://github.com/webpack/webpack-cli/commit/3af73a8))
+- opencollective prompt: fix typo ([c2351b1](https://github.com/webpack/webpack-cli/commit/c2351b1))
+- opencollective prompt: remove .lastocprint file from fs ([b96ad56](https://github.com/webpack/webpack-cli/commit/b96ad56))
+- opencollective prompt: extract weekday to variable ([790d27a](https://github.com/webpack/webpack-cli/commit/790d27a))
+- opencollective prompt: set terminal cols to 80 ([badc32d](https://github.com/webpack/webpack-cli/commit/badc32d))
+- opencollective prompt: fix azure ci ([ea0039a](https://github.com/webpack/webpack-cli/commit/ea0039a))
+- opencollective prompt: lint ([ea906d8](https://github.com/webpack/webpack-cli/commit/ea906d8))
+- opencollective prompt: clear package.json modifications ([f080733](https://github.com/webpack/webpack-cli/commit/f080733))
+- opencollective prompt: add prompt in postinstall script ([dd9d528](https://github.com/webpack/webpack-cli/commit/dd9d528))
+
+## Ast
+
+- change tooltip property from uglify to terser ([ea9e4b8](https://github.com/webpack/webpack-cli/commit/ea9e4b8))
+- replace requires and inits for uglify with terser ([3011a6c](https://github.com/webpack/webpack-cli/commit/3011a6c))
+- replace UglifyJsPlugin with TerserPlugin ([21da35f](https://github.com/webpack/webpack-cli/commit/21da35f))
+
+## Chore
+
+- cli: move constants to a separate file ([#798](https://github.com/webpack/webpack-cli/pull/798))
+- deps: upgrade lerna to fix vulnerabilities & update webpack-dev-server ([#823](https://github.com/webpack/webpack-cli/pull/823))
+- docs: removes scaffolding docs from the root ([8c1db03](https://github.com/webpack/webpack-cli/commit/8c1db03))
+- junit: reverting the junit.xml ([80fd4fa](https://github.com/webpack/webpack-cli/commit/80fd4fa))
+- tests: updated test regex, some helper scripts ([#809](https://github.com/webpack/webpack-cli/pull/809))
+- types: add type information ([#791](https://github.com/webpack/webpack-cli/pull/791))
+- replace instances of uglify with terser ([f9cb8ce](https://github.com/webpack/webpack-cli/commit/f9cb8ce))
+- use actual package name in comment about removing uglify ([b1cf4cc](https://github.com/webpack/webpack-cli/commit/b1cf4cc))
+- align file in the same way as other terserPlugin test fixtures ([b6c6484](https://github.com/webpack/webpack-cli/commit/b6c6484))
+- remove gitHash from package.json ([2af08be](https://github.com/webpack/webpack-cli/commit/2af08be))
+
+## Docs
+
+- contributing: fixes dead link ([#835](https://github.com/webpack/webpack-cli/pull/835))
+- opencollective prompt: improve code clarity ([55992a4](https://github.com/webpack/webpack-cli/commit/55992a4))
+- packages: adds downloads/month shield ([6a0375a](https://github.com/webpack/webpack-cli/commit/6a0375a))
+- readme: adds contributors shield ([958d064](https://github.com/webpack/webpack-cli/commit/958d064))
+- README: phrase change ([3a11a16](https://github.com/webpack/webpack-cli/commit/3a11a16))
+- README: add link to webpack-scaffold-starter ([e35a194](https://github.com/webpack/webpack-cli/commit/e35a194))
+- README: update scaffolding links ([74179b5](https://github.com/webpack/webpack-cli/commit/74179b5))
+- serve: link to webpack-dev-server ([cb68b1b](https://github.com/webpack/webpack-cli/commit/cb68b1b))
+- serve: update docs to use webpack-dev-server ([f7451d4](https://github.com/webpack/webpack-cli/commit/f7451d4))
+- replace tooltip link to terser plugin ([4254730](https://github.com/webpack/webpack-cli/commit/4254730))
+- replace Uglify with Terser in comments ([799577d](https://github.com/webpack/webpack-cli/commit/799577d))
+- replace UglifyJsPlugin with TerserPlugin in migrate docs ([326f783](https://github.com/webpack/webpack-cli/commit/326f783))
+
+## Enh
+
+- webpack-scaffold: improve prompt and doc ([#794](https://github.com/webpack/webpack-cli/pull/794))
+
+## Fix
+
+- add: add types ([d4ce6f2](https://github.com/webpack/webpack-cli/commit/d4ce6f2))
+- add: fix runTransform ([dbc3e9e](https://github.com/webpack/webpack-cli/commit/dbc3e9e))
+- add: lint code ([163b309](https://github.com/webpack/webpack-cli/commit/163b309))
+- add: add handling for topScope ([1162cf5](https://github.com/webpack/webpack-cli/commit/1162cf5))
+- bin, serve: force default package export, add serve default ([#815](https://github.com/webpack/webpack-cli/pull/815))
+- init: refactored the init.ts success message ([#810](https://github.com/webpack/webpack-cli/pull/810))
+- scaffold: config file is always generated at the project root ([#801](https://github.com/webpack/webpack-cli/pull/801))
+- utils: refactors utils ([7fe3543](https://github.com/webpack/webpack-cli/commit/7fe3543))
+- clear up comment about default function purpose ([e48507d](https://github.com/webpack/webpack-cli/commit/e48507d))
+- remove unused files ([ec242ab](https://github.com/webpack/webpack-cli/commit/ec242ab))
+- reset files ([9863445](https://github.com/webpack/webpack-cli/commit/9863445))
+- replace lookups for TerserPlugin in webpack.optimise ([ef23fec](https://github.com/webpack/webpack-cli/commit/ef23fec))
+
+## Tests
+
+- update snapshots ([ce9fbc8](https://github.com/webpack/webpack-cli/commit/ce9fbc8))
+- replace uglify with terser in ast-utils tests ([73f493f](https://github.com/webpack/webpack-cli/commit/73f493f))
+- migration: typescript ([#613](https://github.com/webpack/webpack-cli/pull/613))
+
+## Misc
+
+- Remove tslint in favour of eslint ([#834](https://github.com/webpack/webpack-cli/pull/834))
+- cli: refactor functions into utils and config dirs, merge yargs options ([#781](https://github.com/webpack/webpack-cli/pull/781))
+- utils: refactors scaffold ([0b28fb3](https://github.com/webpack/webpack-cli/commit/0b28fb3))
+
+
+
# 3.3.0 (2019-03-15)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.3...v3.3.0)
## New Features
-* use webpack.config as default name in dev scaffold ([385a672](https://github.com/webpack/webpack-cli/commit/385a672))
-* only display once a week ([b6199e5](https://github.com/webpack/webpack-cli/commit/b6199e5))
-* add util to run-and-get watch proc ([1d2ccd5](https://github.com/webpack/webpack-cli/commit/1d2ccd5))
-* add test-util to append data to file ([e9e1dcb](https://github.com/webpack/webpack-cli/commit/e9e1dcb))
-* log: clean single line logs ([5d2284b](https://github.com/webpack/webpack-cli/commit/5d2284b))
-* log: add gitignore ([7c830b5](https://github.com/webpack/webpack-cli/commit/7c830b5))
-* log: make log package ([df7c224](https://github.com/webpack/webpack-cli/commit/df7c224))
-* log: add clrscr function ([11b3bff](https://github.com/webpack/webpack-cli/commit/11b3bff))
-* log: few changes ([bc32727](https://github.com/webpack/webpack-cli/commit/bc32727))
-* log: add newline for title ([4047213](https://github.com/webpack/webpack-cli/commit/4047213))
-* log: remove unwanted commits ([c088f3e](https://github.com/webpack/webpack-cli/commit/c088f3e))
-* log: task based custom loggers ([2c43a41](https://github.com/webpack/webpack-cli/commit/2c43a41))
+- use webpack.config as default name in dev scaffold ([385a672](https://github.com/webpack/webpack-cli/commit/385a672))
+- only display once a week ([b6199e5](https://github.com/webpack/webpack-cli/commit/b6199e5))
+- add util to run-and-get watch proc ([1d2ccd5](https://github.com/webpack/webpack-cli/commit/1d2ccd5))
+- add test-util to append data to file ([e9e1dcb](https://github.com/webpack/webpack-cli/commit/e9e1dcb))
+- log: clean single line logs ([5d2284b](https://github.com/webpack/webpack-cli/commit/5d2284b))
+- log: add gitignore ([7c830b5](https://github.com/webpack/webpack-cli/commit/7c830b5))
+- log: make log package ([df7c224](https://github.com/webpack/webpack-cli/commit/df7c224))
+- log: add clrscr function ([11b3bff](https://github.com/webpack/webpack-cli/commit/11b3bff))
+- log: few changes ([bc32727](https://github.com/webpack/webpack-cli/commit/bc32727))
+- log: add newline for title ([4047213](https://github.com/webpack/webpack-cli/commit/4047213))
+- log: remove unwanted commits ([c088f3e](https://github.com/webpack/webpack-cli/commit/c088f3e))
+- log: task based custom loggers ([2c43a41](https://github.com/webpack/webpack-cli/commit/2c43a41))
## Chore
-* revise typo ([a14908e](https://github.com/webpack/webpack-cli/commit/a14908e))
-* deps: @std/esm -> esm ([a8b46bf](https://github.com/webpack/webpack-cli/commit/a8b46bf))
-* remove commit lint from travis ([ccec130](https://github.com/webpack/webpack-cli/commit/ccec130))
-* revise contributing location ([13a3a87](https://github.com/webpack/webpack-cli/commit/13a3a87))
-* deps: fix vulnerabilities ([c632d1a](https://github.com/webpack/webpack-cli/commit/c632d1a))
-* tests: skipping broken test ([f7b6b3a](https://github.com/webpack/webpack-cli/commit/f7b6b3a))
-* rewrite changelog ([62ab32d](https://github.com/webpack/webpack-cli/commit/62ab32d))
-* v.3.2.3 ([70138b7](https://github.com/webpack/webpack-cli/commit/70138b7))
-* v.3.2.2 ([24b6387](https://github.com/webpack/webpack-cli/commit/24b6387))
-* update tests ([70bfbd9](https://github.com/webpack/webpack-cli/commit/70bfbd9))
-* one liner ([0f55d5a](https://github.com/webpack/webpack-cli/commit/0f55d5a))
-* one liner after log ([6d8fb67](https://github.com/webpack/webpack-cli/commit/6d8fb67))
-* watch: remove console log ([0952317](https://github.com/webpack/webpack-cli/commit/0952317))
-* v.3.2.1 ([54805ae](https://github.com/webpack/webpack-cli/commit/54805ae))
-* dependency: add `node-ts` as devDependency ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- revise typo ([a14908e](https://github.com/webpack/webpack-cli/commit/a14908e))
+- deps: @std/esm -> esm ([a8b46bf](https://github.com/webpack/webpack-cli/commit/a8b46bf))
+- remove commit lint from travis ([ccec130](https://github.com/webpack/webpack-cli/commit/ccec130))
+- revise contributing location ([13a3a87](https://github.com/webpack/webpack-cli/commit/13a3a87))
+- deps: fix vulnerabilities ([c632d1a](https://github.com/webpack/webpack-cli/commit/c632d1a))
+- tests: skipping broken test ([f7b6b3a](https://github.com/webpack/webpack-cli/commit/f7b6b3a))
+- rewrite changelog ([62ab32d](https://github.com/webpack/webpack-cli/commit/62ab32d))
+- v.3.2.3 ([70138b7](https://github.com/webpack/webpack-cli/commit/70138b7))
+- v.3.2.2 ([24b6387](https://github.com/webpack/webpack-cli/commit/24b6387))
+- update tests ([70bfbd9](https://github.com/webpack/webpack-cli/commit/70bfbd9))
+- one liner ([0f55d5a](https://github.com/webpack/webpack-cli/commit/0f55d5a))
+- one liner after log ([6d8fb67](https://github.com/webpack/webpack-cli/commit/6d8fb67))
+- watch: remove console log ([0952317](https://github.com/webpack/webpack-cli/commit/0952317))
+- v.3.2.1 ([54805ae](https://github.com/webpack/webpack-cli/commit/54805ae))
+- dependency: add `node-ts` as devDependency ([#724](https://github.com/webpack/webpack-cli/pull/724))
## Docs
-* scaffolding: lowercase Webpack ([d19c1f7](https://github.com/webpack/webpack-cli/commit/d19c1f7))
-* scaffolding: fix typos ([b94b0de](https://github.com/webpack/webpack-cli/commit/b94b0de))
-* scaffolding: improve grammar ([6b79072](https://github.com/webpack/webpack-cli/commit/6b79072))
-* add lerna badge in README ([#786](https://github.com/webpack/webpack-cli/pull/786))
-* contributing: refactor & formatting ([1042cb2](https://github.com/webpack/webpack-cli/commit/1042cb2))
-* contributing: improve formatting ([47fcd7f](https://github.com/webpack/webpack-cli/commit/47fcd7f))
-* contributing: : at the end of paragraphs ([48d65fd](https://github.com/webpack/webpack-cli/commit/48d65fd))
-* contributing: update instructions to run individual tests ([b7cca58](https://github.com/webpack/webpack-cli/commit/b7cca58))
-* contributing: update instructions to run individual tests ([bc0297a](https://github.com/webpack/webpack-cli/commit/bc0297a))
-* contributing: add yarn before running jest ([126cf55](https://github.com/webpack/webpack-cli/commit/126cf55))
-* contributing: commands to install jest globally ([18b7c2e](https://github.com/webpack/webpack-cli/commit/18b7c2e))
-* contributing: fixes typo ([c458380](https://github.com/webpack/webpack-cli/commit/c458380))
-* contributing: improves formatting ([abac823](https://github.com/webpack/webpack-cli/commit/abac823))
-* contributing: adds prebuild instructions ([81cb46a](https://github.com/webpack/webpack-cli/commit/81cb46a))
-* readme: add downloads badge ([dc2423c](https://github.com/webpack/webpack-cli/commit/dc2423c))
-* scaffold: add link option for local ([f8424be](https://github.com/webpack/webpack-cli/commit/f8424be))
-* scaffold: Add installation guide for packages/webpack-scaffold ([#727](https://github.com/webpack/webpack-cli/pull/727))
-* scaffolding: fix typo ([98818a1](https://github.com/webpack/webpack-cli/commit/98818a1))
-* scaffolding: improve description & formatting ([0f657d0](https://github.com/webpack/webpack-cli/commit/0f657d0))
-* scaffolding: fix links ([e11c524](https://github.com/webpack/webpack-cli/commit/e11c524))
-* scaffolding: add yarn example ([d47eea0](https://github.com/webpack/webpack-cli/commit/d47eea0))
-* scaffolding: fix typo ([87ba169](https://github.com/webpack/webpack-cli/commit/87ba169))
-* scaffolding: improved structure, formatting, typos ([8949f82](https://github.com/webpack/webpack-cli/commit/8949f82))
-* init documentaion ([4b130bb](https://github.com/webpack/webpack-cli/commit/4b130bb))
-* rename Webpack to webpack ([900c13e](https://github.com/webpack/webpack-cli/commit/900c13e))
-* init documentaion ([14d2b47](https://github.com/webpack/webpack-cli/commit/14d2b47))
+- scaffolding: lowercase Webpack ([d19c1f7](https://github.com/webpack/webpack-cli/commit/d19c1f7))
+- scaffolding: fix typos ([b94b0de](https://github.com/webpack/webpack-cli/commit/b94b0de))
+- scaffolding: improve grammar ([6b79072](https://github.com/webpack/webpack-cli/commit/6b79072))
+- add lerna badge in README ([#786](https://github.com/webpack/webpack-cli/pull/786))
+- contributing: refactor & formatting ([1042cb2](https://github.com/webpack/webpack-cli/commit/1042cb2))
+- contributing: improve formatting ([47fcd7f](https://github.com/webpack/webpack-cli/commit/47fcd7f))
+- contributing: : at the end of paragraphs ([48d65fd](https://github.com/webpack/webpack-cli/commit/48d65fd))
+- contributing: update instructions to run individual tests ([b7cca58](https://github.com/webpack/webpack-cli/commit/b7cca58))
+- contributing: update instructions to run individual tests ([bc0297a](https://github.com/webpack/webpack-cli/commit/bc0297a))
+- contributing: add yarn before running jest ([126cf55](https://github.com/webpack/webpack-cli/commit/126cf55))
+- contributing: commands to install jest globally ([18b7c2e](https://github.com/webpack/webpack-cli/commit/18b7c2e))
+- contributing: fixes typo ([c458380](https://github.com/webpack/webpack-cli/commit/c458380))
+- contributing: improves formatting ([abac823](https://github.com/webpack/webpack-cli/commit/abac823))
+- contributing: adds prebuild instructions ([81cb46a](https://github.com/webpack/webpack-cli/commit/81cb46a))
+- readme: add downloads badge ([dc2423c](https://github.com/webpack/webpack-cli/commit/dc2423c))
+- scaffold: add link option for local ([f8424be](https://github.com/webpack/webpack-cli/commit/f8424be))
+- scaffold: Add installation guide for packages/webpack-scaffold ([#727](https://github.com/webpack/webpack-cli/pull/727))
+- scaffolding: fix typo ([98818a1](https://github.com/webpack/webpack-cli/commit/98818a1))
+- scaffolding: improve description & formatting ([0f657d0](https://github.com/webpack/webpack-cli/commit/0f657d0))
+- scaffolding: fix links ([e11c524](https://github.com/webpack/webpack-cli/commit/e11c524))
+- scaffolding: add yarn example ([d47eea0](https://github.com/webpack/webpack-cli/commit/d47eea0))
+- scaffolding: fix typo ([87ba169](https://github.com/webpack/webpack-cli/commit/87ba169))
+- scaffolding: improved structure, formatting, typos ([8949f82](https://github.com/webpack/webpack-cli/commit/8949f82))
+- init documentaion ([4b130bb](https://github.com/webpack/webpack-cli/commit/4b130bb))
+- rename Webpack to webpack ([900c13e](https://github.com/webpack/webpack-cli/commit/900c13e))
+- init documentaion ([14d2b47](https://github.com/webpack/webpack-cli/commit/14d2b47))
## Fix
-* bin: use compiler.close API correctly for stats ([568161d](https://github.com/webpack/webpack-cli/commit/568161d))
-* bin: extension detection ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* init: lint code ([20aab48](https://github.com/webpack/webpack-cli/commit/20aab48))
-* init: support global installation ([1cb0166](https://github.com/webpack/webpack-cli/commit/1cb0166))
-* init: revert to local installation ([48b3b23](https://github.com/webpack/webpack-cli/commit/48b3b23))
-* init: update prompt command ([c1c0739](https://github.com/webpack/webpack-cli/commit/c1c0739))
-* init: update prompt command ([1cab3cb](https://github.com/webpack/webpack-cli/commit/1cab3cb))
-* readme: remove old dependency status link ([4df0000](https://github.com/webpack/webpack-cli/commit/4df0000))
-* readme: add fallback badge for dependency status ([0e3753b](https://github.com/webpack/webpack-cli/commit/0e3753b))
-* tests: remove snapshot for static compilation ([54a3ac4](https://github.com/webpack/webpack-cli/commit/54a3ac4))
-* tests: remove snapshot for static compilation ([3af0948](https://github.com/webpack/webpack-cli/commit/3af0948))
-* tests: update jest ([d195774](https://github.com/webpack/webpack-cli/commit/d195774))
-* close compiler, own sh script and output clearing ([6ded275](https://github.com/webpack/webpack-cli/commit/6ded275))
-* failing test ([88888bb](https://github.com/webpack/webpack-cli/commit/88888bb))
-* failing test ([986472a](https://github.com/webpack/webpack-cli/commit/986472a))
-* test: fix travis ts build ([22d3acc](https://github.com/webpack/webpack-cli/commit/22d3acc))
+- bin: use compiler.close API correctly for stats ([568161d](https://github.com/webpack/webpack-cli/commit/568161d))
+- bin: extension detection ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- init: lint code ([20aab48](https://github.com/webpack/webpack-cli/commit/20aab48))
+- init: support global installation ([1cb0166](https://github.com/webpack/webpack-cli/commit/1cb0166))
+- init: revert to local installation ([48b3b23](https://github.com/webpack/webpack-cli/commit/48b3b23))
+- init: update prompt command ([c1c0739](https://github.com/webpack/webpack-cli/commit/c1c0739))
+- init: update prompt command ([1cab3cb](https://github.com/webpack/webpack-cli/commit/1cab3cb))
+- readme: remove old dependency status link ([4df0000](https://github.com/webpack/webpack-cli/commit/4df0000))
+- readme: add fallback badge for dependency status ([0e3753b](https://github.com/webpack/webpack-cli/commit/0e3753b))
+- tests: remove snapshot for static compilation ([54a3ac4](https://github.com/webpack/webpack-cli/commit/54a3ac4))
+- tests: remove snapshot for static compilation ([3af0948](https://github.com/webpack/webpack-cli/commit/3af0948))
+- tests: update jest ([d195774](https://github.com/webpack/webpack-cli/commit/d195774))
+- close compiler, own sh script and output clearing ([6ded275](https://github.com/webpack/webpack-cli/commit/6ded275))
+- failing test ([88888bb](https://github.com/webpack/webpack-cli/commit/88888bb))
+- failing test ([986472a](https://github.com/webpack/webpack-cli/commit/986472a))
+- test: fix travis ts build ([22d3acc](https://github.com/webpack/webpack-cli/commit/22d3acc))
## Tests
-* azure pipelines ([c9c3fea](https://github.com/webpack/webpack-cli/commit/c9c3fea))
-* bin: add `webpack.config.ts` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* bin: add `webpack.config.babel.js` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* module: use extractSummary ([7bde073](https://github.com/webpack/webpack-cli/commit/7bde073))
-* watch: use copyFile functionality ([c61fe92](https://github.com/webpack/webpack-cli/commit/c61fe92))
-* add copyFile function in test-utils ([1b21e81](https://github.com/webpack/webpack-cli/commit/1b21e81))
-* config-file: use extractSummary ([7554fe7](https://github.com/webpack/webpack-cli/commit/7554fe7))
-* config-name: use extractSummary ([3e30a57](https://github.com/webpack/webpack-cli/commit/3e30a57))
-* env: use extractSummary ([aa0cf25](https://github.com/webpack/webpack-cli/commit/aa0cf25))
-* fix: fix failing tests ([5669311](https://github.com/webpack/webpack-cli/commit/5669311))
-* fix: fix failing tests ([f1f7db1](https://github.com/webpack/webpack-cli/commit/f1f7db1))
-* help: use extractSummary ([0ba72c4](https://github.com/webpack/webpack-cli/commit/0ba72c4))
-* watch: use switch pattern for verbosity off ([c00386b](https://github.com/webpack/webpack-cli/commit/c00386b))
-* watch: hash assertion for single-config-opt ([55632d6](https://github.com/webpack/webpack-cli/commit/55632d6))
-* watch: hash assertion for single-config ([48f34d1](https://github.com/webpack/webpack-cli/commit/48f34d1))
-* watch: hash assertion for multi-config-watch-opt ([6dd2327](https://github.com/webpack/webpack-cli/commit/6dd2327))
-* watch: hash assertion multi-config ([6b4d339](https://github.com/webpack/webpack-cli/commit/6b4d339))
-* watch: hash assertion info-verbosity-verbose ([42e5ee8](https://github.com/webpack/webpack-cli/commit/42e5ee8))
-* watch: remove test.only for info-verbosity-off ([675d5c0](https://github.com/webpack/webpack-cli/commit/675d5c0))
-* improve appendFile test-case ([18bde78](https://github.com/webpack/webpack-cli/commit/18bde78))
-* remove eslint comment for requireReturn ([be7b259](https://github.com/webpack/webpack-cli/commit/be7b259))
-* watch: test failure using done(error) ([46d2e37](https://github.com/webpack/webpack-cli/commit/46d2e37))
-* watch: use native require first ([20e8579](https://github.com/webpack/webpack-cli/commit/20e8579))
-* watch: use better comments ([b6efe2d](https://github.com/webpack/webpack-cli/commit/b6efe2d))
-* add type to appendDataIfFileExists util ([f853302](https://github.com/webpack/webpack-cli/commit/f853302))
-* make comment clear about fs.copyFileSync ([d1d3d02](https://github.com/webpack/webpack-cli/commit/d1d3d02))
-* use 10E6 instead of 10e6 ([c9c5832](https://github.com/webpack/webpack-cli/commit/c9c5832))
-* bin: add `.babelrc` to webpack-babel-config test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* bin-cases: expose extractSummary as function ([73714f5](https://github.com/webpack/webpack-cli/commit/73714f5))
-* config-type: use extractSummary ([ed36260](https://github.com/webpack/webpack-cli/commit/ed36260))
-* entry: use extractSummary ([745a369](https://github.com/webpack/webpack-cli/commit/745a369))
-* errors: use extractSummary ([3c8628c](https://github.com/webpack/webpack-cli/commit/3c8628c))
-* fix: fix failing tests ([7cb531b](https://github.com/webpack/webpack-cli/commit/7cb531b))
-* fix: fix failing tests ([a967485](https://github.com/webpack/webpack-cli/commit/a967485))
-* mode: use extractSummary ([3277d41](https://github.com/webpack/webpack-cli/commit/3277d41))
-* output: use extractSummary ([cb60b15](https://github.com/webpack/webpack-cli/commit/cb60b15))
-* plugins: use extractSummary ([02e08dc](https://github.com/webpack/webpack-cli/commit/02e08dc))
-* silent: use extractSummary ([ea89a82](https://github.com/webpack/webpack-cli/commit/ea89a82))
-* stats: use extractSummary ([7f4e504](https://github.com/webpack/webpack-cli/commit/7f4e504))
-* watch: hash assertion for info-verbosity-off ([e0a0d97](https://github.com/webpack/webpack-cli/commit/e0a0d97))
-* watch: use extractSummary ([8357dbc](https://github.com/webpack/webpack-cli/commit/8357dbc))
+- azure pipelines ([c9c3fea](https://github.com/webpack/webpack-cli/commit/c9c3fea))
+- bin: add `webpack.config.ts` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- bin: add `webpack.config.babel.js` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- module: use extractSummary ([7bde073](https://github.com/webpack/webpack-cli/commit/7bde073))
+- watch: use copyFile functionality ([c61fe92](https://github.com/webpack/webpack-cli/commit/c61fe92))
+- add copyFile function in test-utils ([1b21e81](https://github.com/webpack/webpack-cli/commit/1b21e81))
+- config-file: use extractSummary ([7554fe7](https://github.com/webpack/webpack-cli/commit/7554fe7))
+- config-name: use extractSummary ([3e30a57](https://github.com/webpack/webpack-cli/commit/3e30a57))
+- env: use extractSummary ([aa0cf25](https://github.com/webpack/webpack-cli/commit/aa0cf25))
+- fix: fix failing tests ([5669311](https://github.com/webpack/webpack-cli/commit/5669311))
+- fix: fix failing tests ([f1f7db1](https://github.com/webpack/webpack-cli/commit/f1f7db1))
+- help: use extractSummary ([0ba72c4](https://github.com/webpack/webpack-cli/commit/0ba72c4))
+- watch: use switch pattern for verbosity off ([c00386b](https://github.com/webpack/webpack-cli/commit/c00386b))
+- watch: hash assertion for single-config-opt ([55632d6](https://github.com/webpack/webpack-cli/commit/55632d6))
+- watch: hash assertion for single-config ([48f34d1](https://github.com/webpack/webpack-cli/commit/48f34d1))
+- watch: hash assertion for multi-config-watch-opt ([6dd2327](https://github.com/webpack/webpack-cli/commit/6dd2327))
+- watch: hash assertion multi-config ([6b4d339](https://github.com/webpack/webpack-cli/commit/6b4d339))
+- watch: hash assertion info-verbosity-verbose ([42e5ee8](https://github.com/webpack/webpack-cli/commit/42e5ee8))
+- watch: remove test.only for info-verbosity-off ([675d5c0](https://github.com/webpack/webpack-cli/commit/675d5c0))
+- improve appendFile test-case ([18bde78](https://github.com/webpack/webpack-cli/commit/18bde78))
+- remove eslint comment for requireReturn ([be7b259](https://github.com/webpack/webpack-cli/commit/be7b259))
+- watch: test failure using done(error) ([46d2e37](https://github.com/webpack/webpack-cli/commit/46d2e37))
+- watch: use native require first ([20e8579](https://github.com/webpack/webpack-cli/commit/20e8579))
+- watch: use better comments ([b6efe2d](https://github.com/webpack/webpack-cli/commit/b6efe2d))
+- add type to appendDataIfFileExists util ([f853302](https://github.com/webpack/webpack-cli/commit/f853302))
+- make comment clear about fs.copyFileSync ([d1d3d02](https://github.com/webpack/webpack-cli/commit/d1d3d02))
+- use 10E6 instead of 10e6 ([c9c5832](https://github.com/webpack/webpack-cli/commit/c9c5832))
+- bin: add `.babelrc` to webpack-babel-config test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- bin-cases: expose extractSummary as function ([73714f5](https://github.com/webpack/webpack-cli/commit/73714f5))
+- config-type: use extractSummary ([ed36260](https://github.com/webpack/webpack-cli/commit/ed36260))
+- entry: use extractSummary ([745a369](https://github.com/webpack/webpack-cli/commit/745a369))
+- errors: use extractSummary ([3c8628c](https://github.com/webpack/webpack-cli/commit/3c8628c))
+- fix: fix failing tests ([7cb531b](https://github.com/webpack/webpack-cli/commit/7cb531b))
+- fix: fix failing tests ([a967485](https://github.com/webpack/webpack-cli/commit/a967485))
+- mode: use extractSummary ([3277d41](https://github.com/webpack/webpack-cli/commit/3277d41))
+- output: use extractSummary ([cb60b15](https://github.com/webpack/webpack-cli/commit/cb60b15))
+- plugins: use extractSummary ([02e08dc](https://github.com/webpack/webpack-cli/commit/02e08dc))
+- silent: use extractSummary ([ea89a82](https://github.com/webpack/webpack-cli/commit/ea89a82))
+- stats: use extractSummary ([7f4e504](https://github.com/webpack/webpack-cli/commit/7f4e504))
+- watch: hash assertion for info-verbosity-off ([e0a0d97](https://github.com/webpack/webpack-cli/commit/e0a0d97))
+- watch: use extractSummary ([8357dbc](https://github.com/webpack/webpack-cli/commit/8357dbc))
## Misc
-* Correction of the webpack-merge configuration ([2ed8c60](https://github.com/webpack/webpack-cli/commit/2ed8c60))
-* replace opencollective with light vers ([848bf4b](https://github.com/webpack/webpack-cli/commit/848bf4b))
+- Correction of the webpack-merge configuration ([2ed8c60](https://github.com/webpack/webpack-cli/commit/2ed8c60))
+- replace opencollective with light vers ([848bf4b](https://github.com/webpack/webpack-cli/commit/848bf4b))
+
+
-
# 3.2.2 (2019-02-05)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.3...v3.2.2)
## New Features
-* only display once a week ([b6199e5](https://github.com/webpack/webpack-cli/commit/b6199e5))
-* add util to run-and-get watch proc ([1d2ccd5](https://github.com/webpack/webpack-cli/commit/1d2ccd5))
-* add test-util to append data to file ([e9e1dcb](https://github.com/webpack/webpack-cli/commit/e9e1dcb))
-* log: clean single line logs ([5d2284b](https://github.com/webpack/webpack-cli/commit/5d2284b))
-* log: add gitignore ([7c830b5](https://github.com/webpack/webpack-cli/commit/7c830b5))
-* log: make log package ([df7c224](https://github.com/webpack/webpack-cli/commit/df7c224))
-* log: add clrscr function ([11b3bff](https://github.com/webpack/webpack-cli/commit/11b3bff))
-* log: few changes ([bc32727](https://github.com/webpack/webpack-cli/commit/bc32727))
-* log: add newline for title ([4047213](https://github.com/webpack/webpack-cli/commit/4047213))
-* log: remove unwanted commits ([c088f3e](https://github.com/webpack/webpack-cli/commit/c088f3e))
-* log: task based custom loggers ([2c43a41](https://github.com/webpack/webpack-cli/commit/2c43a41))
+- only display once a week ([b6199e5](https://github.com/webpack/webpack-cli/commit/b6199e5))
+- add util to run-and-get watch proc ([1d2ccd5](https://github.com/webpack/webpack-cli/commit/1d2ccd5))
+- add test-util to append data to file ([e9e1dcb](https://github.com/webpack/webpack-cli/commit/e9e1dcb))
+- log: clean single line logs ([5d2284b](https://github.com/webpack/webpack-cli/commit/5d2284b))
+- log: add gitignore ([7c830b5](https://github.com/webpack/webpack-cli/commit/7c830b5))
+- log: make log package ([df7c224](https://github.com/webpack/webpack-cli/commit/df7c224))
+- log: add clrscr function ([11b3bff](https://github.com/webpack/webpack-cli/commit/11b3bff))
+- log: few changes ([bc32727](https://github.com/webpack/webpack-cli/commit/bc32727))
+- log: add newline for title ([4047213](https://github.com/webpack/webpack-cli/commit/4047213))
+- log: remove unwanted commits ([c088f3e](https://github.com/webpack/webpack-cli/commit/c088f3e))
+- log: task based custom loggers ([2c43a41](https://github.com/webpack/webpack-cli/commit/2c43a41))
## Chore
-* v.3.2.3 ([70138b7](https://github.com/webpack/webpack-cli/commit/70138b7))
-* v.3.2.2 ([24b6387](https://github.com/webpack/webpack-cli/commit/24b6387))
-* update tests ([70bfbd9](https://github.com/webpack/webpack-cli/commit/70bfbd9))
-* one liner ([0f55d5a](https://github.com/webpack/webpack-cli/commit/0f55d5a))
-* one liner after log ([6d8fb67](https://github.com/webpack/webpack-cli/commit/6d8fb67))
-* watch: remove console log ([0952317](https://github.com/webpack/webpack-cli/commit/0952317))
-* v.3.2.1 ([54805ae](https://github.com/webpack/webpack-cli/commit/54805ae))
-* dependency: add `node-ts` as devDependency ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- v.3.2.3 ([70138b7](https://github.com/webpack/webpack-cli/commit/70138b7))
+- v.3.2.2 ([24b6387](https://github.com/webpack/webpack-cli/commit/24b6387))
+- update tests ([70bfbd9](https://github.com/webpack/webpack-cli/commit/70bfbd9))
+- one liner ([0f55d5a](https://github.com/webpack/webpack-cli/commit/0f55d5a))
+- one liner after log ([6d8fb67](https://github.com/webpack/webpack-cli/commit/6d8fb67))
+- watch: remove console log ([0952317](https://github.com/webpack/webpack-cli/commit/0952317))
+- v.3.2.1 ([54805ae](https://github.com/webpack/webpack-cli/commit/54805ae))
+- dependency: add `node-ts` as devDependency ([#724](https://github.com/webpack/webpack-cli/pull/724))
## Docs
-* init documentaion ([14d2b47](https://github.com/webpack/webpack-cli/commit/14d2b47))
-* scaffold: Add installation guide for packages/webpack-scaffold ([#727](https://github.com/webpack/webpack-cli/pull/727))
+- init documentaion ([14d2b47](https://github.com/webpack/webpack-cli/commit/14d2b47))
+- scaffold: Add installation guide for packages/webpack-scaffold ([#727](https://github.com/webpack/webpack-cli/pull/727))
## Fix
-* close compiler, own sh script and output clearing ([6ded275](https://github.com/webpack/webpack-cli/commit/6ded275))
-* bin: extension detection ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* readme: remove old dependency status link ([4df0000](https://github.com/webpack/webpack-cli/commit/4df0000))
-* readme: add fallback badge for dependency status ([0e3753b](https://github.com/webpack/webpack-cli/commit/0e3753b))
-* failing test ([88888bb](https://github.com/webpack/webpack-cli/commit/88888bb))
-* test: fix travis ts build ([22d3acc](https://github.com/webpack/webpack-cli/commit/22d3acc))
+- close compiler, own sh script and output clearing ([6ded275](https://github.com/webpack/webpack-cli/commit/6ded275))
+- bin: extension detection ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- readme: remove old dependency status link ([4df0000](https://github.com/webpack/webpack-cli/commit/4df0000))
+- readme: add fallback badge for dependency status ([0e3753b](https://github.com/webpack/webpack-cli/commit/0e3753b))
+- failing test ([88888bb](https://github.com/webpack/webpack-cli/commit/88888bb))
+- test: fix travis ts build ([22d3acc](https://github.com/webpack/webpack-cli/commit/22d3acc))
## Tests
-* azure pipelines ([c9c3fea](https://github.com/webpack/webpack-cli/commit/c9c3fea))
-* bin: add `webpack.config.ts` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* module: use extractSummary ([7bde073](https://github.com/webpack/webpack-cli/commit/7bde073))
-* watch: use copyFile functionality ([c61fe92](https://github.com/webpack/webpack-cli/commit/c61fe92))
-* add copyFile function in test-utils ([1b21e81](https://github.com/webpack/webpack-cli/commit/1b21e81))
-* bin: add `webpack.config.babel.js` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* config-file: use extractSummary ([7554fe7](https://github.com/webpack/webpack-cli/commit/7554fe7))
-* config-name: use extractSummary ([3e30a57](https://github.com/webpack/webpack-cli/commit/3e30a57))
-* env: use extractSummary ([aa0cf25](https://github.com/webpack/webpack-cli/commit/aa0cf25))
-* fix: fix failing tests ([5669311](https://github.com/webpack/webpack-cli/commit/5669311))
-* help: use extractSummary ([0ba72c4](https://github.com/webpack/webpack-cli/commit/0ba72c4))
-* watch: use switch pattern for verbosity off ([c00386b](https://github.com/webpack/webpack-cli/commit/c00386b))
-* watch: hash assertion for single-config-opt ([55632d6](https://github.com/webpack/webpack-cli/commit/55632d6))
-* watch: hash assertion for single-config ([48f34d1](https://github.com/webpack/webpack-cli/commit/48f34d1))
-* watch: hash assertion for multi-config-watch-opt ([6dd2327](https://github.com/webpack/webpack-cli/commit/6dd2327))
-* watch: hash assertion multi-config ([6b4d339](https://github.com/webpack/webpack-cli/commit/6b4d339))
-* watch: hash assertion info-verbosity-verbose ([42e5ee8](https://github.com/webpack/webpack-cli/commit/42e5ee8))
-* watch: remove test.only for info-verbosity-off ([675d5c0](https://github.com/webpack/webpack-cli/commit/675d5c0))
-* improve appendFile test-case ([18bde78](https://github.com/webpack/webpack-cli/commit/18bde78))
-* remove eslint comment for requireReturn ([be7b259](https://github.com/webpack/webpack-cli/commit/be7b259))
-* watch: test failure using done(error) ([46d2e37](https://github.com/webpack/webpack-cli/commit/46d2e37))
-* watch: use native require first ([20e8579](https://github.com/webpack/webpack-cli/commit/20e8579))
-* watch: use better comments ([b6efe2d](https://github.com/webpack/webpack-cli/commit/b6efe2d))
-* add type to appendDataIfFileExists util ([f853302](https://github.com/webpack/webpack-cli/commit/f853302))
-* make comment clear about fs.copyFileSync ([d1d3d02](https://github.com/webpack/webpack-cli/commit/d1d3d02))
-* use 10E6 instead of 10e6 ([c9c5832](https://github.com/webpack/webpack-cli/commit/c9c5832))
-* bin: add `.babelrc` to webpack-babel-config test ([#724](https://github.com/webpack/webpack-cli/pull/724))
-* bin-cases: expose extractSummary as function ([73714f5](https://github.com/webpack/webpack-cli/commit/73714f5))
-* config-type: use extractSummary ([ed36260](https://github.com/webpack/webpack-cli/commit/ed36260))
-* entry: use extractSummary ([745a369](https://github.com/webpack/webpack-cli/commit/745a369))
-* errors: use extractSummary ([3c8628c](https://github.com/webpack/webpack-cli/commit/3c8628c))
-* fix: fix failing tests ([7cb531b](https://github.com/webpack/webpack-cli/commit/7cb531b))
-* mode: use extractSummary ([3277d41](https://github.com/webpack/webpack-cli/commit/3277d41))
-* output: use extractSummary ([cb60b15](https://github.com/webpack/webpack-cli/commit/cb60b15))
-* plugins: use extractSummary ([02e08dc](https://github.com/webpack/webpack-cli/commit/02e08dc))
-* silent: use extractSummary ([ea89a82](https://github.com/webpack/webpack-cli/commit/ea89a82))
-* stats: use extractSummary ([7f4e504](https://github.com/webpack/webpack-cli/commit/7f4e504))
-* watch: hash assertion for info-verbosity-off ([e0a0d97](https://github.com/webpack/webpack-cli/commit/e0a0d97))
-* watch: use extractSummary ([8357dbc](https://github.com/webpack/webpack-cli/commit/8357dbc))
+- azure pipelines ([c9c3fea](https://github.com/webpack/webpack-cli/commit/c9c3fea))
+- bin: add `webpack.config.ts` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- module: use extractSummary ([7bde073](https://github.com/webpack/webpack-cli/commit/7bde073))
+- watch: use copyFile functionality ([c61fe92](https://github.com/webpack/webpack-cli/commit/c61fe92))
+- add copyFile function in test-utils ([1b21e81](https://github.com/webpack/webpack-cli/commit/1b21e81))
+- bin: add `webpack.config.babel.js` related test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- config-file: use extractSummary ([7554fe7](https://github.com/webpack/webpack-cli/commit/7554fe7))
+- config-name: use extractSummary ([3e30a57](https://github.com/webpack/webpack-cli/commit/3e30a57))
+- env: use extractSummary ([aa0cf25](https://github.com/webpack/webpack-cli/commit/aa0cf25))
+- fix: fix failing tests ([5669311](https://github.com/webpack/webpack-cli/commit/5669311))
+- help: use extractSummary ([0ba72c4](https://github.com/webpack/webpack-cli/commit/0ba72c4))
+- watch: use switch pattern for verbosity off ([c00386b](https://github.com/webpack/webpack-cli/commit/c00386b))
+- watch: hash assertion for single-config-opt ([55632d6](https://github.com/webpack/webpack-cli/commit/55632d6))
+- watch: hash assertion for single-config ([48f34d1](https://github.com/webpack/webpack-cli/commit/48f34d1))
+- watch: hash assertion for multi-config-watch-opt ([6dd2327](https://github.com/webpack/webpack-cli/commit/6dd2327))
+- watch: hash assertion multi-config ([6b4d339](https://github.com/webpack/webpack-cli/commit/6b4d339))
+- watch: hash assertion info-verbosity-verbose ([42e5ee8](https://github.com/webpack/webpack-cli/commit/42e5ee8))
+- watch: remove test.only for info-verbosity-off ([675d5c0](https://github.com/webpack/webpack-cli/commit/675d5c0))
+- improve appendFile test-case ([18bde78](https://github.com/webpack/webpack-cli/commit/18bde78))
+- remove eslint comment for requireReturn ([be7b259](https://github.com/webpack/webpack-cli/commit/be7b259))
+- watch: test failure using done(error) ([46d2e37](https://github.com/webpack/webpack-cli/commit/46d2e37))
+- watch: use native require first ([20e8579](https://github.com/webpack/webpack-cli/commit/20e8579))
+- watch: use better comments ([b6efe2d](https://github.com/webpack/webpack-cli/commit/b6efe2d))
+- add type to appendDataIfFileExists util ([f853302](https://github.com/webpack/webpack-cli/commit/f853302))
+- make comment clear about fs.copyFileSync ([d1d3d02](https://github.com/webpack/webpack-cli/commit/d1d3d02))
+- use 10E6 instead of 10e6 ([c9c5832](https://github.com/webpack/webpack-cli/commit/c9c5832))
+- bin: add `.babelrc` to webpack-babel-config test ([#724](https://github.com/webpack/webpack-cli/pull/724))
+- bin-cases: expose extractSummary as function ([73714f5](https://github.com/webpack/webpack-cli/commit/73714f5))
+- config-type: use extractSummary ([ed36260](https://github.com/webpack/webpack-cli/commit/ed36260))
+- entry: use extractSummary ([745a369](https://github.com/webpack/webpack-cli/commit/745a369))
+- errors: use extractSummary ([3c8628c](https://github.com/webpack/webpack-cli/commit/3c8628c))
+- fix: fix failing tests ([7cb531b](https://github.com/webpack/webpack-cli/commit/7cb531b))
+- mode: use extractSummary ([3277d41](https://github.com/webpack/webpack-cli/commit/3277d41))
+- output: use extractSummary ([cb60b15](https://github.com/webpack/webpack-cli/commit/cb60b15))
+- plugins: use extractSummary ([02e08dc](https://github.com/webpack/webpack-cli/commit/02e08dc))
+- silent: use extractSummary ([ea89a82](https://github.com/webpack/webpack-cli/commit/ea89a82))
+- stats: use extractSummary ([7f4e504](https://github.com/webpack/webpack-cli/commit/7f4e504))
+- watch: hash assertion for info-verbosity-off ([e0a0d97](https://github.com/webpack/webpack-cli/commit/e0a0d97))
+- watch: use extractSummary ([8357dbc](https://github.com/webpack/webpack-cli/commit/8357dbc))
## Misc
-* Correction of the webpack-merge configuration ([2ed8c60](https://github.com/webpack/webpack-cli/commit/2ed8c60))
-* replace opencollective with light vers ([848bf4b](https://github.com/webpack/webpack-cli/commit/848bf4b))
+- Correction of the webpack-merge configuration ([2ed8c60](https://github.com/webpack/webpack-cli/commit/2ed8c60))
+- replace opencollective with light vers ([848bf4b](https://github.com/webpack/webpack-cli/commit/848bf4b))
+
# 3.1.2 (2018-09-29)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v3.1.1...v3.1.2)
## Chore
-* deps: upgrade husky ([#611](https://github.com/webpack/webpack-cli/pull/611))
-* docs: update readme ([93ebcc2](https://github.com/webpack/webpack-cli/commit/93ebcc2))
-* scripts: add commit script, cz-customizable ([#612](https://github.com/webpack/webpack-cli/pull/612))
+- deps: upgrade husky ([#611](https://github.com/webpack/webpack-cli/pull/611))
+- docs: update readme ([93ebcc2](https://github.com/webpack/webpack-cli/commit/93ebcc2))
+- scripts: add commit script, cz-customizable ([#612](https://github.com/webpack/webpack-cli/pull/612))
## Docs
-* init: update headers ([dc4ded9](https://github.com/webpack/webpack-cli/commit/dc4ded9))
-* init: update init documentation ([2ccf9a9](https://github.com/webpack/webpack-cli/commit/2ccf9a9))
-* readme: update webpack-cli to webpack CLI ([f3a225a](https://github.com/webpack/webpack-cli/commit/f3a225a))
-* readme: change addons to scaffolds ([747aef9](https://github.com/webpack/webpack-cli/commit/747aef9))
-* readme: update links ([f8187f1](https://github.com/webpack/webpack-cli/commit/f8187f1))
-* readme: update README.md ([#614](https://github.com/webpack/webpack-cli/pull/614))
-* readme: update Readme based on feedback ([da05c2f](https://github.com/webpack/webpack-cli/commit/da05c2f))
+- init: update headers ([dc4ded9](https://github.com/webpack/webpack-cli/commit/dc4ded9))
+- init: update init documentation ([2ccf9a9](https://github.com/webpack/webpack-cli/commit/2ccf9a9))
+- readme: update webpack-cli to webpack CLI ([f3a225a](https://github.com/webpack/webpack-cli/commit/f3a225a))
+- readme: change addons to scaffolds ([747aef9](https://github.com/webpack/webpack-cli/commit/747aef9))
+- readme: update links ([f8187f1](https://github.com/webpack/webpack-cli/commit/f8187f1))
+- readme: update README.md ([#614](https://github.com/webpack/webpack-cli/pull/614))
+- readme: update Readme based on feedback ([da05c2f](https://github.com/webpack/webpack-cli/commit/da05c2f))
## Fix
-* tapable: fix hook options ([9aed0dc](https://github.com/webpack/webpack-cli/commit/9aed0dc))
-* replace test regex ([d4e1614](https://github.com/webpack/webpack-cli/commit/d4e1614))
+- tapable: fix hook options ([9aed0dc](https://github.com/webpack/webpack-cli/commit/9aed0dc))
+- replace test regex ([d4e1614](https://github.com/webpack/webpack-cli/commit/d4e1614))
+
+
-
# 3.1.1 (2018-09-23)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.0...v3.1.1)
## New Features
-* migrate: CommonChunksPlugin to SplitChunksPlugin ([#558](https://github.com/webpack/webpack-cli/pull/558))
-* types: types for packages ([#578](https://github.com/webpack/webpack-cli/pull/578))
+- migrate: CommonChunksPlugin to SplitChunksPlugin ([#558](https://github.com/webpack/webpack-cli/pull/558))
+- types: types for packages ([#578](https://github.com/webpack/webpack-cli/pull/578))
## Chore
-* ci: add commitlint when trying to commit ([#595](https://github.com/webpack/webpack-cli/pull/595))
-* ci: Set up CI with Azure Pipelines ([89d3a19](https://github.com/webpack/webpack-cli/commit/89d3a19))
-* ci: fix commitlint ([#592](https://github.com/webpack/webpack-cli/pull/592))
-* ci: Add a status badge for the azure pipelines CI build ([#601](https://github.com/webpack/webpack-cli/pull/601))
-* deps: resync package-lock, upgrade major version ([d892b4d](https://github.com/webpack/webpack-cli/commit/d892b4d))
-* deps: Bump lerna version ([#583](https://github.com/webpack/webpack-cli/pull/583))
-* deps: removing inquirer as default package ([#555](https://github.com/webpack/webpack-cli/pull/555))
-* fix: fix clean all script ([6be0478](https://github.com/webpack/webpack-cli/commit/6be0478))
-* Update schema-utils to the latest version 🚀 ([#565](https://github.com/webpack/webpack-cli/pull/565))
-* update pkg.lock ([76c8277](https://github.com/webpack/webpack-cli/commit/76c8277))
-* remove editorconfig from testfixtures ([#560](https://github.com/webpack/webpack-cli/pull/560))
-* lint: fix tslint warnings ([cf0bf4a](https://github.com/webpack/webpack-cli/commit/cf0bf4a))
-* lint: turn off console log warning ([db5f570](https://github.com/webpack/webpack-cli/commit/db5f570))
-* lint: remove or replace console.log with console.error ([e425642](https://github.com/webpack/webpack-cli/commit/e425642))
-* package: update lerna to version 3.0.0 ([08c424d](https://github.com/webpack/webpack-cli/commit/08c424d))
-* scripts: update ts watch ([336ad3e](https://github.com/webpack/webpack-cli/commit/336ad3e))
-* tests: added first ts test for info package ([#584](https://github.com/webpack/webpack-cli/pull/584))
+- ci: add commitlint when trying to commit ([#595](https://github.com/webpack/webpack-cli/pull/595))
+- ci: Set up CI with Azure Pipelines ([89d3a19](https://github.com/webpack/webpack-cli/commit/89d3a19))
+- ci: fix commitlint ([#592](https://github.com/webpack/webpack-cli/pull/592))
+- ci: Add a status badge for the azure pipelines CI build ([#601](https://github.com/webpack/webpack-cli/pull/601))
+- deps: resync package-lock, upgrade major version ([d892b4d](https://github.com/webpack/webpack-cli/commit/d892b4d))
+- deps: Bump lerna version ([#583](https://github.com/webpack/webpack-cli/pull/583))
+- deps: removing inquirer as default package ([#555](https://github.com/webpack/webpack-cli/pull/555))
+- fix: fix clean all script ([6be0478](https://github.com/webpack/webpack-cli/commit/6be0478))
+- Update schema-utils to the latest version 🚀 ([#565](https://github.com/webpack/webpack-cli/pull/565))
+- update pkg.lock ([76c8277](https://github.com/webpack/webpack-cli/commit/76c8277))
+- remove editorconfig from testfixtures ([#560](https://github.com/webpack/webpack-cli/pull/560))
+- lint: fix tslint warnings ([cf0bf4a](https://github.com/webpack/webpack-cli/commit/cf0bf4a))
+- lint: turn off console log warning ([db5f570](https://github.com/webpack/webpack-cli/commit/db5f570))
+- lint: remove or replace console.log with console.error ([e425642](https://github.com/webpack/webpack-cli/commit/e425642))
+- package: update lerna to version 3.0.0 ([08c424d](https://github.com/webpack/webpack-cli/commit/08c424d))
+- scripts: update ts watch ([336ad3e](https://github.com/webpack/webpack-cli/commit/336ad3e))
+- tests: added first ts test for info package ([#584](https://github.com/webpack/webpack-cli/pull/584))
## CLI
-* allow array value for --ouput-library ([#559](https://github.com/webpack/webpack-cli/pull/559))
+- allow array value for --ouput-library ([#559](https://github.com/webpack/webpack-cli/pull/559))
## Docs
-* fixed latest changelog link ([#556](https://github.com/webpack/webpack-cli/pull/556))
-* migrate documentaion ([#554](https://github.com/webpack/webpack-cli/pull/554))
-* init documentaion ([#547](https://github.com/webpack/webpack-cli/pull/547))
-* contribution: fix the setup workflow #591 ([#597](https://github.com/webpack/webpack-cli/pull/597))
-* typedoc: add ts docs ([#571](https://github.com/webpack/webpack-cli/pull/571))
+- fixed latest changelog link ([#556](https://github.com/webpack/webpack-cli/pull/556))
+- migrate documentaion ([#554](https://github.com/webpack/webpack-cli/pull/554))
+- init documentaion ([#547](https://github.com/webpack/webpack-cli/pull/547))
+- contribution: fix the setup workflow #591 ([#597](https://github.com/webpack/webpack-cli/pull/597))
+- typedoc: add ts docs ([#571](https://github.com/webpack/webpack-cli/pull/571))
## Fix
-* generate-loader: include example template in npm package ([d26ea82](https://github.com/webpack/webpack-cli/commit/d26ea82))
-* generate-plugin: include example template in npm package ([77fa723](https://github.com/webpack/webpack-cli/commit/77fa723))
-* package: update import-local to version 2.0.0 🚀 ([#576](https://github.com/webpack/webpack-cli/pull/576))
-* prettier: add parser, filePath ([#553](https://github.com/webpack/webpack-cli/pull/553))
-* schema: resolve references in schema ([#605](https://github.com/webpack/webpack-cli/pull/605))
+- generate-loader: include example template in npm package ([d26ea82](https://github.com/webpack/webpack-cli/commit/d26ea82))
+- generate-plugin: include example template in npm package ([77fa723](https://github.com/webpack/webpack-cli/commit/77fa723))
+- package: update import-local to version 2.0.0 🚀 ([#576](https://github.com/webpack/webpack-cli/pull/576))
+- prettier: add parser, filePath ([#553](https://github.com/webpack/webpack-cli/pull/553))
+- schema: resolve references in schema ([#605](https://github.com/webpack/webpack-cli/pull/605))
## Misc
-* Revert "cli: allow array value for --ouput-library (#559)" ([#561](https://github.com/webpack/webpack-cli/pull/561))
+- Revert "cli: allow array value for --ouput-library (#559)" ([#561](https://github.com/webpack/webpack-cli/pull/561))
+
+
-
# 3.1.0 (2018-07-18)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v3.0.8...v.3.1.0)
## New Features
-* generators: add typescript support ([c1844f8](https://github.com/webpack/webpack-cli/commit/c1844f8))
-* init: add typescript support ([222ccdc](https://github.com/webpack/webpack-cli/commit/222ccdc))
-* make: add typescript support ([4b574d9](https://github.com/webpack/webpack-cli/commit/4b574d9))
-* remove: add typescript support ([f1623ed](https://github.com/webpack/webpack-cli/commit/f1623ed))
-* scaffold: add typescript support ([eaf6fdf](https://github.com/webpack/webpack-cli/commit/eaf6fdf))
-* scaffold: add typescript support ([f611c27](https://github.com/webpack/webpack-cli/commit/f611c27))
-* serve: add typescript support ([d313421](https://github.com/webpack/webpack-cli/commit/d313421))
-* types: add webpack types schema ([90909e4](https://github.com/webpack/webpack-cli/commit/90909e4))
-* typescript: setup base infra ([fe25465](https://github.com/webpack/webpack-cli/commit/fe25465))
-* typescript: setup base infra ([373a304](https://github.com/webpack/webpack-cli/commit/373a304))
-* update: add typescript support ([53505b9](https://github.com/webpack/webpack-cli/commit/53505b9))
-* utils: add typescript support ([47702cb](https://github.com/webpack/webpack-cli/commit/47702cb))
+- generators: add typescript support ([c1844f8](https://github.com/webpack/webpack-cli/commit/c1844f8))
+- init: add typescript support ([222ccdc](https://github.com/webpack/webpack-cli/commit/222ccdc))
+- make: add typescript support ([4b574d9](https://github.com/webpack/webpack-cli/commit/4b574d9))
+- remove: add typescript support ([f1623ed](https://github.com/webpack/webpack-cli/commit/f1623ed))
+- scaffold: add typescript support ([eaf6fdf](https://github.com/webpack/webpack-cli/commit/eaf6fdf))
+- scaffold: add typescript support ([f611c27](https://github.com/webpack/webpack-cli/commit/f611c27))
+- serve: add typescript support ([d313421](https://github.com/webpack/webpack-cli/commit/d313421))
+- types: add webpack types schema ([90909e4](https://github.com/webpack/webpack-cli/commit/90909e4))
+- typescript: setup base infra ([fe25465](https://github.com/webpack/webpack-cli/commit/fe25465))
+- typescript: setup base infra ([373a304](https://github.com/webpack/webpack-cli/commit/373a304))
+- update: add typescript support ([53505b9](https://github.com/webpack/webpack-cli/commit/53505b9))
+- utils: add typescript support ([47702cb](https://github.com/webpack/webpack-cli/commit/47702cb))
## Ast
-* parser: remove ([7f51c27](https://github.com/webpack/webpack-cli/commit/7f51c27))
-* parser: remove ([faeec57](https://github.com/webpack/webpack-cli/commit/faeec57))
+- parser: remove ([7f51c27](https://github.com/webpack/webpack-cli/commit/7f51c27))
+- parser: remove ([faeec57](https://github.com/webpack/webpack-cli/commit/faeec57))
## Chore
-* add-cmd: add typescript support ([fb98933](https://github.com/webpack/webpack-cli/commit/fb98933))
-* add-cmd: add typescript support ([d730841](https://github.com/webpack/webpack-cli/commit/d730841))
-* build: fix eslint pattern ([#529](https://github.com/webpack/webpack-cli/pull/529))
-* build: fix ci ([#535](https://github.com/webpack/webpack-cli/pull/535))
-* ci: fix build ([#534](https://github.com/webpack/webpack-cli/pull/534))
-* ci: fix build ([#534](https://github.com/webpack/webpack-cli/pull/534))
-* ci: remove semantic release ([#516](https://github.com/webpack/webpack-cli/pull/516))
-* ci: update appveyor config, script ([f220c9e](https://github.com/webpack/webpack-cli/commit/f220c9e))
-* ci: update travis script ([00df5ba](https://github.com/webpack/webpack-cli/commit/00df5ba))
-* update pkg.lock ([817f99c](https://github.com/webpack/webpack-cli/commit/817f99c))
-* fix minor build infra ([87dd419](https://github.com/webpack/webpack-cli/commit/87dd419))
-* Update eslint to the latest version 🚀 ([#526](https://github.com/webpack/webpack-cli/pull/526))
-* update gitignore ([fdc82b9](https://github.com/webpack/webpack-cli/commit/fdc82b9))
-* add missing READMES to packages ([#545](https://github.com/webpack/webpack-cli/pull/545))
-* docs: Updated working link for webpack addon. ([#543](https://github.com/webpack/webpack-cli/pull/543))
-* generate-loader,plugin: add typescript support ([971b31a](https://github.com/webpack/webpack-cli/commit/971b31a))
-* info: add typescript support ([ca133ab](https://github.com/webpack/webpack-cli/commit/ca133ab))
-* info: add typescript support ([2c69df0](https://github.com/webpack/webpack-cli/commit/2c69df0))
-* migrate: add typescript support ([82a7dec](https://github.com/webpack/webpack-cli/commit/82a7dec))
-* package: update eslint-plugin-node to version 7.0.0 ([507a4a6](https://github.com/webpack/webpack-cli/commit/507a4a6))
-* package: update lockfile ([a3d41fb](https://github.com/webpack/webpack-cli/commit/a3d41fb))
-* release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
-* release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
-* release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
-* scripts: fix pretest ([55efce6](https://github.com/webpack/webpack-cli/commit/55efce6))
-* scripts: remove semantic-release ([#525](https://github.com/webpack/webpack-cli/pull/525))
-* template: tiny fix for bug template ([51dc005](https://github.com/webpack/webpack-cli/commit/51dc005))
+- add-cmd: add typescript support ([fb98933](https://github.com/webpack/webpack-cli/commit/fb98933))
+- add-cmd: add typescript support ([d730841](https://github.com/webpack/webpack-cli/commit/d730841))
+- build: fix eslint pattern ([#529](https://github.com/webpack/webpack-cli/pull/529))
+- build: fix ci ([#535](https://github.com/webpack/webpack-cli/pull/535))
+- ci: fix build ([#534](https://github.com/webpack/webpack-cli/pull/534))
+- ci: fix build ([#534](https://github.com/webpack/webpack-cli/pull/534))
+- ci: remove semantic release ([#516](https://github.com/webpack/webpack-cli/pull/516))
+- ci: update appveyor config, script ([f220c9e](https://github.com/webpack/webpack-cli/commit/f220c9e))
+- ci: update travis script ([00df5ba](https://github.com/webpack/webpack-cli/commit/00df5ba))
+- update pkg.lock ([817f99c](https://github.com/webpack/webpack-cli/commit/817f99c))
+- fix minor build infra ([87dd419](https://github.com/webpack/webpack-cli/commit/87dd419))
+- Update eslint to the latest version 🚀 ([#526](https://github.com/webpack/webpack-cli/pull/526))
+- update gitignore ([fdc82b9](https://github.com/webpack/webpack-cli/commit/fdc82b9))
+- add missing READMES to packages ([#545](https://github.com/webpack/webpack-cli/pull/545))
+- docs: Updated working link for webpack addon. ([#543](https://github.com/webpack/webpack-cli/pull/543))
+- generate-loader,plugin: add typescript support ([971b31a](https://github.com/webpack/webpack-cli/commit/971b31a))
+- info: add typescript support ([ca133ab](https://github.com/webpack/webpack-cli/commit/ca133ab))
+- info: add typescript support ([2c69df0](https://github.com/webpack/webpack-cli/commit/2c69df0))
+- migrate: add typescript support ([82a7dec](https://github.com/webpack/webpack-cli/commit/82a7dec))
+- package: update eslint-plugin-node to version 7.0.0 ([507a4a6](https://github.com/webpack/webpack-cli/commit/507a4a6))
+- package: update lockfile ([a3d41fb](https://github.com/webpack/webpack-cli/commit/a3d41fb))
+- release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
+- release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
+- release: whitelist/blacklist release files ([#514](https://github.com/webpack/webpack-cli/pull/514))
+- scripts: fix pretest ([55efce6](https://github.com/webpack/webpack-cli/commit/55efce6))
+- scripts: remove semantic-release ([#525](https://github.com/webpack/webpack-cli/pull/525))
+- template: tiny fix for bug template ([51dc005](https://github.com/webpack/webpack-cli/commit/51dc005))
## Docs
-* update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
-* update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
-* update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
-* pkg: readme file for add package ([#498](https://github.com/webpack/webpack-cli/pull/498))
-* pkg: readme info ([#497](https://github.com/webpack/webpack-cli/pull/497))
-* pkg: readme info ([#497](https://github.com/webpack/webpack-cli/pull/497))
+- update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
+- update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
+- update jsdoc ([#507](https://github.com/webpack/webpack-cli/pull/507))
+- pkg: readme file for add package ([#498](https://github.com/webpack/webpack-cli/pull/498))
+- pkg: readme info ([#497](https://github.com/webpack/webpack-cli/pull/497))
+- pkg: readme info ([#497](https://github.com/webpack/webpack-cli/pull/497))
## Fix
-* default named import bug ([ce956c0](https://github.com/webpack/webpack-cli/commit/ce956c0))
-* generators: named export ([8adbe9e](https://github.com/webpack/webpack-cli/commit/8adbe9e))
+- default named import bug ([ce956c0](https://github.com/webpack/webpack-cli/commit/ce956c0))
+- generators: named export ([8adbe9e](https://github.com/webpack/webpack-cli/commit/8adbe9e))
## Tests
-* fix: bin test outputs ([#552](https://github.com/webpack/webpack-cli/pull/552))
-* migrate: fix transforms order issue ([938e5f9](https://github.com/webpack/webpack-cli/commit/938e5f9))
+- fix: bin test outputs ([#552](https://github.com/webpack/webpack-cli/pull/552))
+- migrate: fix transforms order issue ([938e5f9](https://github.com/webpack/webpack-cli/commit/938e5f9))
## Misc
-* Update yargs to the latest version 🚀 ([#533](https://github.com/webpack/webpack-cli/pull/533))
+- Update yargs to the latest version 🚀 ([#533](https://github.com/webpack/webpack-cli/pull/533))
+
+
-
# 0.0.8-development (2018-06-15, webpack CLI v.3)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.1.5...v0.0.8-development)
## Ast
-* parser: add ([#456](https://github.com/webpack/webpack-cli/pull/456))
+- parser: add ([#456](https://github.com/webpack/webpack-cli/pull/456))
## Chore
-* deps: add lerna ([a7d8085](https://github.com/webpack/webpack-cli/commit/a7d8085))
-* lockfile: update pkglock ([0b024bf](https://github.com/webpack/webpack-cli/commit/0b024bf))
-* monorepo: fix windows build ([0310fd3](https://github.com/webpack/webpack-cli/commit/0310fd3))
-* monorepo: add bootstrap to run ([17c2c88](https://github.com/webpack/webpack-cli/commit/17c2c88))
-* monorepo: fix windows build ([8c58d24](https://github.com/webpack/webpack-cli/commit/8c58d24))
-* monorepo: add rimraf globally ([7c0e245](https://github.com/webpack/webpack-cli/commit/7c0e245))
-* monorepo: fix versions and use clean bootstrap ([7de58ea](https://github.com/webpack/webpack-cli/commit/7de58ea))
-* monorepo: fix appveyor build ([206749b](https://github.com/webpack/webpack-cli/commit/206749b))
-* monorepo: add eslint-plugin-prettier ([ae55183](https://github.com/webpack/webpack-cli/commit/ae55183))
-* monorepo: fix appveyor build ([a08b899](https://github.com/webpack/webpack-cli/commit/a08b899))
-* monorepo: fix appveyor build ([42468d3](https://github.com/webpack/webpack-cli/commit/42468d3))
-* next: dev version bump ([78b48a6](https://github.com/webpack/webpack-cli/commit/78b48a6))
-* pkg: v.6 on next ([3a82b7d](https://github.com/webpack/webpack-cli/commit/3a82b7d))
-* semantic: configure plugins ([#475](https://github.com/webpack/webpack-cli/pull/475))
-* v.6: update init ([ebe5c6b](https://github.com/webpack/webpack-cli/commit/ebe5c6b))
+- deps: add lerna ([a7d8085](https://github.com/webpack/webpack-cli/commit/a7d8085))
+- lockfile: update pkglock ([0b024bf](https://github.com/webpack/webpack-cli/commit/0b024bf))
+- monorepo: fix windows build ([0310fd3](https://github.com/webpack/webpack-cli/commit/0310fd3))
+- monorepo: add bootstrap to run ([17c2c88](https://github.com/webpack/webpack-cli/commit/17c2c88))
+- monorepo: fix windows build ([8c58d24](https://github.com/webpack/webpack-cli/commit/8c58d24))
+- monorepo: add rimraf globally ([7c0e245](https://github.com/webpack/webpack-cli/commit/7c0e245))
+- monorepo: fix versions and use clean bootstrap ([7de58ea](https://github.com/webpack/webpack-cli/commit/7de58ea))
+- monorepo: fix appveyor build ([206749b](https://github.com/webpack/webpack-cli/commit/206749b))
+- monorepo: add eslint-plugin-prettier ([ae55183](https://github.com/webpack/webpack-cli/commit/ae55183))
+- monorepo: fix appveyor build ([a08b899](https://github.com/webpack/webpack-cli/commit/a08b899))
+- monorepo: fix appveyor build ([42468d3](https://github.com/webpack/webpack-cli/commit/42468d3))
+- next: dev version bump ([78b48a6](https://github.com/webpack/webpack-cli/commit/78b48a6))
+- pkg: v.6 on next ([3a82b7d](https://github.com/webpack/webpack-cli/commit/3a82b7d))
+- semantic: configure plugins ([#475](https://github.com/webpack/webpack-cli/pull/475))
+- v.6: update init ([ebe5c6b](https://github.com/webpack/webpack-cli/commit/ebe5c6b))
## CLI
-* add: re-add add command ([bf78411](https://github.com/webpack/webpack-cli/commit/bf78411))
-* color: don't use color on non-tty ([#452](https://github.com/webpack/webpack-cli/pull/452))
-* init: Better defaults ([#451](https://github.com/webpack/webpack-cli/pull/451))
-* symlinks: Fix paths ([#453](https://github.com/webpack/webpack-cli/pull/453))
+- add: re-add add command ([bf78411](https://github.com/webpack/webpack-cli/commit/bf78411))
+- color: don't use color on non-tty ([#452](https://github.com/webpack/webpack-cli/pull/452))
+- init: Better defaults ([#451](https://github.com/webpack/webpack-cli/pull/451))
+- symlinks: Fix paths ([#453](https://github.com/webpack/webpack-cli/pull/453))
## Fix
-* cli: show help flag when defaults fail ([#466](https://github.com/webpack/webpack-cli/pull/466))
-* vulnerabilities: vulnerabilities patch for v3 ([#460](https://github.com/webpack/webpack-cli/pull/460))
+- cli: show help flag when defaults fail ([#466](https://github.com/webpack/webpack-cli/pull/466))
+- vulnerabilities: vulnerabilities patch for v3 ([#460](https://github.com/webpack/webpack-cli/pull/460))
## Tests
-* cov: use regular nyc on tests ([3aa96ce](https://github.com/webpack/webpack-cli/commit/3aa96ce))
-* coverage: fix coverage ([#473](https://github.com/webpack/webpack-cli/pull/473))
-* no-options: refactor tests ([7be10d8](https://github.com/webpack/webpack-cli/commit/7be10d8))
-* parser: fix recursive-tests signature ([#470](https://github.com/webpack/webpack-cli/pull/470))
+- cov: use regular nyc on tests ([3aa96ce](https://github.com/webpack/webpack-cli/commit/3aa96ce))
+- coverage: fix coverage ([#473](https://github.com/webpack/webpack-cli/pull/473))
+- no-options: refactor tests ([7be10d8](https://github.com/webpack/webpack-cli/commit/7be10d8))
+- parser: fix recursive-tests signature ([#470](https://github.com/webpack/webpack-cli/pull/470))
## Misc
-* Added yarn lock file to gitignore ([#455](https://github.com/webpack/webpack-cli/pull/455))
+- Added yarn lock file to gitignore ([#455](https://github.com/webpack/webpack-cli/pull/455))
+
+
-
# 0.0.6 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.0.5...v0.0.6)
## CLI
-* path: resolve better ([7fca948](https://github.com/webpack/webpack-cli/commit/7fca948))
+- path: resolve better ([7fca948](https://github.com/webpack/webpack-cli/commit/7fca948))
## Misc
-* v0.0.6 ([f544578](https://github.com/webpack/webpack-cli/commit/f544578))
+- v0.0.6 ([f544578](https://github.com/webpack/webpack-cli/commit/f544578))
+
+
-
# 0.0.5 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.0.4...v0.0.5)
## Chore
-* deps: update deps ([58a437d](https://github.com/webpack/webpack-cli/commit/58a437d))
-* prompt: revise prompt cmd ([bccc56e](https://github.com/webpack/webpack-cli/commit/bccc56e))
+- deps: update deps ([58a437d](https://github.com/webpack/webpack-cli/commit/58a437d))
+- prompt: revise prompt cmd ([bccc56e](https://github.com/webpack/webpack-cli/commit/bccc56e))
## Misc
-* v0.0.5 ([062fa28](https://github.com/webpack/webpack-cli/commit/062fa28))
+- v0.0.5 ([062fa28](https://github.com/webpack/webpack-cli/commit/062fa28))
+
+
-
# 0.0.4 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.0.3...v0.0.4)
## Chore
-* v: back to v1 ([3ed29c6](https://github.com/webpack/webpack-cli/commit/3ed29c6))
+- v: back to v1 ([3ed29c6](https://github.com/webpack/webpack-cli/commit/3ed29c6))
## Misc
-* v0.0.4 ([e29a173](https://github.com/webpack/webpack-cli/commit/e29a173))
-* v0.0.3 ([01cef3f](https://github.com/webpack/webpack-cli/commit/01cef3f))
-* v0.0.2 ([6489b10](https://github.com/webpack/webpack-cli/commit/6489b10))
+- v0.0.4 ([e29a173](https://github.com/webpack/webpack-cli/commit/e29a173))
+- v0.0.3 ([01cef3f](https://github.com/webpack/webpack-cli/commit/01cef3f))
+- v0.0.2 ([6489b10](https://github.com/webpack/webpack-cli/commit/6489b10))
+
+
-
# 0.0.3 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.0.2...v0.0.3)
## Misc
-* v0.0.3 ([b51e66d](https://github.com/webpack/webpack-cli/commit/b51e66d))
+- v0.0.3 ([b51e66d](https://github.com/webpack/webpack-cli/commit/b51e66d))
+
+
-
# 0.0.2 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.0.1...v0.0.2)
## Chore
-* v: revise some deps ([c36f3e8](https://github.com/webpack/webpack-cli/commit/c36f3e8))
+- v: revise some deps ([c36f3e8](https://github.com/webpack/webpack-cli/commit/c36f3e8))
## Misc
-* v0.0.2 ([91be3fd](https://github.com/webpack/webpack-cli/commit/91be3fd))
+- v0.0.2 ([91be3fd](https://github.com/webpack/webpack-cli/commit/91be3fd))
+
+
-
# 0.0.1 (2018-05-17)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.1.3...v0.0.1)
## Chore
-* cli: move to lerna and scoped packages ([#434](https://github.com/webpack/webpack-cli/pull/434))
-* linting: resolve linting ([80c9e9a](https://github.com/webpack/webpack-cli/commit/80c9e9a))
-* linting: resolve linting ([8f6f1db](https://github.com/webpack/webpack-cli/commit/8f6f1db))
-* linting: fix linting errors ([a76c46f](https://github.com/webpack/webpack-cli/commit/a76c46f))
-* linting: resolve linter errors ([1db677e](https://github.com/webpack/webpack-cli/commit/1db677e))
-* monorepo: fix plugin package.json ([3c822cf](https://github.com/webpack/webpack-cli/commit/3c822cf))
-* monorepo: prune files and update eslint rules ([059d6f9](https://github.com/webpack/webpack-cli/commit/059d6f9))
-* monorepo: move to lerna ([ec6cc38](https://github.com/webpack/webpack-cli/commit/ec6cc38))
-* monorepo: use commands as normal instead of package ([bdafce0](https://github.com/webpack/webpack-cli/commit/bdafce0))
-* monorepo: fix the no-missing-require error ([8ef1804](https://github.com/webpack/webpack-cli/commit/8ef1804))
-* monorepo: updated package.json ([ff6c371](https://github.com/webpack/webpack-cli/commit/ff6c371))
-* monorepo: merge package lock json ([d4c7c5d](https://github.com/webpack/webpack-cli/commit/d4c7c5d))
-* monorepo: prune package json ([64cfef7](https://github.com/webpack/webpack-cli/commit/64cfef7))
-* monorepo: fix typo ([a6a2715](https://github.com/webpack/webpack-cli/commit/a6a2715))
-* monorepo: fix typo ([a1d5406](https://github.com/webpack/webpack-cli/commit/a1d5406))
-* rebase: refactor stuff ([b02070d](https://github.com/webpack/webpack-cli/commit/b02070d))
-* scaffold: move addons to scaffold ([b2a7470](https://github.com/webpack/webpack-cli/commit/b2a7470))
-* scaffold: fix linting errors ([df8287d](https://github.com/webpack/webpack-cli/commit/df8287d))
-* v: revise pkg ([ab38a3a](https://github.com/webpack/webpack-cli/commit/ab38a3a))
+- cli: move to lerna and scoped packages ([#434](https://github.com/webpack/webpack-cli/pull/434))
+- linting: resolve linting ([80c9e9a](https://github.com/webpack/webpack-cli/commit/80c9e9a))
+- linting: resolve linting ([8f6f1db](https://github.com/webpack/webpack-cli/commit/8f6f1db))
+- linting: fix linting errors ([a76c46f](https://github.com/webpack/webpack-cli/commit/a76c46f))
+- linting: resolve linter errors ([1db677e](https://github.com/webpack/webpack-cli/commit/1db677e))
+- monorepo: fix plugin package.json ([3c822cf](https://github.com/webpack/webpack-cli/commit/3c822cf))
+- monorepo: prune files and update eslint rules ([059d6f9](https://github.com/webpack/webpack-cli/commit/059d6f9))
+- monorepo: move to lerna ([ec6cc38](https://github.com/webpack/webpack-cli/commit/ec6cc38))
+- monorepo: use commands as normal instead of package ([bdafce0](https://github.com/webpack/webpack-cli/commit/bdafce0))
+- monorepo: fix the no-missing-require error ([8ef1804](https://github.com/webpack/webpack-cli/commit/8ef1804))
+- monorepo: updated package.json ([ff6c371](https://github.com/webpack/webpack-cli/commit/ff6c371))
+- monorepo: merge package lock json ([d4c7c5d](https://github.com/webpack/webpack-cli/commit/d4c7c5d))
+- monorepo: prune package json ([64cfef7](https://github.com/webpack/webpack-cli/commit/64cfef7))
+- monorepo: fix typo ([a6a2715](https://github.com/webpack/webpack-cli/commit/a6a2715))
+- monorepo: fix typo ([a1d5406](https://github.com/webpack/webpack-cli/commit/a1d5406))
+- rebase: refactor stuff ([b02070d](https://github.com/webpack/webpack-cli/commit/b02070d))
+- scaffold: move addons to scaffold ([b2a7470](https://github.com/webpack/webpack-cli/commit/b2a7470))
+- scaffold: fix linting errors ([df8287d](https://github.com/webpack/webpack-cli/commit/df8287d))
+- v: revise pkg ([ab38a3a](https://github.com/webpack/webpack-cli/commit/ab38a3a))
## CLI
-* pkgs: re-add entries ([b2c2bbd](https://github.com/webpack/webpack-cli/commit/b2c2bbd))
-* prompt: wip ([5f357c9](https://github.com/webpack/webpack-cli/commit/5f357c9))
-* prompt: initial comment for prompt file ([f8a71c0](https://github.com/webpack/webpack-cli/commit/f8a71c0))
+- pkgs: re-add entries ([b2c2bbd](https://github.com/webpack/webpack-cli/commit/b2c2bbd))
+- prompt: wip ([5f357c9](https://github.com/webpack/webpack-cli/commit/5f357c9))
+- prompt: initial comment for prompt file ([f8a71c0](https://github.com/webpack/webpack-cli/commit/f8a71c0))
## Fix
-* monorepo: fix versions in pacakges ([2b3035c](https://github.com/webpack/webpack-cli/commit/2b3035c))
-* monorepo: update lock files ([ca8f5c1](https://github.com/webpack/webpack-cli/commit/ca8f5c1))
-* monorepo: fix cross spawn versions ([0fcc5b3](https://github.com/webpack/webpack-cli/commit/0fcc5b3))
-* monorepo: fix lint errors ([74fb759](https://github.com/webpack/webpack-cli/commit/74fb759))
-* revert: packagejson ([3dd244b](https://github.com/webpack/webpack-cli/commit/3dd244b))
+- monorepo: fix versions in pacakges ([2b3035c](https://github.com/webpack/webpack-cli/commit/2b3035c))
+- monorepo: update lock files ([ca8f5c1](https://github.com/webpack/webpack-cli/commit/ca8f5c1))
+- monorepo: fix cross spawn versions ([0fcc5b3](https://github.com/webpack/webpack-cli/commit/0fcc5b3))
+- monorepo: fix lint errors ([74fb759](https://github.com/webpack/webpack-cli/commit/74fb759))
+- revert: packagejson ([3dd244b](https://github.com/webpack/webpack-cli/commit/3dd244b))
## Misc
-* v0.0.1 ([faae7aa](https://github.com/webpack/webpack-cli/commit/faae7aa))
+- v0.0.1 ([faae7aa](https://github.com/webpack/webpack-cli/commit/faae7aa))
+
+
-
# 2.1.3 (2018-05-06)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.1.2...v2.1.3)
## Chore
-* pkg: remove prefer global ([4149c53](https://github.com/webpack/webpack-cli/commit/4149c53))
-* templates: Update issue templates ([#432](https://github.com/webpack/webpack-cli/pull/432))
+- pkg: remove prefer global ([4149c53](https://github.com/webpack/webpack-cli/commit/4149c53))
+- templates: Update issue templates ([#432](https://github.com/webpack/webpack-cli/pull/432))
## CLI
-* cmds: revise yargs command ([#422](https://github.com/webpack/webpack-cli/pull/422))
+- cmds: revise yargs command ([#422](https://github.com/webpack/webpack-cli/pull/422))
+
+
-
# 2.0.14 (2018-04-05)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.13...2.0.14)
## New Features
-* use npm ci for tests (#367) ([#368](https://github.com/webpack/webpack-cli/pull/368))
-* add envinfo as `webpack-cli info` command ([51ab19f](https://github.com/webpack/webpack-cli/commit/51ab19f))
-* --entry should override config.entry (#155) ([#358](https://github.com/webpack/webpack-cli/pull/358))
+- use npm ci for tests (#367) ([#368](https://github.com/webpack/webpack-cli/pull/368))
+- add envinfo as `webpack-cli info` command ([51ab19f](https://github.com/webpack/webpack-cli/commit/51ab19f))
+- --entry should override config.entry (#155) ([#358](https://github.com/webpack/webpack-cli/pull/358))
## Chore
-* coverage: added reporters inside package.json ([c7d80fb](https://github.com/webpack/webpack-cli/commit/c7d80fb))
-* upgrade: webpack 4.2 and other dependencies ([#362](https://github.com/webpack/webpack-cli/pull/362))
-* version: v.2.0.13 ([2222f1d](https://github.com/webpack/webpack-cli/commit/2222f1d))
+- coverage: added reporters inside package.json ([c7d80fb](https://github.com/webpack/webpack-cli/commit/c7d80fb))
+- upgrade: webpack 4.2 and other dependencies ([#362](https://github.com/webpack/webpack-cli/pull/362))
+- version: v.2.0.13 ([2222f1d](https://github.com/webpack/webpack-cli/commit/2222f1d))
## CLI
-* refactor: improve folder structure ([#371](https://github.com/webpack/webpack-cli/pull/371))
+- refactor: improve folder structure ([#371](https://github.com/webpack/webpack-cli/pull/371))
## Fix
-* loader,plugin: fix generators path bug ([b4bfafb](https://github.com/webpack/webpack-cli/commit/b4bfafb))
+- loader,plugin: fix generators path bug ([b4bfafb](https://github.com/webpack/webpack-cli/commit/b4bfafb))
+
+
-
# 2.0.13 (2018-03-22)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.12...2.0.13)
## Chore
-* pkg: explicitly include files for release ([#349](https://github.com/webpack/webpack-cli/pull/349))
+- pkg: explicitly include files for release ([#349](https://github.com/webpack/webpack-cli/pull/349))
## CLI
-* init: add webpack-cli dep ([#347](https://github.com/webpack/webpack-cli/pull/347))
+- init: add webpack-cli dep ([#347](https://github.com/webpack/webpack-cli/pull/347))
+
+
-
# 2.0.12 (2018-03-14)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.11...v2.0.12)
## New Features
-* support --build-delimiter for opt-in output delimiter (#192) ([#340](https://github.com/webpack/webpack-cli/pull/340))
+- support --build-delimiter for opt-in output delimiter (#192) ([#340](https://github.com/webpack/webpack-cli/pull/340))
## Chore
-* gitignore: add vim swap files to gitignore ([3448fb5](https://github.com/webpack/webpack-cli/commit/3448fb5))
-* scaffolding: update docs ([#336](https://github.com/webpack/webpack-cli/pull/336))
+- gitignore: add vim swap files to gitignore ([3448fb5](https://github.com/webpack/webpack-cli/commit/3448fb5))
+- scaffolding: update docs ([#336](https://github.com/webpack/webpack-cli/pull/336))
## Fix
-* removes debug in migrate ([#342](https://github.com/webpack/webpack-cli/pull/342))
+- removes debug in migrate ([#342](https://github.com/webpack/webpack-cli/pull/342))
## Tests
-* snapshot: update snapshot ([bd8ccda](https://github.com/webpack/webpack-cli/commit/bd8ccda))
+- snapshot: update snapshot ([bd8ccda](https://github.com/webpack/webpack-cli/commit/bd8ccda))
## Misc
-* cz: fix type description ([#339](https://github.com/webpack/webpack-cli/pull/339))
-* init: fix global-modules require statement in package-manager ([610aa02](https://github.com/webpack/webpack-cli/commit/610aa02))
-* init-generator: cleanup ([b8c3145](https://github.com/webpack/webpack-cli/commit/b8c3145))
+- cz: fix type description ([#339](https://github.com/webpack/webpack-cli/pull/339))
+- init: fix global-modules require statement in package-manager ([610aa02](https://github.com/webpack/webpack-cli/commit/610aa02))
+- init-generator: cleanup ([b8c3145](https://github.com/webpack/webpack-cli/commit/b8c3145))
+
+
-
# 2.0.11 (2018-03-10)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.10...v2.0.11)
## Chore
-* bundlesize: change threshold ([2aedfda](https://github.com/webpack/webpack-cli/commit/2aedfda))
-* deps: upgrade deps ([#319](https://github.com/webpack/webpack-cli/pull/319))
-* docs: update docs ([3307e3b](https://github.com/webpack/webpack-cli/commit/3307e3b))
-* es6: changed 'var' into 'const' where convenient ([#325](https://github.com/webpack/webpack-cli/pull/325))
-* test: updated tests file names ([#324](https://github.com/webpack/webpack-cli/pull/324))
+- bundlesize: change threshold ([2aedfda](https://github.com/webpack/webpack-cli/commit/2aedfda))
+- deps: upgrade deps ([#319](https://github.com/webpack/webpack-cli/pull/319))
+- docs: update docs ([3307e3b](https://github.com/webpack/webpack-cli/commit/3307e3b))
+- es6: changed 'var' into 'const' where convenient ([#325](https://github.com/webpack/webpack-cli/pull/325))
+- test: updated tests file names ([#324](https://github.com/webpack/webpack-cli/pull/324))
## CLI
-* init: Refactor Yeoman ([#323](https://github.com/webpack/webpack-cli/pull/323))
-* tapable: Remove Tapable#apply calls ([#305](https://github.com/webpack/webpack-cli/pull/305))
+- init: Refactor Yeoman ([#323](https://github.com/webpack/webpack-cli/pull/323))
+- tapable: Remove Tapable#apply calls ([#305](https://github.com/webpack/webpack-cli/pull/305))
## Docs
-* update README to remove inconsistent CLI messaging (#327) ([#328](https://github.com/webpack/webpack-cli/pull/328))
+- update README to remove inconsistent CLI messaging (#327) ([#328](https://github.com/webpack/webpack-cli/pull/328))
## Fix
-* migrate: move options to use ([#308](https://github.com/webpack/webpack-cli/pull/308))
-* adding 'fix' to whitelist ([10a00df](https://github.com/webpack/webpack-cli/commit/10a00df))
+- migrate: move options to use ([#308](https://github.com/webpack/webpack-cli/pull/308))
+- adding 'fix' to whitelist ([10a00df](https://github.com/webpack/webpack-cli/commit/10a00df))
## Misc
-* deps: clean up dependencies ([7078282](https://github.com/webpack/webpack-cli/commit/7078282))
-* generator: Allow local paths to generators ([#265](https://github.com/webpack/webpack-cli/pull/265))
-* grammar: revise spelling and incorrect syntax ([#293](https://github.com/webpack/webpack-cli/pull/293))
-* readme: add npm badge ([#303](https://github.com/webpack/webpack-cli/pull/303))
+- deps: clean up dependencies ([7078282](https://github.com/webpack/webpack-cli/commit/7078282))
+- generator: Allow local paths to generators ([#265](https://github.com/webpack/webpack-cli/pull/265))
+- grammar: revise spelling and incorrect syntax ([#293](https://github.com/webpack/webpack-cli/pull/293))
+- readme: add npm badge ([#303](https://github.com/webpack/webpack-cli/pull/303))
+
+
-
# 2.0.10 (2018-03-02)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.4...v2.0.10)
## New Features
-* show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
-* chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
+- show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
+- chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
## Ast
-* init: fix init command ([d36cd4f](https://github.com/webpack/webpack-cli/commit/d36cd4f))
+- init: fix init command ([d36cd4f](https://github.com/webpack/webpack-cli/commit/d36cd4f))
## Chore
-* .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
-* .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
-* add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
-* changelog: v.2.0.7 changelog ([a165269](https://github.com/webpack/webpack-cli/commit/a165269))
-* clean: remove unused dependency ([4a395d7](https://github.com/webpack/webpack-cli/commit/4a395d7))
-* deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
-* packager: remove yarn ([#302](https://github.com/webpack/webpack-cli/pull/302))
-* pkg.json: remove commitmsg cmd ([4dff074](https://github.com/webpack/webpack-cli/commit/4dff074))
-* refactor: update supports-color usage ([4566fde](https://github.com/webpack/webpack-cli/commit/4566fde))
-* refactor: update supports-color usage ([97b2df3](https://github.com/webpack/webpack-cli/commit/97b2df3))
-* revert: revert yargs to 9.0.1 ([7ef13ef](https://github.com/webpack/webpack-cli/commit/7ef13ef))
-* upgrade: update all dependencies, devDependencies ([4bf64bf](https://github.com/webpack/webpack-cli/commit/4bf64bf))
-* version: v.2.0.9 ([4cf5e17](https://github.com/webpack/webpack-cli/commit/4cf5e17))
+- .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
+- .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
+- add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
+- changelog: v.2.0.7 changelog ([a165269](https://github.com/webpack/webpack-cli/commit/a165269))
+- clean: remove unused dependency ([4a395d7](https://github.com/webpack/webpack-cli/commit/4a395d7))
+- deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
+- packager: remove yarn ([#302](https://github.com/webpack/webpack-cli/pull/302))
+- pkg.json: remove commitmsg cmd ([4dff074](https://github.com/webpack/webpack-cli/commit/4dff074))
+- refactor: update supports-color usage ([4566fde](https://github.com/webpack/webpack-cli/commit/4566fde))
+- refactor: update supports-color usage ([97b2df3](https://github.com/webpack/webpack-cli/commit/97b2df3))
+- revert: revert yargs to 9.0.1 ([7ef13ef](https://github.com/webpack/webpack-cli/commit/7ef13ef))
+- upgrade: update all dependencies, devDependencies ([4bf64bf](https://github.com/webpack/webpack-cli/commit/4bf64bf))
+- version: v.2.0.9 ([4cf5e17](https://github.com/webpack/webpack-cli/commit/4cf5e17))
## CLI
-* devServer: change devServer path ([c27e961](https://github.com/webpack/webpack-cli/commit/c27e961))
-* version: v.2.0.8 ([9406912](https://github.com/webpack/webpack-cli/commit/9406912))
+- devServer: change devServer path ([c27e961](https://github.com/webpack/webpack-cli/commit/c27e961))
+- version: v.2.0.8 ([9406912](https://github.com/webpack/webpack-cli/commit/9406912))
## Fix
-* generator: use yeoman clone ([0b4269c](https://github.com/webpack/webpack-cli/commit/0b4269c))
-* yeoman-generator fork issue ([#294](https://github.com/webpack/webpack-cli/pull/294))
-* Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
-* change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
+- generator: use yeoman clone ([0b4269c](https://github.com/webpack/webpack-cli/commit/0b4269c))
+- yeoman-generator fork issue ([#294](https://github.com/webpack/webpack-cli/pull/294))
+- Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
+- change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
## Improvement
-* add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
+- add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
## Refactor
-* convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
+- convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
## Style
-* run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
+- run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
## Tests
-* add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
-* mode: add mode tests ([#285](https://github.com/webpack/webpack-cli/pull/285))
-* update: migrate snapshot ([3c4e6f7](https://github.com/webpack/webpack-cli/commit/3c4e6f7))
-* update: migrate snapshot ([c322067](https://github.com/webpack/webpack-cli/commit/c322067))
+- add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
+- mode: add mode tests ([#285](https://github.com/webpack/webpack-cli/pull/285))
+- update: migrate snapshot ([3c4e6f7](https://github.com/webpack/webpack-cli/commit/3c4e6f7))
+- update: migrate snapshot ([c322067](https://github.com/webpack/webpack-cli/commit/c322067))
## Misc
-* refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
-* [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
-* Commitlint ([#300](https://github.com/webpack/webpack-cli/pull/300))
-* Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
-* Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
-* strict Promise configuration validation ([#298](https://github.com/webpack/webpack-cli/pull/298))
-* Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
-* Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
-* remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
-* Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
-* 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
-* v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
-* fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
-* binTestCases: remove obsolete snapshot ([42301d7](https://github.com/webpack/webpack-cli/commit/42301d7))
-* dep: add webpack 4 as peer dependency ([#297](https://github.com/webpack/webpack-cli/pull/297))
-* migrate: prettify output ([#281](https://github.com/webpack/webpack-cli/pull/281))
-* revert: revert supports-color usage ([f8e819a](https://github.com/webpack/webpack-cli/commit/f8e819a))
-* revert: revert supports-color usage ([75f706b](https://github.com/webpack/webpack-cli/commit/75f706b))
-* syntax: prettify ([5cb146f](https://github.com/webpack/webpack-cli/commit/5cb146f))
-* yargs: add description for module-bind-* args ([#286](https://github.com/webpack/webpack-cli/pull/286))
-
-
+- refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
+- [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
+- Commitlint ([#300](https://github.com/webpack/webpack-cli/pull/300))
+- Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
+- Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
+- strict Promise configuration validation ([#298](https://github.com/webpack/webpack-cli/pull/298))
+- Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
+- Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
+- remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
+- Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
+- 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
+- v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
+- fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
+- binTestCases: remove obsolete snapshot ([42301d7](https://github.com/webpack/webpack-cli/commit/42301d7))
+- dep: add webpack 4 as peer dependency ([#297](https://github.com/webpack/webpack-cli/pull/297))
+- migrate: prettify output ([#281](https://github.com/webpack/webpack-cli/pull/281))
+- revert: revert supports-color usage ([f8e819a](https://github.com/webpack/webpack-cli/commit/f8e819a))
+- revert: revert supports-color usage ([75f706b](https://github.com/webpack/webpack-cli/commit/75f706b))
+- syntax: prettify ([5cb146f](https://github.com/webpack/webpack-cli/commit/5cb146f))
+- yargs: add description for module-bind-\* args ([#286](https://github.com/webpack/webpack-cli/pull/286))
+
+
+
# 2.0.9 (2018-02-25)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.4...v2.0.9)
## Ast
-* init: fix init command ([d36cd4f](https://github.com/webpack/webpack-cli/commit/d36cd4f))
+- init: fix init command ([d36cd4f](https://github.com/webpack/webpack-cli/commit/d36cd4f))
## Chore
-* .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
-* .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
-* add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
-* changelog: v.2.0.7 changelog ([a165269](https://github.com/webpack/webpack-cli/commit/a165269))
-* deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
-* pkg.json: remove commitmsg cmd ([4dff074](https://github.com/webpack/webpack-cli/commit/4dff074))
+- .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
+- .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
+- add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
+- changelog: v.2.0.7 changelog ([a165269](https://github.com/webpack/webpack-cli/commit/a165269))
+- deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
+- pkg.json: remove commitmsg cmd ([4dff074](https://github.com/webpack/webpack-cli/commit/4dff074))
## CLI
-* devServer: change devServer path ([c27e961](https://github.com/webpack/webpack-cli/commit/c27e961))
-* version: v.2.0.8 ([9406912](https://github.com/webpack/webpack-cli/commit/9406912))
+- devServer: change devServer path ([c27e961](https://github.com/webpack/webpack-cli/commit/c27e961))
+- version: v.2.0.8 ([9406912](https://github.com/webpack/webpack-cli/commit/9406912))
## Feat
-* show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
-* chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
+- show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
+- chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
## Fix
-* Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
-* change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
-* generator: use yeoman clone ([0b4269c](https://github.com/webpack/webpack-cli/commit/0b4269c))
+- Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
+- change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
+- generator: use yeoman clone ([0b4269c](https://github.com/webpack/webpack-cli/commit/0b4269c))
## Improvement
-* add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
+- add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
## Refactor
-* convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
+- convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
## Style
-* run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
+- run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
## Tests
-* add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
+- add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
## Misc
-* remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
-* Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
-* v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
-* fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
-* 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
-* Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
-* Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
-* Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
-* Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
-* [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
-* refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
-
-
+- remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
+- Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
+- v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
+- fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
+- 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
+- Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
+- Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
+- Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
+- Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
+- [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
+- refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
+
+
+
# 2.0.7 (2018-02-24)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.4...v2.0.7)
## Chore
-* .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
-* .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
-* add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
-* deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
+- .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
+- .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
+- add: temp remove add from cli ([f663215](https://github.com/webpack/webpack-cli/commit/f663215))
+- deps: bump uglify dep and cli version ([81a9f1e](https://github.com/webpack/webpack-cli/commit/81a9f1e))
## Feat
-* show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
-* chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
+- show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
+- chore: add project tools and utilities ([#270](https://github.com/webpack/webpack-cli/pull/270))
## Fix
-* Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
-* change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
+- Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
+- change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
## Improvement
-* add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
+- add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
## Refactor
-* convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
+- convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
## Style
-* run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
+- run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
## Tests
-* add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
+- add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
## Misc
-* remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
-* Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
-* v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
-* fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
-* 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
-* Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
-* Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
-* Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
-* Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
-* [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
-* refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
-
-
+- remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
+- Revert "Show help on no command" ([#276](https://github.com/webpack/webpack-cli/pull/276))
+- v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
+- fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
+- 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
+- Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
+- Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
+- Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
+- Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
+- [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
+- refactor: reduce code duplication use process.exitCode instead of process.exit ([#272](https://github.com/webpack/webpack-cli/pull/272))
+
+
+
# 2.0.6 (2018-02-20)
+
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v2.0.4...v2.0.6)
## Chore
-* .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
-* .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
-* add new items to chore: adds chore command ([db243b6](https://github.com/webpack/webpack-cli/commit/db243b6))
-* linting: lint added files ([6dc12af](https://github.com/webpack/webpack-cli/commit/6dc12af))
-* remove cmd: removes f command ([7adfdcf](https://github.com/webpack/webpack-cli/commit/7adfdcf))
+- .gitignore: ignore .vscode ([ab0eacc](https://github.com/webpack/webpack-cli/commit/ab0eacc))
+- .gitignore: ignore .vscode ([a322505](https://github.com/webpack/webpack-cli/commit/a322505))
+- add new items to chore: adds chore command ([db243b6](https://github.com/webpack/webpack-cli/commit/db243b6))
+- linting: lint added files ([6dc12af](https://github.com/webpack/webpack-cli/commit/6dc12af))
+- remove cmd: removes f command ([7adfdcf](https://github.com/webpack/webpack-cli/commit/7adfdcf))
## Feat
-* show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
+- show help when no options given ([a7ee15a](https://github.com/webpack/webpack-cli/commit/a7ee15a))
## Fix
-* Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
-* change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
+- Resolve webpack dependencies ([#251](https://github.com/webpack/webpack-cli/pull/251))
+- change help logic ([d67f4b7](https://github.com/webpack/webpack-cli/commit/d67f4b7))
## Improvement
-* add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
+- add an option to watch messaging. Add .idea to .gitignore ([#200](https://github.com/webpack/webpack-cli/pull/200))
## Refactor
-* convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
+- convert-args: remove unused arguments ([#253](https://github.com/webpack/webpack-cli/pull/253))
## Style
-* run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
+- run formatter ([7be0da7](https://github.com/webpack/webpack-cli/commit/7be0da7))
## Tests
-* add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
+- add test for showing help on no options ([cf43939](https://github.com/webpack/webpack-cli/commit/cf43939))
## Misc
-* remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
-* [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
-* v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
-* fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
-* 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
-* Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
-* Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
-* Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
-* Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
-* add commitlinting: adds commit linting to the cli ([7e4dd3d](https://github.com/webpack/webpack-cli/commit/7e4dd3d))
-* add eslint ignore items: adds build folder and commit linter to ignore ([a400809](https://github.com/webpack/webpack-cli/commit/a400809))
+- remove yargs major update due security compromise ([9bd7ed4](https://github.com/webpack/webpack-cli/commit/9bd7ed4))
+- [feature] configuration validation ([#240](https://github.com/webpack/webpack-cli/pull/240))
+- v.2.0.6 ([4333088](https://github.com/webpack/webpack-cli/commit/4333088))
+- fix typo.. ([0f1cee6](https://github.com/webpack/webpack-cli/commit/0f1cee6))
+- 2.0.5 ([94ac6db](https://github.com/webpack/webpack-cli/commit/94ac6db))
+- Change from git:// to https:// ([#259](https://github.com/webpack/webpack-cli/pull/259))
+- Issue 249 fixed and other enums refactored ([#264](https://github.com/webpack/webpack-cli/pull/264))
+- Refactor bin directory ([#263](https://github.com/webpack/webpack-cli/pull/263))
+- Add jsdoc comments for migrate ([#255](https://github.com/webpack/webpack-cli/pull/255))
+- add commitlinting: adds commit linting to the cli ([7e4dd3d](https://github.com/webpack/webpack-cli/commit/7e4dd3d))
+- add eslint ignore items: adds build folder and commit linter to ignore ([a400809](https://github.com/webpack/webpack-cli/commit/a400809))
+
## 2.0.0 (2017-12-21)
-* Adds add
-* Remove some mocks
-* Remove validationschema and ajv dependencies
-* Update Jest & Jest-cli
-* Remove unused dependencies
-* Creator is now init
-* Using env preset ([#197](https://github.com/webpack/webpack-cli/pull/197))
-* Using Yarn ([#203](https://github.com/webpack/webpack-cli/pull/203))
-* Using peer dep of webpack
-* Transformations is now migrate
-* Init has its own generator
-* Commands are refactored into a HOC and sent to a folder for each command with an helper for scaffolding aliases
-* Using RawList instead of List for better usability ([82c64db](https://github.com/webpack/webpack-cli/commit/541ba62f02c4a1fcc807eac62a551fcae3f2d2c3))
-* lib/transformations/util is now in lib/utils/ast-utils
-* Each AST module now has an extra argument that specifies action to be done
-* FindPluginsByRoot is now FindRootByName and more generalistic
-* Added ast util function createEmptyCallableFunctionWithArguments
-* Refactor for readability ([#214](https://github.com/webpack/webpack-cli/pull/214))
-* Remove dist from repo ([#215](https://github.com/webpack/webpack-cli/pull/215))
-* Remove entry and output validation ([#217](https://github.com/webpack/webpack-cli/pull/217))
-* topScope now checks if the import already is present
-* Updated test errors/issue-5576, remember to sync with webpack/next
-* User friendly startup message ([#218](https://github.com/webpack/webpack-cli/pull/218))
-* Migrate now uses prettier ([88aaaa2](https://github.com/webpack/webpack-cli/commit/972d4cd90061644aa2f4aaac33d2d80cb4a56d57)
-* Added transform for mode ([972d4cd](https://github.com/webpack/webpack-cli/commit/e1f512c9bb96694dd623562dc4cef411ed004c2c)
-* Remove recast fork ([fba04da](https://github.com/webpack/webpack-cli/commit/b416d9c50138ef343b8bac6e3f66fdd5b917857d))
-* New transforms ([b416d9c](https://github.com/webpack/webpack-cli/commit/28680c944dca0860ca59a38910840a641b418d18))
-* JSdocs are added ([47de46a](https://github.com/webpack/webpack-cli/commit/285846a4cb1f976edcdb36629cf247d8017ff956))
-* Added serve alias ([#204](https://github.com/webpack/webpack-cli/pull/204))
-* Migrate has new validate logic ([c4c68e8](https://github.com/webpack/webpack-cli/commit/5d4430a6a5531cd8084e5a591f7884e746e21b2f))
-* webpack serve logic ([5d4430a](https://github.com/webpack/webpack-cli/commit/992bfe2b08b98aebb43c68d5e5a92320ba3e32a8))
-* webpack --config-register and webpack -r is added ([1f24d19](https://github.com/webpack/webpack-cli/commit/ab9421136887b7e9e10f25a39b59fb32f07b5037))
-* work on makefile generation ([d86e1ce](https://github.com/webpack/webpack-cli/commit/4f9a4f88a8bd113762a54c05b3b9fe6f459855db))
-* Appveyor is added ([9b2f6f5](https://github.com/webpack/webpack-cli/commit/c5c97462d6ccfa4c02fd79206fa075815520cd88))
-* Remove commit-validate from docs ([#222](https://github.com/webpack/webpack-cli/pull/222))
-* Added transform ResolveLoader ([7c713ce](https://github.com/webpack/webpack-cli/commit/3c90e83fa7b8dd5fbecaee5d1b9d8f0279600096))
-* Using v8-compile-cache ([7e57314](https://github.com/webpack/webpack-cli/commit/0564ceb77a995239d0be7a022b948cbd727773a4))
-* Adds webpack-cli bot ([#224](https://github.com/webpack/webpack-cli/pull/224))
+- Adds add
+- Remove some mocks
+- Remove validationschema and ajv dependencies
+- Update Jest & Jest-cli
+- Remove unused dependencies
+- Creator is now init
+- Using env preset ([#197](https://github.com/webpack/webpack-cli/pull/197))
+- Using Yarn ([#203](https://github.com/webpack/webpack-cli/pull/203))
+- Using peer dep of webpack
+- Transformations is now migrate
+- Init has its own generator
+- Commands are refactored into a HOC and sent to a folder for each command with an helper for scaffolding aliases
+- Using RawList instead of List for better usability ([82c64db](https://github.com/webpack/webpack-cli/commit/541ba62f02c4a1fcc807eac62a551fcae3f2d2c3))
+- lib/transformations/util is now in lib/utils/ast-utils
+- Each AST module now has an extra argument that specifies action to be done
+- FindPluginsByRoot is now FindRootByName and more generalistic
+- Added ast util function createEmptyCallableFunctionWithArguments
+- Refactor for readability ([#214](https://github.com/webpack/webpack-cli/pull/214))
+- Remove dist from repo ([#215](https://github.com/webpack/webpack-cli/pull/215))
+- Remove entry and output validation ([#217](https://github.com/webpack/webpack-cli/pull/217))
+- topScope now checks if the import already is present
+- Updated test errors/issue-5576, remember to sync with webpack/next
+- User friendly startup message ([#218](https://github.com/webpack/webpack-cli/pull/218))
+- Migrate now uses prettier ([88aaaa2](https://github.com/webpack/webpack-cli/commit/972d4cd90061644aa2f4aaac33d2d80cb4a56d57)
+- Added transform for mode ([972d4cd](https://github.com/webpack/webpack-cli/commit/e1f512c9bb96694dd623562dc4cef411ed004c2c)
+- Remove recast fork ([fba04da](https://github.com/webpack/webpack-cli/commit/b416d9c50138ef343b8bac6e3f66fdd5b917857d))
+- New transforms ([b416d9c](https://github.com/webpack/webpack-cli/commit/28680c944dca0860ca59a38910840a641b418d18))
+- JSdocs are added ([47de46a](https://github.com/webpack/webpack-cli/commit/285846a4cb1f976edcdb36629cf247d8017ff956))
+- Added serve alias ([#204](https://github.com/webpack/webpack-cli/pull/204))
+- Migrate has new validate logic ([c4c68e8](https://github.com/webpack/webpack-cli/commit/5d4430a6a5531cd8084e5a591f7884e746e21b2f))
+- webpack serve logic ([5d4430a](https://github.com/webpack/webpack-cli/commit/992bfe2b08b98aebb43c68d5e5a92320ba3e32a8))
+- webpack --config-register and webpack -r is added ([1f24d19](https://github.com/webpack/webpack-cli/commit/ab9421136887b7e9e10f25a39b59fb32f07b5037))
+- work on makefile generation ([d86e1ce](https://github.com/webpack/webpack-cli/commit/4f9a4f88a8bd113762a54c05b3b9fe6f459855db))
+- Appveyor is added ([9b2f6f5](https://github.com/webpack/webpack-cli/commit/c5c97462d6ccfa4c02fd79206fa075815520cd88))
+- Remove commit-validate from docs ([#222](https://github.com/webpack/webpack-cli/pull/222))
+- Added transform ResolveLoader ([7c713ce](https://github.com/webpack/webpack-cli/commit/3c90e83fa7b8dd5fbecaee5d1b9d8f0279600096))
+- Using v8-compile-cache ([7e57314](https://github.com/webpack/webpack-cli/commit/0564ceb77a995239d0be7a022b948cbd727773a4))
+- Adds webpack-cli bot ([#224](https://github.com/webpack/webpack-cli/pull/224))
-## 1.3.2 (2017-05-15)
+## 1.3.2 (2017-05-15)
### Bug Fixes
-* add css-loader appropriately ([#141](https://github.com/webpack/webpack-cli/issues/141)) ([a71600e](https://github.com/webpack/webpack-cli/commit/a71600e))
-* Deps 'webpack' and 'uglifyjs-webpack-plugin' not installed when user answers yes to 'using ES2015' ([#135](https://github.com/webpack/webpack-cli/issues/135)). ([#136](https://github.com/webpack/webpack-cli/issues/136)) ([524f035](https://github.com/webpack/webpack-cli/commit/524f035))
-* Install correct (`es2015`) babel preset to match generated config ([#138](https://github.com/webpack/webpack-cli/issues/138)) ([b0af53f](https://github.com/webpack/webpack-cli/commit/b0af53f))
-* use correct test function ([#129](https://github.com/webpack/webpack-cli/issues/129)) ([3464d9e](https://github.com/webpack/webpack-cli/commit/3464d9e))
-
+- add css-loader appropriately ([#141](https://github.com/webpack/webpack-cli/issues/141)) ([a71600e](https://github.com/webpack/webpack-cli/commit/a71600e))
+- Deps 'webpack' and 'uglifyjs-webpack-plugin' not installed when user answers yes to 'using ES2015' ([#135](https://github.com/webpack/webpack-cli/issues/135)). ([#136](https://github.com/webpack/webpack-cli/issues/136)) ([524f035](https://github.com/webpack/webpack-cli/commit/524f035))
+- Install correct (`es2015`) babel preset to match generated config ([#138](https://github.com/webpack/webpack-cli/issues/138)) ([b0af53f](https://github.com/webpack/webpack-cli/commit/b0af53f))
+- use correct test function ([#129](https://github.com/webpack/webpack-cli/issues/129)) ([3464d9e](https://github.com/webpack/webpack-cli/commit/3464d9e))
@@ -946,23 +1182,22 @@
### Bug Fixes
-* add safe traverse to loaderoptionsplugin ([#77](https://github.com/webpack/webpack-cli/issues/77)) ([4020043](https://github.com/webpack/webpack-cli/commit/4020043))
-* Do not create LoaderOptionsPlugin if loaderOptions is empty ([#72](https://github.com/webpack/webpack-cli/issues/72)) ([b9d22c9](https://github.com/webpack/webpack-cli/commit/b9d22c9))
-([68a2dfd](https://github.com/webpack/webpack-cli/commit/68a2dfd))
-* Upgrade to Jest 19 ([#71](https://github.com/webpack/webpack-cli/issues/71)) ([fe62523](https://github.com/webpack/webpack-cli/commit/fe62523))
-* Use `safeTraverse` where appropriate ([#94](https://github.com/webpack/webpack-cli/issues/94)) ([dcde2b6](https://github.com/webpack/webpack-cli/commit/dcde2b6))
-([3464d9e](https://github.com/webpack/webpack-cli/commit/3464d9e))
-* Use real paths from argvs instead of dummy hard-coded file ([#65](https://github.com/webpack/webpack-cli/issues/65)) ([a46edbb](https://github.com/webpack/webpack-cli/commit/a46edbb))
-
+- add safe traverse to loaderoptionsplugin ([#77](https://github.com/webpack/webpack-cli/issues/77)) ([4020043](https://github.com/webpack/webpack-cli/commit/4020043))
+- Do not create LoaderOptionsPlugin if loaderOptions is empty ([#72](https://github.com/webpack/webpack-cli/issues/72)) ([b9d22c9](https://github.com/webpack/webpack-cli/commit/b9d22c9))
+ ([68a2dfd](https://github.com/webpack/webpack-cli/commit/68a2dfd))
+- Upgrade to Jest 19 ([#71](https://github.com/webpack/webpack-cli/issues/71)) ([fe62523](https://github.com/webpack/webpack-cli/commit/fe62523))
+- Use `safeTraverse` where appropriate ([#94](https://github.com/webpack/webpack-cli/issues/94)) ([dcde2b6](https://github.com/webpack/webpack-cli/commit/dcde2b6))
+ ([3464d9e](https://github.com/webpack/webpack-cli/commit/3464d9e))
+- Use real paths from argvs instead of dummy hard-coded file ([#65](https://github.com/webpack/webpack-cli/issues/65)) ([a46edbb](https://github.com/webpack/webpack-cli/commit/a46edbb))
### Features
-* Add beautifier config for JS code ([64c88ea](https://github.com/webpack/webpack-cli/commit/64c88ea))
-* Add commit validation and commits template ([d0cbfc0](https://github.com/webpack/webpack-cli/commit/d0cbfc0))
-* Add editorconfig settings from core webpack ([89809de](https://github.com/webpack/webpack-cli/commit/89809de))
-* Add yarn settings to handle dependencies ([34579c7](https://github.com/webpack/webpack-cli/commit/34579c7))
-* Adds a resolved path for output ([#80](https://github.com/webpack/webpack-cli/issues/80)) ([37a594d](https://github.com/webpack/webpack-cli/commit/37a594d))
-* Introduce reserve and timestamps ([#24](https://github.com/webpack/webpack-cli/issues/24)) ([ed267b4](https://github.com/webpack/webpack-cli/commit/ed267b4))
-* Webpack-CLI version 1([#105](https://github.com/webpack/webpack-cli/pull/105))
-* Feature: Use listr to display progress and errors for transformations([#92](https://github.com/webpack/webpack-cli/pull/92))
-* Feature: Jscodeshift Transformations for --migrate ([#40](https://github.com/webpack/webpack-cli/pull/40))
+- Add beautifier config for JS code ([64c88ea](https://github.com/webpack/webpack-cli/commit/64c88ea))
+- Add commit validation and commits template ([d0cbfc0](https://github.com/webpack/webpack-cli/commit/d0cbfc0))
+- Add editorconfig settings from core webpack ([89809de](https://github.com/webpack/webpack-cli/commit/89809de))
+- Add yarn settings to handle dependencies ([34579c7](https://github.com/webpack/webpack-cli/commit/34579c7))
+- Adds a resolved path for output ([#80](https://github.com/webpack/webpack-cli/issues/80)) ([37a594d](https://github.com/webpack/webpack-cli/commit/37a594d))
+- Introduce reserve and timestamps ([#24](https://github.com/webpack/webpack-cli/issues/24)) ([ed267b4](https://github.com/webpack/webpack-cli/commit/ed267b4))
+- Webpack-CLI version 1([#105](https://github.com/webpack/webpack-cli/pull/105))
+- Feature: Use listr to display progress and errors for transformations([#92](https://github.com/webpack/webpack-cli/pull/92))
+- Feature: Jscodeshift Transformations for --migrate ([#40](https://github.com/webpack/webpack-cli/pull/40))
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..9a75816a574
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,7 @@
+## Code of Conduct
+
+At webpack and webpack/webpack-cli repository we follow the [JSFoundation Code of Conduct][1].
+Please adhere to the guidelines there and feel free to report any violation of them to the @webpack/core-team,
+[**@webpack/cli-team**](https://github.com/orgs/webpack/teams/cli-team), or .
+
+[1]: https://js.foundation/community/code-of-conduct
diff --git a/INIT.md b/INIT.md
index 112ca86eb77..4a1e9f57668 100644
--- a/INIT.md
+++ b/INIT.md
@@ -1,6 +1,6 @@
# webpack-cli init
-`webpack-cli init` is used to initialize `webpack` projects quickly by scaffolding configuration and installing modules required for the project as per user preferences.
+`webpack-cli init` is used to initialize `webpack` projects quickly by scaffolding configuration and creating a runnable project with all the dependencies based on the user preferences.
## Initial Setup
@@ -10,38 +10,38 @@ These are the steps necessary to setup `webpack-cli init` locally:
1. Create `package.json` through npm
- ```shell
- npm init
- ```
+ ```shell
+ npm init
+ ```
2. Install `webpack` and `webpack-cli` as devDependencies
- ```shell
+ ```shell
npm install --save-dev webpack webpack-cli
```
3. Install `@webpack-cli/init` package to add the init scaffold
- ```shell
+ ```shell
npm install --save-dev @webpack-cli/init
```
-
+
### b. Global Setup
These are the steps necessary to setup `webpack-cli init` globally:
1. Install `webpack` and `webpack-cli` globally
- ```shell
- npm install -g webpack webpack-cli
- ```
-
+ ```shell
+ npm install -g webpack webpack-cli
+ ```
+
2. Install `@webpack-cli/init` package to add the init scaffold
- ```shell
- npm install -g @webpack-cli/init
- ```
-
+ ```shell
+ npm install -g @webpack-cli/init
+ ```
+
## Usage
### a. Running locally
@@ -60,36 +60,35 @@ webpack-cli init
1. `Will your application have multiple bundles? (y/N)`
-> *Property/key resolved: [entry](https://webpack.js.org/configuration/entry-context/#entry)*
+> _Property/key resolved: [entry](https://webpack.js.org/configuration/entry-context/#entry)_
This is used to determine if your app will have multiple [entry points](https://webpack.js.org/configuration/entry-context/#entry).
If you want to have multiple entry points, answer yes. If you want to have only one, answer no.
2. `Which will be your application entry point? (src/index)`
-> *Property/key resolved: [entry](https://webpack.js.org/configuration/entry-context/#entry)*
+> _Property/key resolved: [entry](https://webpack.js.org/configuration/entry-context/#entry)_
-This tells webpack from which file to start bundling your application. The default answer `src/index` will tell webpack to look for a file called `index` inside a folder named `src`.
+This tells webpack from which file to start bundling your application. The default answer `src/index` will tell webpack to look for a file called `index` inside a folder named `src`.
3. `In which folder do you want to store your generated bundles? (dist)`
-> *Property/key resolved: [output.path](https://webpack.js.org/configuration/output/#output-path)*
+> _Property/key resolved: [output.path](https://webpack.js.org/configuration/output/#output-path)_
The output directory is where your bundled application will be. Your `index.html` will read the generated files from this folder, that is usually named `dist`.
4. `Will you be using ES2015? (Y/n)`
-> *Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .js files)*
+> _Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .js files)_
-This enables webpack to parse [`ES2015`](https://babeljs.io/learn-es2015/) code. Answer `Yes` if you want to use modern JavaScript in your project.
+This enables webpack to parse [`ES2015`](https://babeljs.io/learn-es2015/) code. Answer `Yes` if you want to use modern JavaScript in your project.
5. `Will you use one of the below CSS solutions?`
-> *Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .scss,.less,.css,.postCSS files)*
+> _Property/key resolved: [module.rules](https://webpack.js.org/configuration/module/#module-rules) (for .scss,.less,.css,.postCSS files)_
-If you use any sort of style in your project, such as [`.less`](http://lesscss.org/), [`.scss`](http://sass-lang.com/), [`.css`](https://developer.mozilla.org/en-US/docs/Web/CSS) or [`postCSS`](http://postcss.org/) you will need to declare this here. If you don't use CSS, answer no.
+If you use any sort of style in your project, such as [`.less`](http://lesscss.org/), [`.scss`](http://sass-lang.com/), [`.css`](https://developer.mozilla.org/en-US/docs/Web/CSS) or [`postCSS`](http://postcss.org/) you will need to declare this here. If you don't use CSS, answer no.
-6. `If you want to bundle your CSS files, what will you name the bundle? (press
-enter to skip)`
+6. `If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)`
If you indicate based on previous questions that you are using production, this will be enabled. The default value for your generated CSS file is `style.[contentHash].css`, which will collect all your `.less`, `.scss` or `.css` into one file. This will make your build faster in production.
diff --git a/README.md b/README.md
index 8e5a30b157b..810a61d0ce8 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
webpack CLI
@@ -11,34 +11,23 @@
-[![npm](https://img.shields.io/npm/v/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
-[![Build Status](https://travis-ci.org/webpack/webpack-cli.svg)](https://travis-ci.org/webpack/webpack-cli)
-[![Build2 Status](https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli)](https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4)
+[![npm][npm]][npm-url]
+[![Build Status][build-status]][build-status-url]
+[![Build2 Status][build-status-azure]][build-status-azure-url]
[![deps][deps]][deps-url]
-[![Code Climate](https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg)](https://codeclimate.com/github/webpack/webpack-cli)
-[![chat on gitter](https://badges.gitter.im/webpack/webpack.svg)](https://gitter.im/webpack/webpack)
-[![Install Size](https://packagephobia.now.sh/badge?p=webpack-cli)](https://packagephobia.now.sh/result?p=webpack-cli)
-[![npm](https://img.shields.io/npm/dw/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
-[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
-[![GitHub contributors](https://img.shields.io/github/contributors/webpack/webpack-cli.svg)](https://github.com/webpack/webpack-cli/graphs/contributors)
-
-
-* [About](#about)
- - [How to install](#how-to-install)
-* [Getting Started](#getting-started)
-* [webpack CLI Scaffolds](#webpack-cli-scaffolds)
-* Commands
- - [`webpack-cli init`](./packages/init/README.md#webpack-cli-init)
- - [`webpack-cli add`](./packages/add/README.md#webpack-cli-add)
- - [`webpack-cli info`](./packages/info/README.md#webpack-cli-info)
- - [`webpack-cli migrate`](./packages/migrate/README.md#webpack-cli-migrate)
- - [`webpack-cli remove`](./packages/remove/README.md#webpack-cli-remove)
- - [`webpack-cli generate-plugin`](./packages/generate-plugin/README.md#webpack-cli-generate-plugin)
- - [`webpack-cli generate-loader`](./packages/generate-loader/README.md#webpack-cli-generate-loader)
- - [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve)
- - [`webpack-cli update`](./packages/update/README.md#webpack-cli-update)
-* [webpack.config.js](https://webpack.js.org/concepts/configuration/)
-* [Contributing and Internal Documentation](#contributing-and-internal-documentation)
+[![Code Climate][maintainability]][maintainability-url]
+[![chat on gitter][chat]][chat-url]
+[![Install Size][size]][size-url]
+[![Downloads][downloads]][downloads-url]
+[![lerna][lerna]][lerna-url]
+[![GitHub contributors][contributors]][contributors-url]
+
+- [About](#about) - [How to install](#how-to-install)
+- [Packages](#packages) - [Commands](#commands) - [Utilities](#utilities)
+- [Getting started](#getting-started)
+- [webpack CLI Scaffolds](#webpack-cli-scaffolds)
+- [Contributing and Internal Documentation](#contributing-and-internal-documentation)
+- [Open Collective](#open-collective)
## About
@@ -48,26 +37,48 @@ webpack CLI provides a flexible set of commands for developers to increase speed
When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed!
-Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it.
+Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it.
+
+## 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.
### Commands
-Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a [multi-package repository](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder.
+Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks.
+
+- [`webpack-cli init`](./packages/init/README.md#webpack-cli-init) - Create a new webpack configuration.
+- [`webpack-cli add`](./packages/add/README.md#webpack-cli-add) - Add new properties to a webpack configuration file.
+- [`webpack-cli info`](./packages/info/README.md#webpack-cli-info) - Returns information related to the local environment.
+- [`webpack-cli migrate`](./packages/migrate/README.md#webpack-cli-migrate) - Migrate project from one version to another.
+- [`webpack-cli remove`](./packages/remove/README.md#webpack-cli-remove) - Remove properties from a webpack configuration file.
+- [`webpack-cli generate-plugin`](./packages/generate-plugin/README.md#webpack-cli-generate-plugin) - Initiate new plugin project.
+- [`webpack-cli generate-loader`](./packages/generate-loader/README.md#webpack-cli-generate-loader) - Initiate new loader project.
+- [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading.
+- [`webpack-cli update`](./packages/update/README.md#webpack-cli-update) - Update properties in a webpack configuration file.
+
+### Utilities
+
+The project also has several utility packages which are used by other commands
+
+- [`utils`](./packages/utils/README.md) - Several utilities used across webpack-cli.
+- [`generators`](./packages/generators/README.md) - Contains all webpack-cli related yeoman generators.
+- [`webpack-scaffold`](./packages/info/README.md#webpack-cli-info) - Utilities to create a webpack scaffold.
## 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 we want to use the `init` functionality 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 we want to use the `init` command to create a new `webpack.config.js` configuration file:
```sh
npm i webpack-cli @webpack-cli/init
npx webpack-cli init
```
-You will answer many questions when running the `init` so webpack CLI can provide the best fitting configuration.
+You will be prompted for some questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration.
## webpack CLI Scaffolds
-With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack webpack's we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these scaffolds. It contains functions that could be of use for creating an scaffold yourself.
+With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack, we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these scaffolds. It contains functions that could be of use for creating a scaffold yourself.
You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding), learn [How to compose a webpack-scaffold?](https://webpack.js.org/contribute/writing-a-scaffold) or generate one with [webpack-scaffold-starter](https://github.com/rishabh3112/webpack-scaffold-starter).
@@ -75,5 +86,29 @@ You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding)
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).
+## Open Collective
+
+If you like **webpack**, please consider donating to our [Open Collective](https://opencollective.com/webpack) to help us maintain it.
+
+We show this message in the terminal once a week, if you want you can disable it by setting the environment variable `DISABLE_OPENCOLLECTIVE=true` or `CI=true`.
+
+[build-status]: https://travis-ci.org/webpack/webpack-cli.svg
+[build-status-url]: https://travis-ci.org/webpack/webpack-cli
+[build-status-azure]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli
+[build-status-azure-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4
+[chat]: https://badges.gitter.im/webpack/webpack.svg
+[chat-url]: https://gitter.im/webpack/webpack
+[contributors]: https://img.shields.io/github/contributors/webpack/webpack-cli.svg
+[contributors-url]: https://github.com/webpack/webpack-cli/graphs/contributors
[deps]: https://img.shields.io/david/webpack/webpack.svg
[deps-url]: https://david-dm.org/webpack/webpack-cli
+[downloads]: https://img.shields.io/npm/dw/webpack-cli.svg
+[downloads-url]: https://www.npmjs.com/package/webpack-cli
+[lerna]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg
+[lerna-url]: http://www.lernajs.io/
+[npm]: https://img.shields.io/npm/v/webpack-cli.svg
+[npm-url]: https://www.npmjs.com/package/webpack-cli
+[maintainability]: https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg
+[maintainability-url]: https://codeclimate.com/github/webpack/webpack-cli
+[size]: https://packagephobia.now.sh/badge?p=webpack-cli
+[size-url]: https://packagephobia.now.sh/result?p=webpack-cli
diff --git a/SCAFFOLDING.md b/SCAFFOLDING.md
deleted file mode 100644
index 855c5fb3442..00000000000
--- a/SCAFFOLDING.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# Introduction
-
-Setting up webpack for the first time is hard. Writing advanced configurations to optimize performance is even harder. The `init` feature is designed to support people that want to create their own configuration or initializing other projects people create.
-
-## Creating a scaffold
-
-Before writing a `webpack-cli` scaffold, think about what you're trying to achieve. Do you want a "general" scaffold that could be used by any project or type of app? Do you want something very focused, like a scaffold that writes both your `webpack.config.js` and your framework code? It's also useful to think about the user experience for your scaffold.
-
-`webpack-cli` offers an experience that is interactive and you can prompt users for questions (like, "What is your entry point?") to help customize the output accordingly.
-
-### Writing a scaffold
-
-There are many resources where you can learn how to write a scaffold, you can start from: [How do I compose a
-webpack-scaffold?](https://github.com/evenstensberg/webpack-scaffold-demo)
-
-
-[`webpack-scaffold`](./packages/webpack-scaffold) is a utility suite for creating scaffolds. It contains functions that could be used to create a scaffold.
-
-
-### Running a scaffold
-
-A scaffold can be executed using [`webpack-cli init`](./INIT.md):
-
-```js
-webpack-cli init
-```
-
-#### Running a scaffold locally
-When the scaffold package is in your local file system you should pass its path to `init`:
-
-```bash
-webpack-cli init path/to/your/scaffold
-```
-
-Or you can create a global module and symlink to the local one:
-
-* Using npm
-
- ```bash
- cd path/to/my-scaffold
- npm link
- webpack-cli init my-scaffold
- ```
-
-* Using yarn
-
- ```bash
- cd path/to/my-scaffold
- yarn link
- webpack-cli init my-scaffold
-
-#### Running a scaffold from npm
-
-If the package is in npm, its name must begin with `webpack-scaffold` and can be used running:
-
-```js
-webpack-cli init webpack-scaffold-yourpackage
-```
-
-
-## API
-
-To create a `scaffold`, you must create a [`yeoman-generator`](http://yeoman.io/authoring/). Because of that, you can optionally extend your generator to include methods from the [Yeoman API](http://yeoman.io/learning/). It's worth noting that we support all the properties of a regular webpack configuration. In order for us to do this, there's a thing you need to remember:
-
-> Objects are made using strings, while strings are made using double strings. This means that in order for you to create a string, you have to wrap it inside another string for us to validate it correctly.
-
-### Required
-- [opts.env.configuration](#optsenvconfiguration-required)
-- [opts.env.configuration.myObj](#optsenvconfigurationmyObj-required)
-- [myObj.webpackOptions](#myObjwebpackOptions-required)
-- [writing()](#writing()-required)
-
-### Optional
-- [myObj.merge](#myObjmerge-optional)
-- [myObj.topScope](#myObjtopScope-optional)
-- [myObj.configName](#myObjconfigName-optional)
-
-### `opts.env.configuration`(required)
-
-This is the entry point your configuration, initialize it inside the constructor of your generator in order for the CLI to work:
-
-```js
-constructor(args, opts) {
- super(args, opts);
- opts.env.configuration = {};
-}
-```
-### `opts.env.configuration.myObj` (required)
-
-This is your scaffold, you add here the options that the CLI will transform into a webpack configuration. You can have many different scaffolds named as you prefer, representing different configurations like `dev.config` or `prod.config`:
-
-```js
-constructor(args, opts) {
- super(args, opts);
- opts.env.configuration = {
- dev: {},
- prod: {}
- };
-}
-```
-
-### `myObj.webpackOptions` (required)
-
-This object has the same format as a regular webpack configuration, so you declare here the properties that you want to scaffold, like `entry`, `output` and `context`. You can initialize this inside a yeoman method:
-
-```js
-this.options.env.configuration.dev.webpackOptions = {
- entry: '\'app.js\'',
- output: {...}
-};
-```
-
-### `myObj.merge` (optional)
-
-If you want to use [`webpack-merge`](https://github.com/survivejs/webpack-merge), you can set the `merge` property of `myObj` to the name of the configuration you want to merge it with:
-
-```js
-this.options.env.configuration.dev.merge = 'myConfig';
-```
-
-### `myObj.topScope`(optional)
-
-The `topScope` property is where you write all the code needed by your configuration, like module imports and functions/variables definitions:
-
-```js
-this.options.env.configuration.dev.topScope = [
- 'const webpack = require(\'webpack\');',
- 'const path = require(\'path\');'
-];
-```
-
-### `myObj.configName`(optional)
-
-`configName` allows you to customize the name of your configuration file. For example you can name it `webpack.base.js` instead of the default `webpack.config.js`:
-
-```js
-this.options.env.configuration.dev.configName = 'base';
-```
-
-### `writing` (required)
-
-For the scaffolding instance to run, you need to write your configuration to a `.yo-rc.json` file. This could be done using one of the lifecycles in the yeoman generator, such as the `writing` method:
-
-```js
-writing() {
- this.config.set('configuration', myObj)
-}
-```
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000000..92c3d610560
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,21 @@
+# Security Policy
+
+This document explains the security policy of webpack-cli and how we intend to support webpack and webpack-cli.
+
+## Supported Versions
+
+webpack CLI is currently supporting webpack v4 and webpack v5. Security fixes are released in patches.
+
+| webpack version | webpack-cli version | Supported |
+| --------------- | ----------------------------- | ------------------ |
+| >= 4.20.x | ^3.1.2 | :white_check_mark: |
+| <= 4.19.x | ^3.1.1 | :white_check_mark: |
+| 5.x.0 | ^3.1.2 | :white_check_mark: |
+| 5.0.x | ^3.1.2 | :white_check_mark: |
+| < 4.x.x | (CLI included in webpack < 4) | :x: |
+
+**Note: Using webpack < 4 with webpack CLI is not required as CLI was [included](https://github.com/webpack/webpack/commit/4b0332d3909eea8115d84f9a03da2d52478daa70#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) in webpack.**
+
+## 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 vulerability is much appreciated.
diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml
index e5423adfb18..60f1802c26e 100644
--- a/azure-pipelines-template.yml
+++ b/azure-pipelines-template.yml
@@ -5,34 +5,38 @@ jobs:
strategy:
maxParallel: 3
matrix:
+ node-12:
+ node_version: ^12.0.0
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
- node-6:
- node_version: ^6.14.4
steps:
- task: NodeTool@0
- displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
+ displayName: "Install Node.js"
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
- npm install
+ node -v
+ npm -v
+ displayName: "Print version"
+ - script: |
+ npm ci
npm run bootstrap
displayName: "Lerna bootstrap"
- script: |
npm run test
displayName: "Run tests"
- task: PublishTestResults@2
- displayName: 'Publish Test Results'
inputs:
- testResultsFiles: '**junit*.xml'
+ testResultsFiles: "**junit*.xml"
testRunTitle: TestRun $ {{ parameters.name }} $(node_version)
+ displayName: "Publish Test Results"
- task: PublishCodeCoverageResults@1
- displayName: 'Publish code coverage results'
inputs:
- codeCoverageTool: 'cobertura'
- summaryFileLocation: '**/coverage/cobertura-coverage.xml'
\ No newline at end of file
+ codeCoverageTool: "cobertura"
+ summaryFileLocation: "**/coverage/cobertura-coverage.xml"
+ displayName: "Publish code coverage results"
\ No newline at end of file
diff --git a/bin/.eslintrc.js b/bin/.eslintrc.js
new file mode 100644
index 00000000000..b32868dab61
--- /dev/null
+++ b/bin/.eslintrc.js
@@ -0,0 +1,63 @@
+module.exports = {
+ root: true,
+ plugins: ["node"],
+ extends: ["../.eslintrc.js", "plugin:node/recommended"],
+ env: {
+ node: true,
+ es6: true,
+ jest: true
+ },
+ parserOptions: { ecmaVersion: 2017, sourceType: "module" },
+ rules: {
+ "node/no-unsupported-features": ["error", { version: 6 }],
+ "node/no-deprecated-api": "error",
+ "node/no-missing-import": "error",
+ "node/no-missing-require": [
+ "error",
+ {
+ resolvePaths: ["./packages"],
+ allowModules: [
+ "webpack",
+ "@webpack-cli/generators",
+ "@webpack-cli/init",
+ "@webpack-cli/migrate",
+ "@webpack-cli/utils",
+ "@webpack-cli/generate-loader",
+ "@webpack-cli/generate-plugin",
+ "@webpack-cli/webpack-scaffold"
+ ]
+ }
+ ],
+ "node/no-unpublished-bin": "error",
+ "node/no-unpublished-require": [
+ "error",
+ {
+ allowModules: [
+ "webpack",
+ "webpack-dev-server",
+ "@webpack-cli/generators",
+ "@webpack-cli/init",
+ "@webpack-cli/migrate",
+ "@webpack-cli/utils",
+ "@webpack-cli/generate-loader",
+ "@webpack-cli/generate-plugin",
+ "@webpack-cli/webpack-scaffold"
+ ]
+ }
+ ],
+ "node/no-extraneous-require": [
+ "error",
+ {
+ allowModules: [
+ "@webpack-cli/migrate",
+ "@webpack-cli/generators",
+ "@webpack-cli/utils",
+ "@webpack-cli/generate-loader",
+ "@webpack-cli/generate-plugin",
+ "@webpack-cli/webpack-scaffold"
+ ]
+ }
+ ],
+ "node/process-exit-as-throw": "error"
+ }
+};
diff --git a/bin/cli.js b/bin/cli.js
index aa7df4c2d9c..aea8f6fd3e4 100755
--- a/bin/cli.js
+++ b/bin/cli.js
@@ -326,14 +326,21 @@ For more information, see https://webpack.js.org/api/cli/.`);
const SIX_DAYS = 518400000;
const now = new Date();
if (now.getDay() === MONDAY) {
- const { statSync, utimesSync } = require("fs");
+ const {
+ access,
+ constants,
+ statSync,
+ utimesSync,
+ } = require("fs");
const lastPrint = statSync(openCollectivePath).atime;
const lastPrintTS = new Date(lastPrint).getTime();
const timeSinceLastPrint = now.getTime() - lastPrintTS;
if (timeSinceLastPrint > SIX_DAYS) {
require(openCollectivePath);
// On windows we need to manually update the atime
- utimesSync(openCollectivePath, now, now);
+ access(openCollectivePath, constants.W_OK, (e) => {
+ if (!e) utimesSync(openCollectivePath, now, now);
+ });
}
}
}
@@ -342,7 +349,8 @@ For more information, see https://webpack.js.org/api/cli/.`);
}
}
if (firstOptions.watch || options.watch) {
- const watchOptions = firstOptions.watchOptions || firstOptions.watch || options.watch || {};
+ const watchOptions =
+ firstOptions.watchOptions || options.watchOptions || firstOptions.watch || options.watch || {};
if (watchOptions.stdin) {
process.stdin.on("end", function(_) {
process.exit(); // eslint-disable-line
diff --git a/bin/config/optionsSchema.json b/bin/config/optionsSchema.json
index aa272397d03..8e95e1b7926 100644
--- a/bin/config/optionsSchema.json
+++ b/bin/config/optionsSchema.json
@@ -1680,7 +1680,7 @@
]
},
"serve": {
- "description": "Options for webpack-serve",
+ "description": "Options for webpack-dev-server",
"type": "object"
},
"stats": {
diff --git a/bin/opencollective.js b/bin/opencollective.js
index 16207dc7575..044ea80206c 100644
--- a/bin/opencollective.js
+++ b/bin/opencollective.js
@@ -34,4 +34,9 @@ function printBadge() {
console.log("\n");
}
-printBadge();
+function isTrue(value) {
+ return !!value && value !== "0" && value !== "false";
+}
+const envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.CI);
+
+if (!envDisable) printBadge();
diff --git a/bin/utils/prompt-command.js b/bin/utils/prompt-command.js
index 1ee4beab8c6..20a99a1655f 100644
--- a/bin/utils/prompt-command.js
+++ b/bin/utils/prompt-command.js
@@ -38,8 +38,8 @@ const npmGlobalRoot = () => {
};
const runWhenInstalled = (packages, pathForCmd, ...args) => {
- const package = require(pathForCmd);
- const func = package.default;
+ const currentPackage = require(pathForCmd);
+ const func = currentPackage.default;
if (typeof func !== "function") {
throw new Error(`@webpack-cli/${packages} failed to export a default function`);
}
diff --git a/junit.xml b/junit.xml
deleted file mode 100644
index 304ccef7cc6..00000000000
--- a/junit.xml
+++ /dev/null
@@ -1,557 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 7be88ee429b..4e17dad8491 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "webpack-cli",
- "version": "3.3.0",
+ "version": "3.3.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -14,18 +14,18 @@
}
},
"@babel/core": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz",
- "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.4.tgz",
+ "integrity": "sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.3.4",
- "@babel/helpers": "^7.2.0",
- "@babel/parser": "^7.3.4",
- "@babel/template": "^7.2.2",
- "@babel/traverse": "^7.3.4",
- "@babel/types": "^7.3.4",
+ "@babel/generator": "^7.4.4",
+ "@babel/helpers": "^7.4.4",
+ "@babel/parser": "^7.4.4",
+ "@babel/template": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4",
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
@@ -62,12 +62,12 @@
}
},
"@babel/generator": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz",
- "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz",
+ "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==",
"dev": true,
"requires": {
- "@babel/types": "^7.3.4",
+ "@babel/types": "^7.4.4",
"jsesc": "^2.5.1",
"lodash": "^4.17.11",
"source-map": "^0.5.0",
@@ -94,25 +94,25 @@
}
},
"@babel/helper-call-delegate": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz",
- "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz",
+ "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.0.0",
- "@babel/traverse": "^7.1.0",
- "@babel/types": "^7.0.0"
+ "@babel/helper-hoist-variables": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-define-map": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz",
- "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz",
+ "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==",
"dev": true,
"requires": {
"@babel/helper-function-name": "^7.1.0",
- "@babel/types": "^7.0.0",
- "lodash": "^4.17.10"
+ "@babel/types": "^7.4.4",
+ "lodash": "^4.17.11"
}
},
"@babel/helper-explode-assignable-expression": {
@@ -146,12 +146,12 @@
}
},
"@babel/helper-hoist-variables": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz",
- "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz",
+ "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==",
"dev": true,
"requires": {
- "@babel/types": "^7.0.0"
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-member-expression-to-functions": {
@@ -173,17 +173,17 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz",
- "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz",
+ "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/helper-simple-access": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
- "@babel/template": "^7.2.2",
- "@babel/types": "^7.2.2",
- "lodash": "^4.17.10"
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/template": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "lodash": "^4.17.11"
}
},
"@babel/helper-optimise-call-expression": {
@@ -202,12 +202,12 @@
"dev": true
},
"@babel/helper-regex": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz",
- "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz",
+ "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==",
"dev": true,
"requires": {
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
}
},
"@babel/helper-remap-async-to-generator": {
@@ -224,15 +224,15 @@
}
},
"@babel/helper-replace-supers": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz",
- "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz",
+ "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.0.0",
"@babel/helper-optimise-call-expression": "^7.0.0",
- "@babel/traverse": "^7.3.4",
- "@babel/types": "^7.3.4"
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-simple-access": {
@@ -246,12 +246,12 @@
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz",
- "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz",
+ "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
"dev": true,
"requires": {
- "@babel/types": "^7.0.0"
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-wrap-function": {
@@ -267,14 +267,14 @@
}
},
"@babel/helpers": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz",
- "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz",
+ "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==",
"dev": true,
"requires": {
- "@babel/template": "^7.1.2",
- "@babel/traverse": "^7.1.5",
- "@babel/types": "^7.3.0"
+ "@babel/template": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/highlight": {
@@ -289,9 +289,9 @@
}
},
"@babel/parser": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz",
- "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz",
+ "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==",
"dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
@@ -316,9 +316,9 @@
}
},
"@babel/plugin-proposal-object-rest-spread": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz",
- "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz",
+ "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
@@ -336,14 +336,14 @@
}
},
"@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz",
- "integrity": "sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz",
+ "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.2.0"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/plugin-syntax-async-generators": {
@@ -392,9 +392,9 @@
}
},
"@babel/plugin-transform-async-to-generator": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz",
- "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz",
+ "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
@@ -412,9 +412,9 @@
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz",
- "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz",
+ "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
@@ -422,18 +422,18 @@
}
},
"@babel/plugin-transform-classes": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz",
- "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz",
+ "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.0.0",
- "@babel/helper-define-map": "^7.1.0",
+ "@babel/helper-define-map": "^7.4.4",
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-optimise-call-expression": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-replace-supers": "^7.3.4",
- "@babel/helper-split-export-declaration": "^7.0.0",
+ "@babel/helper-replace-supers": "^7.4.4",
+ "@babel/helper-split-export-declaration": "^7.4.4",
"globals": "^11.1.0"
}
},
@@ -447,23 +447,23 @@
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz",
- "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz",
+ "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-transform-dotall-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz",
- "integrity": "sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz",
+ "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.1.3"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/plugin-transform-duplicate-keys": {
@@ -486,18 +486,18 @@
}
},
"@babel/plugin-transform-for-of": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz",
- "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz",
+ "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-transform-function-name": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz",
- "integrity": "sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz",
+ "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==",
"dev": true,
"requires": {
"@babel/helper-function-name": "^7.1.0",
@@ -513,6 +513,15 @@
"@babel/helper-plugin-utils": "^7.0.0"
}
},
+ "@babel/plugin-transform-member-expression-literals": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz",
+ "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
"@babel/plugin-transform-modules-amd": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz",
@@ -524,23 +533,23 @@
}
},
"@babel/plugin-transform-modules-commonjs": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz",
- "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz",
+ "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.1.0",
+ "@babel/helper-module-transforms": "^7.4.4",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-simple-access": "^7.1.0"
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.3.4.tgz",
- "integrity": "sha512-VZ4+jlGOF36S7TjKs8g4ojp4MEI+ebCQZdswWb/T9I4X84j8OtFAyjXjt/M16iIm5RIZn0UMQgg/VgIwo/87vw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz",
+ "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.0.0",
+ "@babel/helper-hoist-variables": "^7.4.4",
"@babel/helper-plugin-utils": "^7.0.0"
}
},
@@ -555,18 +564,18 @@
}
},
"@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz",
- "integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz",
+ "integrity": "sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA==",
"dev": true,
"requires": {
"regexp-tree": "^0.1.0"
}
},
"@babel/plugin-transform-new-target": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz",
- "integrity": "sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz",
+ "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
@@ -583,25 +592,43 @@
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.3.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz",
- "integrity": "sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz",
+ "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==",
"dev": true,
"requires": {
- "@babel/helper-call-delegate": "^7.1.0",
+ "@babel/helper-call-delegate": "^7.4.4",
"@babel/helper-get-function-arity": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0"
}
},
+ "@babel/plugin-transform-property-literals": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz",
+ "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
"@babel/plugin-transform-regenerator": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz",
- "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz",
+ "integrity": "sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g==",
"dev": true,
"requires": {
"regenerator-transform": "^0.13.4"
}
},
+ "@babel/plugin-transform-reserved-words": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz",
+ "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
"@babel/plugin-transform-shorthand-properties": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz",
@@ -631,9 +658,9 @@
}
},
"@babel/plugin-transform-template-literals": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz",
- "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz",
+ "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.0.0",
@@ -650,105 +677,109 @@
}
},
"@babel/plugin-transform-unicode-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz",
- "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz",
+ "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.1.3"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/preset-env": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz",
- "integrity": "sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.4.tgz",
+ "integrity": "sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
- "@babel/plugin-proposal-object-rest-spread": "^7.3.4",
+ "@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
- "@babel/plugin-proposal-unicode-property-regex": "^7.2.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
"@babel/plugin-syntax-async-generators": "^7.2.0",
"@babel/plugin-syntax-json-strings": "^7.2.0",
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
"@babel/plugin-syntax-optional-catch-binding": "^7.2.0",
"@babel/plugin-transform-arrow-functions": "^7.2.0",
- "@babel/plugin-transform-async-to-generator": "^7.3.4",
+ "@babel/plugin-transform-async-to-generator": "^7.4.4",
"@babel/plugin-transform-block-scoped-functions": "^7.2.0",
- "@babel/plugin-transform-block-scoping": "^7.3.4",
- "@babel/plugin-transform-classes": "^7.3.4",
+ "@babel/plugin-transform-block-scoping": "^7.4.4",
+ "@babel/plugin-transform-classes": "^7.4.4",
"@babel/plugin-transform-computed-properties": "^7.2.0",
- "@babel/plugin-transform-destructuring": "^7.2.0",
- "@babel/plugin-transform-dotall-regex": "^7.2.0",
+ "@babel/plugin-transform-destructuring": "^7.4.4",
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
"@babel/plugin-transform-duplicate-keys": "^7.2.0",
"@babel/plugin-transform-exponentiation-operator": "^7.2.0",
- "@babel/plugin-transform-for-of": "^7.2.0",
- "@babel/plugin-transform-function-name": "^7.2.0",
+ "@babel/plugin-transform-for-of": "^7.4.4",
+ "@babel/plugin-transform-function-name": "^7.4.4",
"@babel/plugin-transform-literals": "^7.2.0",
+ "@babel/plugin-transform-member-expression-literals": "^7.2.0",
"@babel/plugin-transform-modules-amd": "^7.2.0",
- "@babel/plugin-transform-modules-commonjs": "^7.2.0",
- "@babel/plugin-transform-modules-systemjs": "^7.3.4",
+ "@babel/plugin-transform-modules-commonjs": "^7.4.4",
+ "@babel/plugin-transform-modules-systemjs": "^7.4.4",
"@babel/plugin-transform-modules-umd": "^7.2.0",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0",
- "@babel/plugin-transform-new-target": "^7.0.0",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.4",
+ "@babel/plugin-transform-new-target": "^7.4.4",
"@babel/plugin-transform-object-super": "^7.2.0",
- "@babel/plugin-transform-parameters": "^7.2.0",
- "@babel/plugin-transform-regenerator": "^7.3.4",
+ "@babel/plugin-transform-parameters": "^7.4.4",
+ "@babel/plugin-transform-property-literals": "^7.2.0",
+ "@babel/plugin-transform-regenerator": "^7.4.4",
+ "@babel/plugin-transform-reserved-words": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.0",
"@babel/plugin-transform-sticky-regex": "^7.2.0",
- "@babel/plugin-transform-template-literals": "^7.2.0",
+ "@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/plugin-transform-typeof-symbol": "^7.2.0",
- "@babel/plugin-transform-unicode-regex": "^7.2.0",
- "browserslist": "^4.3.4",
+ "@babel/plugin-transform-unicode-regex": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "browserslist": "^4.5.2",
+ "core-js-compat": "^3.0.0",
"invariant": "^2.2.2",
"js-levenshtein": "^1.1.3",
- "semver": "^5.3.0"
+ "semver": "^5.5.0"
}
},
"@babel/register": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.0.0.tgz",
- "integrity": "sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.4.4.tgz",
+ "integrity": "sha512-sn51H88GRa00+ZoMqCVgOphmswG4b7mhf9VOB0LUBAieykq2GnRFerlN+JQkO/ntT7wz4jaHNSRPg9IdMPEUkA==",
"dev": true,
"requires": {
- "core-js": "^2.5.7",
- "find-cache-dir": "^1.0.0",
- "home-or-tmp": "^3.0.0",
- "lodash": "^4.17.10",
+ "core-js": "^3.0.0",
+ "find-cache-dir": "^2.0.0",
+ "lodash": "^4.17.11",
"mkdirp": "^0.5.1",
"pirates": "^4.0.0",
"source-map-support": "^0.5.9"
}
},
"@babel/template": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz",
- "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz",
+ "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.2.2",
- "@babel/types": "^7.2.2"
+ "@babel/parser": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/traverse": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz",
- "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz",
+ "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.3.4",
+ "@babel/generator": "^7.4.4",
"@babel/helper-function-name": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
- "@babel/parser": "^7.3.4",
- "@babel/types": "^7.3.4",
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/parser": "^7.4.4",
+ "@babel/types": "^7.4.4",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.11"
@@ -772,9 +803,9 @@
}
},
"@babel/types": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz",
- "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz",
+ "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"dev": true,
"requires": {
"esutils": "^2.0.2",
@@ -839,6 +870,14 @@
"import-from": "2.1.0",
"resolve-pkg": "1.0.0",
"semver": "5.6.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
+ "dev": true
+ }
}
},
"@commitlint/ensure": {
@@ -876,6 +915,14 @@
"dev": true,
"requires": {
"semver": "5.6.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
+ "dev": true
+ }
}
},
"@commitlint/lint": {
@@ -1140,44 +1187,43 @@
}
},
"@jest/console": {
- "version": "24.3.0",
- "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.3.0.tgz",
- "integrity": "sha512-NaCty/OOei6rSDcbPdMiCbYCI0KGFGPgGO6B09lwWt5QTxnkuhKYET9El5u5z1GAcSxkQmSMtM63e24YabCWqA==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.7.1.tgz",
+ "integrity": "sha512-iNhtIy2M8bXlAOULWVTUxmnelTLFneTNEkHCgPmgd+zNwy9zVddJ6oS5rZ9iwoscNdT5mMwUd0C51v/fSlzItg==",
"dev": true,
"requires": {
"@jest/source-map": "^24.3.0",
- "@types/node": "*",
"chalk": "^2.0.1",
"slash": "^2.0.0"
}
},
"@jest/core": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.5.0.tgz",
- "integrity": "sha512-RDZArRzAs51YS7dXG1pbXbWGxK53rvUu8mCDYsgqqqQ6uSOaTjcVyBl2Jce0exT2rSLk38ca7az7t2f3b0/oYQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.7.1.tgz",
+ "integrity": "sha512-ivlZ8HX/FOASfHcb5DJpSPFps8ydfUYzLZfgFFqjkLijYysnIEOieg72YRhO4ZUB32xu40hsSMmaw+IGYeKONA==",
"dev": true,
"requires": {
- "@jest/console": "^24.3.0",
- "@jest/reporters": "^24.5.0",
- "@jest/test-result": "^24.5.0",
- "@jest/transform": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/console": "^24.7.1",
+ "@jest/reporters": "^24.7.1",
+ "@jest/test-result": "^24.7.1",
+ "@jest/transform": "^24.7.1",
+ "@jest/types": "^24.7.0",
"ansi-escapes": "^3.0.0",
"chalk": "^2.0.1",
"exit": "^0.1.2",
"graceful-fs": "^4.1.15",
- "jest-changed-files": "^24.5.0",
- "jest-config": "^24.5.0",
- "jest-haste-map": "^24.5.0",
- "jest-message-util": "^24.5.0",
+ "jest-changed-files": "^24.7.0",
+ "jest-config": "^24.7.1",
+ "jest-haste-map": "^24.7.1",
+ "jest-message-util": "^24.7.1",
"jest-regex-util": "^24.3.0",
- "jest-resolve-dependencies": "^24.5.0",
- "jest-runner": "^24.5.0",
- "jest-runtime": "^24.5.0",
- "jest-snapshot": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-validate": "^24.5.0",
- "jest-watcher": "^24.5.0",
+ "jest-resolve-dependencies": "^24.7.1",
+ "jest-runner": "^24.7.1",
+ "jest-runtime": "^24.7.1",
+ "jest-snapshot": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-validate": "^24.7.0",
+ "jest-watcher": "^24.7.1",
"micromatch": "^3.1.10",
"p-each-series": "^1.0.0",
"pirates": "^4.0.1",
@@ -1199,9 +1245,9 @@
"dev": true
},
"strip-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
- "integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -1210,40 +1256,38 @@
}
},
"@jest/environment": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.5.0.tgz",
- "integrity": "sha512-tzUHR9SHjMXwM8QmfHb/EJNbF0fjbH4ieefJBvtwO8YErLTrecc1ROj0uo2VnIT6SlpEGZnvdCK6VgKYBo8LsA==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.7.1.tgz",
+ "integrity": "sha512-wmcTTYc4/KqA+U5h1zQd5FXXynfa7VGP2NfF+c6QeGJ7c+2nStgh65RQWNX62SC716dTtqheTRrZl0j+54oGHw==",
"dev": true,
"requires": {
- "@jest/fake-timers": "^24.5.0",
- "@jest/transform": "^24.5.0",
- "@jest/types": "^24.5.0",
- "@types/node": "*",
- "jest-mock": "^24.5.0"
+ "@jest/fake-timers": "^24.7.1",
+ "@jest/transform": "^24.7.1",
+ "@jest/types": "^24.7.0",
+ "jest-mock": "^24.7.0"
}
},
"@jest/fake-timers": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.5.0.tgz",
- "integrity": "sha512-i59KVt3QBz9d+4Qr4QxsKgsIg+NjfuCjSOWj3RQhjF5JNy+eVJDhANQ4WzulzNCHd72srMAykwtRn5NYDGVraw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.7.1.tgz",
+ "integrity": "sha512-4vSQJDKfR2jScOe12L9282uiwuwQv9Lk7mgrCSZHA9evB9efB/qx8i0KJxsAKtp8fgJYBJdYY7ZU6u3F4/pyjA==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
- "@types/node": "*",
- "jest-message-util": "^24.5.0",
- "jest-mock": "^24.5.0"
+ "@jest/types": "^24.7.0",
+ "jest-message-util": "^24.7.1",
+ "jest-mock": "^24.7.0"
}
},
"@jest/reporters": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.5.0.tgz",
- "integrity": "sha512-vfpceiaKtGgnuC3ss5czWOihKOUSyjJA4M4udm6nH8xgqsuQYcyDCi4nMMcBKsHXWgz9/V5G7iisnZGfOh1w6Q==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.7.1.tgz",
+ "integrity": "sha512-bO+WYNwHLNhrjB9EbPL4kX/mCCG4ZhhfWmO3m4FSpbgr7N83MFejayz30kKjgqr7smLyeaRFCBQMbXpUgnhAJw==",
"dev": true,
"requires": {
- "@jest/environment": "^24.5.0",
- "@jest/test-result": "^24.5.0",
- "@jest/transform": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/environment": "^24.7.1",
+ "@jest/test-result": "^24.7.1",
+ "@jest/transform": "^24.7.1",
+ "@jest/types": "^24.7.0",
"chalk": "^2.0.1",
"exit": "^0.1.2",
"glob": "^7.1.2",
@@ -1251,11 +1295,11 @@
"istanbul-lib-coverage": "^2.0.2",
"istanbul-lib-instrument": "^3.0.1",
"istanbul-lib-source-maps": "^3.0.1",
- "jest-haste-map": "^24.5.0",
- "jest-resolve": "^24.5.0",
- "jest-runtime": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-worker": "^24.4.0",
+ "jest-haste-map": "^24.7.1",
+ "jest-resolve": "^24.7.1",
+ "jest-runtime": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-worker": "^24.6.0",
"node-notifier": "^5.2.1",
"slash": "^2.0.0",
"source-map": "^0.6.0",
@@ -1290,32 +1334,44 @@
}
},
"@jest/test-result": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.5.0.tgz",
- "integrity": "sha512-u66j2vBfa8Bli1+o3rCaVnVYa9O8CAFZeqiqLVhnarXtreSXG33YQ6vNYBogT7+nYiFNOohTU21BKiHlgmxD5A==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.7.1.tgz",
+ "integrity": "sha512-3U7wITxstdEc2HMfBX7Yx3JZgiNBubwDqQMh+BXmZXHa3G13YWF3p6cK+5g0hGkN3iufg/vGPl3hLxQXD74Npg==",
+ "dev": true,
+ "requires": {
+ "@jest/console": "^24.7.1",
+ "@jest/types": "^24.7.0",
+ "@types/istanbul-lib-coverage": "^2.0.0"
+ }
+ },
+ "@jest/test-sequencer": {
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.7.1.tgz",
+ "integrity": "sha512-84HQkCpVZI/G1zq53gHJvSmhUer4aMYp9tTaffW28Ih5OxfCg8hGr3nTSbL1OhVDRrFZwvF+/R9gY6JRkDUpUA==",
"dev": true,
"requires": {
- "@jest/console": "^24.3.0",
- "@jest/types": "^24.5.0",
- "@types/istanbul-lib-coverage": "^1.1.0"
+ "@jest/test-result": "^24.7.1",
+ "jest-haste-map": "^24.7.1",
+ "jest-runner": "^24.7.1",
+ "jest-runtime": "^24.7.1"
}
},
"@jest/transform": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.5.0.tgz",
- "integrity": "sha512-XSsDz1gdR/QMmB8UCKlweAReQsZrD/DK7FuDlNo/pE8EcKMrfi2kqLRk8h8Gy/PDzgqJj64jNEzOce9pR8oj1w==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.7.1.tgz",
+ "integrity": "sha512-EsOUqP9ULuJ66IkZQhI5LufCHlTbi7hrcllRMUEV/tOgqBVQi93+9qEvkX0n8mYpVXQ8VjwmICeRgg58mrtIEw==",
"dev": true,
"requires": {
"@babel/core": "^7.1.0",
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"babel-plugin-istanbul": "^5.1.0",
"chalk": "^2.0.1",
"convert-source-map": "^1.4.0",
"fast-json-stable-stringify": "^2.0.0",
"graceful-fs": "^4.1.15",
- "jest-haste-map": "^24.5.0",
+ "jest-haste-map": "^24.7.1",
"jest-regex-util": "^24.3.0",
- "jest-util": "^24.5.0",
+ "jest-util": "^24.7.1",
"micromatch": "^3.1.10",
"realpath-native": "^1.1.0",
"slash": "^2.0.0",
@@ -1332,24 +1388,24 @@
}
},
"@jest/types": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.5.0.tgz",
- "integrity": "sha512-kN7RFzNMf2R8UDadPOl6ReyI+MT8xfqRuAnuVL+i4gwjv/zubdDK+EDeLHYwq1j0CSSR2W/MmgaRlMZJzXdmVA==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.7.0.tgz",
+ "integrity": "sha512-ipJUa2rFWiKoBqMKP63Myb6h9+iT3FHRTF2M8OR6irxWzItisa8i4dcSg14IbvmXUnBlHBlUQPYUHWyX3UPpYA==",
"dev": true,
"requires": {
- "@types/istanbul-lib-coverage": "^1.1.0",
+ "@types/istanbul-lib-coverage": "^2.0.0",
"@types/yargs": "^12.0.9"
}
},
"@lerna/add": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/add/-/add-3.13.1.tgz",
- "integrity": "sha512-cXk42YbuhzEnADCK8Qte5laC9Qo03eJLVnr0qKY85jQUM/T4URe3IIUemqpg0CpVATrB+Vz+iNdeqw9ng1iALw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/add/-/add-3.13.3.tgz",
+ "integrity": "sha512-T3/Lsbo9ZFq+vL3ssaHxA8oKikZAPTJTGFe4CRuQgWCDd/M61+51jeWsngdaHpwzSSRDRjxg8fJTG10y10pnfA==",
"dev": true,
"requires": {
- "@lerna/bootstrap": "3.13.1",
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
+ "@lerna/bootstrap": "3.13.3",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
"@lerna/npm-conf": "3.13.0",
"@lerna/validation-error": "3.13.0",
"dedent": "^0.7.0",
@@ -1371,19 +1427,19 @@
}
},
"@lerna/bootstrap": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.13.1.tgz",
- "integrity": "sha512-mKdi5Ds5f82PZwEFyB9/W60I3iELobi1i87sTeVrbJh/um7GvqpSPy7kG/JPxyOdMpB2njX6LiJgw+7b6BEPWw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.13.3.tgz",
+ "integrity": "sha512-2XzijnLHRZOVQh8pwS7+5GR3cG4uh+EiLrWOishCq2TVzkqgjaS3GGBoef7KMCXfWHoLqAZRr/jEdLqfETLVqg==",
"dev": true,
"requires": {
"@lerna/batch-packages": "3.13.0",
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
- "@lerna/has-npm-version": "3.13.0",
- "@lerna/npm-install": "3.13.0",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
+ "@lerna/has-npm-version": "3.13.3",
+ "@lerna/npm-install": "3.13.3",
"@lerna/package-graph": "3.13.0",
"@lerna/pulse-till-done": "3.13.0",
- "@lerna/rimraf-dir": "3.13.0",
+ "@lerna/rimraf-dir": "3.13.3",
"@lerna/run-lifecycle": "3.13.0",
"@lerna/run-parallel-batches": "3.13.0",
"@lerna/symlink-binary": "3.13.0",
@@ -1403,32 +1459,32 @@
}
},
"@lerna/changed": {
- "version": "3.13.2",
- "resolved": "https://registry.npmjs.org/@lerna/changed/-/changed-3.13.2.tgz",
- "integrity": "sha512-mcmkxUMR0J4ZyRyVUrdDJl4ZsdHDgdA1xQcbdB4LZvAE/E2lNlPcEfAfbfs08VnRiqvFOqcczbzBq10hvSFg4w==",
+ "version": "3.13.4",
+ "resolved": "https://registry.npmjs.org/@lerna/changed/-/changed-3.13.4.tgz",
+ "integrity": "sha512-9lfOyRVObasw6L/z7yCSfsEl1QKy0Eamb8t2Krg1deIoAt+cE3JXOdGGC1MhOSli+7f/U9LyLXjJzIOs/pc9fw==",
"dev": true,
"requires": {
- "@lerna/collect-updates": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/collect-updates": "3.13.3",
+ "@lerna/command": "3.13.3",
"@lerna/listable": "3.13.0",
"@lerna/output": "3.13.0",
- "@lerna/version": "3.13.2"
+ "@lerna/version": "3.13.4"
}
},
"@lerna/check-working-tree": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.13.0.tgz",
- "integrity": "sha512-dsdO15NXX5To+Q53SYeCrBEpiqv4m5VkaPZxbGQZNwoRen1MloXuqxSymJANQn+ZLEqarv5V56gydebeROPH5A==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.13.3.tgz",
+ "integrity": "sha512-LoGZvTkne+V1WpVdCTU0XNzFKsQa2AiAFKksGRT0v8NQj6VAPp0jfVYDayTqwaWt2Ne0OGKOFE79Y5LStOuhaQ==",
"dev": true,
"requires": {
- "@lerna/describe-ref": "3.13.0",
+ "@lerna/describe-ref": "3.13.3",
"@lerna/validation-error": "3.13.0"
}
},
"@lerna/child-process": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.13.0.tgz",
- "integrity": "sha512-0iDS8y2jiEucD4fJHEzKoc8aQJgm7s+hG+0RmDNtfT0MM3n17pZnf5JOMtS1FJp+SEXOjMKQndyyaDIPFsnp6A==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.13.3.tgz",
+ "integrity": "sha512-3/e2uCLnbU+bydDnDwyadpOmuzazS01EcnOleAnuj9235CU2U97DH6OyoG1EW/fU59x11J+HjIqovh5vBaMQjQ==",
"dev": true,
"requires": {
"chalk": "^2.3.1",
@@ -1437,16 +1493,16 @@
}
},
"@lerna/clean": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/clean/-/clean-3.13.1.tgz",
- "integrity": "sha512-myGIaXv7RUO2qCFZXvx8SJeI+eN6y9SUD5zZ4/LvNogbOiEIlujC5lUAqK65rAHayQ9ltSa/yK6Xv510xhZXZQ==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/clean/-/clean-3.13.3.tgz",
+ "integrity": "sha512-xmNauF1PpmDaKdtA2yuRc23Tru4q7UMO6yB1a/TTwxYPYYsAWG/CBK65bV26J7x4RlZtEv06ztYGMa9zh34UXA==",
"dev": true,
"requires": {
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
"@lerna/prompt": "3.13.0",
"@lerna/pulse-till-done": "3.13.0",
- "@lerna/rimraf-dir": "3.13.0",
+ "@lerna/rimraf-dir": "3.13.3",
"p-map": "^1.2.0",
"p-map-series": "^1.0.0",
"p-waterfall": "^1.0.0"
@@ -1465,13 +1521,13 @@
}
},
"@lerna/collect-updates": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.13.0.tgz",
- "integrity": "sha512-uR3u6uTzrS1p46tHQ/mlHog/nRJGBqskTHYYJbgirujxm6FqNh7Do+I1Q/7zSee407G4lzsNxZdm8IL927HemQ==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.13.3.tgz",
+ "integrity": "sha512-sTpALOAxli/ZS+Mjq6fbmjU9YXqFJ2E4FrE1Ijl4wPC5stXEosg2u0Z1uPY+zVKdM+mOIhLxPVdx83rUgRS+Cg==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
- "@lerna/describe-ref": "3.13.0",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/describe-ref": "3.13.3",
"minimatch": "^3.0.4",
"npmlog": "^4.1.2",
"slash": "^1.0.0"
@@ -1486,12 +1542,12 @@
}
},
"@lerna/command": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/command/-/command-3.13.1.tgz",
- "integrity": "sha512-SYWezxX+iheWvzRoHCrbs8v5zHPaxAx3kWvZhqi70vuGsdOVAWmaG4IvHLn11ztS+Vpd5PM+ztBWSbnykpLFKQ==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/command/-/command-3.13.3.tgz",
+ "integrity": "sha512-WHFIQCubJV0T8gSLRNr6exZUxTswrh+iAtJCb86SE0Sa+auMPklE8af7w2Yck5GJfewmxSjke3yrjNxQrstx7w==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"@lerna/package-graph": "3.13.0",
"@lerna/project": "3.13.1",
"@lerna/validation-error": "3.13.0",
@@ -1547,17 +1603,23 @@
"compare-func": "^1.3.1",
"q": "^1.5.1"
}
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
}
}
},
"@lerna/create": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/create/-/create-3.13.1.tgz",
- "integrity": "sha512-pLENMXgTkQuvKxAopjKeoLOv9fVUCnpTUD7aLrY5d95/1xqSZlnsOcQfUYcpMf3GpOvHc8ILmI5OXkPqjAf54g==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/create/-/create-3.13.3.tgz",
+ "integrity": "sha512-4M5xT1AyUMwt1gCDph4BfW3e6fZmt0KjTa3FoXkUotf/w/eqTsc2IQ+ULz2+gOFQmtuNbqIZEOK3J4P9ArJJ/A==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/command": "3.13.3",
"@lerna/npm-conf": "3.13.0",
"@lerna/validation-error": "3.13.0",
"camelcase": "^5.0.0",
@@ -1576,6 +1638,12 @@
"whatwg-url": "^7.0.0"
},
"dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
@@ -1607,48 +1675,48 @@
}
},
"@lerna/describe-ref": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.13.0.tgz",
- "integrity": "sha512-UJefF5mLxLae9I2Sbz5RLYGbqbikRuMqdgTam0MS5OhXnyuuKYBUpwBshCURNb1dPBXTQhSwc7+oUhORx8ojCg==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.13.3.tgz",
+ "integrity": "sha512-5KcLTvjdS4gU5evW8ESbZ0BF44NM5HrP3dQNtWnOUSKJRgsES8Gj0lq9AlB2+YglZfjEftFT03uOYOxnKto4Uw==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"npmlog": "^4.1.2"
}
},
"@lerna/diff": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/diff/-/diff-3.13.1.tgz",
- "integrity": "sha512-cKqmpONO57mdvxtp8e+l5+tjtmF04+7E+O0QEcLcNUAjC6UR2OSM77nwRCXDukou/1h72JtWs0jjcdYLwAmApg==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/diff/-/diff-3.13.3.tgz",
+ "integrity": "sha512-/DRS2keYbnKaAC+5AkDyZRGkP/kT7v1GlUS0JGZeiRDPQ1H6PzhX09EgE5X6nj0Ytrm0sUasDeN++CDVvgaI+A==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/command": "3.13.3",
"@lerna/validation-error": "3.13.0",
"npmlog": "^4.1.2"
}
},
"@lerna/exec": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/exec/-/exec-3.13.1.tgz",
- "integrity": "sha512-I34wEP9lrAqqM7tTXLDxv/6454WFzrnXDWpNDbiKQiZs6SIrOOjmm6I4FiQsx+rU3o9d+HkC6tcUJRN5mlJUgA==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/exec/-/exec-3.13.3.tgz",
+ "integrity": "sha512-c0bD4XqM96CTPV8+lvkxzE7mkxiFyv/WNM4H01YvvbFAJzk+S4Y7cBtRkIYFTfkFZW3FLo8pEgtG1ONtIdM+tg==",
"dev": true,
"requires": {
"@lerna/batch-packages": "3.13.0",
- "@lerna/child-process": "3.13.0",
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
"@lerna/run-parallel-batches": "3.13.0",
"@lerna/validation-error": "3.13.0"
}
},
"@lerna/filter-options": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.13.0.tgz",
- "integrity": "sha512-SRp7DCo9zrf+7NkQxZMkeyO1GRN6GICoB9UcBAbXhLbWisT37Cx5/6+jh49gYB63d/0/WYHSEPMlheUrpv1Srw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.13.3.tgz",
+ "integrity": "sha512-DbtQX4eRgrBz1wCFWRP99JBD7ODykYme9ykEK79+RrKph40znhJQRlLg4idogj6IsUEzwo1OHjihCzSfnVo6Cg==",
"dev": true,
"requires": {
- "@lerna/collect-updates": "3.13.0",
+ "@lerna/collect-updates": "3.13.3",
"@lerna/filter-packages": "3.13.0",
"dedent": "^0.7.0"
}
@@ -1708,12 +1776,12 @@
}
},
"@lerna/github-client": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.13.1.tgz",
- "integrity": "sha512-iPLUp8FFoAKGURksYEYZzfuo9TRA+NepVlseRXFaWlmy36dCQN20AciINpoXiXGoHcEUHXUKHQvY3ARFdMlf3w==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.13.3.tgz",
+ "integrity": "sha512-fcJkjab4kX0zcLLSa/DCUNvU3v8wmy2c1lhdIbL7s7gABmDcV0QZq93LhnEee3VkC9UpnJ6GKG4EkD7eIifBnA==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"@octokit/plugin-enterprise-rest": "^2.1.1",
"@octokit/rest": "^16.16.0",
"git-url-parse": "^11.1.2",
@@ -1727,23 +1795,23 @@
"dev": true
},
"@lerna/has-npm-version": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.13.0.tgz",
- "integrity": "sha512-Oqu7DGLnrMENPm+bPFGOHnqxK8lCnuYr6bk3g/CoNn8/U0qgFvHcq6Iv8/Z04TsvleX+3/RgauSD2kMfRmbypg==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.13.3.tgz",
+ "integrity": "sha512-mQzoghRw4dBg0R9FFfHrj0TH0glvXyzdEZmYZ8Isvx5BSuEEwpsryoywuZSdppcvLu8o7NAdU5Tac8cJ/mT52w==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"semver": "^5.5.0"
}
},
"@lerna/import": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/import/-/import-3.13.1.tgz",
- "integrity": "sha512-A1Vk1siYx1XkRl6w+zkaA0iptV5TIynVlHPR9S7NY0XAfhykjztYVvwtxarlh6+VcNrO9We6if0+FXCrfDEoIg==",
+ "version": "3.13.4",
+ "resolved": "https://registry.npmjs.org/@lerna/import/-/import-3.13.4.tgz",
+ "integrity": "sha512-dn6eNuPEljWsifBEzJ9B6NoaLwl/Zvof7PBUPA4hRyRlqG5sXRn6F9DnusMTovvSarbicmTURbOokYuotVWQQA==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/command": "3.13.3",
"@lerna/prompt": "3.13.0",
"@lerna/pulse-till-done": "3.13.0",
"@lerna/validation-error": "3.13.0",
@@ -1753,25 +1821,25 @@
}
},
"@lerna/init": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/init/-/init-3.13.1.tgz",
- "integrity": "sha512-M59WACqim8WkH5FQEGOCEZ89NDxCKBfFTx4ZD5ig3LkGyJ8RdcJq5KEfpW/aESuRE9JrZLzVr0IjKbZSxzwEMA==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/init/-/init-3.13.3.tgz",
+ "integrity": "sha512-bK/mp0sF6jT0N+c+xrbMCqN4xRoiZCXQzlYsyACxPK99KH/mpHv7hViZlTYUGlYcymtew6ZC770miv5A9wF9hA==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/command": "3.13.3",
"fs-extra": "^7.0.0",
"p-map": "^1.2.0",
"write-json-file": "^2.3.0"
}
},
"@lerna/link": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/link/-/link-3.13.1.tgz",
- "integrity": "sha512-N3h3Fj1dcea+1RaAoAdy4g2m3fvU7m89HoUn5X/Zcw5n2kPoK8kTO+NfhNAatfRV8VtMXst8vbNrWQQtfm0FFw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/link/-/link-3.13.3.tgz",
+ "integrity": "sha512-IHhtdhA0KlIdevCsq6WHkI2rF3lHWHziJs2mlrEWAKniVrFczbELON1KJAgdJS1k3kAP/WeWVqmIYZ2hJDxMvg==",
"dev": true,
"requires": {
- "@lerna/command": "3.13.1",
+ "@lerna/command": "3.13.3",
"@lerna/package-graph": "3.13.0",
"@lerna/symlink-dependencies": "3.13.0",
"p-map": "^1.2.0",
@@ -1787,13 +1855,13 @@
}
},
"@lerna/list": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/list/-/list-3.13.1.tgz",
- "integrity": "sha512-635iRbdgd9gNvYLLIbYdQCQLr+HioM5FGJLFS0g3DPGygr6iDR8KS47hzCRGH91LU9NcM1mD1RoT/AChF+QbiA==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/list/-/list-3.13.3.tgz",
+ "integrity": "sha512-rLRDsBCkydMq2FL6WY1J/elvnXIjxxRtb72lfKHdvDEqVdquT5Qgt9ci42hwjmcocFwWcFJgF6BZozj5pbc13A==",
"dev": true,
"requires": {
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
"@lerna/listable": "3.13.0",
"@lerna/output": "3.13.0"
}
@@ -1829,6 +1897,14 @@
"requires": {
"config-chain": "^1.1.11",
"pify": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"@lerna/npm-dist-tag": {
@@ -1844,12 +1920,12 @@
}
},
"@lerna/npm-install": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.13.0.tgz",
- "integrity": "sha512-qNyfts//isYQxore6fsPorNYJmPVKZ6tOThSH97tP0aV91zGMtrYRqlAoUnDwDdAjHPYEM16hNujg2wRmsqqIw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.13.3.tgz",
+ "integrity": "sha512-7Jig9MLpwAfcsdQ5UeanAjndChUjiTjTp50zJ+UZz4CbIBIDhoBehvNMTCL2G6pOEC7sGEg6sAqJINAqred6Tg==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"@lerna/get-npm-exec-opts": "3.13.0",
"fs-extra": "^7.0.0",
"npm-package-arg": "^6.1.0",
@@ -1872,15 +1948,23 @@
"npmlog": "^4.1.2",
"pify": "^3.0.0",
"read-package-json": "^2.0.13"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"@lerna/npm-run-script": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.13.0.tgz",
- "integrity": "sha512-hiL3/VeVp+NFatBjkGN8mUdX24EfZx9rQlSie0CMgtjc7iZrtd0jCguLomSCRHYjJuvqgbp+LLYo7nHVykfkaQ==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.13.3.tgz",
+ "integrity": "sha512-qR4o9BFt5hI8Od5/DqLalOJydnKpiQFEeN0h9xZi7MwzuX1Ukwh3X22vqsX4YRbipIelSFtrDzleNVUm5jj0ow==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"@lerna/get-npm-exec-opts": "3.13.0",
"npmlog": "^4.1.2"
}
@@ -2069,9 +2153,9 @@
}
},
"inquirer": {
- "version": "6.2.2",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz",
- "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
+ "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
"dev": true,
"requires": {
"ansi-escapes": "^3.2.0",
@@ -2085,7 +2169,7 @@
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
"string-width": "^2.1.0",
- "strip-ansi": "^5.0.0",
+ "strip-ansi": "^5.1.0",
"through": "^2.3.6"
}
},
@@ -2141,17 +2225,17 @@
}
},
"@lerna/publish": {
- "version": "3.13.2",
- "resolved": "https://registry.npmjs.org/@lerna/publish/-/publish-3.13.2.tgz",
- "integrity": "sha512-L8iceC3Z2YJnlV3cGbfk47NSh1+iOo1tD65z+BU3IYLRpPnnSf8i6BORdKV8rECDj6kjLYvL7//2yxbHy7shhA==",
+ "version": "3.13.4",
+ "resolved": "https://registry.npmjs.org/@lerna/publish/-/publish-3.13.4.tgz",
+ "integrity": "sha512-v03pabiPlqCDwX6cVNis1PDdT6/jBgkVb5Nl4e8wcJXevIhZw3ClvtI94gSZu/wdoVFX0RMfc8QBVmaimSO0qg==",
"dev": true,
"requires": {
"@lerna/batch-packages": "3.13.0",
- "@lerna/check-working-tree": "3.13.0",
- "@lerna/child-process": "3.13.0",
- "@lerna/collect-updates": "3.13.0",
- "@lerna/command": "3.13.1",
- "@lerna/describe-ref": "3.13.0",
+ "@lerna/check-working-tree": "3.13.3",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/collect-updates": "3.13.3",
+ "@lerna/command": "3.13.3",
+ "@lerna/describe-ref": "3.13.3",
"@lerna/log-packed": "3.13.0",
"@lerna/npm-conf": "3.13.0",
"@lerna/npm-dist-tag": "3.13.0",
@@ -2163,7 +2247,7 @@
"@lerna/run-lifecycle": "3.13.0",
"@lerna/run-parallel-batches": "3.13.0",
"@lerna/validation-error": "3.13.0",
- "@lerna/version": "3.13.2",
+ "@lerna/version": "3.13.4",
"figgy-pudding": "^3.5.1",
"fs-extra": "^7.0.0",
"libnpmaccess": "^3.0.1",
@@ -2199,27 +2283,27 @@
}
},
"@lerna/rimraf-dir": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.13.0.tgz",
- "integrity": "sha512-kte+pMemulre8cmPqljxIYjCmdLByz8DgHBHXB49kz2EiPf8JJ+hJFt0PzEubEyJZ2YE2EVAx5Tv5+NfGNUQyQ==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.13.3.tgz",
+ "integrity": "sha512-d0T1Hxwu3gpYVv73ytSL+/Oy8JitsmvOYUR5ouRSABsmqS7ZZCh5t6FgVDDGVXeuhbw82+vuny1Og6Q0k4ilqw==",
"dev": true,
"requires": {
- "@lerna/child-process": "3.13.0",
+ "@lerna/child-process": "3.13.3",
"npmlog": "^4.1.2",
"path-exists": "^3.0.0",
"rimraf": "^2.6.2"
}
},
"@lerna/run": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@lerna/run/-/run-3.13.1.tgz",
- "integrity": "sha512-nv1oj7bsqppWm1M4ifN+/IIbVu9F4RixrbQD2okqDGYne4RQPAXyb5cEZuAzY/wyGTWWiVaZ1zpj5ogPWvH0bw==",
+ "version": "3.13.3",
+ "resolved": "https://registry.npmjs.org/@lerna/run/-/run-3.13.3.tgz",
+ "integrity": "sha512-ygnLIfIYS6YY1JHWOM4CsdZiY8kTYPsDFOLAwASlRnlAXF9HiMT08GFXLmMHIblZJ8yJhsM2+QgraCB0WdxzOQ==",
"dev": true,
"requires": {
"@lerna/batch-packages": "3.13.0",
- "@lerna/command": "3.13.1",
- "@lerna/filter-options": "3.13.0",
- "@lerna/npm-run-script": "3.13.0",
+ "@lerna/command": "3.13.3",
+ "@lerna/filter-options": "3.13.3",
+ "@lerna/npm-run-script": "3.13.3",
"@lerna/output": "3.13.0",
"@lerna/run-parallel-batches": "3.13.0",
"@lerna/timer": "3.13.0",
@@ -2292,18 +2376,18 @@
}
},
"@lerna/version": {
- "version": "3.13.2",
- "resolved": "https://registry.npmjs.org/@lerna/version/-/version-3.13.2.tgz",
- "integrity": "sha512-85AEn6Cx5p1VOejEd5fpTyeDCx6yejSJCgbILkx+gXhLhFg2XpFzLswMd+u71X7RAttWHvhzeKJAw4tWTXDvpQ==",
+ "version": "3.13.4",
+ "resolved": "https://registry.npmjs.org/@lerna/version/-/version-3.13.4.tgz",
+ "integrity": "sha512-pptWUEgN/lUTQZu34+gfH1g4Uhs7TDKRcdZY9A4T9k6RTOwpKC2ceLGiXdeR+ZgQJAey2C4qiE8fo5Z6Rbc6QA==",
"dev": true,
"requires": {
"@lerna/batch-packages": "3.13.0",
- "@lerna/check-working-tree": "3.13.0",
- "@lerna/child-process": "3.13.0",
- "@lerna/collect-updates": "3.13.0",
- "@lerna/command": "3.13.1",
+ "@lerna/check-working-tree": "3.13.3",
+ "@lerna/child-process": "3.13.3",
+ "@lerna/collect-updates": "3.13.3",
+ "@lerna/command": "3.13.3",
"@lerna/conventional-commits": "3.13.0",
- "@lerna/github-client": "3.13.1",
+ "@lerna/github-client": "3.13.3",
"@lerna/output": "3.13.0",
"@lerna/prompt": "3.13.0",
"@lerna/run-lifecycle": "3.13.0",
@@ -2367,15 +2451,32 @@
"dev": true
},
"@octokit/endpoint": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-3.2.3.tgz",
- "integrity": "sha512-yUPCt4vMIOclox13CUxzuKiPJIFo46b/6GhUnUTw5QySczN1L0DtSxgmIZrZV4SAb9EyAqrceoyrWoYVnfF2AA==",
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-4.2.2.tgz",
+ "integrity": "sha512-5IZjkUNhx5q0IRN7Juwf5A+Lu2qAso7ULST7C1P2mbGHePuCOk936Stcl/5GdJpB3ovD8M6/Lv3xra6Mn0IKNQ==",
"dev": true,
"requires": {
"deepmerge": "3.2.0",
- "is-plain-object": "^2.0.4",
+ "is-plain-object": "^3.0.0",
"universal-user-agent": "^2.0.1",
"url-template": "^2.0.8"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
+ "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==",
+ "dev": true,
+ "requires": {
+ "isobject": "^4.0.0"
+ }
+ },
+ "isobject": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
+ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==",
+ "dev": true
+ }
}
},
"@octokit/plugin-enterprise-rest": {
@@ -2385,26 +2486,43 @@
"dev": true
},
"@octokit/request": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/@octokit/request/-/request-2.4.2.tgz",
- "integrity": "sha512-lxVlYYvwGbKSHXfbPk5vxEA8w4zHOH1wobado4a9EfsyD3Cbhuhus1w0Ye9Ro0eMubGO8kNy5d+xNFisM3Tvaw==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-3.0.1.tgz",
+ "integrity": "sha512-aH61OVkMKMofGW/go2x4mJ44X4U/JF8xsiFFictwkZYtz0psE8OPKpsP2TZBZaJoCg2wmeTyEgqGfY+veg0hGQ==",
"dev": true,
"requires": {
- "@octokit/endpoint": "^3.2.0",
+ "@octokit/endpoint": "^4.0.0",
"deprecation": "^1.0.1",
- "is-plain-object": "^2.0.4",
+ "is-plain-object": "^3.0.0",
"node-fetch": "^2.3.0",
"once": "^1.4.0",
"universal-user-agent": "^2.0.1"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
+ "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==",
+ "dev": true,
+ "requires": {
+ "isobject": "^4.0.0"
+ }
+ },
+ "isobject": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
+ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==",
+ "dev": true
+ }
}
},
"@octokit/rest": {
- "version": "16.23.2",
- "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.23.2.tgz",
- "integrity": "sha512-ZxiZMaCuqBG/IsbgNRVfGwYsvBb5DjHuMGjJgOrinT+/b+1j1U7PiGyRkHDJdjTGA6N/PsMC2lP2ZybX9579iA==",
+ "version": "16.25.2",
+ "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.25.2.tgz",
+ "integrity": "sha512-aUSzvY33dz6RMLLmT+1aNc2OvvAmDfdXKaOzFEEBNJjsjckNjWkB2hgGa5plnnbuLPCloVldPuAdm+8REZGLcg==",
"dev": true,
"requires": {
- "@octokit/request": "2.4.2",
+ "@octokit/request": "3.0.1",
"atob-lite": "^2.0.0",
"before-after-hook": "^1.4.0",
"btoa-lite": "^1.0.0",
@@ -2428,9 +2546,9 @@
}
},
"@types/babel__core": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.0.tgz",
- "integrity": "sha512-wJTeJRt7BToFx3USrCDs2BhEi4ijBInTQjOIukj6a/5tEkwpFMVZ+1ppgmE+Q/FQyc5P/VWUbx7I9NELrKruHA==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.1.tgz",
+ "integrity": "sha512-+hjBtgcFPYyCTo0A15+nxrCVJL7aC6Acg87TXd5OW3QhHswdrOLoles+ldL2Uk8q++7yIfl4tURtztccdeeyOw==",
"dev": true,
"requires": {
"@babel/parser": "^7.1.0",
@@ -2510,9 +2628,9 @@
"dev": true
},
"@types/istanbul-lib-coverage": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz",
- "integrity": "sha512-ohkhb9LehJy+PA40rDtGAji61NCgdtKLAlFoYp4cnuuQEswwdK3vz9SOIkkyc3wrk8dzjphQApNs56yyXLStaQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
+ "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==",
"dev": true
},
"@types/jest": {
@@ -2540,15 +2658,15 @@
"dev": true
},
"@types/node": {
- "version": "10.14.1",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.1.tgz",
- "integrity": "sha512-Rymt08vh1GaW4vYB6QP61/5m/CFLGnFZP++bJpWbiNxceNa6RBipDmb413jvtSf/R1gg5a/jQVl2jY4XVRscEA==",
+ "version": "10.14.6",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.6.tgz",
+ "integrity": "sha512-Fvm24+u85lGmV4hT5G++aht2C5I4Z4dYlWZIh62FAfFO/TfzXtPpoLI6I7AuBWkIFqZCnhFOoTT7RjjaIL5Fjg==",
"dev": true
},
"@types/shelljs": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.3.tgz",
- "integrity": "sha512-miY41hqc5SkRlsZDod3heDa4OS9xv8G77EMBQuSpqq86HBn66l7F+f8y9YKm+1PIuwC8QEZVwN8YxOOG7Y67fA==",
+ "version": "0.8.5",
+ "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.5.tgz",
+ "integrity": "sha512-bZgjwIWu9gHCjirKJoOlLzGi5N0QgZ5t7EXEuoqyWCHTuSddURXo3FOBYDyRPNOWzZ6NbkLvZnVkn483Y/tvcQ==",
"dev": true,
"requires": {
"@types/glob": "*",
@@ -2562,11 +2680,54 @@
"dev": true
},
"@types/yargs": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.9.tgz",
- "integrity": "sha512-sCZy4SxP9rN2w30Hlmg5dtdRwgYQfYRiLo9usw8X9cxlf+H4FqM1xX7+sNH7NNKVdbXMJWqva7iyy+fxh/V7fA==",
+ "version": "12.0.12",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.12.tgz",
+ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==",
"dev": true
},
+ "@typescript-eslint/eslint-plugin": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.7.0.tgz",
+ "integrity": "sha512-NUSz1aTlIzzTjFFVFyzrbo8oFjHg3K/M9MzYByqbMCxeFdErhLAcGITVfXzSz+Yvp5OOpMu3HkIttB0NyKl54Q==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/parser": "1.7.0",
+ "@typescript-eslint/typescript-estree": "1.7.0",
+ "eslint-utils": "^1.3.1",
+ "regexpp": "^2.0.1",
+ "requireindex": "^1.2.0",
+ "tsutils": "^3.7.0"
+ }
+ },
+ "@typescript-eslint/parser": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz",
+ "integrity": "sha512-1QFKxs2V940372srm12ovSE683afqc1jB6zF/f8iKhgLz1yoSjYeGHipasao33VXKI+0a/ob9okeogGdKGvvlg==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/typescript-estree": "1.7.0",
+ "eslint-scope": "^4.0.0",
+ "eslint-visitor-keys": "^1.0.0"
+ }
+ },
+ "@typescript-eslint/typescript-estree": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.7.0.tgz",
+ "integrity": "sha512-K5uedUxVmlYrVkFbyV3htDipvLqTE3QMOUQEHYJaKtgzxj6r7c5Ca/DG1tGgFxX+fsbi9nDIrf4arq7Ib7H/Yw==",
+ "dev": true,
+ "requires": {
+ "lodash.unescape": "4.0.1",
+ "semver": "5.5.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "dev": true
+ }
+ }
+ },
"@webassemblyjs/ast": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz",
@@ -2778,13 +2939,13 @@
"dev": true
},
"accepts": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
- "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
+ "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"dev": true,
"requires": {
- "mime-types": "~2.1.18",
- "negotiator": "0.6.1"
+ "mime-types": "~2.1.24",
+ "negotiator": "0.6.2"
}
},
"acorn": {
@@ -2800,9 +2961,9 @@
"dev": true
},
"acorn-globals": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz",
- "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.2.tgz",
+ "integrity": "sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ==",
"dev": true,
"requires": {
"acorn": "^6.0.1",
@@ -2937,6 +3098,12 @@
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"dev": true
},
+ "archy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
+ "dev": true
+ },
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
@@ -3129,9 +3296,9 @@
}
},
"async-each": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz",
- "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
"dev": true
},
"async-limiter": {
@@ -3170,12 +3337,12 @@
"dev": true
},
"axios": {
- "version": "0.17.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz",
- "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=",
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
+ "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"dev": true,
"requires": {
- "follow-redirects": "^1.2.5",
+ "follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
@@ -3366,16 +3533,16 @@
}
},
"babel-jest": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.5.0.tgz",
- "integrity": "sha512-0fKCXyRwxFTJL0UXDJiT2xYxO9Lu2vBd9n+cC+eDjESzcVG3s2DRGAxbzJX21fceB1WYoBjAh8pQ83dKcl003g==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.7.1.tgz",
+ "integrity": "sha512-GPnLqfk8Mtt0i4OemjWkChi73A3ALs4w2/QbG64uAj8b5mmwzxc7jbJVRZt8NJkxi6FopVHog9S3xX6UJKb2qg==",
"dev": true,
"requires": {
- "@jest/transform": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/transform": "^24.7.1",
+ "@jest/types": "^24.7.0",
"@types/babel__core": "^7.1.0",
"babel-plugin-istanbul": "^5.1.0",
- "babel-preset-jest": "^24.3.0",
+ "babel-preset-jest": "^24.6.0",
"chalk": "^2.4.2",
"slash": "^2.0.0"
}
@@ -3399,20 +3566,20 @@
}
},
"babel-plugin-istanbul": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz",
- "integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==",
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.4.tgz",
+ "integrity": "sha512-dySz4VJMH+dpndj0wjJ8JPs/7i1TdSPb1nRrn56/92pKOF9VKC1FMFJmMXjzlGGusnCAqujP6PBCiKq0sVA+YQ==",
"dev": true,
"requires": {
"find-up": "^3.0.0",
- "istanbul-lib-instrument": "^3.0.0",
- "test-exclude": "^5.0.0"
+ "istanbul-lib-instrument": "^3.3.0",
+ "test-exclude": "^5.2.3"
}
},
"babel-plugin-jest-hoist": {
- "version": "24.3.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.3.0.tgz",
- "integrity": "sha512-nWh4N1mVH55Tzhx2isvUN5ebM5CDUvIpXPZYMRazQughie/EqGnbR+czzoQlhUmJG9pPJmYDRhvocotb2THl1w==",
+ "version": "24.6.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz",
+ "integrity": "sha512-3pKNH6hMt9SbOv0F3WVmy5CWQ4uogS3k0GY5XLyQHJ9EGpAT9XWkFd2ZiXXtkwFHdAHa5j7w7kfxSP5lAIwu7w==",
"dev": true,
"requires": {
"@types/babel__traverse": "^7.0.6"
@@ -3769,6 +3936,12 @@
"regenerator-runtime": "^0.10.5"
},
"dependencies": {
+ "core-js": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
+ "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
+ "dev": true
+ },
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
@@ -3828,13 +4001,13 @@
}
},
"babel-preset-jest": {
- "version": "24.3.0",
- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.3.0.tgz",
- "integrity": "sha512-VGTV2QYBa/Kn3WCOKdfS31j9qomaXSgJqi65B6o05/1GsJyj9LVhSljM9ro4S+IBGj/ENhNBuH9bpqzztKAQSw==",
+ "version": "24.6.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz",
+ "integrity": "sha512-pdZqLEdmy1ZK5kyRUfvBb2IfTPb2BUvIJczlPspS8fWmBQslNNDBqVfh7BW5leOVJMDZKzjD8XEyABTk6gQ5yw==",
"dev": true,
"requires": {
"@babel/plugin-syntax-object-rest-spread": "^7.0.0",
- "babel-plugin-jest-hoist": "^24.3.0"
+ "babel-plugin-jest-hoist": "^24.6.0"
}
},
"babel-runtime": {
@@ -3845,6 +4018,14 @@
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
+ },
+ "dependencies": {
+ "core-js": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
+ "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
+ "dev": true
+ }
}
},
"babel-template": {
@@ -4000,9 +4181,9 @@
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
"binary-extensions": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz",
- "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==",
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
"dev": true
},
"bl": {
@@ -4042,9 +4223,9 @@
}
},
"bluebird": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz",
- "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==",
+ "version": "3.5.4",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz",
+ "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==",
"dev": true
},
"bn.js": {
@@ -4152,13 +4333,13 @@
"dev": true
},
"brotli-size": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-0.0.1.tgz",
- "integrity": "sha1-jBruoBzSLzWbBIlRGFvVOf8Mgp8=",
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-0.1.0.tgz",
+ "integrity": "sha512-5ny7BNvpe2TSmdafF1T9dnFYp3AIrJ8qJt29K0DQJzORlK38LBim/CmlY26JtreV6SWmXza7Oa+9m61SzvxR0Q==",
"dev": true,
"requires": {
"duplexer": "^0.1.1",
- "iltorb": "^1.0.9"
+ "iltorb": "^2.4.3"
}
},
"browser-process-hrtime": {
@@ -4256,14 +4437,14 @@
}
},
"browserslist": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.2.tgz",
- "integrity": "sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg==",
+ "version": "4.5.6",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz",
+ "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30000939",
- "electron-to-chromium": "^1.3.113",
- "node-releases": "^1.1.8"
+ "caniuse-lite": "^1.0.30000963",
+ "electron-to-chromium": "^1.3.127",
+ "node-releases": "^1.1.17"
}
},
"bs-logger": {
@@ -4341,12 +4522,6 @@
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"dev": true
},
- "builtin-modules": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
- "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
- "dev": true
- },
"builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
@@ -4360,21 +4535,37 @@
"dev": true
},
"bundlesize": {
- "version": "0.17.1",
- "resolved": "https://registry.npmjs.org/bundlesize/-/bundlesize-0.17.1.tgz",
- "integrity": "sha512-p5I5Tpoug9aOVGg4kQETMJ8xquY66mX9XI19kXkkAFnmDhDXwSF+1jq1OjBGz7h27TAulM3k2wLEJPvickTt0A==",
+ "version": "0.17.2",
+ "resolved": "https://registry.npmjs.org/bundlesize/-/bundlesize-0.17.2.tgz",
+ "integrity": "sha512-cJAZ6wvs6IHQCnUn9kTme4GL+ahoICjcS0QPcGTj61Hl4bCc8wKkkVLUote4k/1yxa0+kUIrIo9wyNJ+XIciEw==",
"dev": true,
"requires": {
- "axios": "^0.17.0",
- "brotli-size": "0.0.1",
- "bytes": "^3.0.0",
+ "axios": "^0.18.0",
+ "brotli-size": "0.1.0",
+ "bytes": "^3.1.0",
"ci-env": "^1.4.0",
- "commander": "^2.11.0",
+ "commander": "^2.20.0",
"github-build": "^1.2.0",
- "glob": "^7.1.2",
+ "glob": "^7.1.4",
"gzip-size": "^4.0.0",
"prettycli": "^1.4.3",
"read-pkg-up": "^3.0.0"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
+ "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ }
}
},
"byline": {
@@ -4456,6 +4647,31 @@
"integrity": "sha512-xGBpPqoBvn3unBW7oxgb8aJn42K0m9m1/wyjmazah10Fq7bROGG3kRAE6OIyr3U3PIJUqGuebhCEdMk9OKJG0A==",
"dev": true
},
+ "caching-transform": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz",
+ "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==",
+ "dev": true,
+ "requires": {
+ "hasha": "^3.0.0",
+ "make-dir": "^2.0.0",
+ "package-hash": "^3.0.0",
+ "write-file-atomic": "^2.4.2"
+ },
+ "dependencies": {
+ "write-file-atomic": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz",
+ "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.2"
+ }
+ }
+ }
+ },
"call-me-maybe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
@@ -4489,15 +4705,15 @@
}
},
"callsites": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz",
- "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true
},
"camelcase": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz",
- "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ=="
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"camelcase-keys": {
"version": "4.2.0",
@@ -4519,9 +4735,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30000948",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000948.tgz",
- "integrity": "sha512-Lw4y7oz1X5MOMZm+2IFaSISqVVQvUuD+ZUSfeYK/SlYiMjkHN/eJ2PDfJehW5NA6JjrxYSSnIWfwjeObQMEjFQ==",
+ "version": "1.0.30000966",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000966.tgz",
+ "integrity": "sha512-qqLQ/uYrpZmFhPY96VuBkMEo8NhVFBZ9y/Bh+KnvGzGJ5I8hvpIaWlF2pw5gqe4PLAL+ZjsPgMOvoXSpX21Keg==",
"dev": true
},
"capture-exit": {
@@ -4556,9 +4772,9 @@
"dev": true
},
"chokidar": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz",
- "integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==",
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
+ "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
"dev": true,
"requires": {
"anymatch": "^2.0.0",
@@ -4572,13 +4788,13 @@
"normalize-path": "^3.0.0",
"path-is-absolute": "^1.0.0",
"readdirp": "^2.2.1",
- "upath": "^1.1.0"
+ "upath": "^1.1.1"
},
"dependencies": {
"is-glob": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
- "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
"requires": {
"is-extglob": "^2.1.1"
@@ -4608,9 +4824,9 @@
}
},
"ci-env": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/ci-env/-/ci-env-1.7.0.tgz",
- "integrity": "sha512-ifHfV5JmACoTnoPxwjKjUUAekL1UCKZ9EU27GaaSkLVopkV3H1w0eYIpY+aAiX31SVEtTrZFMS94EFETSj0vIA==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/ci-env/-/ci-env-1.8.0.tgz",
+ "integrity": "sha512-OKShe5VZpuvVfJhiadgix/+lnOVJIcNLdLOrUwbllNfvHPAQzJxuNjefH3xfw3yHxAV8CDbLqXT9C4ygDtg8ow==",
"dev": true
},
"ci-info": {
@@ -4762,9 +4978,9 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"codecov": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.2.0.tgz",
- "integrity": "sha512-3NJvNARXxilqnqVfgzDHyVrF4oeVgaYW1c1O6Oi5mn93exE7HTSSFNiYdwojWW6IwrCZABJ8crpNbKoo9aUHQw==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.3.0.tgz",
+ "integrity": "sha512-S70c3Eg9SixumOvxaKE/yKUxb9ihu/uebD9iPO2IR73IdP4i6ZzjXEULj3d0HeyWPr0DqBfDkjNBWxURjVO5hw==",
"dev": true,
"requires": {
"argv": "^0.0.2",
@@ -4833,15 +5049,15 @@
}
},
"commander": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
- "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
+ "version": "2.20.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true
},
"commitizen": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-3.0.7.tgz",
- "integrity": "sha512-2j8E8Ik1pe1Jqy1gQ1SzEZDJCdr0ItjvhbXmDqhz186Q3ukRoQHMBkmCqmsFYmfDmchBkrOXV1239mTeXEPJKQ==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-3.1.1.tgz",
+ "integrity": "sha512-n5pnG8sNM5a3dS3Kkh3rYr+hFdPWZlqV6pfz6KGLmWV/gsIiTqAwhTgFKkcF/paKUpfIMp0x4YZlD0xLBNTW9g==",
"dev": true,
"requires": {
"cachedir": "2.1.0",
@@ -4993,17 +5209,17 @@
"dev": true
},
"component-emitter": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
- "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"compressible": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz",
- "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==",
+ "version": "2.0.17",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz",
+ "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==",
"dev": true,
"requires": {
- "mime-db": ">= 1.38.0 < 2"
+ "mime-db": ">= 1.40.0 < 2"
}
},
"compression": {
@@ -5114,21 +5330,22 @@
"dev": true
},
"conventional-changelog": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.0.6.tgz",
- "integrity": "sha512-1b96x3G67lDKakRvMm+VvYGwgRk+C8aapHKL5iZ/TJzzD/RuyGA2diHNEsR+uPHmQ7/A4Ts7j6N+VNqUoOfksg==",
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.4.tgz",
+ "integrity": "sha512-uMeTSzEb2oKFlL00Oh9j3+00PFq1MNneLzyy0TBftxo4PFrs7OiaRJXmXtEgSvJDdkc0RSd6ch2N+yTxPagZ0A==",
"dev": true,
"requires": {
"conventional-changelog-angular": "^5.0.3",
"conventional-changelog-atom": "^2.0.1",
"conventional-changelog-codemirror": "^2.0.1",
- "conventional-changelog-core": "^3.1.6",
+ "conventional-changelog-conventionalcommits": "^1.1.2",
+ "conventional-changelog-core": "^3.2.2",
"conventional-changelog-ember": "^2.0.2",
- "conventional-changelog-eslint": "^3.0.1",
+ "conventional-changelog-eslint": "^3.0.2",
"conventional-changelog-express": "^2.0.1",
"conventional-changelog-jquery": "^3.0.4",
"conventional-changelog-jshint": "^2.0.1",
- "conventional-changelog-preset-loader": "^2.0.2"
+ "conventional-changelog-preset-loader": "^2.1.1"
},
"dependencies": {
"conventional-changelog-angular": {
@@ -5163,13 +5380,13 @@
}
},
"conventional-changelog-cli": {
- "version": "2.0.12",
- "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.12.tgz",
- "integrity": "sha512-6wh9W5Gpr9DM40E8cFi0qa6JotVm4Jq+suksuqgKnm544H8ZXsRhgGNXShDASOteY9brv9fX8/+fE/QL1wHqbA==",
+ "version": "2.0.17",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.17.tgz",
+ "integrity": "sha512-IQUS08TTrLxAd0Le3THPz8xFFe1kVmSBOcnfe8RGpi+io3ALnMT4uw0snmP3Cb9lgnHXg0NcjQyVsE+jJmHtrw==",
"dev": true,
"requires": {
"add-stream": "^1.0.0",
- "conventional-changelog": "^3.0.6",
+ "conventional-changelog": "^3.1.4",
"lodash": "^4.2.1",
"meow": "^4.0.0",
"tempfile": "^1.1.1"
@@ -5203,14 +5420,24 @@
"q": "^1.5.1"
}
},
+ "conventional-changelog-conventionalcommits": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-1.1.2.tgz",
+ "integrity": "sha512-t8VyibJHGrtsDwSHjgpW9v7oBbqDGQooCMo/a2rc0z5cousV5O11palcSPpyshEVWVijxPtzBNG02EQkMDJ8CA==",
+ "dev": true,
+ "requires": {
+ "compare-func": "^1.3.1",
+ "q": "^1.5.1"
+ }
+ },
"conventional-changelog-core": {
- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.6.tgz",
- "integrity": "sha512-5teTAZOtJ4HLR6384h50nPAaKdDr+IaU0rnD2Gg2C3MS7hKsEPH8pZxrDNqam9eOSPQg9tET6uZY79zzgSz+ig==",
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.2.tgz",
+ "integrity": "sha512-cssjAKajxaOX5LNAJLB+UOcoWjAIBvXtDMedv/58G+YEmAXMNfC16mmPl0JDOuVJVfIqM0nqQiZ8UCm8IXbE0g==",
"dev": true,
"requires": {
- "conventional-changelog-writer": "^4.0.3",
- "conventional-commits-parser": "^3.0.1",
+ "conventional-changelog-writer": "^4.0.5",
+ "conventional-commits-parser": "^3.0.2",
"dateformat": "^3.0.0",
"get-pkg-repo": "^1.0.0",
"git-raw-commits": "2.0.0",
@@ -5221,13 +5448,13 @@
"q": "^1.5.1",
"read-pkg": "^3.0.0",
"read-pkg-up": "^3.0.0",
- "through2": "^2.0.0"
+ "through2": "^3.0.0"
},
"dependencies": {
"conventional-commits-parser": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz",
- "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.2.tgz",
+ "integrity": "sha512-y5eqgaKR0F6xsBNVSQ/5cI5qIF3MojddSUi1vKIggRkqUTbkqFKH9P5YX/AT1BVZp9DtSzBTIkvjyVLotLsVog==",
"dev": true,
"requires": {
"JSONStream": "^1.0.4",
@@ -5235,7 +5462,7 @@
"lodash": "^4.2.1",
"meow": "^4.0.0",
"split2": "^2.0.0",
- "through2": "^2.0.0",
+ "through2": "^3.0.0",
"trim-off-newlines": "^1.0.0"
}
},
@@ -5250,9 +5477,36 @@
"meow": "^4.0.0",
"split2": "^2.0.0",
"through2": "^2.0.0"
- }
- },
- "meow": {
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "through2": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~2.3.6",
+ "xtend": "~4.0.1"
+ }
+ }
+ }
+ },
+ "meow": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
"integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
@@ -5268,6 +5522,15 @@
"redent": "^2.0.0",
"trim-newlines": "^2.0.0"
}
+ },
+ "through2": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
+ "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "2 || 3"
+ }
}
}
},
@@ -5281,9 +5544,9 @@
}
},
"conventional-changelog-eslint": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.1.tgz",
- "integrity": "sha512-yH3+bYrtvgKxSFChUBQnKNh9/U9kN2JElYBm253VpYs5wXhPHVc9ENcuVGWijh24nnOkei7wEJmnmUzgZ4ok+A==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.2.tgz",
+ "integrity": "sha512-Yi7tOnxjZLXlCYBHArbIAm8vZ68QUSygFS7PgumPRiEk+9NPUeucy5Wg9AAyKoBprSV3o6P7Oghh4IZSLtKCvQ==",
"dev": true,
"requires": {
"q": "^1.5.1"
@@ -5318,19 +5581,19 @@
}
},
"conventional-changelog-preset-loader": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz",
- "integrity": "sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.1.1.tgz",
+ "integrity": "sha512-K4avzGMLm5Xw0Ek/6eE3vdOXkqnpf9ydb68XYmCc16cJ99XMMbc2oaNMuPwAsxVK6CC1yA4/I90EhmWNj0Q6HA==",
"dev": true
},
"conventional-changelog-writer": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.3.tgz",
- "integrity": "sha512-bIlpSiQtQZ1+nDVHEEh798Erj2jhN/wEjyw9sfxY9es6h7pREE5BNJjfv0hXGH/FTrAsEpHUq4xzK99eePpwuA==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.5.tgz",
+ "integrity": "sha512-g/Myp4MaJ1A+f7Ai+SnVhkcWtaHk6flw0SYN7A+vQ+MTu0+gSovQWs4Pg4NtcNUcIztYQ9YHsoxHP+GGQplI7Q==",
"dev": true,
"requires": {
"compare-func": "^1.3.1",
- "conventional-commits-filter": "^2.0.1",
+ "conventional-commits-filter": "^2.0.2",
"dateformat": "^3.0.0",
"handlebars": "^4.1.0",
"json-stringify-safe": "^5.0.1",
@@ -5338,7 +5601,7 @@
"meow": "^4.0.0",
"semver": "^5.5.0",
"split": "^1.0.0",
- "through2": "^2.0.0"
+ "through2": "^3.0.0"
},
"dependencies": {
"meow": {
@@ -5357,22 +5620,31 @@
"redent": "^2.0.0",
"trim-newlines": "^2.0.0"
}
+ },
+ "through2": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
+ "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "2 || 3"
+ }
}
}
},
"conventional-commit-types": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz",
- "integrity": "sha1-XblXOdbCEqy+e29lahG5QLqmiUY=",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-2.1.1.tgz",
+ "integrity": "sha512-0Ts+fEdmjqYDOQ1yZ+LNgdSPO335XZw9qC10M7CxtLP3nIMGmeMhmkM8Taffa4+MXN13bRPlp0CtH+QfOzKTzw==",
"dev": true
},
"conventional-commits-filter": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz",
- "integrity": "sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz",
+ "integrity": "sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ==",
"dev": true,
"requires": {
- "is-subset": "^0.1.1",
+ "lodash.ismatch": "^4.4.0",
"modify-values": "^1.0.0"
}
},
@@ -5411,25 +5683,37 @@
}
},
"conventional-recommended-bump": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-4.0.4.tgz",
- "integrity": "sha512-9mY5Yoblq+ZMqJpBzgS+RpSq+SUfP2miOR3H/NR9drGf08WCrY9B6HAGJZEm6+ThsVP917VHAahSOjM6k1vhPg==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-4.1.1.tgz",
+ "integrity": "sha512-JT2vKfSP9kR18RXXf55BRY1O3AHG8FPg5btP3l7LYfcWJsiXI6MCf30DepQ98E8Qhowvgv7a8iev0J1bEDkTFA==",
"dev": true,
"requires": {
- "concat-stream": "^1.6.0",
- "conventional-changelog-preset-loader": "^2.0.2",
- "conventional-commits-filter": "^2.0.1",
- "conventional-commits-parser": "^3.0.1",
+ "concat-stream": "^2.0.0",
+ "conventional-changelog-preset-loader": "^2.1.1",
+ "conventional-commits-filter": "^2.0.2",
+ "conventional-commits-parser": "^3.0.2",
"git-raw-commits": "2.0.0",
"git-semver-tags": "^2.0.2",
"meow": "^4.0.0",
"q": "^1.5.1"
},
"dependencies": {
+ "concat-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
+ "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
+ "dev": true,
+ "requires": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.0.2",
+ "typedarray": "^0.0.6"
+ }
+ },
"conventional-commits-parser": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz",
- "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.2.tgz",
+ "integrity": "sha512-y5eqgaKR0F6xsBNVSQ/5cI5qIF3MojddSUi1vKIggRkqUTbkqFKH9P5YX/AT1BVZp9DtSzBTIkvjyVLotLsVog==",
"dev": true,
"requires": {
"JSONStream": "^1.0.4",
@@ -5437,7 +5721,7 @@
"lodash": "^4.2.1",
"meow": "^4.0.0",
"split2": "^2.0.0",
- "through2": "^2.0.0",
+ "through2": "^3.0.0",
"trim-off-newlines": "^1.0.0"
}
},
@@ -5452,6 +5736,33 @@
"meow": "^4.0.0",
"split2": "^2.0.0",
"through2": "^2.0.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "through2": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~2.3.6",
+ "xtend": "~4.0.1"
+ }
+ }
}
},
"meow": {
@@ -5470,6 +5781,15 @@
"redent": "^2.0.0",
"trim-newlines": "^2.0.0"
}
+ },
+ "through2": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
+ "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "2 || 3"
+ }
}
}
},
@@ -5514,9 +5834,35 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-js": {
- "version": "2.6.5",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
- "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz",
+ "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==",
+ "dev": true
+ },
+ "core-js-compat": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz",
+ "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.5.4",
+ "core-js": "3.0.1",
+ "core-js-pure": "3.0.1",
+ "semver": "^6.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
+ "dev": true
+ }
+ }
+ },
+ "core-js-pure": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz",
+ "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==",
"dev": true
},
"core-util-is": {
@@ -5536,6 +5882,19 @@
"require-from-string": "^2.0.1"
}
},
+ "cp-file": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz",
+ "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "make-dir": "^2.0.0",
+ "nested-error-stacks": "^2.0.0",
+ "pify": "^4.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
"create-ecdh": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
@@ -5611,9 +5970,9 @@
"dev": true
},
"cssstyle": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz",
- "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz",
+ "integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==",
"dev": true,
"requires": {
"cssom": "0.3.x"
@@ -5648,14 +6007,15 @@
}
},
"cz-customizable": {
- "version": "5.5.3",
- "resolved": "https://registry.npmjs.org/cz-customizable/-/cz-customizable-5.5.3.tgz",
- "integrity": "sha512-5OUgx+5xjKgysQUs/fxOSGrrl3YWUeMRik2SvtX8mKS6+DaohWloftKFkb84go6eoOYtiuBDzxm1j5N7I4tQMg==",
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/cz-customizable/-/cz-customizable-5.10.0.tgz",
+ "integrity": "sha512-8fzzmoXXAg3ydu5Uhx4g+XwgWNdjmvm/zycKzZejnhQn8Z+kvnqKwXhwm9thmFE67MIXDMS7n+A1wuMAEplddQ==",
"dev": true,
"requires": {
"editor": "1.0.0",
"find-config": "^1.0.0",
"inquirer": "^6.2.2",
+ "lodash": "^4.17.11",
"temp": "^0.9.0",
"word-wrap": "^1.2.3"
},
@@ -5697,9 +6057,9 @@
}
},
"inquirer": {
- "version": "6.2.2",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz",
- "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
+ "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
"dev": true,
"requires": {
"ansi-escapes": "^3.2.0",
@@ -5713,7 +6073,7 @@
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
"string-width": "^2.1.0",
- "strip-ansi": "^5.0.0",
+ "strip-ansi": "^5.1.0",
"through": "^2.3.6"
}
},
@@ -5758,9 +6118,9 @@
}
},
"strip-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
- "integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -5984,11 +6344,12 @@
}
},
"del": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/del/-/del-4.1.0.tgz",
- "integrity": "sha512-C4kvKNlYrwXhKxz97BuohF8YoGgQ23Xm9lvoHmgT7JaPGprSEjk3+XFled74Yt/x0ZABUHg2D67covzAPUKx5Q==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz",
+ "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==",
"dev": true,
"requires": {
+ "@types/glob": "^7.1.1",
"globby": "^6.1.0",
"is-path-cwd": "^2.0.0",
"is-path-in-cwd": "^2.0.0",
@@ -6023,12 +6384,6 @@
"resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
"dev": true
- },
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
}
}
},
@@ -6084,9 +6439,9 @@
"dev": true
},
"detect-libc": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-0.2.0.tgz",
- "integrity": "sha1-R/31ZzSKF+wl/L8LnkRjSKdvn7U=",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
"dev": true
},
"detect-newline": {
@@ -6266,9 +6621,9 @@
"dev": true
},
"electron-to-chromium": {
- "version": "1.3.116",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.116.tgz",
- "integrity": "sha512-NKwKAXzur5vFCZYBHpdWjTMO8QptNLNP80nItkSIgUOapPAo9Uia+RvkCaZJtO7fhQaVElSvBPWEc2ku6cKsPA==",
+ "version": "1.3.131",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.131.tgz",
+ "integrity": "sha512-NSO4jLeyGLWrT4mzzfYX8vt1MYCoMI5LxSYAjt0H9+LF/14JyiKJSyyjA6AJTxflZlEM5v3QU33F0ohbPMCAPg==",
"dev": true
},
"elegant-spinner": {
@@ -6384,6 +6739,12 @@
"is-symbol": "^1.0.2"
}
},
+ "es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "dev": true
+ },
"es6-promise": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz",
@@ -6439,9 +6800,9 @@
}
},
"eslint": {
- "version": "5.15.2",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.2.tgz",
- "integrity": "sha512-I8VM4SILpMwUvsRt83bQVwIRQAJ2iPMXun1FVZ/lV1OHklH2tJaXqoDnNzdiFc6bnCtGKXvQIQNP3kj1eMskSw==",
+ "version": "5.16.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
+ "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -6464,7 +6825,7 @@
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"inquirer": "^6.2.2",
- "js-yaml": "^3.12.0",
+ "js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
@@ -6528,9 +6889,9 @@
}
},
"inquirer": {
- "version": "6.2.2",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz",
- "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
+ "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
"dev": true,
"requires": {
"ansi-escapes": "^3.2.0",
@@ -6544,14 +6905,14 @@
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
"string-width": "^2.1.0",
- "strip-ansi": "^5.0.0",
+ "strip-ansi": "^5.1.0",
"through": "^2.3.6"
},
"dependencies": {
"strip-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
- "integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -6607,6 +6968,23 @@
}
}
},
+ "eslint-config-prettier": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-4.2.0.tgz",
+ "integrity": "sha512-y0uWc/FRfrHhpPZCYflWC8aE0KRJRY04rdZVfl8cL3sEZmOYyaBdhdlQPjKZBnuRMyLVK+JUZr7HaZFClQiH4w==",
+ "dev": true,
+ "requires": {
+ "get-stdin": "^6.0.0"
+ },
+ "dependencies": {
+ "get-stdin": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
+ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
+ "dev": true
+ }
+ }
+ },
"eslint-plugin-es": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz",
@@ -6632,9 +7010,9 @@
},
"dependencies": {
"ignore": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.0.5.tgz",
- "integrity": "sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.1.tgz",
+ "integrity": "sha512-DWjnQIFLenVrwyRCKZT+7a7/U4Cqgar4WG8V++K3hw+lrW1hc/SIwdiGmtxKCVACmHULTuGeBbHJmbwW7/sAvA==",
"dev": true
}
}
@@ -6662,9 +7040,9 @@
"dev": true
},
"esm": {
- "version": "3.2.18",
- "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.18.tgz",
- "integrity": "sha512-1UENjnnI37UDp7KuOqKYjfqdaMim06eBWnDv37smaxTIzDl0ZWnlgoXwsVwD9+Lidw+q/f1gUf2diVMDCycoVw==",
+ "version": "3.2.22",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz",
+ "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==",
"dev": true
},
"espree": {
@@ -6721,9 +7099,9 @@
"dev": true
},
"eventemitter3": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
- "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
+ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==",
"dev": true
},
"events": {
@@ -6816,9 +7194,9 @@
}
},
"expand-template": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz",
- "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
"dev": true
},
"expand-tilde": {
@@ -6830,16 +7208,16 @@
}
},
"expect": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/expect/-/expect-24.5.0.tgz",
- "integrity": "sha512-p2Gmc0CLxOgkyA93ySWmHFYHUPFIHG6XZ06l7WArWAsrqYVaVEkOU5NtT5i68KUyGKbkQgDCkiT65bWmdoL6Bw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/expect/-/expect-24.7.1.tgz",
+ "integrity": "sha512-mGfvMTPduksV3xoI0xur56pQsg2vJjNf5+a+bXOjqCkiCBbmCayrBbHS/75y9K430cfqyocPr2ZjiNiRx4SRKw==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"ansi-styles": "^3.2.0",
"jest-get-type": "^24.3.0",
- "jest-matcher-utils": "^24.5.0",
- "jest-message-util": "^24.5.0",
+ "jest-matcher-utils": "^24.7.0",
+ "jest-message-util": "^24.7.1",
"jest-regex-util": "^24.3.0"
}
},
@@ -7123,68 +7501,14 @@
}
},
"find-cache-dir": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
- "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+ "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
"dev": true,
"requires": {
"commondir": "^1.0.1",
- "make-dir": "^1.0.0",
- "pkg-dir": "^2.0.0"
- },
- "dependencies": {
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
- },
- "pkg-dir": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
- "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
- "dev": true,
- "requires": {
- "find-up": "^2.1.0"
- }
- }
+ "make-dir": "^2.0.0",
+ "pkg-dir": "^3.0.0"
}
},
"find-config": {
@@ -7219,9 +7543,9 @@
}
},
"is-glob": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
- "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
"requires": {
"is-extglob": "^2.1.1"
@@ -7335,6 +7659,28 @@
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
},
+ "foreground-child": {
+ "version": "1.5.6",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
+ "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^4",
+ "signal-exit": "^3.0.0"
+ },
+ "dependencies": {
+ "cross-spawn": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
+ "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^4.0.1",
+ "which": "^1.2.9"
+ }
+ }
+ }
+ },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -7461,14 +7807,14 @@
"dev": true
},
"fsevents": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz",
- "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==",
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
+ "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
"dev": true,
"optional": true,
"requires": {
- "nan": "^2.9.2",
- "node-pre-gyp": "^0.10.0"
+ "nan": "^2.12.1",
+ "node-pre-gyp": "^0.12.0"
},
"dependencies": {
"abbrev": {
@@ -7546,12 +7892,12 @@
"optional": true
},
"debug": {
- "version": "2.6.9",
+ "version": "4.1.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
- "ms": "2.0.0"
+ "ms": "^2.1.1"
}
},
"deep-extend": {
@@ -7722,24 +8068,24 @@
}
},
"ms": {
- "version": "2.0.0",
+ "version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
},
"needle": {
- "version": "2.2.4",
+ "version": "2.3.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
- "debug": "^2.1.2",
+ "debug": "^4.1.0",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
}
},
"node-pre-gyp": {
- "version": "0.10.3",
+ "version": "0.12.0",
"bundled": true,
"dev": true,
"optional": true,
@@ -7767,13 +8113,13 @@
}
},
"npm-bundled": {
- "version": "1.0.5",
+ "version": "1.0.6",
"bundled": true,
"dev": true,
"optional": true
},
"npm-packlist": {
- "version": "1.2.0",
+ "version": "1.4.1",
"bundled": true,
"dev": true,
"optional": true,
@@ -7912,7 +8258,7 @@
"optional": true
},
"semver": {
- "version": "5.6.0",
+ "version": "5.7.0",
"bundled": true,
"dev": true,
"optional": true
@@ -8523,9 +8869,9 @@
}
},
"globals": {
- "version": "11.11.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz",
- "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==",
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true
},
"globby": {
@@ -8549,6 +8895,12 @@
"integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
"dev": true
},
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
@@ -8576,6 +8928,14 @@
"requires": {
"duplexer": "^0.1.1",
"pify": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"handle-thing": {
@@ -8585,12 +8945,12 @@
"dev": true
},
"handlebars": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz",
- "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
+ "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
"dev": true,
"requires": {
- "async": "^2.5.0",
+ "neo-async": "^2.6.0",
"optimist": "^0.6.1",
"source-map": "^0.6.1",
"uglify-js": "^3.1.4"
@@ -8712,6 +9072,15 @@
"minimalistic-assert": "^1.0.1"
}
},
+ "hasha": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz",
+ "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=",
+ "dev": true,
+ "requires": {
+ "is-stream": "^1.0.1"
+ }
+ },
"highlight.js": {
"version": "9.15.6",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz",
@@ -8729,12 +9098,6 @@
"minimalistic-crypto-utils": "^1.0.1"
}
},
- "home-or-tmp": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-3.0.0.tgz",
- "integrity": "sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs=",
- "dev": true
- },
"homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
@@ -8950,15 +9313,14 @@
},
"dependencies": {
"cosmiconfig": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.1.0.tgz",
- "integrity": "sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz",
+ "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==",
"dev": true,
"requires": {
"import-fresh": "^2.0.0",
"is-directory": "^0.3.1",
- "js-yaml": "^3.9.0",
- "lodash.get": "^4.4.2",
+ "js-yaml": "^3.13.0",
"parse-json": "^4.0.0"
}
},
@@ -8978,6 +9340,12 @@
"resolve-from": "^3.0.0"
}
},
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
"read-pkg": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz",
@@ -9001,9 +9369,9 @@
}
},
"ieee754": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
- "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
+ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
"dev": true
},
"iferr": {
@@ -9028,15 +9396,16 @@
}
},
"iltorb": {
- "version": "1.3.10",
- "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz",
- "integrity": "sha512-nyB4+ru1u8CQqQ6w7YjasboKN3NQTN8GH/V/eEssNRKhW6UbdxdWhB9fJ5EEdjJfezKY0qPrcwLyIcgjL8hHxA==",
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-2.4.3.tgz",
+ "integrity": "sha512-cr/kC07Cf9sW3TWH7yUxV2QkNjby4LMCsXGmxPCQs5x//QzTpF3GLPNY7L66G+DkNGaTRCgY+vYZ+dyAcuDOnQ==",
"dev": true,
"requires": {
- "detect-libc": "^0.2.0",
- "nan": "^2.6.2",
- "node-gyp": "^3.6.2",
- "prebuild-install": "^2.3.0"
+ "detect-libc": "^1.0.3",
+ "nan": "^2.13.2",
+ "npmlog": "^4.1.2",
+ "prebuild-install": "^5.3.0",
+ "which-pm-runs": "^1.0.0"
}
},
"import-fresh": {
@@ -9211,14 +9580,6 @@
"requires": {
"default-gateway": "^4.2.0",
"ipaddr.js": "^1.9.0"
- },
- "dependencies": {
- "ipaddr.js": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
- "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==",
- "dev": true
- }
}
},
"interpret": {
@@ -9253,9 +9614,9 @@
"dev": true
},
"ipaddr.js": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
- "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
+ "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==",
"dev": true
},
"is-accessor-descriptor": {
@@ -9383,9 +9744,9 @@
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"is-generator-fn": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.0.0.tgz",
- "integrity": "sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
+ "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
"dev": true
},
"is-glob": {
@@ -9430,27 +9791,27 @@
}
},
"is-path-cwd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.0.0.tgz",
- "integrity": "sha512-m5dHHzpOXEiv18JEORttBO64UgTEypx99vCxQLjbBvGhOJxnTNglYoFXxwo6AbsQb79sqqycQEHv2hWkHZAijA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.1.0.tgz",
+ "integrity": "sha512-Sc5j3/YnM8tDeyCsVeKlm/0p95075DyLmDEIkSgQ7mXkrOX+uTCtmQFm0CYzVyJwcCCmO3k8qfJt17SxQwB5Zw==",
"dev": true
},
"is-path-in-cwd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.0.0.tgz",
- "integrity": "sha512-6Vz5Gc9s/sDA3JBVu0FzWufm8xaBsqy1zn8Q6gmvGP6nSDMw78aS4poBNeatWjaRpTpxxLn1WOndAiOlk+qY8A==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz",
+ "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==",
"dev": true,
"requires": {
- "is-path-inside": "^1.0.0"
+ "is-path-inside": "^2.1.0"
}
},
"is-path-inside": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
- "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz",
+ "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==",
"dev": true,
"requires": {
- "path-is-inside": "^1.0.1"
+ "path-is-inside": "^1.0.2"
}
},
"is-plain-obj": {
@@ -9508,12 +9869,6 @@
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
- "is-subset": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz",
- "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=",
- "dev": true
- },
"is-symbol": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
@@ -9577,65 +9932,73 @@
"dev": true
},
"istanbul-api": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz",
- "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==",
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.6.tgz",
+ "integrity": "sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA==",
"dev": true,
"requires": {
- "async": "^2.6.1",
- "compare-versions": "^3.2.1",
+ "async": "^2.6.2",
+ "compare-versions": "^3.4.0",
"fileset": "^2.0.3",
- "istanbul-lib-coverage": "^2.0.3",
- "istanbul-lib-hook": "^2.0.3",
- "istanbul-lib-instrument": "^3.1.0",
- "istanbul-lib-report": "^2.0.4",
- "istanbul-lib-source-maps": "^3.0.2",
- "istanbul-reports": "^2.1.1",
- "js-yaml": "^3.12.0",
- "make-dir": "^1.3.0",
+ "istanbul-lib-coverage": "^2.0.5",
+ "istanbul-lib-hook": "^2.0.7",
+ "istanbul-lib-instrument": "^3.3.0",
+ "istanbul-lib-report": "^2.0.8",
+ "istanbul-lib-source-maps": "^3.0.6",
+ "istanbul-reports": "^2.2.4",
+ "js-yaml": "^3.13.1",
+ "make-dir": "^2.1.0",
"minimatch": "^3.0.4",
"once": "^1.4.0"
}
},
"istanbul-lib-coverage": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
- "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz",
+ "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==",
"dev": true
},
"istanbul-lib-hook": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz",
- "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==",
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz",
+ "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==",
"dev": true,
"requires": {
"append-transform": "^1.0.0"
}
},
"istanbul-lib-instrument": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz",
- "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz",
+ "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==",
"dev": true,
"requires": {
- "@babel/generator": "^7.0.0",
- "@babel/parser": "^7.0.0",
- "@babel/template": "^7.0.0",
- "@babel/traverse": "^7.0.0",
- "@babel/types": "^7.0.0",
- "istanbul-lib-coverage": "^2.0.3",
- "semver": "^5.5.0"
+ "@babel/generator": "^7.4.0",
+ "@babel/parser": "^7.4.3",
+ "@babel/template": "^7.4.0",
+ "@babel/traverse": "^7.4.3",
+ "@babel/types": "^7.4.0",
+ "istanbul-lib-coverage": "^2.0.5",
+ "semver": "^6.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
+ "dev": true
+ }
}
},
"istanbul-lib-report": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz",
- "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==",
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz",
+ "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==",
"dev": true,
"requires": {
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
- "supports-color": "^6.0.0"
+ "istanbul-lib-coverage": "^2.0.5",
+ "make-dir": "^2.1.0",
+ "supports-color": "^6.1.0"
},
"dependencies": {
"supports-color": {
@@ -9650,15 +10013,15 @@
}
},
"istanbul-lib-source-maps": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz",
- "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==",
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz",
+ "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==",
"dev": true,
"requires": {
"debug": "^4.1.1",
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
- "rimraf": "^2.6.2",
+ "istanbul-lib-coverage": "^2.0.5",
+ "make-dir": "^2.1.0",
+ "rimraf": "^2.6.3",
"source-map": "^0.6.1"
},
"dependencies": {
@@ -9686,90 +10049,91 @@
}
},
"istanbul-reports": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz",
- "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==",
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.4.tgz",
+ "integrity": "sha512-QCHGyZEK0bfi9GR215QSm+NJwFKEShbtc7tfbUdLAEzn3kKhLDDZqvljn8rPZM9v8CEOhzL1nlYoO4r1ryl67w==",
"dev": true,
"requires": {
- "handlebars": "^4.1.0"
+ "handlebars": "^4.1.2"
}
},
"jest": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest/-/jest-24.5.0.tgz",
- "integrity": "sha512-lxL+Fq5/RH7inxxmfS2aZLCf8MsS+YCUBfeiNO6BWz/MmjhDGaIEA/2bzEf9q4Q0X+mtFHiinHFvQ0u+RvW/qQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest/-/jest-24.7.1.tgz",
+ "integrity": "sha512-AbvRar5r++izmqo5gdbAjTeA6uNRGoNRuj5vHB0OnDXo2DXWZJVuaObiGgtlvhKb+cWy2oYbQSfxv7Q7GjnAtA==",
"dev": true,
"requires": {
"import-local": "^2.0.0",
- "jest-cli": "^24.5.0"
+ "jest-cli": "^24.7.1"
}
},
"jest-changed-files": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.5.0.tgz",
- "integrity": "sha512-Ikl29dosYnTsH9pYa1Tv9POkILBhN/TLZ37xbzgNsZ1D2+2n+8oEZS2yP1BrHn/T4Rs4Ggwwbp/x8CKOS5YJOg==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.7.0.tgz",
+ "integrity": "sha512-33BgewurnwSfJrW7T5/ZAXGE44o7swLslwh8aUckzq2e17/2Os1V0QU506ZNik3hjs8MgnEMKNkcud442NCDTw==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"execa": "^1.0.0",
"throat": "^4.0.0"
}
},
"jest-cli": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.5.0.tgz",
- "integrity": "sha512-P+Jp0SLO4KWN0cGlNtC7JV0dW1eSFR7eRpoOucP2UM0sqlzp/bVHeo71Omonvigrj9AvCKy7NtQANtqJ7FXz8g==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.7.1.tgz",
+ "integrity": "sha512-32OBoSCVPzcTslGFl6yVCMzB2SqX3IrWwZCY5mZYkb0D2WsogmU3eV2o8z7+gRQa4o4sZPX/k7GU+II7CxM6WQ==",
"dev": true,
"requires": {
- "@jest/core": "^24.5.0",
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/core": "^24.7.1",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"chalk": "^2.0.1",
"exit": "^0.1.2",
"import-local": "^2.0.0",
"is-ci": "^2.0.0",
- "jest-config": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-validate": "^24.5.0",
+ "jest-config": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-validate": "^24.7.0",
"prompts": "^2.0.1",
"realpath-native": "^1.1.0",
"yargs": "^12.0.2"
}
},
"jest-config": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.5.0.tgz",
- "integrity": "sha512-t2UTh0Z2uZhGBNVseF8wA2DS2SuBiLOL6qpLq18+OZGfFUxTM7BzUVKyHFN/vuN+s/aslY1COW95j1Rw81huOQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.7.1.tgz",
+ "integrity": "sha512-8FlJNLI+X+MU37j7j8RE4DnJkvAghXmBWdArVzypW6WxfGuxiL/CCkzBg0gHtXhD2rxla3IMOSUAHylSKYJ83g==",
"dev": true,
"requires": {
"@babel/core": "^7.1.0",
- "@jest/types": "^24.5.0",
- "babel-jest": "^24.5.0",
+ "@jest/test-sequencer": "^24.7.1",
+ "@jest/types": "^24.7.0",
+ "babel-jest": "^24.7.1",
"chalk": "^2.0.1",
"glob": "^7.1.1",
- "jest-environment-jsdom": "^24.5.0",
- "jest-environment-node": "^24.5.0",
+ "jest-environment-jsdom": "^24.7.1",
+ "jest-environment-node": "^24.7.1",
"jest-get-type": "^24.3.0",
- "jest-jasmine2": "^24.5.0",
+ "jest-jasmine2": "^24.7.1",
"jest-regex-util": "^24.3.0",
- "jest-resolve": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-validate": "^24.5.0",
+ "jest-resolve": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-validate": "^24.7.0",
"micromatch": "^3.1.10",
- "pretty-format": "^24.5.0",
+ "pretty-format": "^24.7.0",
"realpath-native": "^1.1.0"
}
},
"jest-diff": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.5.0.tgz",
- "integrity": "sha512-mCILZd9r7zqL9Uh6yNoXjwGQx0/J43OD2vvWVKwOEOLZliQOsojXwqboubAQ+Tszrb6DHGmNU7m4whGeB9YOqw==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.7.0.tgz",
+ "integrity": "sha512-ULQZ5B1lWpH70O4xsANC4tf4Ko6RrpwhE3PtG6ERjMg1TiYTC2Wp4IntJVGro6a8HG9luYHhhmF4grF0Pltckg==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
"diff-sequences": "^24.3.0",
"jest-get-type": "^24.3.0",
- "pretty-format": "^24.5.0"
+ "pretty-format": "^24.7.0"
}
},
"jest-docblock": {
@@ -9782,43 +10146,43 @@
}
},
"jest-each": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.5.0.tgz",
- "integrity": "sha512-6gy3Kh37PwIT5sNvNY2VchtIFOOBh8UCYnBlxXMb5sr5wpJUDPTUATX2Axq1Vfk+HWTMpsYPeVYp4TXx5uqUBw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.7.1.tgz",
+ "integrity": "sha512-4fsS8fEfLa3lfnI1Jw6NxjhyRTgfpuOVTeUZZFyVYqeTa4hPhr2YkToUhouuLTrL2eMGOfpbdMyRx0GQ/VooKA==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"chalk": "^2.0.1",
"jest-get-type": "^24.3.0",
- "jest-util": "^24.5.0",
- "pretty-format": "^24.5.0"
+ "jest-util": "^24.7.1",
+ "pretty-format": "^24.7.0"
}
},
"jest-environment-jsdom": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.5.0.tgz",
- "integrity": "sha512-62Ih5HbdAWcsqBx2ktUnor/mABBo1U111AvZWcLKeWN/n/gc5ZvDBKe4Og44fQdHKiXClrNGC6G0mBo6wrPeGQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.7.1.tgz",
+ "integrity": "sha512-Gnhb+RqE2JuQGb3kJsLF8vfqjt3PHKSstq4Xc8ic+ax7QKo4Z0RWGucU3YV+DwKR3T9SYc+3YCUQEJs8r7+Jxg==",
"dev": true,
"requires": {
- "@jest/environment": "^24.5.0",
- "@jest/fake-timers": "^24.5.0",
- "@jest/types": "^24.5.0",
- "jest-mock": "^24.5.0",
- "jest-util": "^24.5.0",
+ "@jest/environment": "^24.7.1",
+ "@jest/fake-timers": "^24.7.1",
+ "@jest/types": "^24.7.0",
+ "jest-mock": "^24.7.0",
+ "jest-util": "^24.7.1",
"jsdom": "^11.5.1"
}
},
"jest-environment-node": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.5.0.tgz",
- "integrity": "sha512-du6FuyWr/GbKLsmAbzNF9mpr2Iu2zWSaq/BNHzX+vgOcts9f2ayXBweS7RAhr+6bLp6qRpMB6utAMF5Ygktxnw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.7.1.tgz",
+ "integrity": "sha512-GJJQt1p9/C6aj6yNZMvovZuxTUd+BEJprETdvTKSb4kHcw4mFj8777USQV0FJoJ4V3djpOwA5eWyPwfq//PFBA==",
"dev": true,
"requires": {
- "@jest/environment": "^24.5.0",
- "@jest/fake-timers": "^24.5.0",
- "@jest/types": "^24.5.0",
- "jest-mock": "^24.5.0",
- "jest-util": "^24.5.0"
+ "@jest/environment": "^24.7.1",
+ "@jest/fake-timers": "^24.7.1",
+ "@jest/types": "^24.7.0",
+ "jest-mock": "^24.7.0",
+ "jest-util": "^24.7.1"
}
},
"jest-get-type": {
@@ -9828,50 +10192,53 @@
"dev": true
},
"jest-haste-map": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.5.0.tgz",
- "integrity": "sha512-mb4Yrcjw9vBgSvobDwH8QUovxApdimGcOkp+V1ucGGw4Uvr3VzZQBJhNm1UY3dXYm4XXyTW2G7IBEZ9pM2ggRQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.7.1.tgz",
+ "integrity": "sha512-g0tWkzjpHD2qa03mTKhlydbmmYiA2KdcJe762SbfFo/7NIMgBWAA0XqQlApPwkWOF7Cxoi/gUqL0i6DIoLpMBw==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
+ "anymatch": "^2.0.0",
"fb-watchman": "^2.0.0",
+ "fsevents": "^1.2.7",
"graceful-fs": "^4.1.15",
"invariant": "^2.2.4",
"jest-serializer": "^24.4.0",
- "jest-util": "^24.5.0",
- "jest-worker": "^24.4.0",
+ "jest-util": "^24.7.1",
+ "jest-worker": "^24.6.0",
"micromatch": "^3.1.10",
- "sane": "^4.0.3"
+ "sane": "^4.0.3",
+ "walker": "^1.0.7"
}
},
"jest-jasmine2": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.5.0.tgz",
- "integrity": "sha512-sfVrxVcx1rNUbBeyIyhkqZ4q+seNKyAG6iM0S2TYBdQsXjoFDdqWFfsUxb6uXSsbimbXX/NMkJIwUZ1uT9+/Aw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.7.1.tgz",
+ "integrity": "sha512-Y/9AOJDV1XS44wNwCaThq4Pw3gBPiOv/s6NcbOAkVRRUEPu+36L2xoPsqQXsDrxoBerqeyslpn2TpCI8Zr6J2w==",
"dev": true,
"requires": {
"@babel/traverse": "^7.1.0",
- "@jest/environment": "^24.5.0",
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/environment": "^24.7.1",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"chalk": "^2.0.1",
"co": "^4.6.0",
- "expect": "^24.5.0",
+ "expect": "^24.7.1",
"is-generator-fn": "^2.0.0",
- "jest-each": "^24.5.0",
- "jest-matcher-utils": "^24.5.0",
- "jest-message-util": "^24.5.0",
- "jest-runtime": "^24.5.0",
- "jest-snapshot": "^24.5.0",
- "jest-util": "^24.5.0",
- "pretty-format": "^24.5.0",
+ "jest-each": "^24.7.1",
+ "jest-matcher-utils": "^24.7.0",
+ "jest-message-util": "^24.7.1",
+ "jest-runtime": "^24.7.1",
+ "jest-snapshot": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "pretty-format": "^24.7.0",
"throat": "^4.0.0"
}
},
"jest-junit": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-6.3.0.tgz",
- "integrity": "sha512-3PH9UkpaomX6CUzqjlnk0m4yBCW/eroxV6v61OM6LkCQFO848P3YUhfIzu8ypZSBKB3vvCbB4WaLTKT0BrIf8A==",
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-6.4.0.tgz",
+ "integrity": "sha512-GXEZA5WBeUich94BARoEUccJumhCgCerg7mXDFLxWwI2P7wL3Z7sGWk+53x343YdBLjiMR9aD/gYMVKO+0pE4Q==",
"dev": true,
"requires": {
"jest-validate": "^24.0.0",
@@ -9881,35 +10248,35 @@
}
},
"jest-leak-detector": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.5.0.tgz",
- "integrity": "sha512-LZKBjGovFRx3cRBkqmIg+BZnxbrLqhQl09IziMk3oeh1OV81Hg30RUIx885mq8qBv1PA0comB9bjKcuyNO1bCQ==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.7.0.tgz",
+ "integrity": "sha512-zV0qHKZGXtmPVVzT99CVEcHE9XDf+8LwiE0Ob7jjezERiGVljmqKFWpV2IkG+rkFIEUHFEkMiICu7wnoPM/RoQ==",
"dev": true,
"requires": {
- "pretty-format": "^24.5.0"
+ "pretty-format": "^24.7.0"
}
},
"jest-matcher-utils": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.5.0.tgz",
- "integrity": "sha512-QM1nmLROjLj8GMGzg5VBra3I9hLpjMPtF1YqzQS3rvWn2ltGZLrGAO1KQ9zUCVi5aCvrkbS5Ndm2evIP9yZg1Q==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.7.0.tgz",
+ "integrity": "sha512-158ieSgk3LNXeUhbVJYRXyTPSCqNgVXOp/GT7O94mYd3pk/8+odKTyR1JLtNOQSPzNi8NFYVONtvSWA/e1RDXg==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
- "jest-diff": "^24.5.0",
+ "jest-diff": "^24.7.0",
"jest-get-type": "^24.3.0",
- "pretty-format": "^24.5.0"
+ "pretty-format": "^24.7.0"
}
},
"jest-message-util": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.5.0.tgz",
- "integrity": "sha512-6ZYgdOojowCGiV0D8WdgctZEAe+EcFU+KrVds+0ZjvpZurUW2/oKJGltJ6FWY2joZwYXN5VL36GPV6pNVRqRnQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.7.1.tgz",
+ "integrity": "sha512-dk0gqVtyqezCHbcbk60CdIf+8UHgD+lmRHifeH3JRcnAqh4nEyPytSc9/L1+cQyxC+ceaeP696N4ATe7L+omcg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"@types/stack-utils": "^1.0.1",
"chalk": "^2.0.1",
"micromatch": "^3.1.10",
@@ -9918,12 +10285,12 @@
}
},
"jest-mock": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.5.0.tgz",
- "integrity": "sha512-ZnAtkWrKf48eERgAOiUxVoFavVBziO2pAi2MfZ1+bGXVkDfxWLxU0//oJBkgwbsv6OAmuLBz4XFFqvCFMqnGUw==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.7.0.tgz",
+ "integrity": "sha512-6taW4B4WUcEiT2V9BbOmwyGuwuAFT2G8yghF7nyNW1/2gq5+6aTqSPcS9lS6ArvEkX55vbPAS/Jarx5LSm4Fng==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0"
+ "@jest/types": "^24.7.0"
}
},
"jest-pnp-resolver": {
@@ -9939,12 +10306,12 @@
"dev": true
},
"jest-resolve": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.5.0.tgz",
- "integrity": "sha512-ZIfGqLX1Rg8xJpQqNjdoO8MuxHV1q/i2OO1hLXjgCWFWs5bsedS8UrOdgjUqqNae6DXA+pCyRmdcB7lQEEbXew==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.7.1.tgz",
+ "integrity": "sha512-Bgrc+/UUZpGJ4323sQyj85hV9d+ANyPNu6XfRDUcyFNX1QrZpSoM0kE4Mb2vZMAYTJZsBFzYe8X1UaOkOELSbw==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"browser-resolve": "^1.11.3",
"chalk": "^2.0.1",
"jest-pnp-resolver": "^1.2.1",
@@ -9952,68 +10319,68 @@
}
},
"jest-resolve-dependencies": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.5.0.tgz",
- "integrity": "sha512-dRVM1D+gWrFfrq2vlL5P9P/i8kB4BOYqYf3S7xczZ+A6PC3SgXYSErX/ScW/469pWMboM1uAhgLF+39nXlirCQ==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.7.1.tgz",
+ "integrity": "sha512-2Eyh5LJB2liNzfk4eo7bD1ZyBbqEJIyyrFtZG555cSWW9xVHxII2NuOkSl1yUYTAYCAmM2f2aIT5A7HzNmubyg==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"jest-regex-util": "^24.3.0",
- "jest-snapshot": "^24.5.0"
+ "jest-snapshot": "^24.7.1"
}
},
"jest-runner": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.5.0.tgz",
- "integrity": "sha512-oqsiS9TkIZV5dVkD+GmbNfWBRPIvxqmlTQ+AQUJUQ07n+4xTSDc40r+aKBynHw9/tLzafC00DIbJjB2cOZdvMA==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.7.1.tgz",
+ "integrity": "sha512-aNFc9liWU/xt+G9pobdKZ4qTeG/wnJrJna3VqunziDNsWT3EBpmxXZRBMKCsNMyfy+A/XHiV+tsMLufdsNdgCw==",
"dev": true,
"requires": {
- "@jest/console": "^24.3.0",
- "@jest/environment": "^24.5.0",
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/console": "^24.7.1",
+ "@jest/environment": "^24.7.1",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"chalk": "^2.4.2",
"exit": "^0.1.2",
"graceful-fs": "^4.1.15",
- "jest-config": "^24.5.0",
+ "jest-config": "^24.7.1",
"jest-docblock": "^24.3.0",
- "jest-haste-map": "^24.5.0",
- "jest-jasmine2": "^24.5.0",
- "jest-leak-detector": "^24.5.0",
- "jest-message-util": "^24.5.0",
- "jest-resolve": "^24.5.0",
- "jest-runtime": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-worker": "^24.4.0",
+ "jest-haste-map": "^24.7.1",
+ "jest-jasmine2": "^24.7.1",
+ "jest-leak-detector": "^24.7.0",
+ "jest-message-util": "^24.7.1",
+ "jest-resolve": "^24.7.1",
+ "jest-runtime": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-worker": "^24.6.0",
"source-map-support": "^0.5.6",
"throat": "^4.0.0"
}
},
"jest-runtime": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.5.0.tgz",
- "integrity": "sha512-GTFHzfLdwpaeoDPilNpBrorlPoNZuZrwKKzKJs09vWwHo+9TOsIIuszK8cWOuKC7ss07aN1922Ge8fsGdsqCuw==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.7.1.tgz",
+ "integrity": "sha512-0VAbyBy7tll3R+82IPJpf6QZkokzXPIS71aDeqh+WzPRXRCNz6StQ45otFariPdJ4FmXpDiArdhZrzNAC3sj6A==",
"dev": true,
"requires": {
- "@jest/console": "^24.3.0",
- "@jest/environment": "^24.5.0",
+ "@jest/console": "^24.7.1",
+ "@jest/environment": "^24.7.1",
"@jest/source-map": "^24.3.0",
- "@jest/transform": "^24.5.0",
- "@jest/types": "^24.5.0",
+ "@jest/transform": "^24.7.1",
+ "@jest/types": "^24.7.0",
"@types/yargs": "^12.0.2",
"chalk": "^2.0.1",
"exit": "^0.1.2",
"glob": "^7.1.3",
"graceful-fs": "^4.1.15",
- "jest-config": "^24.5.0",
- "jest-haste-map": "^24.5.0",
- "jest-message-util": "^24.5.0",
- "jest-mock": "^24.5.0",
+ "jest-config": "^24.7.1",
+ "jest-haste-map": "^24.7.1",
+ "jest-message-util": "^24.7.1",
+ "jest-mock": "^24.7.0",
"jest-regex-util": "^24.3.0",
- "jest-resolve": "^24.5.0",
- "jest-snapshot": "^24.5.0",
- "jest-util": "^24.5.0",
- "jest-validate": "^24.5.0",
+ "jest-resolve": "^24.7.1",
+ "jest-snapshot": "^24.7.1",
+ "jest-util": "^24.7.1",
+ "jest-validate": "^24.7.0",
"realpath-native": "^1.1.0",
"slash": "^2.0.0",
"strip-bom": "^3.0.0",
@@ -10027,37 +10394,36 @@
"dev": true
},
"jest-snapshot": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.5.0.tgz",
- "integrity": "sha512-eBEeJb5ROk0NcpodmSKnCVgMOo+Qsu5z9EDl3tGffwPzK1yV37mjGWF2YeIz1NkntgTzP+fUL4s09a0+0dpVWA==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.7.1.tgz",
+ "integrity": "sha512-8Xk5O4p+JsZZn4RCNUS3pxA+ORKpEKepE+a5ejIKrId9CwrVN0NY+vkqEkXqlstA5NMBkNahXkR/4qEBy0t5yA==",
"dev": true,
"requires": {
"@babel/types": "^7.0.0",
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"chalk": "^2.0.1",
- "expect": "^24.5.0",
- "jest-diff": "^24.5.0",
- "jest-matcher-utils": "^24.5.0",
- "jest-message-util": "^24.5.0",
- "jest-resolve": "^24.5.0",
+ "expect": "^24.7.1",
+ "jest-diff": "^24.7.0",
+ "jest-matcher-utils": "^24.7.0",
+ "jest-message-util": "^24.7.1",
+ "jest-resolve": "^24.7.1",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
- "pretty-format": "^24.5.0",
+ "pretty-format": "^24.7.0",
"semver": "^5.5.0"
}
},
"jest-util": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.5.0.tgz",
- "integrity": "sha512-Xy8JsD0jvBz85K7VsTIQDuY44s+hYJyppAhcsHsOsGisVtdhar6fajf2UOf2mEVEgh15ZSdA0zkCuheN8cbr1Q==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.7.1.tgz",
+ "integrity": "sha512-/KilOue2n2rZ5AnEBYoxOXkeTu6vi7cjgQ8MXEkih0oeAXT6JkS3fr7/j8+engCjciOU1Nq5loMSKe0A1oeX0A==",
"dev": true,
"requires": {
- "@jest/console": "^24.3.0",
- "@jest/fake-timers": "^24.5.0",
+ "@jest/console": "^24.7.1",
+ "@jest/fake-timers": "^24.7.1",
"@jest/source-map": "^24.3.0",
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
- "@types/node": "*",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"callsites": "^3.0.0",
"chalk": "^2.0.1",
"graceful-fs": "^4.1.15",
@@ -10076,32 +10442,31 @@
}
},
"jest-validate": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.5.0.tgz",
- "integrity": "sha512-gg0dYszxjgK2o11unSIJhkOFZqNRQbWOAB2/LOUdsd2LfD9oXiMeuee8XsT0iRy5EvSccBgB4h/9HRbIo3MHgQ==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.7.0.tgz",
+ "integrity": "sha512-cgai/gts9B2chz1rqVdmLhzYxQbgQurh1PEQSvSgPZ8KGa1AqXsqC45W5wKEwzxKrWqypuQrQxnF4+G9VejJJA==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"camelcase": "^5.0.0",
"chalk": "^2.0.1",
"jest-get-type": "^24.3.0",
"leven": "^2.1.0",
- "pretty-format": "^24.5.0"
+ "pretty-format": "^24.7.0"
}
},
"jest-watcher": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.5.0.tgz",
- "integrity": "sha512-/hCpgR6bg0nKvD3nv4KasdTxuhwfViVMHUATJlnGCD0r1QrmIssimPbmc5KfAQblAVxkD8xrzuij9vfPUk1/rA==",
+ "version": "24.7.1",
+ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.7.1.tgz",
+ "integrity": "sha512-Wd6TepHLRHVKLNPacEsBwlp9raeBIO+01xrN24Dek4ggTS8HHnOzYSFnvp+6MtkkJ3KfMzy220KTi95e2rRkrw==",
"dev": true,
"requires": {
- "@jest/test-result": "^24.5.0",
- "@jest/types": "^24.5.0",
- "@types/node": "*",
+ "@jest/test-result": "^24.7.1",
+ "@jest/types": "^24.7.0",
"@types/yargs": "^12.0.9",
"ansi-escapes": "^3.0.0",
"chalk": "^2.0.1",
- "jest-util": "^24.5.0",
+ "jest-util": "^24.7.1",
"string-length": "^2.0.0"
},
"dependencies": {
@@ -10114,12 +10479,11 @@
}
},
"jest-worker": {
- "version": "24.4.0",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.4.0.tgz",
- "integrity": "sha512-BH9X/klG9vxwoO99ZBUbZFfV8qO0XNZ5SIiCyYK2zOuJBl6YJVAeNIQjcoOVNu4HGEHeYEKsUWws8kSlSbZ9YQ==",
+ "version": "24.6.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz",
+ "integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==",
"dev": true,
"requires": {
- "@types/node": "*",
"merge-stream": "^1.0.1",
"supports-color": "^6.1.0"
},
@@ -10294,9 +10658,9 @@
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"kleur": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.2.tgz",
- "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
"dev": true
},
"lcid": {
@@ -10314,26 +10678,26 @@
"dev": true
},
"lerna": {
- "version": "3.13.2",
- "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.13.2.tgz",
- "integrity": "sha512-2iliiFVAMNqaKsVSJ90p49dur93d5RlktotAJNp+uuHsCuIIAvwceqmSgDQCmWu4GkgAom+5uy//KV6F9t8fLA==",
+ "version": "3.13.4",
+ "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.13.4.tgz",
+ "integrity": "sha512-qTp22nlpcgVrJGZuD7oHnFbTk72j2USFimc2Pj4kC0/rXmcU2xPtCiyuxLl8y6/6Lj5g9kwEuvKDZtSXujjX/A==",
"dev": true,
"requires": {
- "@lerna/add": "3.13.1",
- "@lerna/bootstrap": "3.13.1",
- "@lerna/changed": "3.13.2",
- "@lerna/clean": "3.13.1",
+ "@lerna/add": "3.13.3",
+ "@lerna/bootstrap": "3.13.3",
+ "@lerna/changed": "3.13.4",
+ "@lerna/clean": "3.13.3",
"@lerna/cli": "3.13.0",
- "@lerna/create": "3.13.1",
- "@lerna/diff": "3.13.1",
- "@lerna/exec": "3.13.1",
- "@lerna/import": "3.13.1",
- "@lerna/init": "3.13.1",
- "@lerna/link": "3.13.1",
- "@lerna/list": "3.13.1",
- "@lerna/publish": "3.13.2",
- "@lerna/run": "3.13.1",
- "@lerna/version": "3.13.2",
+ "@lerna/create": "3.13.3",
+ "@lerna/diff": "3.13.3",
+ "@lerna/exec": "3.13.3",
+ "@lerna/import": "3.13.4",
+ "@lerna/init": "3.13.3",
+ "@lerna/link": "3.13.3",
+ "@lerna/list": "3.13.3",
+ "@lerna/publish": "3.13.4",
+ "@lerna/run": "3.13.3",
+ "@lerna/version": "3.13.4",
"import-local": "^1.0.0",
"npmlog": "^4.1.2"
},
@@ -10494,15 +10858,14 @@
},
"dependencies": {
"cosmiconfig": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.1.0.tgz",
- "integrity": "sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz",
+ "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==",
"dev": true,
"requires": {
"import-fresh": "^2.0.0",
"is-directory": "^0.3.1",
- "js-yaml": "^3.9.0",
- "lodash.get": "^4.4.2",
+ "js-yaml": "^3.13.0",
"parse-json": "^4.0.0"
}
},
@@ -10558,9 +10921,9 @@
}
},
"is-glob": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
- "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
"requires": {
"is-extglob": "^2.1.1"
@@ -10590,6 +10953,12 @@
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
},
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
"pretty-format": {
"version": "23.6.0",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz",
@@ -10620,9 +10989,9 @@
},
"dependencies": {
"p-map": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz",
- "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
+ "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
"dev": true
}
}
@@ -10845,6 +11214,14 @@
"parse-json": "^4.0.0",
"pify": "^3.0.0",
"strip-bom": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"loader-runner": {
@@ -10890,12 +11267,24 @@
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
+ "lodash.flattendeep": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
+ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
+ "dev": true
+ },
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
"dev": true
},
+ "lodash.ismatch": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz",
+ "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=",
+ "dev": true
+ },
"lodash.map": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
@@ -11076,12 +11465,13 @@
"dev": true
},
"make-dir": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
- "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"requires": {
- "pify": "^3.0.0"
+ "pify": "^4.0.1",
+ "semver": "^5.6.0"
}
},
"make-error": {
@@ -11184,9 +11574,9 @@
"dev": true
},
"mem": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz",
- "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
+ "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^2.0.0",
@@ -11264,6 +11654,23 @@
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
"dev": true
},
+ "merge-source-map": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz",
+ "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==",
+ "dev": true,
+ "requires": {
+ "source-map": "^0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
+ }
+ },
"merge-stream": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
@@ -11374,24 +11781,24 @@
"dev": true
},
"mime-db": {
- "version": "1.38.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
- "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==",
+ "version": "1.40.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
+ "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
"dev": true
},
"mime-types": {
- "version": "2.1.22",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
- "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
+ "version": "2.1.24",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
+ "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"dev": true,
"requires": {
- "mime-db": "~1.38.0"
+ "mime-db": "1.40.0"
}
},
"mimic-fn": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz",
- "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA=="
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
},
"mimic-response": {
"version": "1.0.1",
@@ -11576,9 +11983,9 @@
"dev": true
},
"nan": {
- "version": "2.13.1",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz",
- "integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==",
+ "version": "2.13.2",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
+ "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==",
"dev": true
},
"nanomatch": {
@@ -11599,6 +12006,12 @@
"to-regex": "^3.0.1"
}
},
+ "napi-build-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz",
+ "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==",
+ "dev": true
+ },
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@@ -11606,9 +12019,9 @@
"dev": true
},
"negotiator": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
- "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
+ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
"dev": true
},
"neo-async": {
@@ -11617,24 +12030,30 @@
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
"dev": true
},
+ "nested-error-stacks": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz",
+ "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==",
+ "dev": true
+ },
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"node-abi": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.7.1.tgz",
- "integrity": "sha512-OV8Bq1OrPh6z+Y4dqwo05HqrRL9YNF7QVMRfq1/pguwKLG+q9UB/Lk0x5qXjO23JjJg+/jqCHSTaG1P3tfKfuw==",
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.8.0.tgz",
+ "integrity": "sha512-1/aa2clS0pue0HjckL62CsbhWWU35HARvBDXcJtYKbYR7LnIutmpxmXbuDMV9kEviD2lP/wACOgWmmwljghHyQ==",
"dev": true,
"requires": {
"semver": "^5.4.1"
}
},
"node-fetch": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
- "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==",
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz",
+ "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==",
"dev": true
},
"node-fetch-npm": {
@@ -11768,9 +12187,9 @@
}
},
"node-releases": {
- "version": "1.1.10",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.10.tgz",
- "integrity": "sha512-KbUPCpfoBvb3oBkej9+nrU0/7xPlVhmhhUJ1PZqwIP5/1dJkRWKWD3OONjo6M2J7tSCBtDCumLwwqeI+DWWaLQ==",
+ "version": "1.1.17",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz",
+ "integrity": "sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==",
"dev": true,
"requires": {
"semver": "^5.3.0"
@@ -11941,1037 +12360,111 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"nwsapi": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz",
- "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz",
+ "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==",
"dev": true
},
"nyc": {
- "version": "13.3.0",
- "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz",
- "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==",
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.0.tgz",
+ "integrity": "sha512-iy9fEV8Emevz3z/AanIZsoGa8F4U2p0JKevZ/F0sk+/B2r9E6Qn+EPs0bpxEhnAt6UPlTL8mQZIaSJy8sK0ZFw==",
"dev": true,
"requires": {
"archy": "^1.0.0",
- "arrify": "^1.0.1",
- "caching-transform": "^3.0.1",
+ "caching-transform": "^3.0.2",
"convert-source-map": "^1.6.0",
- "find-cache-dir": "^2.0.0",
- "find-up": "^3.0.0",
- "foreground-child": "^1.5.6",
- "glob": "^7.1.3",
- "istanbul-lib-coverage": "^2.0.3",
- "istanbul-lib-hook": "^2.0.3",
- "istanbul-lib-instrument": "^3.1.0",
- "istanbul-lib-report": "^2.0.4",
- "istanbul-lib-source-maps": "^3.0.2",
- "istanbul-reports": "^2.1.1",
- "make-dir": "^1.3.0",
- "merge-source-map": "^1.1.0",
- "resolve-from": "^4.0.0",
- "rimraf": "^2.6.3",
- "signal-exit": "^3.0.2",
- "spawn-wrap": "^1.4.2",
- "test-exclude": "^5.1.0",
- "uuid": "^3.3.2",
- "yargs": "^12.0.5",
- "yargs-parser": "^11.1.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "append-transform": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "default-require-extensions": "^2.0.0"
- }
- },
- "archy": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "arrify": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "async": {
- "version": "2.6.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "lodash": "^4.17.11"
- }
- },
- "balanced-match": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "brace-expansion": {
- "version": "1.1.11",
- "bundled": true,
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "caching-transform": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "hasha": "^3.0.0",
- "make-dir": "^1.3.0",
- "package-hash": "^3.0.0",
- "write-file-atomic": "^2.3.0"
- }
- },
- "camelcase": {
- "version": "5.0.0",
- "bundled": true,
- "dev": true
- },
- "cliui": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
- }
- },
- "code-point-at": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "commander": {
- "version": "2.17.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "commondir": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "bundled": true,
- "dev": true
- },
- "convert-source-map": {
- "version": "1.6.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.1"
- }
- },
- "cross-spawn": {
- "version": "4.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
- }
- },
- "debug": {
- "version": "4.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "decamelize": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "default-require-extensions": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "strip-bom": "^3.0.0"
- }
- },
- "end-of-stream": {
- "version": "1.4.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "once": "^1.4.0"
- }
- },
- "error-ex": {
- "version": "1.3.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-arrayish": "^0.2.1"
- }
- },
- "es6-error": {
- "version": "4.1.1",
- "bundled": true,
- "dev": true
- },
- "execa": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "6.0.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- }
- }
- },
- "find-cache-dir": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "commondir": "^1.0.1",
- "make-dir": "^1.0.0",
- "pkg-dir": "^3.0.0"
- }
- },
- "find-up": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "locate-path": "^3.0.0"
- }
- },
- "foreground-child": {
- "version": "1.5.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "get-caller-file": {
- "version": "1.0.3",
- "bundled": true,
- "dev": true
- },
- "get-stream": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
- "glob": {
- "version": "7.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.1.15",
- "bundled": true,
- "dev": true
- },
- "handlebars": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "async": "^2.5.0",
- "optimist": "^0.6.1",
- "source-map": "^0.6.1",
- "uglify-js": "^3.1.4"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "has-flag": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "hasha": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-stream": "^1.0.1"
- }
- },
- "hosted-git-info": {
- "version": "2.7.1",
- "bundled": true,
- "dev": true
- },
- "imurmurhash": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true
- },
- "invert-kv": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "is-arrayish": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "is-stream": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "istanbul-lib-coverage": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true
- },
- "istanbul-lib-hook": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "append-transform": "^1.0.0"
- }
- },
- "istanbul-lib-report": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
- "supports-color": "^6.0.0"
- },
- "dependencies": {
- "supports-color": {
- "version": "6.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
- }
- },
- "istanbul-lib-source-maps": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "debug": "^4.1.1",
- "istanbul-lib-coverage": "^2.0.3",
- "make-dir": "^1.3.0",
- "rimraf": "^2.6.2",
- "source-map": "^0.6.1"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "istanbul-reports": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "handlebars": "^4.1.0"
- }
- },
- "json-parse-better-errors": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "lcid": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "invert-kv": "^2.0.0"
- }
- },
- "load-json-file": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^4.0.0",
- "pify": "^3.0.0",
- "strip-bom": "^3.0.0"
- }
- },
- "locate-path": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "lodash": {
- "version": "4.17.11",
- "bundled": true,
- "dev": true
- },
- "lodash.flattendeep": {
- "version": "4.4.0",
- "bundled": true,
- "dev": true
- },
- "lru-cache": {
- "version": "4.1.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
- "make-dir": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "map-age-cleaner": {
- "version": "0.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-defer": "^1.0.0"
- }
- },
- "mem": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^1.0.0",
- "p-is-promise": "^2.0.0"
- }
- },
- "merge-source-map": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "source-map": "^0.6.1"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "mimic-fn": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.10",
- "bundled": true,
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- },
- "dependencies": {
- "minimist": {
- "version": "0.0.8",
- "bundled": true,
- "dev": true
- }
- }
- },
- "ms": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "nice-try": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true
- },
- "normalize-package-data": {
- "version": "2.5.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "hosted-git-info": "^2.1.4",
- "resolve": "^1.10.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- }
- },
- "npm-run-path": {
- "version": "2.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-key": "^2.0.0"
- }
- },
- "number-is-nan": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "once": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "optimist": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "minimist": "~0.0.1",
- "wordwrap": "~0.0.2"
- }
- },
- "os-homedir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "os-locale": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "^4.0.0"
- }
- },
- "p-defer": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "p-finally": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "p-is-promise": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "p-limit": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-try": "^2.0.0"
- }
- },
- "p-locate": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-limit": "^2.0.0"
- }
- },
- "p-try": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "package-hash": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.15",
- "hasha": "^3.0.0",
- "lodash.flattendeep": "^4.4.0",
- "release-zalgo": "^1.0.0"
- }
- },
- "parse-json": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- }
- },
- "path-exists": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "path-key": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true
- },
- "path-parse": {
- "version": "1.0.6",
- "bundled": true,
- "dev": true
- },
- "path-type": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "pify": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "pkg-dir": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^3.0.0"
- }
- },
- "pseudomap": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "pump": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "read-pkg": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
- }
- },
- "read-pkg-up": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^3.0.0",
- "read-pkg": "^3.0.0"
- }
- },
- "release-zalgo": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "es6-error": "^4.0.1"
- }
- },
- "require-directory": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "require-main-filename": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "resolve": {
- "version": "1.10.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-parse": "^1.0.6"
- }
- },
- "resolve-from": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- },
- "rimraf": {
- "version": "2.6.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "bundled": true,
- "dev": true
- },
- "semver": {
- "version": "5.6.0",
- "bundled": true,
- "dev": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "shebang-command": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true
- },
- "spawn-wrap": {
- "version": "1.4.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "foreground-child": "^1.5.6",
- "mkdirp": "^0.5.0",
- "os-homedir": "^1.0.1",
- "rimraf": "^2.6.2",
- "signal-exit": "^3.0.2",
- "which": "^1.3.0"
- }
- },
- "spdx-correct": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-expression-parse": "^3.0.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-exceptions": {
- "version": "2.2.0",
- "bundled": true,
- "dev": true
- },
- "spdx-expression-parse": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-license-ids": {
- "version": "3.0.3",
- "bundled": true,
- "dev": true
- },
- "string-width": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- }
- },
- "strip-ansi": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- },
- "strip-bom": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "strip-eof": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "test-exclude": {
- "version": "5.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "arrify": "^1.0.1",
- "minimatch": "^3.0.4",
- "read-pkg-up": "^4.0.0",
- "require-main-filename": "^1.0.1"
- }
- },
- "uglify-js": {
- "version": "3.4.9",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "commander": "~2.17.1",
- "source-map": "~0.6.1"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "uuid": {
- "version": "3.3.2",
- "bundled": true,
+ "cp-file": "^6.2.0",
+ "find-cache-dir": "^2.1.0",
+ "find-up": "^3.0.0",
+ "foreground-child": "^1.5.6",
+ "glob": "^7.1.3",
+ "istanbul-lib-coverage": "^2.0.5",
+ "istanbul-lib-hook": "^2.0.7",
+ "istanbul-lib-instrument": "^3.3.0",
+ "istanbul-lib-report": "^2.0.8",
+ "istanbul-lib-source-maps": "^3.0.6",
+ "istanbul-reports": "^2.2.4",
+ "js-yaml": "^3.13.1",
+ "make-dir": "^2.1.0",
+ "merge-source-map": "^1.1.0",
+ "resolve-from": "^4.0.0",
+ "rimraf": "^2.6.3",
+ "signal-exit": "^3.0.2",
+ "spawn-wrap": "^1.4.2",
+ "test-exclude": "^5.2.3",
+ "uuid": "^3.3.2",
+ "yargs": "^13.2.2",
+ "yargs-parser": "^13.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
- "validate-npm-package-license": {
- "version": "3.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "which": {
- "version": "1.3.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
},
- "which-module": {
+ "require-main-filename": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
- "wordwrap": {
- "version": "0.0.3",
- "bundled": true,
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true
},
- "wrap-ansi": {
- "version": "2.1.0",
- "bundled": true,
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "string-width": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- }
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
}
},
- "wrappy": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "write-file-atomic": {
- "version": "2.4.2",
- "bundled": true,
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
- "graceful-fs": "^4.1.11",
- "imurmurhash": "^0.1.4",
- "signal-exit": "^3.0.2"
+ "ansi-regex": "^4.1.0"
}
},
- "y18n": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- },
- "yallist": {
- "version": "2.1.2",
- "bundled": true,
- "dev": true
- },
"yargs": {
- "version": "12.0.5",
- "bundled": true,
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
+ "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
"dev": true,
"requires": {
"cliui": "^4.0.0",
- "decamelize": "^1.2.0",
"find-up": "^3.0.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^3.0.0",
+ "get-caller-file": "^2.0.1",
+ "os-locale": "^3.1.0",
"require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
+ "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
+ "string-width": "^3.0.0",
"which-module": "^2.0.0",
- "y18n": "^3.2.1 || ^4.0.0",
- "yargs-parser": "^11.1.1"
+ "y18n": "^4.0.0",
+ "yargs-parser": "^13.0.0"
}
},
"yargs-parser": {
- "version": "11.1.1",
- "bundled": true,
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
+ "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
@@ -13021,9 +12514,9 @@
}
},
"object-keys": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz",
- "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"dev": true
},
"object-visit": {
@@ -13219,9 +12712,9 @@
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-is-promise": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz",
- "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg=="
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
+ "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg=="
},
"p-limit": {
"version": "2.2.0",
@@ -13267,9 +12760,9 @@
"dev": true
},
"p-try": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
- "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"p-waterfall": {
"version": "1.0.0",
@@ -13280,6 +12773,18 @@
"p-reduce": "^1.0.0"
}
},
+ "package-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz",
+ "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.15",
+ "hasha": "^3.0.0",
+ "lodash.flattendeep": "^4.4.0",
+ "release-zalgo": "^1.0.0"
+ }
+ },
"pacote": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz",
@@ -13382,9 +12887,9 @@
}
},
"parent-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz",
- "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
"requires": {
"callsites": "^3.0.0"
@@ -13454,9 +12959,9 @@
"dev": true
},
"parseurl": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
- "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"dev": true
},
"pascalcase": {
@@ -13517,6 +13022,14 @@
"dev": true,
"requires": {
"pify": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"pbkdf2": {
@@ -13539,9 +13052,9 @@
"dev": true
},
"pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true
},
"pinkie": {
@@ -13622,34 +13135,29 @@
"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
"prebuild-install": {
- "version": "2.5.3",
- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz",
- "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.0.tgz",
+ "integrity": "sha512-aaLVANlj4HgZweKttFNUVNRxDukytuIuxeK2boIMHjagNJCiVKWFsKF4tCE3ql3GbrD2tExPQ7/pwtEJcHNZeg==",
"dev": true,
"requires": {
"detect-libc": "^1.0.3",
- "expand-template": "^1.0.2",
+ "expand-template": "^2.0.3",
"github-from-package": "0.0.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
- "node-abi": "^2.2.0",
+ "napi-build-utils": "^1.0.1",
+ "node-abi": "^2.7.0",
"noop-logger": "^0.1.1",
"npmlog": "^4.0.1",
"os-homedir": "^1.0.1",
"pump": "^2.0.1",
- "rc": "^1.1.6",
+ "rc": "^1.2.7",
"simple-get": "^2.7.0",
"tar-fs": "^1.13.0",
"tunnel-agent": "^0.6.0",
"which-pm-runs": "^1.0.0"
},
"dependencies": {
- "detect-libc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
- "dev": true
- },
"pump": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
@@ -13669,10 +13177,9 @@
"dev": true
},
"prettier": {
- "version": "1.16.4",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz",
- "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==",
- "dev": true
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
+ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw=="
},
"prettier-eslint": {
"version": "8.8.2",
@@ -14629,12 +14136,12 @@
}
},
"pretty-format": {
- "version": "24.5.0",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.5.0.tgz",
- "integrity": "sha512-/3RuSghukCf8Riu5Ncve0iI+BzVkbRU5EeUoArKARZobREycuH5O4waxvaNIloEXdb0qwgmEAed5vTpX1HNROQ==",
+ "version": "24.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.7.0.tgz",
+ "integrity": "sha512-apen5cjf/U4dj7tHetpC7UEFCvtAgnNZnBDkfPv3fokzIqyOJckAG9OlAPC1BlFALnqT/lGB2tl9EJjlK6eCsA==",
"dev": true,
"requires": {
- "@jest/types": "^24.5.0",
+ "@jest/types": "^24.7.0",
"ansi-regex": "^4.0.0",
"ansi-styles": "^3.2.0",
"react-is": "^16.8.4"
@@ -14725,9 +14232,9 @@
}
},
"prompts": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.3.tgz",
- "integrity": "sha512-H8oWEoRZpybm6NV4to9/1limhttEo13xK62pNvn2JzY0MA03p7s0OjtmhXyon3uJmxiJJVSuUwEJFFssI3eBiQ==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.4.tgz",
+ "integrity": "sha512-HTzM3UWp/99A0gk51gAegwo1QRYA7xjcZufMNe33rCclFszUYAuHe1fIN/3ZmiHeGPkUsNaRyQm1hHOfM0PKxA==",
"dev": true,
"requires": {
"kleur": "^3.0.2",
@@ -14765,13 +14272,13 @@
}
},
"proxy-addr": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
- "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
+ "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
"dev": true,
"requires": {
"forwarded": "~0.1.2",
- "ipaddr.js": "1.8.0"
+ "ipaddr.js": "1.9.0"
}
},
"prr": {
@@ -14946,9 +14453,9 @@
}
},
"react-is": {
- "version": "16.8.4",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.4.tgz",
- "integrity": "sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA==",
+ "version": "16.8.6",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
+ "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==",
"dev": true
},
"read": {
@@ -15070,9 +14577,9 @@
}
},
"readable-stream": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
- "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
+ "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
@@ -15210,9 +14717,9 @@
}
},
"regexp-tree": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.5.tgz",
- "integrity": "sha512-nUmxvfJyAODw+0B13hj8CFVAxhe7fDEAgJgaotBu3nnR+IgGgZq59YedJP5VYTlkEfqjuK6TuRpnymKdatLZfQ==",
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.6.tgz",
+ "integrity": "sha512-LFrA98Dw/heXqDojz7qKFdygZmFoiVlvE1Zp7Cq2cvF+ZA+03Gmhy0k0PQlsC1jvHPiTUSs+pDHEuSWv6+6D7w==",
"dev": true
},
"regexpp": {
@@ -15258,6 +14765,15 @@
}
}
},
+ "release-zalgo": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz",
+ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=",
+ "dev": true,
+ "requires": {
+ "es6-error": "^4.0.1"
+ }
+ },
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -15386,6 +14902,12 @@
}
}
},
+ "requireindex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
+ "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
+ "dev": true
+ },
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
@@ -15399,9 +14921,9 @@
"dev": true
},
"resolve": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
- "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
+ "version": "1.10.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz",
+ "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -15552,9 +15074,9 @@
}
},
"rxjs": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz",
- "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==",
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
@@ -15637,9 +15159,9 @@
}
},
"semver": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
- "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
},
"semver-compare": {
"version": "1.0.0",
@@ -15669,9 +15191,9 @@
}
},
"serialize-javascript": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz",
- "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz",
+ "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==",
"dev": true
},
"serve-index": {
@@ -16036,9 +15558,9 @@
}
},
"source-map-support": {
- "version": "0.5.11",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz",
- "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==",
+ "version": "0.5.12",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
+ "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
@@ -16058,6 +15580,20 @@
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
},
+ "spawn-wrap": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz",
+ "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==",
+ "dev": true,
+ "requires": {
+ "foreground-child": "^1.5.6",
+ "mkdirp": "^0.5.0",
+ "os-homedir": "^1.0.1",
+ "rimraf": "^2.6.2",
+ "signal-exit": "^3.0.2",
+ "which": "^1.3.0"
+ }
+ },
"spdx-correct": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
@@ -16085,9 +15621,9 @@
}
},
"spdx-license-ids": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz",
- "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz",
+ "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==",
"dev": true
},
"spdy": {
@@ -16488,9 +16024,9 @@
}
},
"strip-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
- "integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -16499,9 +16035,9 @@
}
},
"tapable": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz",
- "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA=="
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
+ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"tar": {
"version": "2.2.1",
@@ -16608,6 +16144,23 @@
"pify": "^3.0.0",
"temp-dir": "^1.0.0",
"uuid": "^3.0.1"
+ },
+ "dependencies": {
+ "make-dir": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"tempfile": {
@@ -16663,33 +16216,6 @@
"worker-farm": "^1.5.2"
},
"dependencies": {
- "find-cache-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
- "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
- "dev": true,
- "requires": {
- "commondir": "^1.0.1",
- "make-dir": "^2.0.0",
- "pkg-dir": "^3.0.0"
- }
- },
- "make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "requires": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- }
- },
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- },
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -16699,15 +16225,15 @@
}
},
"test-exclude": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz",
- "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz",
+ "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==",
"dev": true,
"requires": {
- "arrify": "^1.0.1",
+ "glob": "^7.1.3",
"minimatch": "^3.0.4",
"read-pkg-up": "^4.0.0",
- "require-main-filename": "^1.0.1"
+ "require-main-filename": "^2.0.0"
},
"dependencies": {
"read-pkg-up": {
@@ -16719,6 +16245,12 @@
"find-up": "^3.0.0",
"read-pkg": "^3.0.0"
}
+ },
+ "require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+ "dev": true
}
}
},
@@ -16969,31 +16501,10 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
"dev": true
},
- "tslint": {
- "version": "5.14.0",
- "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
- "integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
- "dev": true,
- "requires": {
- "babel-code-frame": "^6.22.0",
- "builtin-modules": "^1.1.1",
- "chalk": "^2.3.0",
- "commander": "^2.12.1",
- "diff": "^3.2.0",
- "glob": "^7.1.1",
- "js-yaml": "^3.7.0",
- "minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
- "resolve": "^1.3.2",
- "semver": "^5.3.0",
- "tslib": "^1.8.0",
- "tsutils": "^2.29.0"
- }
- },
"tsutils": {
- "version": "2.29.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
- "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz",
+ "integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
@@ -17030,13 +16541,13 @@
}
},
"type-is": {
- "version": "1.6.16",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
- "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"dev": true,
"requires": {
"media-typer": "0.3.0",
- "mime-types": "~2.1.18"
+ "mime-types": "~2.1.24"
}
},
"typedarray": {
@@ -17046,9 +16557,9 @@
"dev": true
},
"typedoc": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.13.0.tgz",
- "integrity": "sha512-jQWtvPcV+0fiLZAXFEe70v5gqjDO6pJYJz4mlTtmGJeW2KRoIU/BEfktma6Uj8Xii7UakuZjbxFewl3UYOkU/w==",
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.14.2.tgz",
+ "integrity": "sha512-aEbgJXV8/KqaVhcedT7xG6d2r+mOvB5ep3eIz1KuB5sc4fDYXcepEEMdU7XSqLFO5hVPu0nllHi1QxX2h/QlpQ==",
"dev": true,
"requires": {
"@types/fs-extra": "^5.0.3",
@@ -17060,14 +16571,14 @@
"@types/shelljs": "^0.8.0",
"fs-extra": "^7.0.0",
"handlebars": "^4.0.6",
- "highlight.js": "^9.0.0",
+ "highlight.js": "^9.13.1",
"lodash": "^4.17.10",
"marked": "^0.4.0",
"minimatch": "^3.0.0",
"progress": "^2.0.0",
"shelljs": "^0.8.2",
"typedoc-default-themes": "^0.5.0",
- "typescript": "3.1.x"
+ "typescript": "3.2.x"
},
"dependencies": {
"shelljs": {
@@ -17082,9 +16593,9 @@
}
},
"typescript": {
- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz",
- "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz",
+ "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==",
"dev": true
}
}
@@ -17114,9 +16625,9 @@
}
},
"typescript": {
- "version": "3.3.3333",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3333.tgz",
- "integrity": "sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==",
+ "version": "3.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz",
+ "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==",
"dev": true
},
"typescript-eslint-parser": {
@@ -17138,13 +16649,13 @@
}
},
"uglify-js": {
- "version": "3.4.10",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz",
- "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==",
+ "version": "3.5.10",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.10.tgz",
+ "integrity": "sha512-/GTF0nosyPLbdJBd+AwYiZ+Hu5z8KXWnO0WCGt1BQ/u9Iamhejykqmz5o1OHJ53+VAk6xVxychonnApDjuqGsw==",
"dev": true,
"optional": true,
"requires": {
- "commander": "~2.19.0",
+ "commander": "~2.20.0",
"source-map": "~0.6.1"
},
"dependencies": {
@@ -17343,12 +16854,12 @@
}
},
"url-parse": {
- "version": "1.4.6",
- "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.6.tgz",
- "integrity": "sha512-/B8AD9iQ01seoXmXf9z/MjLZQIdOoYl/+gvsQF6+mpnxaTfG9P7srYaiqaDMyKkR36XMXfhqSHss5MyFAO8lew==",
+ "version": "1.4.7",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
+ "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
"dev": true,
"requires": {
- "querystringify": "^2.0.0",
+ "querystringify": "^2.1.1",
"requires-port": "^1.0.0"
}
},
@@ -17652,9 +17163,9 @@
"dev": true
},
"webpack": {
- "version": "4.29.6",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.6.tgz",
- "integrity": "sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw==",
+ "version": "4.30.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.30.0.tgz",
+ "integrity": "sha512-4hgvO2YbAFUhyTdlR4FNyt2+YaYBYHavyzjCMbZzgglo02rlKi/pcsEzwCuCpsn1ryzIl1cq/u8ArIKu8JBYMg==",
"dev": true,
"requires": {
"@webassemblyjs/ast": "1.8.5",
@@ -17755,26 +17266,6 @@
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
- "chokidar": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
- "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
- "dev": true,
- "requires": {
- "anymatch": "^2.0.0",
- "async-each": "^1.0.1",
- "braces": "^2.3.2",
- "fsevents": "^1.2.7",
- "glob-parent": "^3.1.0",
- "inherits": "^2.0.3",
- "is-binary-path": "^1.0.0",
- "is-glob": "^4.0.0",
- "normalize-path": "^3.0.0",
- "path-is-absolute": "^1.0.0",
- "readdirp": "^2.2.1",
- "upath": "^1.1.1"
- }
- },
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@@ -17784,27 +17275,12 @@
"ms": "^2.1.1"
}
},
- "is-glob": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
- "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
},
- "normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true
- },
"semver": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
@@ -17951,9 +17427,9 @@
"dev": true
},
"worker-farm": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz",
- "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",
+ "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==",
"dev": true,
"requires": {
"errno": "~0.1.7"
@@ -18038,6 +17514,23 @@
"pify": "^3.0.0",
"sort-keys": "^2.0.0",
"write-file-atomic": "^2.0.0"
+ },
+ "dependencies": {
+ "make-dir": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
}
},
"write-pkg": {
diff --git a/package.json b/package.json
index b9ed22b9862..5135a191ba4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "webpack-cli",
- "version": "3.3.0",
+ "version": "3.3.2",
"description": "CLI for webpack & friends",
"license": "MIT",
"repository": {
@@ -33,18 +33,18 @@
"clean:all": "rimraf node_modules packages/*/{node_modules}",
"commit": "git-cz",
"docs": "typedoc",
- "format": "prettier-eslint ./bin/*.js ./bin/**/*.js ./test/**/*.js ./packages/**/*.js ./packages/**/**/*.js --write",
- "lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"packages/**/!(node_modules)/*.test.js\"",
+ "format": "prettier-eslint ./bin/*.js ./test/**/*.js ./packages/**/*.js --write",
+ "lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"",
+ "lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"packages/**/!(node_modules)/*.ts\"",
"postinstall": "node ./bin/opencollective.js",
- "pretest": "npm run build && npm run lint && npm run tslint",
+ "pretest": "npm run build && npm run lint",
"reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov",
"test": "nyc jest --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:cli": "nyc jest test/ --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:packages": "nyc jest packages/ --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:ci": "nyc jest --maxWorkers=$(nproc) --reporters=default --reporters=jest-junit",
"travis:integration": "npm run build && npm run test && npm run reportCoverage",
- "travis:lint": "npm run build && npm run lint && npm run tslint",
- "tslint": "tslint -c tslint.json \"packages/**/*.ts\"",
+ "travis:lint": "npm run build && npm run lint",
"watch": "npm run build && tsc -w"
},
"husky": {
@@ -54,12 +54,12 @@
}
},
"lint-staged": {
- "{packages,bin}/**/!(__testfixtures__)/**.js": [
- "eslint --fix",
+ "*.md": [
+ "prettier --parser markdown --write",
"git add"
],
- "{packages,bin}/**/!(__testfixtures__)/**.ts": [
- "tslint --fix",
+ "{packages,bin}/**/!(__testfixtures__)/**.js": [
+ "eslint --fix",
"git add"
]
},
@@ -128,6 +128,7 @@
"import-local": "^2.0.0",
"interpret": "^1.1.0",
"loader-utils": "^1.1.0",
+ "prettier": "^1.17.0",
"supports-color": "^5.5.0",
"v8-compile-cache": "^2.0.2",
"yargs": "^12.0.5"
@@ -144,15 +145,18 @@
"@commitlint/travis-cli": "^7.2.1",
"@types/jest": "^23.3.14",
"@types/node": "^10.12.9",
+ "@typescript-eslint/eslint-plugin": "^1.6.0",
+ "@typescript-eslint/parser": "^1.6.0",
"babel-preset-env": "^1.7.0",
"babel-preset-jest": "^24.3.0",
- "bundlesize": "^0.17.0",
+ "bundlesize": "^0.17.2",
"codecov": "^3.1.0",
"commitizen": "^3.0.7",
"commitlint-config-cz": "^0.10.1",
"conventional-changelog-cli": "^2.0.11",
"cz-customizable": "^5.3.0",
"eslint": "^5.9.0",
+ "eslint-config-prettier": "^4.1.0",
"eslint-plugin-node": "^8.0.0",
"esm": "^3.2.14",
"execa": "^1.0.0",
@@ -160,17 +164,16 @@
"jest": "^24.3.1",
"jest-cli": "^24.3.1",
"jest-junit": "^6.3.0",
- "lerna": "^3.13.2",
+ "lerna": "^3.13.4",
"lint-staged": "7.x.x",
- "nyc": "^13.3.0",
+ "nyc": "^14.1.0",
"prettier-eslint-cli": "^4.7.1",
"readable-stream": "^3.0.6",
"rimraf": "^2.6.2",
"schema-utils": "^1.0.0",
"ts-jest": "^23.10.5",
"ts-node": "^7.0.1",
- "tslint": "^5.11.0",
- "typedoc": "^0.13.0",
+ "typedoc": "^0.14.2",
"typedoc-plugin-monorepo": "^0.1.0",
"typescript": "^3.3.1",
"webpack": "4.x.x",
diff --git a/packages/README.md b/packages/README.md
index 905d1917cca..3e9e3661d5b 100644
--- a/packages/README.md
+++ b/packages/README.md
@@ -1,10 +1,12 @@
# webpack-cli Packages
## Description
+
webpack CLI hosts several standalone packages apart from the main package that focuses on the solving respective smaller use cases.
This folder is the collection of those packages.
## Packages
+
1. [add](https://github.com/webpack/webpack-cli/tree/master/packages/add)
2. [generate-loader](https://github.com/webpack/webpack-cli/tree/master/packages/generate-loader)
3. [generate-plugin](https://github.com/webpack/webpack-cli/tree/master/packages/generate-plugin)
@@ -20,15 +22,19 @@ This folder is the collection of those packages.
13. [webpack-scaffold](https://github.com/webpack/webpack-cli/tree/master/packages/webpack-scaffold)
## Generic Installation
+
1. Standalone installation of packages
+
```shell
npm install @webpack-cli/
```
2. Installation of respective `package` with `webpack-cli` [Recommended]
+
```shell
npm install webpack-cli @webpack-cli/
```
-----
+---
+
[Back to webpack-cli](https://github.com/webpack/webpack-cli)
diff --git a/packages/add/.eslintrc b/packages/add/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/add/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/add/README.md b/packages/add/README.md
index cc13015724b..82196d3e567 100644
--- a/packages/add/README.md
+++ b/packages/add/README.md
@@ -1,6 +1,6 @@
# webpack-cli add
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/add.svg)](https://www.npmjs.com/package/@webpack-cli/add)
+[![NPM downloads][downloads]][downloads-url]
## Description
@@ -34,3 +34,6 @@ add();
```bash
npx webpack-cli add
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/add.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/add
diff --git a/packages/add/index.ts b/packages/add/index.ts
index bc5fe92f195..a63515c9347 100644
--- a/packages/add/index.ts
+++ b/packages/add/index.ts
@@ -12,11 +12,11 @@ import modifyConfigHelper from "@webpack-cli/utils/modify-config-helper";
const DEFAULT_WEBPACK_CONFIG_FILENAME = "webpack.config.js";
export default function add(...args: string[]): Function {
- const filePaths = args.slice(3);
- let configFile = DEFAULT_WEBPACK_CONFIG_FILENAME;
- if (filePaths.length) {
- configFile = filePaths[0];
- }
+ const filePaths = args.slice(3);
+ let configFile = DEFAULT_WEBPACK_CONFIG_FILENAME;
+ if (filePaths.length) {
+ configFile = filePaths[0];
+ }
- return modifyConfigHelper("add", defaultGenerator, configFile);
+ return modifyConfigHelper("add", defaultGenerator, configFile);
}
diff --git a/packages/add/package-lock.json b/packages/add/package-lock.json
index 61a703534e8..dfebd320fe5 100644
--- a/packages/add/package-lock.json
+++ b/packages/add/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@webpack-cli/add",
- "version": "0.1.2",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -10,6 +10,109 @@
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==",
"dev": true
},
+ "@typescript-eslint/eslint-plugin": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.6.0.tgz",
+ "integrity": "sha512-U224c29E2lo861TQZs6GSmyC0OYeRNg6bE9UVIiFBxN2MlA0nq2dCrgIVyyRbC05UOcrgf2Wk/CF2gGOPQKUSQ==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/parser": "1.6.0",
+ "@typescript-eslint/typescript-estree": "1.6.0",
+ "requireindex": "^1.2.0",
+ "tsutils": "^3.7.0"
+ }
+ },
+ "@typescript-eslint/parser": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.6.0.tgz",
+ "integrity": "sha512-VB9xmSbfafI+/kI4gUK3PfrkGmrJQfh0N4EScT1gZXSZyUxpsBirPL99EWZg9MmPG0pzq/gMtgkk7/rAHj4aQw==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/typescript-estree": "1.6.0",
+ "eslint-scope": "^4.0.0",
+ "eslint-visitor-keys": "^1.0.0"
+ }
+ },
+ "@typescript-eslint/typescript-estree": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.6.0.tgz",
+ "integrity": "sha512-A4CanUwfaG4oXobD5y7EXbsOHjCwn8tj1RDd820etpPAjH+Icjc2K9e/DQM1Hac5zH2BSy+u6bjvvF2wwREvYA==",
+ "dev": true,
+ "requires": {
+ "lodash.unescape": "4.0.1",
+ "semver": "5.5.0"
+ }
+ },
+ "eslint-scope": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "eslint-visitor-keys": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
+ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
+ "dev": true
+ },
+ "esrecurse": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.1.0"
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
+ "dev": true
+ },
+ "lodash.unescape": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
+ "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=",
+ "dev": true
+ },
+ "prettier": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
+ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==",
+ "dev": true
+ },
+ "requireindex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
+ "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
+ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
+ "dev": true
+ },
+ "tsutils": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz",
+ "integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.8.1"
+ }
+ },
"typescript": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz",
diff --git a/packages/add/tsconfig.json b/packages/add/tsconfig.json
index 8b1269a36b6..2a74d10580a 100644
--- a/packages/add/tsconfig.json
+++ b/packages/add/tsconfig.json
@@ -1,3 +1,3 @@
{
- "extends": "../../tsconfig.packages.json"
+ "extends": "../../tsconfig.packages.json"
}
diff --git a/packages/generate-loader/.eslintrc b/packages/generate-loader/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/generate-loader/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/generate-loader/README.md b/packages/generate-loader/README.md
index ed7e47ae96a..d1b6ad8a38c 100644
--- a/packages/generate-loader/README.md
+++ b/packages/generate-loader/README.md
@@ -1,6 +1,6 @@
# webpack-cli generate-loader
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/generate-loader.svg)](https://www.npmjs.com/package/@webpack-cli/generate-loader)
+[![NPM Downloads][downloads]][downloads-url]
## Description
@@ -24,6 +24,10 @@ generateLoader();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli generate-loader
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generate-loader.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generate-loader
diff --git a/packages/generate-loader/index.ts b/packages/generate-loader/index.ts
index b56835cfc97..8f280fc6226 100644
--- a/packages/generate-loader/index.ts
+++ b/packages/generate-loader/index.ts
@@ -1,8 +1,6 @@
import LoaderGenerator from "@webpack-cli/generators/loader-generator";
import * as yeoman from "yeoman-environment";
-import { IYeoman } from "./types/Yeoman";
-
/**
* Runs a yeoman generator to create a new webpack loader project
* @returns {void}
diff --git a/packages/generate-loader/package-lock.json b/packages/generate-loader/package-lock.json
index b9561b5e442..90c9c102e80 100644
--- a/packages/generate-loader/package-lock.json
+++ b/packages/generate-loader/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@webpack-cli/generate-loader",
- "version": "0.1.2",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -24,6 +24,47 @@
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==",
"dev": true
},
+ "@typescript-eslint/eslint-plugin": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.6.0.tgz",
+ "integrity": "sha512-U224c29E2lo861TQZs6GSmyC0OYeRNg6bE9UVIiFBxN2MlA0nq2dCrgIVyyRbC05UOcrgf2Wk/CF2gGOPQKUSQ==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/parser": "1.6.0",
+ "@typescript-eslint/typescript-estree": "1.6.0",
+ "requireindex": "^1.2.0",
+ "tsutils": "^3.7.0"
+ }
+ },
+ "@typescript-eslint/parser": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.6.0.tgz",
+ "integrity": "sha512-VB9xmSbfafI+/kI4gUK3PfrkGmrJQfh0N4EScT1gZXSZyUxpsBirPL99EWZg9MmPG0pzq/gMtgkk7/rAHj4aQw==",
+ "dev": true,
+ "requires": {
+ "@typescript-eslint/typescript-estree": "1.6.0",
+ "eslint-scope": "^4.0.0",
+ "eslint-visitor-keys": "^1.0.0"
+ }
+ },
+ "@typescript-eslint/typescript-estree": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.6.0.tgz",
+ "integrity": "sha512-A4CanUwfaG4oXobD5y7EXbsOHjCwn8tj1RDd820etpPAjH+Icjc2K9e/DQM1Hac5zH2BSy+u6bjvvF2wwREvYA==",
+ "dev": true,
+ "requires": {
+ "lodash.unescape": "4.0.1",
+ "semver": "5.5.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "dev": true
+ }
+ }
+ },
"ansi-escapes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
@@ -384,6 +425,37 @@
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
+ "eslint-scope": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "eslint-visitor-keys": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
+ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
+ "dev": true
+ },
+ "esrecurse": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.1.0"
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
+ "dev": true
+ },
"expand-brackets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -905,6 +977,12 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
+ "lodash.unescape": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
+ "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=",
+ "dev": true
+ },
"log-symbols": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
@@ -1142,6 +1220,12 @@
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
+ "prettier": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
+ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==",
+ "dev": true
+ },
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
@@ -1185,6 +1269,12 @@
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
"integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ="
},
+ "requireindex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
+ "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
+ "dev": true
+ },
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@@ -1571,6 +1661,15 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
+ "tsutils": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz",
+ "integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.8.1"
+ }
+ },
"typescript": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz",
diff --git a/packages/generate-loader/types/Yeoman.ts b/packages/generate-loader/types/Yeoman.ts
deleted file mode 100644
index 4c56a771c00..00000000000
--- a/packages/generate-loader/types/Yeoman.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-interface IRunEnv extends Object {
- on?: (event: string, callbackFn: Function) => void;
-}
-
-export interface IYeoman extends Object {
- registerStub?(generator: IGenerator, namespace: string): void;
- run?(target: string, options?: object, done?: Function): IRunEnv;
-}
-
-export interface IGenerator extends Object {
- composeWith?: (path: string) => void;
-}
diff --git a/packages/generate-plugin/.eslintrc b/packages/generate-plugin/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/generate-plugin/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/generate-plugin/README.md b/packages/generate-plugin/README.md
index 29662905a17..096a0ad491e 100644
--- a/packages/generate-plugin/README.md
+++ b/packages/generate-plugin/README.md
@@ -1,6 +1,6 @@
# webpack-cli generate-plugin
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/generate-plugin.svg)](https://www.npmjs.com/package/@webpack-cli/generate-plugin)
+[![NPM Downloads][downloads]][downloads-url]
## Description
@@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/generate-plugin
To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
### Node
+
```js
const generatePlugin = require("@webpack-cli/generate-plugin").default;
generatePlugin();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli generate-plugin
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generate-plugin.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generate-plugin
diff --git a/packages/generate-plugin/index.ts b/packages/generate-plugin/index.ts
index c5fab329c0a..50448da6713 100644
--- a/packages/generate-plugin/index.ts
+++ b/packages/generate-plugin/index.ts
@@ -1,8 +1,6 @@
import PluginGenerator from "@webpack-cli/generators/plugin-generator";
import * as yeoman from "yeoman-environment";
-import { IYeoman } from "./types/Yeoman";
-
/**
* Runs a yeoman generator to create a new webpack plugin project
* @returns {void}
diff --git a/packages/generate-plugin/types/Yeoman.ts b/packages/generate-plugin/types/Yeoman.ts
deleted file mode 100644
index 4c56a771c00..00000000000
--- a/packages/generate-plugin/types/Yeoman.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-interface IRunEnv extends Object {
- on?: (event: string, callbackFn: Function) => void;
-}
-
-export interface IYeoman extends Object {
- registerStub?(generator: IGenerator, namespace: string): void;
- run?(target: string, options?: object, done?: Function): IRunEnv;
-}
-
-export interface IGenerator extends Object {
- composeWith?: (path: string) => void;
-}
diff --git a/packages/generators/.eslintrc b/packages/generators/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/generators/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/generators/.gitignore b/packages/generators/.gitignore
index 74dcaf3ce86..b3cdf36cae7 100644
--- a/packages/generators/.gitignore
+++ b/packages/generators/.gitignore
@@ -2,3 +2,4 @@
**/*.js
!*.test.js
!/**/*.test.js
+!/templates/*.js
diff --git a/packages/generators/README.md b/packages/generators/README.md
index 5139dcf3c4b..6fcb5621dec 100644
--- a/packages/generators/README.md
+++ b/packages/generators/README.md
@@ -1,10 +1,10 @@
# webpack-cli generators
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/generators.svg)](https://www.npmjs.com/package/@webpack-cli/generators)
+[![NPM Downloads][downloads]][downloads-url]
## Description
-This package contains all webpack-cli related yeoman generators.
+This package contains all webpack-cli related yeoman generators.
## Installation
@@ -19,19 +19,31 @@ To run the package programmatically, install it as a dependency. When using the
### Node
```js
-const { addGenerator, addonGenerator, initGenerator, loaderGenerator,
- pluginGenerator, removeGenerator, updateGenerator
- } = require("@webpack-cli/generators");
- // ... compose with yeoman env or add a generator to your own yeoman project
+const {
+ addGenerator,
+ addonGenerator,
+ initGenerator,
+ loaderGenerator,
+ pluginGenerator,
+ removeGenerator,
+ updateGenerator
+} = require("@webpack-cli/generators");
+// ... compose with yeoman env or add a generator to your own yeoman project
```
+
## Generators
-- [**Plugin Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/plugin-generator.ts) : Creates a webpack plugin project, add starter plugin code and runs `webpack-defaults`
-- [**Remove Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/remove-generator.ts) : Removes properties from webpack configurations
-- [**Update Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/update-generator.ts) : [WIP] Updates properties of webpack configurations
-- [**Loader Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/loader-generator.ts) : Creates a webpack loader project, add starter loader code and runs `webpack-defaults`
-- [**Init Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/init-generator.ts) : Generates new webapck configuration as per user requirements
-- [**Add Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/add-generator.ts) : Add properties to webpack configurations
-- [**Addon Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/addon-generator.ts) : Generates a webpack project conforming to `webpack-defaults`
+- [**Plugin Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/plugin-generator.ts) : Creates a webpack plugin project, add starter plugin code and runs `webpack-defaults`
+- [**Remove Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/remove-generator.ts) : Removes properties from webpack configurations
+- [**Update Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/update-generator.ts) : [WIP] Updates properties of webpack configurations
+- [**Loader Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/loader-generator.ts) : Creates a webpack loader project, add starter loader code and runs `webpack-defaults`
+- [**Init Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/init-generator.ts) : Generates new webapck configuration as per user requirements
+- [**Add Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/add-generator.ts) : Add properties to webpack configurations
+- [**Addon Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/addon-generator.ts) : Generates a webpack project conforming to `webpack-defaults`
+
---
+
[Back to Packages](https://github.com/webpack/webpack-cli/tree/master/packages)
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generators.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generators
diff --git a/packages/generators/__tests__/.eslintrc b/packages/generators/__tests__/.eslintrc
new file mode 100644
index 00000000000..e3e3b0884ac
--- /dev/null
+++ b/packages/generators/__tests__/.eslintrc
@@ -0,0 +1,9 @@
+{
+ "root": true,
+ "extends": [
+ "../.eslintrc"
+ ],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["off"]
+ }
+}
diff --git a/packages/generators/__tests__/add-generator.test.ts b/packages/generators/__tests__/add-generator.test.ts
new file mode 100644
index 00000000000..7906123cb4e
--- /dev/null
+++ b/packages/generators/__tests__/add-generator.test.ts
@@ -0,0 +1,14 @@
+import { generatePluginName } from "../utils/plugins"
+
+describe("generatePluginName", () => {
+ it("should return webpack Standard Plugin Name for Name : extract-text-webpack-plugin", () => {
+ const pluginName = generatePluginName("extract-text-webpack-plugin");
+ expect(pluginName).toEqual("ExtractTextWebpackPlugin");
+ });
+
+ it("should return webpack Standard Plugin Name for Name : webpack.DefinePlugin", () => {
+ const pluginName = generatePluginName("webpack.DefinePlugin");
+ expect(pluginName).toEqual("webpack.DefinePlugin");
+ });
+});
+
diff --git a/packages/generators/loader-generator.test.js b/packages/generators/__tests__/loader-generator.test.ts
similarity index 84%
rename from packages/generators/loader-generator.test.js
rename to packages/generators/__tests__/loader-generator.test.ts
index 283f6bf551a..f8d6c4667c3 100644
--- a/packages/generators/loader-generator.test.js
+++ b/packages/generators/__tests__/loader-generator.test.ts
@@ -1,6 +1,4 @@
-"use strict";
-
-const { makeLoaderName } = require("./loader-generator");
+import { makeLoaderName } from "../loader-generator";
describe("makeLoaderName", () => {
it("should kebab-case loader name and append '-loader'", () => {
diff --git a/packages/generators/add-generator.ts b/packages/generators/add-generator.ts
index 134c10be8b4..ced8cd62311 100644
--- a/packages/generators/add-generator.ts
+++ b/packages/generators/add-generator.ts
@@ -1,4 +1,4 @@
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
import * as glob from "glob-all";
import * as autoComplete from "inquirer-autocomplete-prompt";
@@ -7,37 +7,15 @@ import * as path from "path";
import npmExists from "@webpack-cli/utils/npm-exists";
import { getPackageManager } from "@webpack-cli/utils/package-manager";
import PROP_TYPES from "@webpack-cli/utils/prop-types";
-import {
- AutoComplete,
- Confirm,
- IInquirerInput,
- Input,
- List,
-} from "@webpack-cli/webpack-scaffold";
+import { AutoComplete, Confirm, Input, List } from "@webpack-cli/webpack-scaffold";
-import { ISchemaProperties, IWebpackOptions } from "./types";
+import { SchemaProperties, WebpackOptions } from "./types";
import entryQuestions from "./utils/entry";
-
-// tslint:disable:no-var-requires
-const webpackDevServerSchema = require("webpack-dev-server/lib/options.json");
-const webpackSchema = require("./utils/optionsSchema.json");
+import { generatePluginName } from "./utils/plugins";
+import * as webpackDevServerSchema from "webpack-dev-server/lib/options.json";
+import * as webpackSchema from "./utils/optionsSchema.json";
const PROPS: string[] = Array.from(PROP_TYPES.keys());
-/**
- *
- * Replaces the string with a substring at the given index
- * https://gist.github.com/efenacigiray/9367920
- *
- * @param {String} string - string to be modified
- * @param {Number} index - index to replace from
- * @param {String} replace - string to replace starting from index
- *
- * @returns {String} string - The newly mutated string
- *
- */
-function replaceAt(str: string, index: number, replace: string): string {
- return str.substring(0, index) + replace + str.substring(index + 1);
-}
/**
*
@@ -51,11 +29,13 @@ function replaceAt(str: string, index: number, replace: string): string {
*/
const traverseAndGetProperties = (arr: object[], prop: string): boolean => {
let hasProp = false;
- arr.forEach((p: object): void => {
- if (p[prop]) {
- hasProp = true;
+ arr.forEach(
+ (p: object): void => {
+ if (p[prop]) {
+ hasProp = true;
+ }
}
- });
+ );
return hasProp;
};
@@ -71,11 +51,7 @@ const traverseAndGetProperties = (arr: object[], prop: string): boolean => {
*/
const searchProps = (answers: object, input: string): Promise => {
input = input || "";
- return Promise.resolve(
- PROPS.filter((prop: string): boolean =>
- prop.toLowerCase().includes(input.toLowerCase()),
- ),
- );
+ return Promise.resolve(PROPS.filter((prop: string): boolean => prop.toLowerCase().includes(input.toLowerCase())));
};
/**
@@ -91,452 +67,406 @@ export default class AddGenerator extends Generator {
private dependencies: string[];
private configuration: {
config: {
- configName?: string,
- topScope?: string[],
+ configName?: string;
+ topScope?: string[];
item?: string;
- webpackOptions?: IWebpackOptions,
- },
+ webpackOptions?: WebpackOptions;
+ };
};
- constructor(args, opts) {
+ public constructor(args, opts) {
super(args, opts);
this.dependencies = [];
this.configuration = {
config: {
topScope: ["const webpack = require('webpack')"],
- webpackOptions: {},
- },
+ webpackOptions: {}
+ }
};
const { registerPrompt } = this.env.adapter.promptModule;
registerPrompt("autocomplete", autoComplete);
}
- public prompting() {
- const done: (_?: void) => void | boolean = this.async();
+ public prompting(): Promise {
+ const done: () => {} = this.async();
let action: string;
const self: this = this;
- const manualOrListInput: (promptAction: string) => IInquirerInput = (promptAction: string) =>
+ const manualOrListInput: (promptAction: string) => Generator.Question = (promptAction: string): Generator.Question =>
Input("actionAnswer", `What do you want to add to ${promptAction}?`);
- let inputPrompt: IInquirerInput;
+ let inputPrompt: Generator.Question;
// first index indicates if it has a deep prop, 2nd indicates what kind of
+ // TODO: this must be reviewed. It starts as an array of booleans but after that it get overridden
+ // Bye bye functional programming.
+ // eslint-disable-next-line
const isDeepProp: any[] = [false, false];
return this.prompt([
- AutoComplete(
- "actionType",
- "What property do you want to add to?",
- {
- pageSize: 7,
- source: searchProps,
- suggestOnly: false,
- },
- ),
- ])
- .then((actionTypeAnswer: {
- actionType: string,
- }) => {
- // Set initial prop, like devtool
- this.configuration.config.webpackOptions[
- actionTypeAnswer.actionType
- ] = null;
- // update the action variable, we're using it later
- action = actionTypeAnswer.actionType;
+ AutoComplete("actionType", "What property do you want to add to?", {
+ pageSize: 7,
+ source: searchProps,
+ suggestOnly: false
})
- .then((_: void) => {
- if (action === "entry") {
- return this.prompt([
- Confirm("entryType", "Will your application have multiple bundles?", false),
- ])
- .then((entryTypeAnswer: {
- entryType: boolean,
- }) => {
- // Ask different questions for entry points
- return entryQuestions(self, entryTypeAnswer);
- })
- .then((entryOptions: {
- entryType: boolean;
- }) => {
- this.configuration.config.webpackOptions.entry = entryOptions;
- this.configuration.config.item = action;
- });
+ ])
+ .then(
+ (actionTypeAnswer: { actionType: string }): void => {
+ // Set initial prop, like devtool
+ this.configuration.config.webpackOptions[actionTypeAnswer.actionType] = null;
+ // update the action variable, we're using it later
+ action = actionTypeAnswer.actionType;
+ }
+ )
+ .then(
+ (): Promise => {
+ if (action === "entry") {
+ return this.prompt([
+ Confirm("entryType", "Will your application have multiple bundles?", false)
+ ])
+ .then(
+ (entryTypeAnswer: { entryType: boolean }): Promise => {
+ // Ask different questions for entry points
+ return entryQuestions(self, entryTypeAnswer.entryType);
+ }
+ )
+ .then(
+ (entryOptions: { entryType: boolean }): void => {
+ this.configuration.config.webpackOptions.entry = entryOptions;
+ this.configuration.config.item = action;
+ }
+ );
} else {
if (action === "topScope") {
- return this.prompt([
- Input("topScope", "What do you want to add to topScope?"),
- ])
- .then((topScopeAnswer: {
- topScope: string;
- }) => {
- this.configuration.config.topScope.push(topScopeAnswer.topScope);
- done();
- });
+ return this.prompt([Input("topScope", "What do you want to add to topScope?")]).then(
+ (topScopeAnswer: { topScope: string }): void => {
+ this.configuration.config.topScope.push(topScopeAnswer.topScope);
+ done();
+ }
+ );
}
}
- const temp = action;
- if (action === "resolveLoader") {
- action = "resolve";
- }
- const webpackSchemaProp: ISchemaProperties = webpackSchema.definitions[action];
- /*
- * https://github.com/webpack/webpack/blob/next/schemas/WebpackOptions.json
- * Find the properties directly in the properties prop, or the anyOf prop
- */
- let defOrPropDescription: object = webpackSchemaProp
- ? webpackSchemaProp.properties
- : webpackSchema.properties[action].properties
+ const temp = action;
+ if (action === "resolveLoader") {
+ action = "resolve";
+ }
+ const webpackSchemaProp: SchemaProperties = webpackSchema.definitions[action];
+ /*
+ * https://github.com/webpack/webpack/blob/next/schemas/WebpackOptions.json
+ * Find the properties directly in the properties prop, or the anyOf prop
+ */
+ let defOrPropDescription: object = webpackSchemaProp
+ ? webpackSchemaProp.properties
+ : webpackSchema.properties[action].properties
? webpackSchema.properties[action].properties
: webpackSchema.properties[action].anyOf
- ? webpackSchema.properties[action].anyOf.filter(
- (p: {
- properties?: object,
- enum?: any[],
- }) => p.properties || p.enum,
- )
- : null;
- if (Array.isArray(defOrPropDescription)) {
- // Todo: Generalize these to go through the array, then merge enum with props if needed
- const hasPropertiesProp: boolean = traverseAndGetProperties(
- defOrPropDescription,
- "properties",
- );
- const hasEnumProp: boolean = traverseAndGetProperties(
- defOrPropDescription,
- "enum",
- );
- /* as we know he schema only has two arrays that might hold our values,
- * check them for either having arr.enum or arr.properties
- */
- if (hasPropertiesProp) {
- defOrPropDescription =
- defOrPropDescription[0].properties ||
- defOrPropDescription[1].properties;
- if (!defOrPropDescription) {
- defOrPropDescription = defOrPropDescription[0].enum;
- }
- // TODO: manually implement stats and devtools like sourcemaps
- } else if (hasEnumProp) {
- const originalPropDesc: object = defOrPropDescription[0].enum;
- // Array -> Object -> Merge objects into one for compat in manualOrListInput
- defOrPropDescription = Object.keys(defOrPropDescription[0].enum)
- .map((p: string): object => {
- return Object.assign(
- {},
- {
- [originalPropDesc[p]]: "noop",
- },
- );
- })
- .reduce((result: object, currentObject: object): object => {
- for (const key in currentObject) {
- if (currentObject.hasOwnProperty(key)) {
- result[key] = currentObject[key];
+ ? webpackSchema.properties[action].anyOf.filter(
+ (p: { properties?: object; enum?: string[] }): boolean => !!p.properties || !!p.enum
+ )
+ : null;
+ if (Array.isArray(defOrPropDescription)) {
+ // Todo: Generalize these to go through the array, then merge enum with props if needed
+ const hasPropertiesProp: boolean = traverseAndGetProperties(defOrPropDescription, "properties");
+ const hasEnumProp: boolean = traverseAndGetProperties(defOrPropDescription, "enum");
+ /* as we know he schema only has two arrays that might hold our values,
+ * check them for either having arr.enum or arr.properties
+ */
+ if (hasPropertiesProp) {
+ defOrPropDescription =
+ defOrPropDescription[0].properties || defOrPropDescription[1].properties;
+ if (!defOrPropDescription) {
+ defOrPropDescription = defOrPropDescription[0].enum;
+ }
+ // TODO: manually implement stats and devtools like sourcemaps
+ } else if (hasEnumProp) {
+ const originalPropDesc: object = defOrPropDescription[0].enum;
+ // Array -> Object -> Merge objects into one for compat in manualOrListInput
+ defOrPropDescription = Object.keys(defOrPropDescription[0].enum)
+ .map(
+ (p: string): object => {
+ return Object.assign(
+ {},
+ {
+ [originalPropDesc[p]]: "noop"
+ }
+ );
}
- }
- return result;
- }, {});
+ )
+ .reduce((result: object, currentObject: object): object => {
+ for (const key in currentObject) {
+ if (currentObject.hasOwnProperty(key)) {
+ result[key] = currentObject[key];
+ }
+ }
+ return result;
+ }, {});
+ }
}
- }
- // WDS has its own schema, so we gonna need to check that too
- const webpackDevserverSchemaProp: ISchemaProperties =
- action === "devServer" ? webpackDevServerSchema : null;
- // Watch has a boolean arg, but we need to append to it manually
- if (action === "watch") {
- defOrPropDescription = {
- false: {},
- true: {},
- };
- }
- if (action === "mode") {
- defOrPropDescription = {
- development: {},
- production: {},
- };
- }
- action = temp;
- if (action === "resolveLoader") {
- defOrPropDescription = Object.assign(defOrPropDescription, {
- moduleExtensions: {},
- });
- }
- // If we've got a schema prop or devServer Schema Prop
- if (defOrPropDescription || webpackDevserverSchemaProp) {
- // Check for properties in definitions[action] or properties[action]
- if (defOrPropDescription) {
- if (action !== "devtool") {
- // Add the option of adding an own variable if the user wants
- defOrPropDescription = Object.assign(defOrPropDescription, {
- other: {},
- });
+ // WDS has its own schema, so we gonna need to check that too
+ const webpackDevserverSchemaProp: SchemaProperties =
+ action === "devServer" ? webpackDevServerSchema : null;
+ // Watch has a boolean arg, but we need to append to it manually
+ if (action === "watch") {
+ defOrPropDescription = {
+ false: {},
+ true: {}
+ };
+ }
+ if (action === "mode") {
+ defOrPropDescription = {
+ development: {},
+ production: {}
+ };
+ }
+ action = temp;
+ if (action === "resolveLoader") {
+ defOrPropDescription = Object.assign(defOrPropDescription, {
+ moduleExtensions: {}
+ });
+ }
+ // If we've got a schema prop or devServer Schema Prop
+ if (defOrPropDescription || webpackDevserverSchemaProp) {
+ // Check for properties in definitions[action] or properties[action]
+ if (defOrPropDescription) {
+ if (action !== "devtool") {
+ // Add the option of adding an own variable if the user wants
+ defOrPropDescription = Object.assign(defOrPropDescription, {
+ other: {}
+ });
+ } else {
+ // The schema doesn't have the source maps we can prompt, so add those
+ defOrPropDescription = Object.assign(defOrPropDescription, {
+ "cheap-eval-source-map": {},
+ "cheap-module-eval-source-map": {},
+ "cheap-module-source-map": {},
+ "cheap-source-map": {},
+ eval: {},
+ "eval-source-map": {},
+ "hidden-source-map": {},
+ "inline-cheap-module-source-map": {},
+ "inline-cheap-source-map": {},
+ "inline-source-map": {},
+ "nosources-source-map": {},
+ "source-map": {}
+ });
+ }
+ inputPrompt = List(
+ "actionAnswer",
+ `What do you want to add to ${action}?`,
+ Object.keys(defOrPropDescription)
+ );
+ // We know we're gonna append some deep prop like module.rule
+ isDeepProp[0] = true;
+ } else if (webpackDevserverSchemaProp) {
+ // Append the custom property option
+ webpackDevserverSchemaProp.properties = Object.assign(
+ webpackDevserverSchemaProp.properties,
+ {
+ other: {}
+ }
+ );
+ inputPrompt = List(
+ "actionAnswer",
+ `What do you want to add to ${action}?`,
+ Object.keys(webpackDevserverSchemaProp.properties)
+ );
+ // We know we are in a devServer.prop scenario
+ isDeepProp[0] = true;
} else {
- // The schema doesn't have the source maps we can prompt, so add those
- defOrPropDescription = Object.assign(defOrPropDescription, {
- "cheap-eval-source-map": {},
- "cheap-module-eval-source-map": {},
- "cheap-module-source-map": {},
- "cheap-source-map": {},
- "eval": {},
- "eval-source-map": {},
- "hidden-source-map": {},
- "inline-cheap-module-source-map": {},
- "inline-cheap-source-map": {},
- "inline-source-map": {},
- "nosources-source-map": {},
- "source-map": {},
- });
+ // manual input if non-existent
+ inputPrompt = manualOrListInput(action);
}
- inputPrompt = List(
- "actionAnswer",
- `What do you want to add to ${action}?`,
- Object.keys(defOrPropDescription),
- );
- // We know we're gonna append some deep prop like module.rule
- isDeepProp[0] = true;
- } else if (webpackDevserverSchemaProp) {
- // Append the custom property option
- webpackDevserverSchemaProp.properties = Object.assign(
- webpackDevserverSchemaProp.properties,
- {
- other: {},
- },
- );
- inputPrompt = List(
- "actionAnswer",
- `What do you want to add to ${action}?`,
- Object.keys(webpackDevserverSchemaProp.properties),
- );
- // We know we are in a devServer.prop scenario
- isDeepProp[0] = true;
} else {
- // manual input if non-existent
inputPrompt = manualOrListInput(action);
}
- } else {
- inputPrompt = manualOrListInput(action);
- }
- return this.prompt([
- inputPrompt,
- ]);
- })
- .then((answerToAction: {
- actionAnswer: string,
- }) => {
- if (!answerToAction) {
- done();
- return;
+ return this.prompt([inputPrompt]);
}
- /*
- * Plugins got their own logic,
- * find the names of each natively plugin and check if it matches
- */
- if (action === "plugins") {
- const pluginExist: string = glob
- .sync([
- "node_modules/webpack/lib/*Plugin.js",
- "node_modules/webpack/lib/**/*Plugin.js",
- ])
- .map((p: string): string =>
- p
- .split("/")
- .pop()
- .replace(".js", ""),
- )
- .find(
- (p: string): boolean => p.toLowerCase().indexOf(answerToAction.actionAnswer) >= 0,
- );
-
- if (pluginExist) {
- this.configuration.config.item = pluginExist;
- const pluginsSchemaPath: string = glob
- .sync([
- "node_modules/webpack/schemas/plugins/*Plugin.json",
- "node_modules/webpack/schemas/plugins/**/*Plugin.json",
- ])
- .find(
- (p: string): boolean =>
+ )
+ .then(
+ (answerToAction: { actionAnswer: string }): Promise => {
+ if (!answerToAction) {
+ done();
+ return;
+ }
+ /*
+ * Plugins got their own logic,
+ * find the names of each natively plugin and check if it matches
+ */
+ if (action === "plugins") {
+ const pluginExist: string = glob
+ .sync(["node_modules/webpack/lib/*Plugin.js", "node_modules/webpack/lib/**/*Plugin.js"])
+ .map(
+ (p: string): string =>
p
.split("/")
.pop()
- .replace(".json", "")
- .toLowerCase()
- .indexOf(answerToAction.actionAnswer) >= 0,
- );
- if (pluginsSchemaPath) {
- const constructorPrefix: string =
- pluginsSchemaPath.indexOf("optimize") >= 0
- ? "webpack.optimize"
- : "webpack";
- const resolvePluginsPath: string = path.resolve(pluginsSchemaPath);
- const pluginSchema: object = resolvePluginsPath
- ? require(resolvePluginsPath)
- : null;
- let pluginsSchemaProps: string[] = ["other"];
- if (pluginSchema) {
- Object.keys(pluginSchema)
- .filter((p: string): boolean => Array.isArray(pluginSchema[p]))
- .forEach((p: string): void => {
- Object.keys(pluginSchema[p]).forEach((n: string): void => {
- if (pluginSchema[p][n].properties) {
- pluginsSchemaProps = Object.keys(
- pluginSchema[p][n].properties,
+ .replace(".js", "")
+ )
+ .find((p: string): boolean => p.toLowerCase().indexOf(answerToAction.actionAnswer) >= 0);
+
+ if (pluginExist) {
+ this.configuration.config.item = pluginExist;
+ const pluginsSchemaPath: string = glob
+ .sync([
+ "node_modules/webpack/schemas/plugins/*Plugin.json",
+ "node_modules/webpack/schemas/plugins/**/*Plugin.json"
+ ])
+ .find(
+ (p: string): boolean =>
+ p
+ .split("/")
+ .pop()
+ .replace(".json", "")
+ .toLowerCase()
+ .indexOf(answerToAction.actionAnswer) >= 0
+ );
+ if (pluginsSchemaPath) {
+ const constructorPrefix: string =
+ pluginsSchemaPath.indexOf("optimize") >= 0 ? "webpack.optimize" : "webpack";
+ const resolvePluginsPath: string = path.resolve(pluginsSchemaPath);
+ const pluginSchema: object = resolvePluginsPath ? require(resolvePluginsPath) : null;
+ let pluginsSchemaProps: string[] = ["other"];
+ if (pluginSchema) {
+ Object.keys(pluginSchema)
+ .filter((p: string): boolean => Array.isArray(pluginSchema[p]))
+ .forEach(
+ (p: string): void => {
+ Object.keys(pluginSchema[p]).forEach(
+ (n: string): void => {
+ if (pluginSchema[p][n].properties) {
+ pluginsSchemaProps = Object.keys(
+ pluginSchema[p][n].properties
+ );
+ }
+ }
);
}
- });
- });
- }
+ );
+ }
- return this.prompt([
- List(
- "pluginsPropType",
- `What property do you want to add ${pluginExist}?`,
- pluginsSchemaProps,
- ),
- ]).then((pluginsPropAnswer: {
- pluginsPropType: string,
- }) => {
return this.prompt([
- Input(
- "pluginsPropTypeVal",
- `What value should ${pluginExist}.${
- pluginsPropAnswer.pluginsPropType
- } have?`,
- ),
- ]).then((valForProp: {
- pluginsPropTypeVal: string,
- }) => {
- this.configuration.config.webpackOptions[action] = {
- [`${constructorPrefix}.${pluginExist}`]: {
- [pluginsPropAnswer.pluginsPropType]:
- valForProp.pluginsPropTypeVal,
- },
- };
- done();
- });
- });
+ List(
+ "pluginsPropType",
+ `What property do you want to add ${pluginExist}?`,
+ pluginsSchemaProps
+ )
+ ]).then(
+ (pluginsPropAnswer: { pluginsPropType: string }): Promise => {
+ return this.prompt([
+ Input(
+ "pluginsPropTypeVal",
+ `What value should ${pluginExist}.${
+ pluginsPropAnswer.pluginsPropType
+ } have?`
+ )
+ ]).then(
+ (valForProp: { pluginsPropTypeVal: string }): void => {
+ this.configuration.config.webpackOptions[action] = {
+ [`${constructorPrefix}.${pluginExist}`]: {
+ [pluginsPropAnswer.pluginsPropType]:
+ valForProp.pluginsPropTypeVal
+ }
+ };
+ done();
+ }
+ );
+ }
+ );
+ } else {
+ this.configuration.config.webpackOptions[action] = `new webpack.${pluginExist}`;
+ done();
+ }
} else {
- this.configuration.config.webpackOptions[
- action
- ] = `new webpack.${pluginExist}`;
- done();
+ // If its not in webpack, check npm
+ npmExists(answerToAction.actionAnswer).then(
+ (p: boolean): void => {
+ if (p) {
+ this.dependencies.push(answerToAction.actionAnswer);
+ const pluginName = generatePluginName(answerToAction.actionAnswer)
+ this.configuration.config.topScope.push(
+ `const ${pluginName} = require("${answerToAction.actionAnswer}")`
+ );
+ this.configuration.config.webpackOptions[action] = `new ${pluginName}`;
+ this.configuration.config.item = answerToAction.actionAnswer;
+ done();
+ this.scheduleInstallTask(getPackageManager(), this.dependencies, {
+ "save-dev": true
+ });
+ } else {
+ console.error(
+ answerToAction.actionAnswer,
+ "doesn't exist on NPM or is built in webpack, please check for any misspellings."
+ );
+ process.exit(0);
+ }
+ }
+ );
}
} else {
- // If its not in webpack, check npm
- npmExists(answerToAction.actionAnswer)
- .then((p: string) => {
- if (p) {
- this.dependencies.push(answerToAction.actionAnswer);
- const normalizePluginName = answerToAction.actionAnswer.replace(
- "-webpack-plugin",
- "Plugin",
- );
- const pluginName = replaceAt(
- normalizePluginName,
- 0,
- normalizePluginName.charAt(0).toUpperCase(),
- );
- this.configuration.config.topScope.push(
- `const ${pluginName} = require("${
- answerToAction.actionAnswer
- }")`,
- );
- this.configuration.config.webpackOptions[
- action
- ] = `new ${pluginName}`;
- this.configuration.config.item = answerToAction.actionAnswer;
- done();
- this.scheduleInstallTask(getPackageManager(), this.dependencies, {
- "save-dev": true,
- });
- } else {
- console.error(
- answerToAction.actionAnswer,
- "doesn't exist on NPM or is built in webpack, please check for any misspellings.",
- );
- process.exit(0);
+ // If we're in the scenario with a deep-property
+ if (isDeepProp[0]) {
+ isDeepProp[1] = answerToAction.actionAnswer;
+ if (
+ isDeepProp[1] !== "other" &&
+ (action === "devtool" || action === "watch" || action === "mode")
+ ) {
+ this.configuration.config.item = action;
+ this.configuration.config.webpackOptions[action] = answerToAction.actionAnswer;
+ done();
+ return;
+ }
+ // Either we are adding directly at the property, else we're in a prop.theOne scenario
+ const actionMessage =
+ isDeepProp[1] === "other"
+ ? `What do you want the key on ${action} to be? (press enter if you want it directly as a value on the property)`
+ : `What do you want the value of ${isDeepProp[1]} to be?`;
+
+ this.prompt([Input("deepProp", actionMessage)]).then(
+ (deepPropAns: { deepProp: string }): void => {
+ // The other option needs to be validated of either being empty or not
+ if (isDeepProp[1] === "other") {
+ const othersDeepPropKey: string = deepPropAns.deepProp
+ ? `What do you want the value of ${deepPropAns.deepProp} to be?` // eslint-disable-line
+ : `What do you want to be the value of ${action} to be?`;
+ // Push the answer to the array we have created, so we can use it later
+ isDeepProp.push(deepPropAns.deepProp);
+ this.prompt([Input("innerProp", othersDeepPropKey)]).then(
+ (innerPropAns: { innerProp }): void => {
+ // Check length, if it has none, add the prop directly on the given action
+ if (isDeepProp[2].length === 0) {
+ this.configuration.config.item = action;
+ this.configuration.config.webpackOptions[action] =
+ innerPropAns.innerProp;
+ } else {
+ // If not, we're adding to something like devServer.myProp
+ this.configuration.config.item = action + "." + isDeepProp[2];
+ this.configuration.config.webpackOptions[action] = {
+ [isDeepProp[2]]: innerPropAns.innerProp
+ };
+ }
+ done();
+ }
+ );
+ } else {
+ // We got the schema prop, we've correctly prompted it, and can add it directly
+ this.configuration.config.item = `${action}.${isDeepProp[1]}`;
+ this.configuration.config.webpackOptions[action] = {
+ [isDeepProp[1]]: deepPropAns.deepProp
+ };
+ done();
+ }
}
- });
- }
- } else {
- // If we're in the scenario with a deep-property
- if (isDeepProp[0]) {
- isDeepProp[1] = answerToAction.actionAnswer;
- if (
- isDeepProp[1] !== "other" &&
- (action === "devtool" || action === "watch" || action === "mode")
- ) {
+ );
+ } else {
+ // We're asking for input-only
this.configuration.config.item = action;
- this.configuration.config.webpackOptions[action] =
- answerToAction.actionAnswer;
+ this.configuration.config.webpackOptions[action] = answerToAction.actionAnswer;
done();
- return;
}
- // Either we are adding directly at the property, else we're in a prop.theOne scenario
- const actionMessage =
- isDeepProp[1] === "other"
- ? `What do you want the key on ${
- action
- } to be? (press enter if you want it directly as a value on the property)`
- : `What do you want the value of ${isDeepProp[1]} to be?`;
-
- this.prompt([
- Input("deepProp", actionMessage),
- ]).then(
- (deepPropAns: {
- deepProp: string,
- }) => {
- // The other option needs to be validated of either being empty or not
- if (isDeepProp[1] === "other") {
- const othersDeepPropKey: string = deepPropAns.deepProp
- ? `What do you want the value of ${
- deepPropAns.deepProp
- } to be?` // eslint-disable-line
- : `What do you want to be the value of ${action} to be?`;
- // Push the answer to the array we have created, so we can use it later
- isDeepProp.push(deepPropAns.deepProp);
- this.prompt([
- Input("innerProp", othersDeepPropKey),
- ]).then(
- (innerPropAns: {
- innerProp,
- }) => {
- // Check length, if it has none, add the prop directly on the given action
- if (isDeepProp[2].length === 0) {
- this.configuration.config.item = action;
- this.configuration.config.webpackOptions[action] =
- innerPropAns.innerProp;
- } else {
- // If not, we're adding to something like devServer.myProp
- this.configuration.config.item =
- action + "." + isDeepProp[2];
- this.configuration.config.webpackOptions[action] = {
- [isDeepProp[2]]: innerPropAns.innerProp,
- };
- }
- done();
- },
- );
- } else {
- // We got the schema prop, we've correctly prompted it, and can add it directly
- this.configuration.config.item = `${action}.${isDeepProp[1]}`;
- this.configuration.config.webpackOptions[action] = {
- [isDeepProp[1]]: deepPropAns.deepProp,
- };
- done();
- }
- },
- );
- } else {
- // We're asking for input-only
- this.configuration.config.item = action;
- this.configuration.config.webpackOptions[action] =
- answerToAction.actionAnswer;
- done();
}
}
- });
+ );
}
- public writing() {
+ public writing(): void {
this.config.set("configuration", this.configuration);
}
}
diff --git a/packages/generators/addon-generator.ts b/packages/generators/addon-generator.ts
index 7f83dddf104..fbbcf7fc8e5 100644
--- a/packages/generators/addon-generator.ts
+++ b/packages/generators/addon-generator.ts
@@ -1,15 +1,14 @@
import * as mkdirp from "mkdirp";
import * as path from "path";
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
import * as copyUtils from "@webpack-cli/utils/copy-utils";
-import { IInquirerScaffoldObject } from "@webpack-cli/webpack-scaffold";
/**
* Creates a Yeoman Generator that generates a project conforming
* to webpack-defaults.
*
- * @param {any[]} prompts An array of Yeoman prompt objects
+ * @param {Generator.Questions} prompts An array of Yeoman prompt objects
*
* @param {string} templateDir Absolute path to template directory
*
@@ -26,60 +25,60 @@ import { IInquirerScaffoldObject } from "@webpack-cli/webpack-scaffold";
*
* @returns {Generator} A class extending Generator
*/
-export default function addonGenerator(
- prompts: IInquirerScaffoldObject[],
+const addonGenerator = (
+ prompts: Generator.Questions,
templateDir: string,
copyFiles: string[],
copyTemplateFiles: string[],
- templateFn: Function,
-) {
- return class AddOnGenerator extends Generator {
- public props: IInquirerScaffoldObject;
- private copy: (value: string, index: number, array: string[]) => void;
- private copyTpl: (value: string, index: number, array: string[]) => void;
+ templateFn: Function
+): typeof Generator => class AddonGenerator extends Generator {
+ public props: Generator.Question;
+ public copy: (value: string, index: number, array: string[]) => void;
+ public copyTpl: (value: string, index: number, array: string[]) => void;
- public prompting(): Promise<{}> {
- return this.prompt(prompts)
- .then((props: IInquirerScaffoldObject): void => {
+ public prompting(): Promise {
+ return this.prompt(prompts).then(
+ (props: Generator.Question): void => {
this.props = props;
- });
+ }
+ );
}
- public default() {
+ public default(): void {
const currentDirName = path.basename(this.destinationPath());
if (currentDirName !== this.props.name) {
this.log(`
Your project must be inside a folder named ${this.props.name}
I will create this folder for you.
`);
- mkdirp(this.props.name, (err: object) => {
- console.error("Failed to create directory", err);
- });
+ mkdirp(
+ this.props.name,
+ (err: object): void => {
+ console.error("Failed to create directory", err);
+ }
+ );
const pathToProjectDir: string = this.destinationPath(this.props.name);
this.destinationRoot(pathToProjectDir);
}
}
- public writing() {
+ public writing(): void {
this.copy = copyUtils.generatorCopy(this, templateDir);
- this.copyTpl = copyUtils.generatorCopyTpl(
- this,
- templateDir,
- templateFn(this),
- );
+ this.copyTpl = copyUtils.generatorCopyTpl(this, templateDir, templateFn(this));
copyFiles.forEach(this.copy);
copyTemplateFiles.forEach(this.copyTpl);
}
- public install() {
+ public install(): void {
this.npmInstall(["webpack-defaults", "bluebird"], {
- "save-dev": true,
+ "save-dev": true
});
}
- public end() {
+ public end(): void {
this.spawnCommand("npm", ["run", "defaults"]);
}
};
-}
+
+export default addonGenerator;
diff --git a/packages/generators/init-generator.ts b/packages/generators/init-generator.ts
index 90207de3c61..9d5b33f0b51 100644
--- a/packages/generators/init-generator.ts
+++ b/packages/generators/init-generator.ts
@@ -1,19 +1,18 @@
import chalk from "chalk";
import * as logSymbols from "log-symbols";
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
+import * as path from "path";
import { getPackageManager } from "@webpack-cli/utils/package-manager";
-import {
- Confirm,
- Input,
- List,
-} from "@webpack-cli/webpack-scaffold";
+import { Confirm, Input, List } from "@webpack-cli/webpack-scaffold";
-import { IWebpackOptions } from "./types";
+import { getDefaultOptimization } from "./utils/webpackConfig";
+import { WebpackOptions } from "./types";
import entryQuestions from "./utils/entry";
-import getBabelPlugin from "./utils/module";
-import getDefaultPlugins from "./utils/plugins";
+import langQuestionHandler, { LangType } from "./utils/languageSupport";
+import styleQuestionHandler, { Loader, StylingType } from "./utils/styleSupport";
import tooltip from "./utils/tooltip";
+import { generatePluginName } from "./utils/plugins";
/**
*
@@ -30,424 +29,266 @@ export default class InitGenerator extends Generator {
private dependencies: string[];
private configuration: {
config: {
- configName?: string,
- topScope?: string[],
- webpackOptions?: IWebpackOptions,
- },
+ configName?: string;
+ topScope?: string[];
+ webpackOptions?: WebpackOptions;
+ };
};
+ private langType: string;
- constructor(args, opts) {
+ public constructor(args, opts) {
super(args, opts);
- this.isProd = false;
this.usingDefaults = false,
+ this.isProd = this.usingDefaults ? true : false;
+
this.dependencies = [
"webpack",
"webpack-cli",
- "terser-webpack-plugin",
"babel-plugin-syntax-dynamic-import",
];
+ if (this.isProd) {
+ this.dependencies.push("terser-webpack-plugin");
+ } else {
+ this.dependencies.push("webpack-dev-server");
+ }
+
this.configuration = {
config: {
+ configName: this.isProd ? "prod" : "config",
topScope: [],
- webpackOptions: {},
+ webpackOptions: {
+ mode: this.isProd ? "'production'" : "'development'",
+ entry: undefined,
+ output: undefined,
+ plugins: [],
+ module: {
+ rules: [],
+ },
+ },
},
};
+
+ // add splitChunks options for transparency
+ // defaults coming from: https://webpack.js.org/plugins/split-chunks-plugin/#optimization-splitchunks
+ this.configuration.config.topScope.push(
+ "const path = require('path');",
+ "const webpack = require('webpack');",
+ "\n",
+ tooltip.splitChunks(),
+ );
+
+ if (this.isProd) {
+ this.configuration.config.topScope.push(
+ tooltip.terser(),
+ "const TerserPlugin = require('terser-webpack-plugin');",
+ "\n",
+ );
+ }
+
+ (this.configuration.config.webpackOptions.plugins as string[]).push(
+ "new webpack.ProgressPlugin()",
+ );
+
+ let optimizationConfig = getDefaultOptimization(this.isProd);
+ this.configuration.config.webpackOptions.optimization = optimizationConfig;
+
+ if (!this.isProd) {
+ this.configuration.config.webpackOptions.devServer = {
+ open: true,
+ };
+ }
}
- public prompting() {
- const done: (_?: void) => void | boolean = this.async();
+ public async prompting() {
+ const done: () => {} = this.async();
const self: this = this;
let regExpForStyles: string;
- let ExtractUseProps: object[];
+ let ExtractUseProps: Loader[];
process.stdout.write(
- "\n" +
- logSymbols.info +
- chalk.blue(" INFO ") +
- "For more information and a detailed description of each question, have a look at " +
- chalk.bold.green(
- "https://github.com/webpack/webpack-cli/blob/master/INIT.md",
- ) +
- "\n",
+ `\n${logSymbols.info}${chalk.blue(" INFO ")} ` +
+ `For more information and a detailed description of each question, have a look at: ` +
+ `${chalk.bold.green("https://github.com/webpack/webpack-cli/blob/master/INIT.md")}\n`,
);
process.stdout.write(
- logSymbols.info +
- chalk.blue(" INFO ") +
- "Alternatively, run `webpack(-cli) --help` for usage info." +
- "\n\n",
+ `${logSymbols.info}${chalk.blue(" INFO ")} ` +
+ `Alternatively, run "webpack(-cli) --help" for usage info\n\n`,
);
- this.configuration.config.webpackOptions.module = {
- rules: [],
- };
- this.configuration.config.topScope.push(
- "const webpack = require('webpack')",
- "const path = require('path')",
- "\n",
- );
+ const { multiEntries } = await this.prompt([
+ Confirm(
+ "multiEntries",
+ "Will your application have multiple bundles?",
+ false
+ ),
+ ]);
- return this.prompt([
- Confirm("entryType", "Will your application have multiple bundles?", false),
- ])
- .then((entryTypeAnswer: {
- entryType: boolean;
- }) => {
- // Ask different questions for entry points
- return entryQuestions(self, entryTypeAnswer);
- })
- .then((entryOptions: object | string) => {
- if (typeof entryOptions === "string" && entryOptions.length > 0) {
- return this.prompt([
- Input(
- "outputType",
- "In which folder do you want to store your generated bundles? (dist):",
- ),
- ]);
- }
- if (entryOptions !== "\"\"") {
- this.configuration.config.webpackOptions.entry = entryOptions;
- }
- return this.prompt([
- Input(
- "outputType",
- "In which folder do you want to store your generated bundles? (dist):",
- ),
- ]);
- })
- .then((outputTypeAnswer: {
- outputType: string;
- }) => {
- // As entry is not required anymore and we dont set it to be an empty string or """""
- // it can be undefined so falsy check is enough (vs entry.length);
- if (
- !this.configuration.config.webpackOptions.entry &&
- !this.usingDefaults
- ) {
- this.configuration.config.webpackOptions.output = {
- chunkFilename: "'[name].[chunkhash].js'",
- filename: "'[name].[chunkhash].js'",
- };
- } else if (!this.usingDefaults) {
- this.configuration.config.webpackOptions.output = {
- filename: "'[name].[chunkhash].js'",
- };
- }
- if (!this.usingDefaults && outputTypeAnswer.outputType.length) {
- this.configuration.config.webpackOptions.output.path =
- `path.resolve(__dirname, '${outputTypeAnswer.outputType}')`;
- }
- })
- .then((_: void) => {
- this.isProd = this.usingDefaults ? true : false;
- this.configuration.config.configName = this.isProd ? "prod" : "config";
- if (!this.isProd) {
- this.configuration.config.webpackOptions.mode = "'development'";
- }
- this.configuration.config.webpackOptions.plugins = this.isProd ? [] : getDefaultPlugins();
- return this.prompt([
- Confirm("babelConfirm", "Will you be using ES2015?"),
- ]);
- })
- .then((babelConfirmAnswer: {
- babelConfirm: boolean;
- }) => {
- if (babelConfirmAnswer.babelConfirm) {
- this.configuration.config.webpackOptions.module.rules.push(
- getBabelPlugin(),
- );
- this.dependencies.push(
- "babel-loader",
- "@babel/core",
- "@babel/preset-env",
- );
- }
- })
- .then((_: void) => {
- return this.prompt([
+ // TODO string | object
+ const entryOption: void | {} = await entryQuestions(self, multiEntries);
+
+ if (typeof entryOption === "string" && entryOption.length > 0) {
+ this.configuration.config.webpackOptions.entry = `${entryOption}`;
+ } else if (typeof entryOption === "object") {
+ this.configuration.config.webpackOptions.entry = entryOption;
+ }
+
+ const { outputDir } = await this.prompt([
+ Input(
+ "outputDir",
+ "In which folder do you want to store your generated bundles?",
+ "dist",
+ ),
+ ]);
+
+ // As entry is not required anymore and we dont set it to be an empty string or """""
+ // it can be undefined so falsy check is enough (vs entry.length);
+ if (
+ !this.configuration.config.webpackOptions.entry &&
+ !this.usingDefaults
+ ) {
+ this.configuration.config.webpackOptions.output = {
+ chunkFilename: "'[name].[chunkhash].js'",
+ filename: "'[name].[chunkhash].js'",
+ };
+ } else if (!this.usingDefaults) {
+ this.configuration.config.webpackOptions.output = {
+ filename: "'[name].[chunkhash].js'",
+ };
+ }
+ if (!this.usingDefaults && outputDir.length) {
+ this.configuration.config.webpackOptions.output.path =
+ `path.resolve(__dirname, '${outputDir}')`;
+ }
+
+ const { langType } = await this.prompt([
+ List("langType", "Will you use one of the below JS solutions?", [
+ LangType.ES6,
+ LangType.Typescript,
+ "No",
+ ]),
+ ]);
+
+ langQuestionHandler(this, langType);
+ this.langType = langType;
+
+ const { stylingType } = await this.prompt([
List("stylingType", "Will you use one of the below CSS solutions?", [
"No",
- "CSS",
- "SASS",
- "LESS",
- "PostCSS",
+ StylingType.CSS,
+ StylingType.SASS,
+ StylingType.LESS,
+ StylingType.PostCSS,
]),
]);
- })
- .then((stylingTypeAnswer: {
- stylingType: string;
- }) => {
- ExtractUseProps = [];
- switch (stylingTypeAnswer.stylingType) {
- case "SASS":
- this.dependencies.push(
- "sass-loader",
- "node-sass",
- "style-loader",
- "css-loader",
- );
- regExpForStyles = `${new RegExp(/\.(scss|css)$/)}`;
- if (this.isProd) {
- ExtractUseProps.push(
- {
- loader: "'css-loader'",
- options: {
- sourceMap: true,
- },
- },
- {
- loader: "'sass-loader'",
- options: {
- sourceMap: true,
- },
- },
- );
- } else {
- ExtractUseProps.push(
- {
- loader: "'style-loader'",
- },
- {
- loader: "'css-loader'",
- },
- {
- loader: "'sass-loader'",
- },
- );
- }
- break;
- case "LESS":
- regExpForStyles = `${new RegExp(/\.(less|css)$/)}`;
- this.dependencies.push(
- "less-loader",
- "less",
- "style-loader",
- "css-loader",
- );
- if (this.isProd) {
- ExtractUseProps.push(
- {
- loader: "'css-loader'",
- options: {
- sourceMap: true,
- },
- },
- {
- loader: "'less-loader'",
- options: {
- sourceMap: true,
- },
- },
- );
- } else {
- ExtractUseProps.push(
- {
- loader: "'css-loader'",
- options: {
- sourceMap: true,
- },
- },
- {
- loader: "'less-loader'",
- options: {
- sourceMap: true,
- },
- },
- );
- }
- break;
- case "PostCSS":
- this.configuration.config.topScope.push(
- tooltip.postcss(),
- "const autoprefixer = require('autoprefixer');",
- "const precss = require('precss');",
- "\n",
- );
- this.dependencies.push(
- "style-loader",
- "css-loader",
- "postcss-loader",
- "precss",
- "autoprefixer",
- );
- regExpForStyles = `${new RegExp(/\.css$/)}`;
- if (this.isProd) {
- ExtractUseProps.push(
- {
- loader: "'css-loader'",
- options: {
- importLoaders: 1,
- sourceMap: true,
- },
- },
- {
- loader: "'postcss-loader'",
- options: {
- plugins: `function () {
- return [
- precss,
- autoprefixer
- ];
- }`,
- },
- },
- );
- } else {
- ExtractUseProps.push(
- {
- loader: "'style-loader'",
- },
- {
- loader: "'css-loader'",
- options: {
- importLoaders: 1,
- sourceMap: true,
- },
- },
- {
- loader: "'postcss-loader'",
- options: {
- plugins: `function () {
- return [
- precss,
- autoprefixer
- ];
- }`,
- },
- },
- );
- }
- break;
- case "CSS":
- this.dependencies.push("style-loader", "css-loader");
- regExpForStyles = `${new RegExp(/\.css$/)}`;
- if (this.isProd) {
- ExtractUseProps.push({
- loader: "'css-loader'",
- options: {
- sourceMap: true,
- },
- });
- } else {
- ExtractUseProps.push(
- {
- loader: "'style-loader'",
- options: {
- sourceMap: true,
- },
- },
- {
- loader: "'css-loader'",
- },
- );
- }
- break;
- default:
- regExpForStyles = null;
- }
- })
- .then((_: void) => {
- if (this.isProd) {
- // Ask if the user wants to use extractPlugin
- return this.prompt([
- Input(
- "extractPlugin",
- "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)",
- ),
- ]);
- }
- })
- .then((extractPluginAnswer: {
- extractPlugin: string;
- }) => {
- if (regExpForStyles) {
- if (this.isProd) {
- const cssBundleName: string = extractPluginAnswer.extractPlugin;
- this.configuration.config.topScope.push(tooltip.cssPlugin());
- this.dependencies.push("mini-css-extract-plugin");
-
- if (cssBundleName.length !== 0) {
- this.configuration.config.webpackOptions.plugins.push(
- // TODO: use [contenthash] after it is supported
- `new MiniCssExtractPlugin({ filename:'${cssBundleName}.[chunkhash].css' })`,
- );
- } else {
- this.configuration.config.webpackOptions.plugins.push(
- "new MiniCssExtractPlugin({ filename:'style.css' })",
- );
- }
- ExtractUseProps.unshift({
- loader: "MiniCssExtractPlugin.loader",
- });
+ ({ ExtractUseProps, regExpForStyles } = styleQuestionHandler(self, stylingType));
- const moduleRulesObj = {
- test: regExpForStyles,
- use: ExtractUseProps,
- };
-
- this.configuration.config.webpackOptions.module.rules.push(
- moduleRulesObj,
- );
- this.configuration.config.topScope.push(
- "const MiniCssExtractPlugin = require('mini-css-extract-plugin');",
- "\n",
+ if (this.isProd) {
+ // Ask if the user wants to use extractPlugin
+ const { useExtractPlugin } = await this.prompt([
+ Input(
+ "useExtractPlugin",
+ "If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)",
+ ),
+ ]);
+
+ if (regExpForStyles) {
+ if (this.isProd) {
+ const cssBundleName: string = useExtractPlugin;
+ this.dependencies.push("mini-css-extract-plugin");
+ this.configuration.config.topScope.push(
+ tooltip.cssPlugin(),
+ "const MiniCssExtractPlugin = require('mini-css-extract-plugin');",
+ "\n",
+ );
+ if (cssBundleName.length !== 0) {
+ (this.configuration.config.webpackOptions.plugins as string[]).push(
+ // TODO: use [contenthash] after it is supported
+ `new MiniCssExtractPlugin({ filename:'${cssBundleName}.[chunkhash].css' })`,
);
} else {
- const moduleRulesObj: {
- test: string;
- use: object[];
- } = {
- test: regExpForStyles,
- use: ExtractUseProps,
- };
-
- this.configuration.config.webpackOptions.module.rules.push(
- moduleRulesObj,
+ (this.configuration.config.webpackOptions.plugins as string[]).push(
+ "new MiniCssExtractPlugin({ filename:'style.css' })",
);
}
+
+ ExtractUseProps.unshift({
+ loader: "MiniCssExtractPlugin.loader",
+ });
}
- // add splitChunks options for transparency
- // defaults coming from: https://webpack.js.org/plugins/split-chunks-plugin/#optimization-splitchunks
- this.configuration.config.topScope.push(tooltip.splitChunks());
- this.configuration.config.webpackOptions.optimization = {
- splitChunks: {
- cacheGroups: {
- vendors: {
- priority: -10,
- test: "/[\\\\/]node_modules[\\\\/]/",
- },
- },
- chunks: "'async'",
- minChunks: 1,
- minSize: 30000,
- // for production name is recommended to be off
- name: !this.isProd,
+
+ this.configuration.config.webpackOptions.module.rules.push(
+ {
+ test: regExpForStyles,
+ use: ExtractUseProps,
},
- };
- done();
- });
- }
- public installPlugins() {
- if (this.isProd) {
- this.dependencies = this.dependencies.filter(
- (p: string): boolean => p !== "terser-webpack-plugin",
- );
- } else {
- this.configuration.config.topScope.push(
- tooltip.terser(),
- "const TerserPlugin = require('terser-webpack-plugin');",
+ );
+ }
+ }
+ if(!this.isProd) {
+ this.dependencies.push("html-webpack-plugin");
+ const htmlWebpackDependency = "html-webpack-plugin";
+ const htmlwebpackPlugin = generatePluginName(htmlWebpackDependency);
+ (this.configuration.config.topScope as string[]).push(
+ `const ${htmlwebpackPlugin} = require('${htmlWebpackDependency}')`,
"\n",
+ tooltip.html(),
+ );
+ (this.configuration.config.webpackOptions.plugins as string[]).push(
+ `new ${htmlwebpackPlugin}()`,
);
}
+ done();
+ }
+
+ public installPlugins(): void {
const packager = getPackageManager();
const opts: {
dev?: boolean,
"save-dev"?: boolean,
- } = packager === "yarn" ? { dev: true } : { "save-dev": true };
+ } = packager === "yarn" ?
+ { dev: true } :
+ { "save-dev": true };
+
this.scheduleInstallTask(packager, this.dependencies, opts);
}
- public writing() {
+ public writing(): void {
this.config.set("configuration", this.configuration);
+
+ const packageJsonTemplatePath = "./templates/package.json.js";
+ this.fs.extendJSON(this.destinationPath("package.json"), require(packageJsonTemplatePath)(this.isProd));
+
+ const generateEntryFile = (entryPath: string, name: string): void => {
+ entryPath = entryPath.replace(/'/g, "");
+ this.fs.copyTpl(
+ path.resolve(__dirname, "./templates/index.js"),
+ this.destinationPath(entryPath),
+ { name },
+ );
+ };
+
+ // Generate entry file/files
+ const entry = this.configuration.config.webpackOptions.entry;
+ if ( typeof entry === "string" ) {
+ generateEntryFile(entry, "your main file!");
+ } else if (typeof entry === "object") {
+ Object.keys(entry).forEach((name: string): void =>
+ generateEntryFile(entry[name], `${name} main file!`),
+ );
+ }
+
+ // Generate README
+ this.fs.copyTpl(
+ path.resolve(__dirname, "./templates/README.md"),
+ this.destinationPath("README.md"),
+ {}
+ );
+
+ // Genrate tsconfig
+ if (this.langType === LangType.Typescript) {
+ const tsConfigTemplatePath = "./templates/tsconfig.json.js";
+ this.fs.extendJSON(this.destinationPath("tsconfig.json"), require(tsConfigTemplatePath));
+ }
}
}
diff --git a/packages/generators/package-lock.json b/packages/generators/package-lock.json
index 60bec2740d7..9e54eb33282 100644
--- a/packages/generators/package-lock.json
+++ b/packages/generators/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@webpack-cli/generators",
- "version": "0.1.2",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -92,6 +92,27 @@
"@types/node": "*"
}
},
+ "@types/inquirer": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-6.0.1.tgz",
+ "integrity": "sha512-O9rEHE9iBvYaFAGS0fAlDzqY/3CsOrRKzni4zwnAEce2JrHUEbXAce2Pwwe8ZGzmQkucwSXn1tSiKig37INgfA==",
+ "dev": true,
+ "requires": {
+ "@types/through": "*",
+ "rxjs": ">=6.4.0"
+ },
+ "dependencies": {
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ }
+ }
+ },
"@types/lodash": {
"version": "4.14.119",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.119.tgz",
@@ -147,6 +168,15 @@
"integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==",
"dev": true
},
+ "@types/through": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.29.tgz",
+ "integrity": "sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
"@types/uglify-js": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz",
@@ -197,6 +227,27 @@
"@types/webpack": "*"
}
},
+ "@types/yeoman-generator": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-3.1.2.tgz",
+ "integrity": "sha512-Wr67yKgBKxKJ9eUNCL5WuKuc3e9CSCbdw8nMDiBatp+/NHgvriqUGjt5kbWBIfLG9yRdIKaxT4Tf8L+VVd7qSA==",
+ "dev": true,
+ "requires": {
+ "@types/inquirer": "*",
+ "rxjs": ">=6.4.0"
+ },
+ "dependencies": {
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ }
+ }
+ },
"@webassemblyjs/ast": {
"version": "1.7.11",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz",
@@ -519,7 +570,7 @@
},
"util": {
"version": "0.10.3",
- "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"requires": {
"inherits": "2.0.1"
@@ -1865,7 +1916,7 @@
},
"finalhandler": {
"version": "1.1.1",
- "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
"integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
"requires": {
"debug": "2.6.9",
@@ -1995,7 +2046,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2013,11 +2065,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2030,15 +2084,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2141,7 +2198,8 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -2151,6 +2209,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2163,17 +2222,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -2190,6 +2252,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2262,7 +2325,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2272,6 +2336,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -2347,7 +2412,8 @@
},
"safe-buffer": {
"version": "5.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2377,6 +2443,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2394,6 +2461,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2432,11 +2500,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -2447,7 +2517,7 @@
},
"get-stream": {
"version": "3.0.0",
- "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-value": {
@@ -2520,7 +2590,7 @@
},
"globby": {
"version": "6.1.0",
- "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
"requires": {
"array-union": "^1.0.1",
@@ -2532,7 +2602,7 @@
"dependencies": {
"pify": {
"version": "2.3.0",
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
@@ -2679,7 +2749,7 @@
},
"http-errors": {
"version": "1.6.3",
- "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
@@ -2705,7 +2775,7 @@
},
"http-proxy-middleware": {
"version": "0.18.0",
- "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz",
"integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==",
"requires": {
"http-proxy": "^1.16.2",
@@ -2857,7 +2927,7 @@
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
@@ -2893,7 +2963,7 @@
},
"is-builtin-module": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "^1.0.0"
@@ -2901,7 +2971,7 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
@@ -3111,7 +3181,7 @@
},
"json5": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"requires": {
"minimist": "^1.2.0"
@@ -3119,7 +3189,7 @@
"dependencies": {
"minimist": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
@@ -3254,7 +3324,7 @@
},
"media-typer": {
"version": "0.3.0",
- "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mem": {
@@ -3439,7 +3509,7 @@
},
"minimist": {
"version": "0.1.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz",
"integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4="
},
"mississippi": {
@@ -3480,7 +3550,7 @@
},
"mkdirp": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
@@ -3488,7 +3558,7 @@
"dependencies": {
"minimist": {
"version": "0.0.8",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
@@ -3527,7 +3597,7 @@
},
"multimatch": {
"version": "2.1.0",
- "resolved": "http://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
"integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=",
"requires": {
"array-differ": "^1.0.0",
@@ -3538,7 +3608,7 @@
},
"mute-stream": {
"version": "0.0.7",
- "resolved": "http://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
},
"nan": {
@@ -3794,7 +3864,7 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"p-cancelable": {
@@ -3814,7 +3884,7 @@
},
"p-is-promise": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
},
"p-limit": {
@@ -3899,7 +3969,7 @@
},
"path-browserify": {
"version": "0.0.0",
- "resolved": "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo="
},
"path-dirname": {
@@ -3914,7 +3984,7 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
@@ -4175,7 +4245,7 @@
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
@@ -4337,7 +4407,7 @@
},
"safe-regex": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"requires": {
"ret": "~0.1.10"
@@ -4468,7 +4538,7 @@
},
"sha.js": {
"version": "2.4.11",
- "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
@@ -4828,7 +4898,7 @@
},
"stream-browserify": {
"version": "2.0.1",
- "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
"requires": {
"inherits": "~2.0.1",
@@ -4892,7 +4962,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
@@ -4900,7 +4970,7 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
@@ -4932,7 +5002,7 @@
},
"strip-eof": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"supports-color": {
@@ -5009,7 +5079,7 @@
},
"through": {
"version": "2.3.8",
- "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"through2": {
@@ -5097,7 +5167,7 @@
},
"tty-browserify": {
"version": "0.0.0",
- "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
},
"type-is": {
@@ -5350,7 +5420,7 @@
},
"pify": {
"version": "2.3.0",
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"replace-ext": {
@@ -5380,7 +5450,7 @@
},
"vm-browserify": {
"version": "0.0.4",
- "resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"requires": {
"indexof": "0.0.1"
@@ -5606,7 +5676,7 @@
},
"wrap-ansi": {
"version": "2.1.0",
- "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "^1.0.1",
@@ -5623,7 +5693,7 @@
},
"string-width": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
@@ -5660,7 +5730,7 @@
},
"yargs": {
"version": "1.2.6",
- "resolved": "http://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz",
"integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=",
"requires": {
"minimist": "^0.1.0"
@@ -5788,7 +5858,7 @@
},
"minimist": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"ms": {
diff --git a/packages/generators/package.json b/packages/generators/package.json
index 22e2e88b60d..edcb344376b 100644
--- a/packages/generators/package.json
+++ b/packages/generators/package.json
@@ -26,11 +26,13 @@
"webpack": "4.x.x"
},
"devDependencies": {
+ "@types/inquirer": "^6.0.1",
"@types/lodash": "^4.14.118",
"@types/log-symbols": "^2.0.0",
"@types/mkdirp": "^0.5.2",
"@types/node": "^10.12.9",
"@types/webpack-dev-server": "^3.1.1",
+ "@types/yeoman-generator": "^3.1.2",
"typescript": "^3.1.6"
},
"scripts": {
diff --git a/packages/generators/remove-generator.ts b/packages/generators/remove-generator.ts
index d81bdeeaf94..9af3b862592 100644
--- a/packages/generators/remove-generator.ts
+++ b/packages/generators/remove-generator.ts
@@ -1,10 +1,10 @@
import * as fs from "fs";
import * as path from "path";
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
import PROP_TYPES from "@webpack-cli/utils/prop-types";
import { List } from "@webpack-cli/webpack-scaffold";
-import { IWebpackOptions } from "./types";
+import { WebpackOptions } from "./types";
/**
*
@@ -18,27 +18,23 @@ import { IWebpackOptions } from "./types";
export default class RemoveGenerator extends Generator {
private configuration: {
config: {
- configName?: string,
- topScope?: string[],
- webpackOptions?: IWebpackOptions,
- },
+ configName?: string;
+ topScope?: string[];
+ webpackOptions?: WebpackOptions;
+ };
};
- private webpackOptions: IWebpackOptions | string;
+ private webpackOptions: WebpackOptions | string;
- constructor(args, opts) {
+ public constructor(args, opts) {
super(args, opts);
this.configuration = {
config: {
- webpackOptions: {},
- },
+ webpackOptions: {}
+ }
};
-
- let configPath = path.resolve(process.cwd(), "webpack.config.js");
+ const { configFile } = opts;
+ let configPath = path.resolve(process.cwd(), configFile);
const webpackConfigExists = fs.existsSync(configPath);
- if (!webpackConfigExists) {
- configPath = null;
- // end the generator stating webpack config not found or to specify the config
- }
this.webpackOptions = require(configPath);
}
@@ -49,90 +45,96 @@ export default class RemoveGenerator extends Generator {
public getModuleLoadersNames(): string[] {
if (typeof this.webpackOptions === "object") {
if (this.webpackOptions.module && this.webpackOptions.module.rules) {
- return this.webpackOptions.module.rules.map((rule: {
- loader: string;
- }) => rule ? rule.loader : null);
+ return this.webpackOptions.module.rules.map(
+ (rule: { loader: string }): string | null => (rule ? rule.loader : null)
+ );
}
}
}
- public prompting() {
- const done: (_?: void) => void | boolean = this.async();
+ public prompting(): Promise {
+ const done: () => {} = this.async();
let propValue: object | string | boolean;
- return this.prompt([
- List(
- "propType",
- "Which property do you want to remove?",
- Array.from(this.getPropTypes()),
- ),
- ])
- .then(({ propType }: { propType: string }): Promise<{}> => {
- if (!PROP_TYPES.has(propType)) {
- console.error("Invalid webpack config prop");
- return;
- }
+ return this.prompt([List("propType", "Which property do you want to remove?", Array.from(this.getPropTypes()))])
+ .then(
+ ({ propType }: { propType: string }): Promise => {
+ if (!PROP_TYPES.has(propType)) {
+ console.error("Invalid webpack config prop");
+ return;
+ }
- propValue = this.webpackOptions[propType];
- if (typeof propValue === "object") {
- if (Array.isArray(propValue)) {
- return this.prompt([
- List(
- "keyType",
- `Which key do you want to remove from ${propType}?`,
- Array.from(propValue),
- ),
- ]).then(({ keyType }: { keyType: string }): void => {
- this.configuration.config.webpackOptions[propType] = [ keyType ];
- });
- } else {
- return this.prompt([
- List(
- "keyType",
- `Which key do you want to remove from ${propType}?`,
- Array.from(Object.keys(propValue)),
- ),
- ])
- .then(({ keyType }: { keyType: string }): Promise<{}> => {
- if (propType === "module" && keyType === "rules") {
- return this.prompt([
- List(
- "rule",
- "Which loader do you want to remove?",
- Array.from(this.getModuleLoadersNames()),
- ),
- ])
- .then(({ rule }: { rule: string }): void => {
- if (typeof this.webpackOptions === "object") {
- const loaderIndex: number = this.getModuleLoadersNames().indexOf(rule);
- const loader: object = this.webpackOptions.module.rules[loaderIndex];
- this.configuration.config.webpackOptions.module = {
- rules: [ loader ],
- };
+ propValue = this.webpackOptions[propType];
+ if (typeof propValue === "object") {
+ if (Array.isArray(propValue)) {
+ return this.prompt([
+ List(
+ "keyType",
+ `Which key do you want to remove from ${propType}?`,
+ Array.from(propValue)
+ )
+ ]).then(
+ ({ keyType }: { keyType: string }): void => {
+ this.configuration.config.webpackOptions[propType] = [keyType];
+ }
+ );
+ } else {
+ return this.prompt([
+ List(
+ "keyType",
+ `Which key do you want to remove from ${propType}?`,
+ Array.from(Object.keys(propValue))
+ )
+ ]).then(
+ ({ keyType }: { keyType: string }): Promise => {
+ if (propType === "module" && keyType === "rules") {
+ return this.prompt([
+ List(
+ "rule",
+ "Which loader do you want to remove?",
+ Array.from(this.getModuleLoadersNames())
+ )
+ ]).then(
+ ({ rule }: { rule: string }): void => {
+ if (typeof this.webpackOptions === "object") {
+ const loaderIndex: number = this.getModuleLoadersNames().indexOf(
+ rule
+ );
+ const loader: object = this.webpackOptions.module.rules[
+ loaderIndex
+ ];
+ this.configuration.config.webpackOptions.module = {
+ rules: [loader]
+ };
+ }
}
- });
- } else {
- // remove the complete prop object if there is only one key
- if (Object.keys(this.webpackOptions[propType]).length <= 1) {
- this.configuration.config.webpackOptions[propType] = null;
+ );
} else {
- this.configuration.config.webpackOptions[propType] = {
- [keyType]: null,
- };
+ // remove the complete prop object if there is only one key
+ if (Object.keys(this.webpackOptions[propType]).length <= 1) {
+ this.configuration.config.webpackOptions[propType] = null;
+ } else {
+ this.configuration.config.webpackOptions[propType] = {
+ [keyType]: null
+ };
+ }
}
}
- });
+ );
+ }
+ } else {
+ this.configuration.config.webpackOptions[propType] = null;
}
- } else {
- this.configuration.config.webpackOptions[propType] = null;
}
- })
- .then((_: void): void => {
- done();
- });
+ )
+ .then(
+ (): void => {
+ done();
+ }
+ );
}
- public writing() {
+ public writing(): void {
this.config.set("configuration", this.configuration);
}
}
diff --git a/packages/generators/templates/README.md b/packages/generators/templates/README.md
new file mode 100644
index 00000000000..500b88d8caf
--- /dev/null
+++ b/packages/generators/templates/README.md
@@ -0,0 +1,15 @@
+# 🚀 Welcome to your new awesome project!
+
+This project has been created using **webpack scaffold**, you can now run
+
+```
+npm run build
+```
+
+or
+
+```
+yarn build
+```
+
+to bundle your application
diff --git a/packages/generators/templates/index.js b/packages/generators/templates/index.js
new file mode 100644
index 00000000000..0eec583fb7e
--- /dev/null
+++ b/packages/generators/templates/index.js
@@ -0,0 +1 @@
+console.log("Hello World from <%= name %>");
diff --git a/packages/generators/templates/package.json.js b/packages/generators/templates/package.json.js
new file mode 100644
index 00000000000..54089edb516
--- /dev/null
+++ b/packages/generators/templates/package.json.js
@@ -0,0 +1,15 @@
+module.exports = (isProd) => {
+
+ let scripts = {
+ build: "webpack"
+ };
+ if (!isProd) {
+ scripts.start = "webpack-dev-server";
+ }
+
+ return {
+ version: "1.0.0",
+ description: "My webpack project",
+ scripts,
+ };
+};
diff --git a/packages/generators/templates/tsconfig.json.js b/packages/generators/templates/tsconfig.json.js
new file mode 100644
index 00000000000..0eae50cb36f
--- /dev/null
+++ b/packages/generators/templates/tsconfig.json.js
@@ -0,0 +1,9 @@
+module.exports = {
+ compilerOptions: {
+ allowSyntheticDefaultImports: true,
+ noImplicitAny: true,
+ module: "es6",
+ target: "es5",
+ allowJs: true
+ }
+};
diff --git a/packages/generators/tslint.json b/packages/generators/tslint.json
deleted file mode 100644
index 0946f20963a..00000000000
--- a/packages/generators/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "../../tslint.json"
-}
diff --git a/packages/generators/types/index.ts b/packages/generators/types/index.ts
index 1adc7ee911c..32ed902ab23 100644
--- a/packages/generators/types/index.ts
+++ b/packages/generators/types/index.ts
@@ -1,11 +1,11 @@
-export interface ISchemaProperties {
+export interface SchemaProperties {
additionalProperties?: boolean;
definitions?: object;
properties?: object;
type?: string;
}
-interface IWebpackResolve {
+interface WebpackResolve {
alias?: object;
aliasFields?: string[];
cachePredicate?: Function;
@@ -27,7 +27,7 @@ interface IWebpackResolve {
type IRuleSetCondition = RegExp | string | Function | object;
-export interface IWebpackOptions {
+export interface WebpackOptions {
amd?: string;
bail?: boolean;
cache?: boolean | object;
@@ -47,10 +47,12 @@ export interface IWebpackOptions {
headers?: object;
logLevel?: string;
clientLogLevel?: string;
- overlay?: boolean | {
- errors?: boolean;
- warnings?: boolean;
- };
+ overlay?:
+ | boolean
+ | {
+ errors?: boolean;
+ warnings?: boolean;
+ };
progress?: boolean;
key?: string | Buffer;
cert?: string | Buffer;
@@ -69,10 +71,12 @@ export interface IWebpackOptions {
openPage?: string;
compress?: boolean;
proxy?: object[] | Function[];
- historyApiFallback?: boolean | {
- rewrites?: object[];
- disableDotRule?: boolean;
- };
+ historyApiFallback?:
+ | boolean
+ | {
+ rewrites?: object[];
+ disableDotRule?: boolean;
+ };
staticOptions?: object;
setup?: Function;
before?: Function;
@@ -97,25 +101,7 @@ export interface IWebpackOptions {
exprContextRegExp?: boolean | RegExp;
exprContextRequest?: string;
noParse?: string | string[] | Function | RegExp | RegExp[];
- rules?: Array<{
- enforce?: "pre" | "post";
- exclude?: IRuleSetCondition;
- include?: IRuleSetCondition;
- issuer?: IRuleSetCondition;
- loader?: string | Function | object;
- loaders?: Function[] | object[];
- options?: object;
- parser?: object;
- sideEffects?: boolean;
- type?: string;
- resource?: IRuleSetCondition;
- resourceQuery?: IRuleSetCondition;
- compiler?: IRuleSetCondition;
- rules?: object[];
- use?: object | object[] | Function;
- test?: IRuleSetCondition;
-
- }>;
+ rules?: Rule[];
unknownContextCritical?: boolean;
unknownContextRecursive?: boolean;
unknownContextRegExp?: boolean | RegExp;
@@ -127,15 +113,19 @@ export interface IWebpackOptions {
strictExportPresence?: boolean;
strictThisContextOnImports?: boolean;
};
- node?: false | true | string | {
- console?: boolean | string;
- process?: boolean | string;
- global?: boolean;
- __filename?: boolean | string;
- __dirname?: boolean | string;
- Buffer?: boolean | string;
- setImmediate?: boolean | string;
- };
+ node?:
+ | false
+ | true
+ | string
+ | {
+ console?: boolean | string;
+ process?: boolean | string;
+ global?: boolean;
+ __filename?: boolean | string;
+ __dirname?: boolean | string;
+ Buffer?: boolean | string;
+ setImmediate?: boolean | string;
+ };
output?: {
auxiliaryComment?: string | object;
chunkFilename?: string;
@@ -199,19 +189,21 @@ export interface IWebpackOptions {
};
};
parallelism?: number;
- performance?: false | {
- assetFilter?: Function;
- hints?: false | string;
- maxEntrypointSize?: number;
- maxAssetSize?: number;
- };
- plugins?: object[] | Function[] | string[] | string | any;
+ performance?:
+ | false
+ | {
+ assetFilter?: Function;
+ hints?: false | string;
+ maxEntrypointSize?: number;
+ maxAssetSize?: number;
+ };
+ plugins?: object[] | Function[] | string[] | string;
profile?: boolean;
recordsInputPath?: string;
recordsOutputPath?: string;
recordsPath?: string;
- resolve?: IWebpackResolve;
- resolveLoader?: IWebpackResolve;
+ resolve?: WebpackResolve;
+ resolveLoader?: WebpackResolve;
stats?: string | boolean | object;
target?: string | Function;
watch?: boolean;
@@ -221,3 +213,22 @@ export interface IWebpackOptions {
poll?: boolean | number;
};
}
+
+export interface Rule {
+ enforce?: "pre" | "post";
+ exclude?: IRuleSetCondition;
+ include?: IRuleSetCondition;
+ issuer?: IRuleSetCondition;
+ loader?: string | Function | object;
+ loaders?: Function[] | object[];
+ options?: object;
+ parser?: object;
+ sideEffects?: boolean;
+ type?: string;
+ resource?: IRuleSetCondition;
+ resourceQuery?: IRuleSetCondition;
+ compiler?: IRuleSetCondition;
+ rules?: object[];
+ use?: object | object[] | Function;
+ test?: IRuleSetCondition;
+}
diff --git a/packages/generators/types/json-loader.d.ts b/packages/generators/types/json-loader.d.ts
index 0cb4cf5f44b..36396113911 100644
--- a/packages/generators/types/json-loader.d.ts
+++ b/packages/generators/types/json-loader.d.ts
@@ -1,4 +1,5 @@
declare module "*.json" {
+ // eslint-disable-next-line
const value: any;
export default value;
}
diff --git a/packages/generators/types/yeoman-generator.d.ts b/packages/generators/types/yeoman-generator.d.ts
deleted file mode 100644
index bc2425c458f..00000000000
--- a/packages/generators/types/yeoman-generator.d.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-// Type definitions for yeoman-generator
-// Project: https://github.com/yeoman/generator
-// Definitions by: Kentaro Okuno
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
-
-interface IYeoman {
- public config: {
- set: (setProperty: string, setValue: object) => void;
- };
- public env: {
- adapter: {
- promptModule: {
- registerPrompt: (promptName: string, promptModule: object) => void;
- },
- },
- };
- public props: {
- name: string;
- };
- public composeWith(namespace: string, options?: object, settings?: IComposeSetting): YeomanGeneratorBase;
- public destinationRoot(rootPath?: string): string;
- public destinationPath(...path: string[]): string;
- public run(target: string, options?: object, done?: Function): IRunEnv;
- public scheduleInstallTask(packager: string, dependencies: string[], options?: object): void;
- public on(event: string, listener: Function): this;
- public async(): (_?: void) => void | boolean;
- public prompt(opt: IPromptOptions[]): Promise<>;
- public log(message: string): void;
- public npmInstall(packages?: string[] | string, options?: object, cb?: Function): Promise<>;
- public spawnCommand(name: string, args?: string[], options?: Object): void;
-}
-
-declare module "yeoman-generator" {
-
- class YeomanGeneratorBase extends IYeoman {
- public config: {
- set: (setProperty: string, setValue: object) => void;
- };
- public env: {
- adapter: {
- promptModule: {
- registerPrompt: (promptName: string, promptModule: object) => void;
- },
- },
- };
- public props: {
- name: string;
- };
- public composeWith(namespace: string, options?: object, settings?: IComposeSetting): YeomanGeneratorBase;
- public destinationRoot(rootPath?: string): string;
- public destinationPath(...path: string[]): string;
- public run(target: string, options?: object, done?: Function): IRunEnv;
- public scheduleInstallTask(packager: string, dependencies: string[], options?: object): void;
- public on(event: string, listener: Function): this;
- public async(): (_?: void) => void | boolean;
- public prompt(opt: IPromptOptions[]): Promise<>;
- public log(message: string): void;
- public npmInstall(packages?: string[] | string, options?: object, cb?: Function): Promise<>;
- public spawnCommand(name: string, args?: string[], options?: Object): void;
- }
-
- interface IRunEnv extends Object {
- on: (event: string, callbackFn: Function) => void;
- }
-
- interface IPromptOptions {
- type?: string;
- name: string;
- message: string | ((answers: Object) => string);
- choices?: string[] | ((answers: Object) => string);
- default?: string | number | boolean | string[] | number[]
- | ((answers: Object) => (string | number | boolean | string[] | number[]));
- validate?: ((input: string) => boolean | string);
- when?: ((answers: Object) => boolean) | boolean;
- store?: boolean;
- filter?: (name: string) => string;
- }
-
- // tslint:disable-next-line
- class NamedBase extends YeomanGeneratorBase implements INamedBase {
- constructor(args: string | string[], options: object);
- }
-
- // tslint:disable-next-line
- class Base extends NamedBase implements IBase {
- public static extend(protoProps: IQueueProps): YeomanGeneratorBase;
- }
-
- export = Base;
-}
diff --git a/packages/generators/update-generator.ts b/packages/generators/update-generator.ts
index ca5d7ce78ce..f5c3060de66 100644
--- a/packages/generators/update-generator.ts
+++ b/packages/generators/update-generator.ts
@@ -1,3 +1,3 @@
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
export default class UpdateGenerator extends Generator {}
diff --git a/packages/generators/utils/entry.ts b/packages/generators/utils/entry.ts
index aae92f38be1..2d29c7dda6b 100644
--- a/packages/generators/utils/entry.ts
+++ b/packages/generators/utils/entry.ts
@@ -1,8 +1,9 @@
-import { InputValidate } from "@webpack-cli/webpack-scaffold";
+import * as Generator from "yeoman-generator";
+import { Input, InputValidate } from "@webpack-cli/webpack-scaffold";
import validate from "./validate";
-interface IEntry extends IYeoman {
+interface CustomGenerator extends Generator {
usingDefaults?: boolean;
}
@@ -15,93 +16,111 @@ interface IEntry extends IYeoman {
* @returns {Object} An Object that holds the answers given by the user, later used to scaffold
*/
-export default function entry(self: IEntry, answer: {
- entryType: boolean;
-}): Promise<{}> {
+export default function entry(
+ self: CustomGenerator,
+ multiEntries: boolean,
+): Promise {
let entryIdentifiers: string[];
- let result: Promise<{}>;
- if (answer.entryType) {
+ let result: Promise;
+ if (multiEntries) {
result = self
.prompt([
InputValidate(
"multipleEntries",
- "Type the names you want for your modules (entry files), separated by comma [example: app,vendor]",
+ "What do you want to name your bundles? (separated by comma)",
validate,
- ),
+ "pageOne, pageTwo"
+ )
])
- .then((multipleEntriesAnswer: {
- multipleEntries: string,
- }) => {
- const webpackEntryPoint: object = {};
- entryIdentifiers = multipleEntriesAnswer.multipleEntries.split(",");
+ .then(
+ (multipleEntriesAnswer: { multipleEntries: string }): Promise => {
+ const webpackEntryPoint: object = {};
+ entryIdentifiers = multipleEntriesAnswer.multipleEntries.split(",");
- function forEachPromise(entries: string[], fn: (entryProp: string) => Promise<{} | void>) {
- return entries.reduce((promise: Promise<{}>, prop: string) => {
- const trimmedProp: string = prop.trim();
+ function forEachPromise(
+ entries: string[],
+ fn: (entryProp: string) => Promise
+ ): Promise {
+ return entries.reduce((promise: Promise<{}>, prop: string): Promise => {
+ const trimmedProp: string = prop.trim();
- return promise.then((n: object) => {
- if (n) {
- Object.keys(n).forEach((val: string): void => {
- if (
- n[val].charAt(0) !== "(" &&
- n[val].charAt(0) !== "[" &&
- !n[val].includes("function") &&
- !n[val].includes("path") &&
- !n[val].includes("process")
- ) {
- n[val] = `\'${n[val].replace(/"|'/g, "").concat(".js")}\'`;
+ return promise.then(
+ (n: object): Promise => {
+ if (n) {
+ Object.keys(n).forEach(
+ (val: string): void => {
+ if (
+ n[val].charAt(0) !== "(" &&
+ n[val].charAt(0) !== "[" &&
+ !n[val].includes("function") &&
+ !n[val].includes("path") &&
+ !n[val].includes("process")
+ ) {
+ n[val] = `\'./${n[val].replace(/"|'/g, "").concat(".js")}\'`;
+ }
+ webpackEntryPoint[val] = n[val];
+ }
+ );
+ } else {
+ n = {};
}
- webpackEntryPoint[val] = n[val];
- });
- } else {
- n = {};
+ return fn(trimmedProp);
+ }
+ );
+ }, Promise.resolve());
+ }
+
+ return forEachPromise(
+ entryIdentifiers,
+ (entryProp: string): Promise =>
+ self.prompt([
+ InputValidate(
+ `${entryProp}`,
+ `What is the location of "${entryProp}"?`,
+ validate,
+ `src/${entryProp}`,
+ ),
+ ]))
+ .then(
+ (entryPropAnswer: object): object => {
+ Object.keys(entryPropAnswer).forEach(
+ (val: string): void => {
+ if (
+ entryPropAnswer[val].charAt(0) !== "(" &&
+ entryPropAnswer[val].charAt(0) !== "[" &&
+ !entryPropAnswer[val].includes("function") &&
+ !entryPropAnswer[val].includes("path") &&
+ !entryPropAnswer[val].includes("process")
+ ) {
+ entryPropAnswer[val] = `\'./${entryPropAnswer[val].replace(/"|'/g, "").concat(".js")}\'`;
+ }
+ webpackEntryPoint[val] = entryPropAnswer[val];
+ }
+ );
+ return webpackEntryPoint;
}
- return fn(trimmedProp);
- });
- }, Promise.resolve());
+ );
}
- return forEachPromise(entryIdentifiers, (entryProp: string): Promise<{} | void> =>
- self.prompt([
- InputValidate(
- `${entryProp}`,
- `What is the location of "${entryProp}"? [example: ./src/${entryProp}]`,
- validate,
- ),
- ]),
- ).then((entryPropAnswer: object): object => {
- Object.keys(entryPropAnswer).forEach((val: string): void => {
- if (
- entryPropAnswer[val].charAt(0) !== "(" &&
- entryPropAnswer[val].charAt(0) !== "[" &&
- !entryPropAnswer[val].includes("function") &&
- !entryPropAnswer[val].includes("path") &&
- !entryPropAnswer[val].includes("process")
- ) {
- entryPropAnswer[val] = `\'${entryPropAnswer[val].replace(/"|'/g, "")}\'`;
- }
- webpackEntryPoint[val] = entryPropAnswer[val];
- });
- return webpackEntryPoint;
- });
- });
+ );
} else {
result = self
.prompt([
- InputValidate(
+ Input(
"singularEntry",
- "Which will be your application entry point? (src/index)",
- ),
+ "Which will be your application entry point?",
+ "src/index",
+ )
])
- .then((singularEntryAnswer: {
- singularEntry: string,
- }): string => {
- let { singularEntry } = singularEntryAnswer;
- singularEntry = `\'${singularEntry.replace(/"|'/g, "")}\'`;
- if (singularEntry.length <= 0) {
- self.usingDefaults = true;
+ .then(
+ (singularEntryAnswer: { singularEntry: string }): string => {
+ let { singularEntry } = singularEntryAnswer;
+ singularEntry = `\'./${singularEntry.replace(/"|'/g, "").concat(".js")}\'`;
+ if (singularEntry.length <= 0) {
+ self.usingDefaults = true;
+ }
+ return singularEntry;
}
- return singularEntry;
- });
+ );
}
return result;
}
diff --git a/packages/generators/utils/languageSupport.ts b/packages/generators/utils/languageSupport.ts
new file mode 100644
index 00000000000..7d3c1f901cf
--- /dev/null
+++ b/packages/generators/utils/languageSupport.ts
@@ -0,0 +1,117 @@
+import { Rule } from "../types";
+
+export enum LangType {
+ ES6 = "ES6",
+ Typescript = "Typescript",
+}
+
+const replaceExt = (path: string, ext: string): string =>
+ path.substr(0, path.lastIndexOf(".")) + `${ext}'`;
+
+function updateEntryExt(self, newExt: string): void {
+ const jsEntryOption = self.configuration.config.webpackOptions.entry;
+ let tsEntryOption = {};
+ if (typeof jsEntryOption === "string") {
+ tsEntryOption = replaceExt(jsEntryOption, newExt);
+ } else if (typeof jsEntryOption === "object") {
+ Object.keys(jsEntryOption).forEach((entry: string): void => {
+ tsEntryOption[entry] = replaceExt(jsEntryOption[entry], newExt);
+ });
+ }
+ self.configuration.config.webpackOptions.entry = tsEntryOption;
+}
+
+const getFolder = (path: string): string =>
+ path.replace("'./", "").split("/").slice(0, -1).join("/");
+
+function getEntryFolders(self): string[] {
+ const entryOption = self.configuration.config.webpackOptions.entry;
+ let entryFolders = {};
+ if (typeof entryOption === "string") {
+ const folder = getFolder(entryOption);
+ if (folder.length > 0) entryFolders[folder] = true;
+ } else if (typeof entryOption === "object") {
+ Object.keys(entryOption).forEach((entry: string): void => {
+ const folder = getFolder(entryOption[entry]);
+ if (folder.length > 0) entryFolders[folder] = true;
+ });
+ }
+ return Object.keys(entryFolders);
+}
+
+/**
+ *
+ * Returns an module.rule object for the babel loader
+ * @param {string[]} includeFolders An array of folders to include
+ * @returns {Rule} A configuration containing the babel-loader with env preset
+ */
+export function getBabelLoader(includeFolders: string[]): Rule {
+ const include = includeFolders.map((folder: string): string =>
+ `path.resolve(__dirname, '${folder}')`
+ );
+ return {
+ test: "/\.(js|jsx)$/",
+ include,
+ loader: "'babel-loader'",
+ options: {
+ plugins: ["'syntax-dynamic-import'"],
+ presets: [
+ [
+ "'@babel/preset-env'",
+ {
+ "'modules'": false
+ }
+ ]
+ ]
+ },
+ };
+}
+
+/**
+ *
+ * Returns an module.rule object for the typescript loader
+ * @param {string[]} includeFolders An array of folders to include
+ * @returns {Rule} A configuration containing the ts-loader
+ */
+export function getTypescriptLoader(includeFolders: string[]): Rule {
+ const include = includeFolders.map((folder: string): string =>
+ `path.resolve(__dirname, '${folder}')`
+ );
+ return {
+ test: "/\.(ts|tsx)?$/",
+ loader: "'ts-loader'",
+ include,
+ exclude: ["/node_modules/"],
+ };
+}
+
+export default function language(self, langType: string): void {
+ const entryFolders = getEntryFolders(self);
+ switch (langType) {
+ case LangType.ES6:
+ self.dependencies.push(
+ "babel-loader",
+ "@babel/core",
+ "@babel/preset-env",
+ );
+ self.configuration.config.webpackOptions.module.rules.push(
+ getBabelLoader(entryFolders),
+ );
+ break;
+
+ case LangType.Typescript:
+ self.dependencies.push(
+ "typescript",
+ "ts-loader",
+ );
+ self.configuration.config.webpackOptions.module.rules.push(
+ getTypescriptLoader(entryFolders),
+ );
+ self.configuration.config.webpackOptions.resolve = {
+ extensions: [ "'.tsx'", "'.ts'", "'.js'" ],
+ };
+
+ updateEntryExt(self, ".ts");
+ break;
+ }
+}
diff --git a/packages/generators/utils/module.ts b/packages/generators/utils/module.ts
deleted file mode 100644
index 50c4b0deeea..00000000000
--- a/packages/generators/utils/module.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-interface IModule extends Object {
- include: string[];
- loader: string;
- options: {
- plugins: string[];
- presets: Array>;
- };
- test: string;
-}
-
-/**
- *
- * Returns an module.rule object that has the babel loader if invoked
- *
- * @returns {Function} A callable function that adds the babel-loader with env preset
- */
-export default function(): IModule {
- return {
- include: ["path.resolve(__dirname, 'src')"],
- loader: "'babel-loader'",
- options: {
- plugins: [
- "'syntax-dynamic-import'",
- ],
- presets: [
- [
- "'@babel/preset-env'",
- {
- "'modules'": false,
- },
- ],
- ],
- },
- test: `${new RegExp(/\.js$/)}`,
- };
-}
diff --git a/packages/generators/utils/plugins.ts b/packages/generators/utils/plugins.ts
index f94029dea51..4b60bd3f307 100644
--- a/packages/generators/utils/plugins.ts
+++ b/packages/generators/utils/plugins.ts
@@ -1,3 +1,4 @@
+
/**
*
* Callable function with the initial plugins
@@ -6,6 +7,45 @@
* that consists of terser-webpack-plugin
*/
-export default function(_?: void): string[] {
+export default function (): string[] {
return ["new TerserPlugin()"];
}
+
+/**
+ *
+ * Replaces the string with a substring at the given index
+ * https://gist.github.com/efenacigiray/9367920
+ *
+ * @param {String} str - string to be modified
+ * @param {Number} index - index to replace from
+ * @param {String} replace - string to replace starting from index
+ *
+ * @returns {String} string - The newly mutated string
+ *
+ */
+
+export const replaceAt = (str: string, index: number, replace: string) : string => {
+ return str.substring(0, index) + replace + str.substring(index + 1);
+}
+
+
+/**
+ *
+ * Generate a webpack standard webpack plugin name from the plugin name from the Answer
+ *
+ * @param {String} rawPluginName - plugin name from answer
+ *
+ * @returns {String} string - the webpack standard plugin name
+ *
+ */
+
+
+export const generatePluginName = (rawPluginName: string): string => {
+ let myPluginNameArray : string[];
+ myPluginNameArray = rawPluginName.split("-");
+ const pluginArrLength : number = myPluginNameArray.length;
+ for (let i = 0; i < pluginArrLength && pluginArrLength > 1 ; i++) {
+ myPluginNameArray[i] = replaceAt(myPluginNameArray[i], 0, myPluginNameArray[i].charAt(0).toUpperCase());
+ }
+ return myPluginNameArray.join("")
+}
diff --git a/packages/generators/utils/styleSupport.ts b/packages/generators/utils/styleSupport.ts
new file mode 100644
index 00000000000..d05a5241a75
--- /dev/null
+++ b/packages/generators/utils/styleSupport.ts
@@ -0,0 +1,183 @@
+import tooltip from "./tooltip";
+
+export enum StylingType {
+ CSS = "CSS",
+ SASS = "SASS",
+ LESS = "LESS",
+ PostCSS = "PostCSS",
+}
+
+export enum LoaderName {
+ CSS = "css-loader",
+ SASS = "sass-loader",
+ STYLE = "style-loader",
+ LESS = "less-loader",
+ POSTCSS = "postcss-loader",
+}
+
+export enum StyleRegex {
+ CSS = "/\.css$/",
+ SASS = "/\.(scss|css)$/",
+ LESS = "/\.(less|css)$/",
+ PostCSS = "/\.css$/",
+}
+
+export interface Loader {
+ loader: string;
+ options?: {
+ importLoaders?: number;
+ sourceMap?: boolean;
+ plugins?: string;
+ };
+}
+
+export default function style(self, stylingType: string): {
+ ExtractUseProps: Loader[],
+ regExpForStyles: StyleRegex,
+} {
+ const ExtractUseProps: Loader[] = [];
+ let regExpForStyles: StyleRegex = null;
+
+ switch (stylingType) {
+ case StylingType.CSS:
+ regExpForStyles = StyleRegex.CSS;
+
+ self.dependencies.push(
+ LoaderName.CSS,
+ );
+ if (!self.isProd) {
+ self.dependencies.push(
+ LoaderName.STYLE,
+ );
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.STYLE}"`,
+ },
+ );
+ }
+ ExtractUseProps.push({
+ loader: `"${LoaderName.CSS}"`,
+ options: {
+ sourceMap: true,
+ },
+ });
+ break;
+
+ case StylingType.SASS:
+ regExpForStyles = StyleRegex.SASS;
+
+ self.dependencies.push(
+ "node-sass",
+ LoaderName.SASS,
+ LoaderName.CSS,
+ );
+ if (!self.isProd) {
+ self.dependencies.push(
+ LoaderName.STYLE,
+ );
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.STYLE}"`,
+ },
+ );
+ }
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.CSS}"`,
+ options: {
+ sourceMap: true,
+ },
+ },
+ {
+ loader: `"${LoaderName.SASS}"`,
+ options: {
+ sourceMap: true,
+ },
+ },
+ );
+ break;
+
+ case StylingType.LESS:
+ regExpForStyles = StyleRegex.LESS;
+
+ self.dependencies.push(
+ "less",
+ LoaderName.LESS,
+ LoaderName.CSS,
+ );
+ if (!self.isProd) {
+ self.dependencies.push(
+ LoaderName.STYLE,
+ );
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.STYLE}"`,
+ },
+ );
+ }
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.CSS}"`,
+ options: {
+ sourceMap: true,
+ },
+ },
+ {
+ loader: `"${LoaderName.LESS}"`,
+ options: {
+ sourceMap: true,
+ },
+ },
+ );
+ break;
+
+ case StylingType.PostCSS:
+ regExpForStyles = StyleRegex.PostCSS;
+
+ self.configuration.config.topScope.push(
+ tooltip.postcss(),
+ "const autoprefixer = require('autoprefixer');",
+ "const precss = require('precss');",
+ "\n",
+ );
+
+ self.dependencies.push(
+ "precss",
+ "autoprefixer",
+ LoaderName.CSS,
+ LoaderName.POSTCSS,
+ );
+ if (!self.isProd) {
+ self.dependencies.push(
+ LoaderName.STYLE,
+ );
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.STYLE}"`,
+ },
+ );
+ }
+ ExtractUseProps.push(
+ {
+ loader: `"${LoaderName.CSS}"`,
+ options: {
+ importLoaders: 1,
+ sourceMap: true,
+ },
+ },
+ {
+ loader: `"${LoaderName.POSTCSS}"`,
+ options: {
+ plugins: `function () {
+ return [
+ precss,
+ autoprefixer
+ ];
+ }`,
+ },
+ },
+ );
+ break;
+ }
+ return { ExtractUseProps, regExpForStyles };
+}
diff --git a/packages/generators/utils/tooltip.ts b/packages/generators/utils/tooltip.ts
index 27580eee7ad..c58c7fba922 100644
--- a/packages/generators/utils/tooltip.ts
+++ b/packages/generators/utils/tooltip.ts
@@ -7,7 +7,7 @@
*/
export default {
- cssPlugin: (_?: void): string => {
+ cssPlugin: (): string => {
return `/*
* We've enabled MiniCssExtractPlugin for you. This allows your app to
* use css modules that will be moved into a separate CSS file instead of inside
@@ -18,7 +18,7 @@ export default {
*/`;
},
- splitChunks: (_?: void): string => {
+ splitChunks: (): string => {
return `/*
* SplitChunksPlugin is enabled by default and replaced
* deprecated CommonsChunkPlugin. It automatically identifies modules which
@@ -33,7 +33,7 @@ export default {
*/`;
},
- postcss: (_?: void): string => {
+ postcss: (): string => {
return `/*
* We've enabled Postcss, autoprefixer and precss for you. This allows your app
* to lint CSS, support variables and mixins, transpile future CSS syntax,
@@ -50,7 +50,7 @@ export default {
*/`;
},
- terser: (_?: void): string => {
+ terser: (): string => {
return `/*
* We've enabled TerserPlugin for you! This minifies your app
* in order to load faster and run less javascript.
@@ -59,4 +59,15 @@ export default {
*
*/`;
},
+
+ html: (): string => {
+ return `/*
+ * We've enabled HtmlWebpackPlugin for you! This generates a html
+ * page for you when you compile webpack, which will make you start
+ * developing and prototyping faster.
+ *
+ * https://github.com/jantimon/html-webpack-plugin
+ *
+ */`;
+ }
};
diff --git a/packages/generators/utils/webpackConfig.ts b/packages/generators/utils/webpackConfig.ts
new file mode 100644
index 00000000000..b67d3c6d0c5
--- /dev/null
+++ b/packages/generators/utils/webpackConfig.ts
@@ -0,0 +1,31 @@
+import { WebpackOptions } from '../types';
+
+export function getDefaultOptimization(isProd: boolean): WebpackOptions["optimization"] {
+ let optimizationOptions;
+ if (isProd) {
+ optimizationOptions = {
+ minimizer: [
+ "new TerserPlugin()",
+ ],
+ splitChunks: {
+ chunks: "'all'",
+ },
+ };
+ } else {
+ optimizationOptions = {
+ splitChunks: {
+ cacheGroups: {
+ vendors: {
+ priority: -10,
+ test: "/[\\\\/]node_modules[\\\\/]/",
+ },
+ },
+ chunks: "'async'",
+ minChunks: 1,
+ minSize: 30000,
+ name: !this.isProd,
+ },
+ };
+ }
+ return optimizationOptions;
+}
\ No newline at end of file
diff --git a/packages/info/.eslintrc b/packages/info/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/info/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/info/README.md b/packages/info/README.md
index 03dcd9bd8d1..a1258e1affa 100644
--- a/packages/info/README.md
+++ b/packages/info/README.md
@@ -1,10 +1,10 @@
# webpack-cli info
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/info.svg)](https://www.npmjs.com/package/@webpack-cli/info)
+[![NPM Downloads][downloads]][downloads-url]
## Description
-This pacakge returns a set of information related to the local enviroment.
+This package returns a set of information related to the local environment.
## Installation
@@ -22,6 +22,10 @@ envinfo();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli info
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/info.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/info
diff --git a/packages/info/__tests__/.eslintrc b/packages/info/__tests__/.eslintrc
new file mode 100644
index 00000000000..5d4340a351d
--- /dev/null
+++ b/packages/info/__tests__/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "root": true,
+ "extends": ["../.eslintrc"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["off"]
+ }
+}
diff --git a/packages/info/__tests__/index.test.ts b/packages/info/__tests__/index.test.ts
index fca23773708..7ddb1dae791 100644
--- a/packages/info/__tests__/index.test.ts
+++ b/packages/info/__tests__/index.test.ts
@@ -8,7 +8,7 @@ describe("info", () => {
Browsers: ["Chrome", "Firefox", "Safari"],
System: ["OS", "CPU"],
npmGlobalPackages: ["webpack", "webpack-cli"],
- npmPackages: "*webpack*",
+ npmPackages: "*webpack*"
};
expect(returnedInformation).toEqual(expectedInformation);
diff --git a/packages/info/index.ts b/packages/info/index.ts
index 43db20f6234..68c69c9ddf8 100644
--- a/packages/info/index.ts
+++ b/packages/info/index.ts
@@ -5,16 +5,18 @@ import * as process from "process";
* Prints debugging information for webpack issue reporting
*/
-export function information() {
+// TODO: define proper interface
+// eslint-disable-next-line
+export function information(): any {
return {
Binaries: ["Node", "Yarn", "npm"],
Browsers: ["Chrome", "Firefox", "Safari"],
System: ["OS", "CPU"],
npmGlobalPackages: ["webpack", "webpack-cli"],
- npmPackages: "*webpack*",
+ npmPackages: "*webpack*"
};
}
-export default async function info() {
+export default async function info(): Promise {
process.stdout.write(await envinfo.run(information()));
}
diff --git a/packages/init/.eslintrc b/packages/init/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/init/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/init/README.md b/packages/init/README.md
index 465966be148..9f93a65754b 100644
--- a/packages/init/README.md
+++ b/packages/init/README.md
@@ -1,6 +1,6 @@
# webpack-cli init
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/init.svg)](https://www.npmjs.com/package/@webpack-cli/init)
+[![NPM Downloads][downloads]][downloads-url]
## Description
@@ -24,24 +24,31 @@ const init = require("@webpack-cli/init").default;
// this will run the default init instance
init();
- // we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
+// we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
init([null, null, ...myPacakges]);
```
### CLI (via `webpack-cli`)
+
**Via defaults**
```bash
npx webpack-cli init
```
+
**Via custom scaffold**
+
1. Using package on `npm`
```bash
npx webpack-cli init webpack-scaffold-[name]
```
-2. Using path to local directory
+
+2. Using path to a local directory
```bash
npx webpack-cli init [path]
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/init.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/init
diff --git a/packages/init/init.ts b/packages/init/init.ts
index 1b60fe34c7e..b4063cd15e9 100644
--- a/packages/init/init.ts
+++ b/packages/init/init.ts
@@ -7,9 +7,9 @@ import propTypes from "@webpack-cli/utils/prop-types";
import astTransform from "@webpack-cli/utils/recursive-parser";
import runPrettier from "@webpack-cli/utils/run-prettier";
-import { INode } from "@webpack-cli/utils/types/NodePath";
-import { IError } from "./types";
-import { IConfiguration, IWebpackProperties } from "./types/Transform";
+import { Node } from "@webpack-cli/utils/types/NodePath";
+import { Error } from "./types";
+import { Configuration, WebpackProperties } from "./types/Transform";
/**
*
@@ -21,9 +21,8 @@ import { IConfiguration, IWebpackProperties } from "./types/Transform";
* @returns {Array} - An array with the transformations to be run
*/
-const mapOptionsToTransform = (config: IConfiguration): string[] =>
- Object.keys(config.webpackOptions)
- .filter((key: string): boolean => propTypes.has(key));
+const mapOptionsToTransform = (config: Configuration): string[] =>
+ Object.keys(config.webpackOptions).filter((key: string): boolean => propTypes.has(key));
/**
*
@@ -35,53 +34,56 @@ const mapOptionsToTransform = (config: IConfiguration): string[] =>
* and writes the file
*/
-export default function runTransform(webpackProperties: IWebpackProperties, action: string): void {
+export default function runTransform(webpackProperties: WebpackProperties, action: string): void {
// webpackOptions.name sent to nameTransform if match
- const webpackConfig: string[] =
- Object
- .keys(webpackProperties)
- .filter((p: string): boolean => p !== "configFile" && p !== "configPath");
+ const webpackConfig: string[] = Object.keys(webpackProperties).filter(
+ (p: string): boolean => p !== "configFile" && p !== "configPath"
+ );
const initActionNotDefined = (action && action !== "init") || false;
- webpackConfig.forEach((scaffoldPiece: string): Promise => {
- const config: IConfiguration = webpackProperties[scaffoldPiece];
- const transformations = mapOptionsToTransform(config);
- const ast = j(
- initActionNotDefined
- ? webpackProperties.configFile
- : "module.exports = {}",
- );
- const transformAction: string | null = action || null;
+ webpackConfig.forEach(
+ (scaffoldPiece: string): Promise => {
+ const config: Configuration = webpackProperties[scaffoldPiece];
+ const transformations = mapOptionsToTransform(config);
+ const ast = j(initActionNotDefined ? webpackProperties.configFile : "module.exports = {}");
+ const transformAction: string | null = action || null;
- return pEachSeries(transformations, (f: string): boolean | INode => {
- return astTransform(j, ast, config.webpackOptions[f], transformAction, f);
- })
- .then((value: string[]): void | PromiseLike => {
- let configurationName = "webpack.config.js";
- if (config.configName) {
- configurationName = `webpack.${config.configName}.js`;
+ return pEachSeries(
+ transformations,
+ (f: string): boolean | Node => {
+ return astTransform(j, ast, config.webpackOptions[f], transformAction, f);
}
+ )
+ .then(
+ (): void | PromiseLike => {
+ let configurationName = "webpack.config.js";
+ if (config.configName) {
+ configurationName = `webpack.${config.configName}.js`;
+ }
- const outputPath = initActionNotDefined
- ? webpackProperties.configPath
- : path.join(process.cwd(), configurationName);
+ const outputPath = initActionNotDefined
+ ? webpackProperties.configPath
+ : path.join(process.cwd(), configurationName);
- const source: string = ast.toSource({
- quote: "single",
- });
+ const source: string = ast.toSource({
+ quote: "single"
+ });
- runPrettier(outputPath, source);
- })
- .catch((err: IError) => {
- console.error(err.message ? err.message : err);
- });
- });
+ runPrettier(outputPath, source);
+ }
+ )
+ .catch(
+ (err: Error): void => {
+ console.error(err.message ? err.message : err);
+ }
+ );
+ }
+ );
let successMessage: string = `Congratulations! Your new webpack configuration file has been created!`;
if (initActionNotDefined && webpackProperties.config.item) {
successMessage = `Congratulations! ${webpackProperties.config.item} has been ${action}ed!`;
-
}
process.stdout.write("\n" + chalk.green(`${successMessage}\n`));
}
diff --git a/packages/init/package-lock.json b/packages/init/package-lock.json
index fede4727f12..1695fbbf370 100644
--- a/packages/init/package-lock.json
+++ b/packages/init/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@webpack-cli/init",
- "version": "0.1.3",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/packages/init/types/Transform.ts b/packages/init/types/Transform.ts
index 89622b85f62..d117d93d558 100644
--- a/packages/init/types/Transform.ts
+++ b/packages/init/types/Transform.ts
@@ -1,14 +1,14 @@
-export interface IWebpackProperties extends Object {
+export interface WebpackProperties extends Object {
configFile: string;
configPath: string;
- webpackOptions: IConfiguration;
+ webpackOptions: Configuration;
config: {
item: string;
configName: string;
};
}
-export interface IConfiguration extends Object {
+export interface Configuration extends Object {
configName: string;
webpackOptions: object;
topScope: string[];
diff --git a/packages/init/types/index.ts b/packages/init/types/index.ts
index c0f13602567..9480d6ce9b0 100644
--- a/packages/init/types/index.ts
+++ b/packages/init/types/index.ts
@@ -1,3 +1,3 @@
-export interface IError {
+export interface Error {
message?: string;
}
diff --git a/packages/make/.eslintrc b/packages/make/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/make/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/migrate/.eslintrc b/packages/migrate/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/migrate/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/migrate/README.md b/packages/migrate/README.md
index 68a8ae342a9..a5fc77e87dc 100644
--- a/packages/migrate/README.md
+++ b/packages/migrate/README.md
@@ -1,6 +1,6 @@
# webpack-cli migrate
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/migrate.svg)](https://www.npmjs.com/package/@webpack-cli/migrate)
+[![npm][downloads]][downloads-url]
## Description
@@ -17,6 +17,7 @@ npm i -D webpack-cli @webpack-cli/migrate
To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
### Node
+
```js
const migrate = require("@webpack-cli/migrate").default;
@@ -25,6 +26,10 @@ migrate(null, null, inputPath, outputPath);
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli migrate
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/migrate.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/migrate
diff --git a/packages/migrate/__tests__/.eslintrc b/packages/migrate/__tests__/.eslintrc
new file mode 100644
index 00000000000..5d4340a351d
--- /dev/null
+++ b/packages/migrate/__tests__/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "root": true,
+ "extends": ["../.eslintrc"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["off"]
+ }
+}
diff --git a/packages/migrate/bannerPlugin/bannerPlugin.ts b/packages/migrate/bannerPlugin/bannerPlugin.ts
index 5d369f57ec9..422e1d40dd1 100644
--- a/packages/migrate/bannerPlugin/bannerPlugin.ts
+++ b/packages/migrate/bannerPlugin/bannerPlugin.ts
@@ -1,6 +1,6 @@
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -12,24 +12,19 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
- return utils
- .findPluginsByName(j, ast, ["webpack.BannerPlugin"])
- .forEach((path: INode): void => {
- const args: INode[] = path.value.arguments; // any node
+export default function(j: JSCodeshift, ast: Node): Node {
+ return utils.findPluginsByName(j, ast, ["webpack.BannerPlugin"]).forEach(
+ (path: Node): void => {
+ const args: Node[] = (path.value as Node).arguments; // any node
// If the first argument is a literal replace it with object notation
// See https://webpack.js.org/guides/migrating/#bannerplugin-breaking-change
if (args && args.length > 1 && args[0].type === j.Literal.name) {
// and remove the first argument
- path.value.arguments = [path.value.arguments[1]];
- utils.createOrUpdatePluginByName(
- j,
- path.parent,
- "webpack.BannerPlugin",
- {
- banner: args[0].value,
- },
- );
+ (path.value as Node).arguments = [(path.value as Node).arguments[1]];
+ utils.createOrUpdatePluginByName(j, path.parent, "webpack.BannerPlugin", {
+ banner: args[0].value
+ });
}
- });
+ }
+ );
}
diff --git a/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts b/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts
index ea86fb371ba..62bc6a090e2 100644
--- a/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts
+++ b/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts
@@ -4,10 +4,47 @@ import {
createProperty,
findAndRemovePluginByName,
findPluginsByName,
- findRootNodesByName,
+ findRootNodesByName
} from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
+
+// merge test entry prop and function expression. case 6[x]
+// TODO: set the proper type once moved to @types/jscodeshift
+// eslint-disable-next-line
+const mergeTestPropArrowFunction = (j, chunkKey, testFunc): any => {
+ return j.property(
+ "init",
+ createIdentifierOrLiteral(j, "test"),
+ j.arrowFunctionExpression(
+ [j.identifier("module")],
+ j.blockStatement([
+ j.ifStatement(
+ j.callExpression(
+ j.memberExpression(
+ j.callExpression(j.memberExpression(j.identifier("module"), j.identifier("getChunks")), []),
+ j.identifier("some"),
+ false
+ ),
+ [
+ j.arrowFunctionExpression(
+ [j.identifier("chunk")],
+ j.binaryExpression(
+ "===",
+ j.memberExpression(j.identifier("chunk"), j.identifier("name")),
+ j.literal(chunkKey)
+ )
+ )
+ ]
+ ),
+ j.returnStatement(j.literal(true))
+ ),
+ j.variableDeclaration("const", [j.variableDeclarator(j.identifier("fn"), testFunc)]),
+ j.returnStatement(j.callExpression(j.identifier("fn"), [j.identifier("module")]))
+ ])
+ )
+ );
+};
/**
*
@@ -18,20 +55,15 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @param {Node} ast - jscodeshift ast to transform
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
- const splitChunksProps: INode[] = [];
- const cacheGroupsProps: INode[] = [];
+export default function(j: JSCodeshift, ast: Node): Node {
+ const splitChunksProps: Node[] = [];
+ const cacheGroupsProps: Node[] = [];
const optimizationProps: object = {};
- let commonCacheGroupsProps: INode[] = [
- createProperty(j, "chunks", "initial"),
- createProperty(j, "enforce", true),
- ];
+ let commonCacheGroupsProps: Node[] = [createProperty(j, "chunks", "initial"), createProperty(j, "enforce", true)];
// find old options
- const CommonsChunkPlugin: INode = findPluginsByName(j, ast, [
- "webpack.optimize.CommonsChunkPlugin",
- ]);
+ const CommonsChunkPlugin: Node = findPluginsByName(j, ast, ["webpack.optimize.CommonsChunkPlugin"]);
if (!CommonsChunkPlugin.size()) {
return ast;
@@ -39,64 +71,66 @@ export default function(j: IJSCodeshift, ast: INode): INode {
// cache group options based on keys
let cacheGroup: object = {};
- let cacheGroups: INode[] = [];
+ let cacheGroups: Node[] = [];
// iterate each CommonsChunkPlugin instance
CommonsChunkPlugin.forEach(
- (path: INode): void => {
- const CCPProps: INode[] = path.value.arguments[0].properties;
+ (path: Node): void => {
+ const CCPProps: Node[] = (path.value as Node).arguments[0].properties;
// reset chunks from old props
cacheGroup = {};
cacheGroups = [];
- commonCacheGroupsProps = [
- createProperty(j, "chunks", "initial"),
- createProperty(j, "enforce", true),
- ];
+ commonCacheGroupsProps = [createProperty(j, "chunks", "initial"), createProperty(j, "enforce", true)];
let chunkKey: string;
- let chunkCount: number = 0;
+ let chunkCount = 0;
// iterate CCP props and map SCP props
CCPProps.forEach(
- (p: INode): void => {
+ (p: Node): void => {
const propKey: string = p.key.name;
switch (propKey) {
case "names":
- p.value.elements.forEach(({ value: chunkValue }): void => {
- if (chunkValue === "runtime") {
- optimizationProps["runtimeChunk"] = j.objectExpression([ // tslint:disable-line
- createProperty(j, "name", chunkValue),
- ]);
- } else {
- if (!Array.isArray(cacheGroup[chunkValue])) {
- cacheGroup[chunkValue] = [];
- }
+ (p.value as Node).elements.forEach(
+ ({ value: chunkValue }): void => {
+ if (chunkValue === "runtime") {
+ optimizationProps["runtimeChunk"] = j.objectExpression([
+ createProperty(j, "name", chunkValue)
+ ]);
+ } else {
+ if (!Array.isArray(cacheGroup[chunkValue as string])) {
+ cacheGroup[chunkValue as string] = [];
+ }
- findRootNodesByName(j, ast, "entry").forEach(
- ({ value: { value: { properties: entries }} },
- ): void => {
- chunkCount = entries.length;
- entries.forEach(({ key: { name: entryName }}): void => {
- if (entryName === chunkValue) {
- cacheGroup[chunkValue].push(
- createProperty(j, "test", entryName),
+ findRootNodesByName(j, ast, "entry").forEach(
+ ({ value }): void => {
+ const { properties: entries } = (value as Node).value as Node;
+ chunkCount = entries.length;
+ entries.forEach(
+ ({ key: { name: entryName } }): void => {
+ if (entryName === chunkValue) {
+ cacheGroup[chunkValue as string].push(
+ createProperty(j, "test", entryName)
+ );
+ }
+ }
);
}
- });
- });
+ );
+ }
}
- });
+ );
break;
- case "name":
- const nameKey = p.value.value;
+ case "name": {
+ const nameKey = (p.value as Node).value as string;
if (nameKey === "runtime") {
- optimizationProps["runtimeChunk"] = j.objectExpression([ // tslint:disable-line
- createProperty(j, "name", nameKey),
+ optimizationProps["runtimeChunk"] = j.objectExpression([
+ createProperty(j, "name", nameKey)
]);
} else {
chunkKey = nameKey;
@@ -106,19 +140,21 @@ export default function(j: IJSCodeshift, ast: INode): INode {
}
findRootNodesByName(j, ast, "entry").forEach(
- ({ value: { value: { properties: entries }} },
- ): void => {
- chunkCount = entries.length;
- entries.forEach(({ key: { name: entryName }}): void => {
- if (entryName === nameKey) {
- cacheGroup[nameKey].push(
- createProperty(j, "test", entryName),
- );
- }
- });
- });
+ ({ value }): void => {
+ const { properties: entries } = (value as Node).value as Node;
+ chunkCount = entries.length;
+ entries.forEach(
+ ({ key: { name: entryName } }): void => {
+ if (entryName === nameKey) {
+ cacheGroup[nameKey].push(createProperty(j, "test", entryName));
+ }
+ }
+ );
+ }
+ );
}
break;
+ }
case "filename":
if (chunkKey) {
@@ -126,7 +162,7 @@ export default function(j: IJSCodeshift, ast: INode): INode {
cacheGroup[chunkKey] = [];
}
cacheGroup[chunkKey].push(
- createProperty(j, propKey, p.value.value),
+ createProperty(j, propKey, (p.value as Node).value as string)
);
}
break;
@@ -135,9 +171,7 @@ export default function(j: IJSCodeshift, ast: INode): INode {
if (!Array.isArray(cacheGroup[chunkKey])) {
cacheGroup[chunkKey] = [];
}
- cacheGroup[chunkKey].push(
- createProperty(j, "chunks", "async"),
- );
+ cacheGroup[chunkKey].push(createProperty(j, "chunks", "async"));
break;
case "minSize":
@@ -145,177 +179,104 @@ export default function(j: IJSCodeshift, ast: INode): INode {
cacheGroup[chunkKey] = [];
}
cacheGroup[chunkKey].push(
- j.property("init", createIdentifierOrLiteral(j, propKey), p.value),
+ j.property("init", createIdentifierOrLiteral(j, propKey), p.value as Node)
);
break;
- case "minChunks" :
- const { value: pathValue }: INode = p;
+ case "minChunks": {
+ const { value: pathValue }: Node = p;
// minChunk is a function
if (
- pathValue.type === "ArrowFunctionExpression" ||
- pathValue.type === "FunctionExpression"
+ (pathValue as Node).type === "ArrowFunctionExpression" ||
+ (pathValue as Node).type === "FunctionExpression"
) {
if (!Array.isArray(cacheGroup[chunkKey])) {
cacheGroup[chunkKey] = [];
}
- cacheGroup[chunkKey] = cacheGroup[chunkKey].map((prop) =>
- prop.key.name === "test" ? mergeTestPropArrowFunction(j, chunkKey, pathValue) : prop);
+ // eslint-disable-next-line
+ cacheGroup[chunkKey] = cacheGroup[chunkKey].map(
+ (prop): any =>
+ prop.key.name === "test"
+ ? mergeTestPropArrowFunction(j, chunkKey, pathValue)
+ : prop
+ );
}
break;
+ }
}
- },
+ }
);
- Object.keys(cacheGroup).forEach((chunkName: string): void => {
- let chunkProps: INode[] = [
- createProperty(j, "name", chunkName),
- ];
+ Object.keys(cacheGroup).forEach(
+ (chunkName: string): void => {
+ let chunkProps: Node[] = [createProperty(j, "name", chunkName)];
- const chunkPropsToAdd = cacheGroup[chunkName];
- const chunkPropsKeys = chunkPropsToAdd.map((prop) => prop.key.name);
+ const chunkPropsToAdd = cacheGroup[chunkName];
+ const chunkPropsKeys = chunkPropsToAdd.map((prop): string => prop.key.name);
- commonCacheGroupsProps =
- commonCacheGroupsProps.filter((commonProp) => !chunkPropsKeys.includes(commonProp.key.name));
+ commonCacheGroupsProps = commonCacheGroupsProps.filter(
+ (commonProp): boolean => !chunkPropsKeys.includes(commonProp.key.name)
+ );
- chunkProps.push(...commonCacheGroupsProps);
+ chunkProps.push(...commonCacheGroupsProps);
- if (chunkCount > 1) {
- chunkProps.push(
- j.property(
- "init",
- createIdentifierOrLiteral(j, "minChunks"),
- createIdentifierOrLiteral(j, chunkCount),
- ),
+ if (chunkCount > 1) {
+ chunkProps.push(
+ j.property(
+ "init",
+ createIdentifierOrLiteral(j, "minChunks"),
+ createIdentifierOrLiteral(j, chunkCount)
+ )
+ );
+ }
+
+ const chunkPropsContainTest = chunkPropsToAdd.some(
+ (prop): boolean => prop.key.name === "test" && prop.value.type === "Literal"
);
- }
- const chunkPropsContainTest =
- chunkPropsToAdd.some((prop) => prop.key.name === "test" && prop.value.type === "Literal");
+ if (chunkPropsContainTest) {
+ chunkProps = chunkProps.filter((prop): boolean => prop.key.name !== "minChunks");
+ }
- if (chunkPropsContainTest) {
- chunkProps = chunkProps.filter((prop) => prop.key.name !== "minChunks");
- }
+ if (chunkPropsToAdd && Array.isArray(chunkPropsToAdd) && chunkPropsToAdd.length > 0) {
+ chunkProps.push(...chunkPropsToAdd);
+ }
- if (
- chunkPropsToAdd &&
- Array.isArray(chunkPropsToAdd) &&
- chunkPropsToAdd.length > 0
- ) {
- chunkProps.push(...chunkPropsToAdd);
+ cacheGroups.push(
+ j.property("init", createIdentifierOrLiteral(j, chunkName), j.objectExpression([...chunkProps]))
+ );
}
-
- cacheGroups.push(
- j.property(
- "init",
- createIdentifierOrLiteral(j, chunkName),
- j.objectExpression([...chunkProps]),
- ),
- );
- });
+ );
if (cacheGroups.length > 0) {
cacheGroupsProps.push(...cacheGroups);
}
- },
+ }
);
// Remove old plugin
- const root: INode = findAndRemovePluginByName(
- j,
- ast,
- "webpack.optimize.CommonsChunkPlugin",
- );
+ const root: Node = findAndRemovePluginByName(j, ast, "webpack.optimize.CommonsChunkPlugin");
- const rootProps: INode[] = [...splitChunksProps];
+ const rootProps: Node[] = [...splitChunksProps];
if (cacheGroupsProps.length > 0) {
rootProps.push(
- j.property(
- "init",
- createIdentifierOrLiteral(j, "cacheGroups"),
- j.objectExpression([...cacheGroupsProps]),
- ),
+ j.property("init", createIdentifierOrLiteral(j, "cacheGroups"), j.objectExpression([...cacheGroupsProps]))
);
}
// Add new optimizations splitChunks option
if (root) {
- addOrUpdateConfigObject(
- j,
- root,
- "optimizations",
- "splitChunks",
- j.objectExpression([...rootProps]),
- );
+ addOrUpdateConfigObject(j, root, "optimizations", "splitChunks", j.objectExpression([...rootProps]));
- Object.keys(optimizationProps).forEach((key: string): void => {
- addOrUpdateConfigObject(
- j,
- root,
- "optimizations",
- key,
- optimizationProps[key],
- );
- });
+ Object.keys(optimizationProps).forEach(
+ (key: string): void => {
+ addOrUpdateConfigObject(j, root, "optimizations", key, optimizationProps[key]);
+ }
+ );
}
return ast;
}
-
-// merge test entry prop and function expression. case 6[x]
-const mergeTestPropArrowFunction = (j, chunkKey, testFunc) => {
- return j.property(
- "init",
- createIdentifierOrLiteral(j, "test"),
- j.arrowFunctionExpression(
- [j.identifier("module")],
- j.blockStatement([
- j.ifStatement(
- j.callExpression(
- j.memberExpression(
- j.callExpression(
- j.memberExpression(
- j.identifier("module"),
- j.identifier("getChunks"),
- ),
- [],
- ),
- j.identifier("some"),
- false,
- ),
- [j.arrowFunctionExpression(
- [j.identifier("chunk")],
- j.binaryExpression(
- "===",
- j.memberExpression(
- j.identifier("chunk"),
- j.identifier("name"),
- ),
- j.literal(chunkKey),
- ),
- )],
- ),
- j.returnStatement(
- j.literal(true),
- ),
- ),
- j.variableDeclaration(
- "const",
- [j.variableDeclarator(
- j.identifier("fn"),
- testFunc,
- )],
- ),
- j.returnStatement(
- j.callExpression(
- j.identifier("fn"),
- [j.identifier("module")],
- ),
- ),
- ]),
- ),
- );
-};
diff --git a/packages/migrate/extractTextPlugin/extractTextPlugin.ts b/packages/migrate/extractTextPlugin/extractTextPlugin.ts
index bf0cf39d937..fcc3931a394 100644
--- a/packages/migrate/extractTextPlugin/extractTextPlugin.ts
+++ b/packages/migrate/extractTextPlugin/extractTextPlugin.ts
@@ -1,6 +1,6 @@
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -12,12 +12,12 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Boolean} isPluginInvocation - whether `node` is the invocation of the plugin denoted by `pluginName`
*/
-function findInvocation(j: IJSCodeshift, path: INode, pluginName: string): boolean {
- let found: boolean = false;
+function findInvocation(j: JSCodeshift, path: Node, pluginName: string): boolean {
+ let found = false;
found =
j(path)
.find(j.MemberExpression)
- .filter((p: INode): boolean => p.get("object").value.name === pluginName)
+ .filter((p: Node): boolean => (p.get("object").value as Node).name === pluginName)
.size() > 0;
return found;
}
@@ -31,30 +31,28 @@ function findInvocation(j: IJSCodeshift, path: INode, pluginName: string): boole
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): void | INode {
- const changeArguments = (path: INode): INode => {
- const args: INode[] = path.value.arguments;
+export default function(j: JSCodeshift, ast: Node): void | Node {
+ const changeArguments = (path: Node): Node => {
+ const args: Node[] = (path.value as Node).arguments;
- const literalArgs: INode[] = args.filter((p: INode): boolean => utils.isType(p, "Literal"));
+ const literalArgs: Node[] = args.filter((p: Node): boolean => utils.isType(p, "Literal"));
if (literalArgs && literalArgs.length > 1) {
const newArgs: object = j.objectExpression(
- literalArgs.map((p: INode, index: number): INode =>
- utils.createProperty(j, index === 0 ? "fallback" : "use", p.value),
- ),
+ literalArgs.map(
+ (p: Node, index: number): Node => utils.createProperty(j, index === 0 ? "fallback" : "use", p.value as Node)
+ )
);
- path.value.arguments = [newArgs];
+ (path.value as Node).arguments = [newArgs];
}
return path;
};
- const name: string = utils.findVariableToPlugin(
- j,
- ast,
- "extract-text-webpack-plugin",
- );
- if (!name) { return ast; }
+ const name: string = utils.findVariableToPlugin(j, ast, "extract-text-webpack-plugin");
+ if (!name) {
+ return ast;
+ }
return ast
.find(j.CallExpression)
- .filter((p: INode): boolean => findInvocation(j, p, name))
+ .filter((p: Node): boolean => findInvocation(j, p, name))
.forEach(changeArguments);
}
diff --git a/packages/migrate/index.ts b/packages/migrate/index.ts
index 2a34c453438..09e6bcee346 100644
--- a/packages/migrate/index.ts
+++ b/packages/migrate/index.ts
@@ -10,19 +10,20 @@ import { validate, WebpackOptionsValidationError } from "webpack";
import runPrettier from "@webpack-cli/utils/run-prettier";
import { transformations } from "./migrate";
-import { IJSCodeshift, INode } from "./types/NodePath";
+import { Node } from "./types/NodePath";
+import jscodeshift from "jscodeshift";
declare var process: {
cwd: Function;
webpackModule: {
validate: Function;
- /* tslint:disable */
WebpackOptionsValidationError: {
- new: (errors: string[]) => {
+ new: (
+ errors: string[]
+ ) => {
message: string;
};
};
- /* tslint:enable */
};
stdout: {
write: Function;
@@ -30,6 +31,167 @@ declare var process: {
exitCode: number;
};
+/**
+ *
+ * Runs migration on a given configuration using AST's and promises
+ * to sequentially transform a configuration file.
+ *
+ * @param {String} currentConfigPath - input path for config
+ * @param {String} outputConfigPath - output path for config
+ * @returns {Promise} Runs the migration using a promise that
+ * will throw any errors during each transform or output if the
+ * user decides to abort the migration
+ */
+
+function runMigration(currentConfigPath: string, outputConfigPath: string): Promise | void {
+ const recastOptions: object = {
+ quote: "single"
+ };
+
+ const tasks: Listr = new Listr([
+ {
+ task: (ctx: Node): string | void | Listr | Promise<{}> =>
+ new pLazy(
+ (
+ resolve: (value?: object) => void,
+ reject: (reason?: string | object, err?: object) => void
+ ): void => {
+ fs.readFile(
+ currentConfigPath,
+ "utf8",
+ (err: object, content: string): void => {
+ if (err) {
+ reject(err);
+ }
+ try {
+ ctx.source = content;
+ ctx.ast = jscodeshift(content);
+ resolve();
+ } catch (err) {
+ reject("Error generating AST", err);
+ }
+ }
+ );
+ }
+ ),
+ title: "Reading webpack config"
+ },
+ {
+ task: (ctx: Node): string | void | Listr | Promise<{}> => {
+ return new Listr(
+ Object.keys(transformations).map(
+ (
+ key: string
+ ): {
+ task: () => string;
+ title: string;
+ } => {
+ const transform: Function = transformations[key];
+ return {
+ task: (): string => transform(ctx.ast, ctx.source),
+ title: key
+ };
+ }
+ )
+ );
+ },
+ title: "Migrating config to newest version"
+ }
+ ]);
+
+ tasks
+ .run()
+ .then(
+ (ctx: Node): void | Promise => {
+ const result: string = ctx.ast.toSource(recastOptions);
+ const diffOutput: diff.IDiffResult[] = diff.diffLines(ctx.source, result);
+
+ diffOutput.forEach(
+ (diffLine: diff.IDiffResult): void => {
+ if (diffLine.added) {
+ process.stdout.write(chalk.green(`+ ${diffLine.value}`));
+ } else if (diffLine.removed) {
+ process.stdout.write(chalk.red(`- ${diffLine.value}`));
+ }
+ }
+ );
+
+ return inquirer
+ .prompt([
+ {
+ default: "Y",
+ message: "Are you sure these changes are fine?",
+ name: "confirmMigration",
+ type: "confirm"
+ }
+ ])
+ .then(
+ (answers: { confirmMigration: boolean }): Promise<{}> => {
+ if (answers.confirmMigration) {
+ return inquirer.prompt([
+ {
+ default: "Y",
+ message:
+ "Do you want to validate your configuration? " +
+ "(If you're using webpack merge, validation isn't useful)",
+ name: "confirmValidation",
+ type: "confirm"
+ }
+ ]);
+ } else {
+ console.error(chalk.red("✖ Migration aborted"));
+ }
+ }
+ )
+ .then(
+ (answer: { confirmValidation: boolean }): void => {
+ if (!answer) {
+ return;
+ }
+
+ runPrettier(
+ outputConfigPath,
+ result,
+ (err: object): void => {
+ if (err) {
+ throw err;
+ }
+ }
+ );
+
+ if (answer.confirmValidation) {
+ const webpackOptionsValidationErrors: string[] = validate(require(outputConfigPath));
+
+ if (webpackOptionsValidationErrors.length) {
+ console.error(chalk.red("\n✖ Your configuration validation wasn't successful \n"));
+ console.error(
+ new WebpackOptionsValidationError(webpackOptionsValidationErrors).message
+ );
+ }
+ }
+
+ console.info(chalk.green(`\n✔︎ New webpack config file is at ${outputConfigPath}.`));
+ console.info(
+ chalk.green(
+ "✔︎ Heads up! Updating to the latest version could contain breaking changes."
+ )
+ );
+
+ console.info(chalk.green("✔︎ Plugin and loader dependencies may need to be updated."));
+ }
+ );
+ }
+ )
+ .catch(
+ (err: object): void => {
+ const errMsg = "\n ✖ ︎Migration aborted due to some errors: \n";
+ console.error(chalk.red(errMsg));
+ console.error(err);
+ process.exitCode = 1;
+ }
+ );
+}
+
/**
*
* Runs migration on a given configuration using AST's and promises
@@ -62,179 +224,25 @@ export default function migrate(...args: string[]): void | Promise {
"Do you want to use your existing webpack " +
"configuration?",
name: "confirmPath",
- type: "confirm",
- },
+ type: "confirm"
+ }
])
- .then((ans: {
- confirmPath: boolean;
- }): void | Promise => {
- if (!ans.confirmPath) {
- console.error(chalk.red("✖ ︎Migration aborted due no output path"));
- return;
+ .then(
+ (ans: { confirmPath: boolean }): void | Promise => {
+ if (!ans.confirmPath) {
+ console.error(chalk.red("✖ ︎Migration aborted due no output path"));
+ return;
+ }
+ outputConfigPath = path.resolve(process.cwd(), filePaths[0]);
+ return runMigration(currentConfigPath, outputConfigPath);
}
- outputConfigPath = path.resolve(process.cwd(), filePaths[0]);
- return runMigration(currentConfigPath, outputConfigPath);
- })
- .catch((err: object): void => {
- console.error(err);
- });
+ )
+ .catch(
+ (err: object): void => {
+ console.error(err);
+ }
+ );
}
outputConfigPath = path.resolve(process.cwd(), filePaths[1]);
return runMigration(currentConfigPath, outputConfigPath);
}
-
-/**
- *
- * Runs migration on a given configuration using AST's and promises
- * to sequentially transform a configuration file.
- *
- * @param {String} currentConfigPath - input path for config
- * @param {String} outputConfigPath - output path for config
- * @returns {Promise} Runs the migration using a promise that
- * will throw any errors during each transform or output if the
- * user decides to abort the migration
- */
-
-function runMigration(currentConfigPath: string, outputConfigPath: string): Promise | void {
- const recastOptions: object = {
- quote: "single",
- };
-
- const tasks: Listr = new Listr([
- {
- task: (ctx: INode): string | void | Listr | Promise<{}> =>
- new pLazy((
- resolve: (value?: object) => void,
- reject: (reason?: string | object, err?: object) => void,
- ) => {
- fs.readFile(currentConfigPath, "utf8", (err: object, content: string) => {
- if (err) {
- reject(err);
- }
- try {
- const jscodeshift: IJSCodeshift = require("jscodeshift");
- ctx.source = content;
- ctx.ast = jscodeshift(content);
- resolve();
- } catch (err) {
- reject("Error generating AST", err);
- }
- });
- }),
- title: "Reading webpack config",
- },
- {
- task: (ctx: INode): string | void | Listr | Promise => {
- return new Listr(
- Object.keys(transformations).map((key: string): {
- task: (_?: void) => string;
- title: string;
- } => {
- const transform: Function = transformations[key];
- return {
- task: (_?: void) => transform(ctx.ast, ctx.source),
- title: key,
- };
- }),
- );
- },
- title: "Migrating config to newest version",
- },
- ]);
-
- tasks
- .run()
- .then((ctx: INode): void | Promise => {
- const result: string = ctx.ast.toSource(recastOptions);
- const diffOutput: diff.IDiffResult[] = diff.diffLines(ctx.source, result);
-
- diffOutput.forEach((diffLine: diff.IDiffResult): void => {
- if (diffLine.added) {
- process.stdout.write(chalk.green(`+ ${diffLine.value}`));
- } else if (diffLine.removed) {
- process.stdout.write(chalk.red(`- ${diffLine.value}`));
- }
- });
-
- return inquirer
- .prompt([
- {
- default: "Y",
- message: "Are you sure these changes are fine?",
- name: "confirmMigration",
- type: "confirm",
- },
- ])
- .then((answers: {
- confirmMigration: boolean;
- }): Promise<{}> => {
- if (answers.confirmMigration) {
- return inquirer.prompt([
- {
- default: "Y",
- message:
- "Do you want to validate your configuration? " +
- "(If you're using webpack merge, validation isn't useful)",
- name: "confirmValidation",
- type: "confirm",
- },
- ]);
- } else {
- console.error(chalk.red("✖ Migration aborted"));
- }
- })
- .then((answer: {
- confirmValidation: boolean;
- }): void => {
- if (!answer) { return; }
-
- runPrettier(outputConfigPath, result, (err: object): void => {
- if (err) {
- throw err;
- }
- });
-
- if (answer.confirmValidation) {
- const webpackOptionsValidationErrors: string[] = validate(
- require(outputConfigPath),
- );
-
- if (webpackOptionsValidationErrors.length) {
- console.error(
- chalk.red(
- "\n✖ Your configuration validation wasn't successful \n",
- ),
- );
- console.error(
- new WebpackOptionsValidationError(
- webpackOptionsValidationErrors,
- ).message,
- );
- }
- }
-
- console.info(
- chalk.green(
- `\n✔︎ New webpack config file is at ${outputConfigPath}.`,
- ),
- );
- console.info(
- chalk.green(
- "✔︎ Heads up! Updating to the latest version could contain breaking changes.",
- ),
- );
-
- console.info(
- chalk.green(
- "✔︎ Plugin and loader dependencies may need to be updated.",
- ),
- );
- });
- })
- .catch((err: object): void => {
- const errMsg = "\n ✖ ︎Migration aborted due to some errors: \n";
- console.error(chalk.red(errMsg));
- console.error(err);
- process.exitCode = 1;
- });
-}
diff --git a/packages/migrate/loaderOptionsPlugin/loaderOptionsPlugin.ts b/packages/migrate/loaderOptionsPlugin/loaderOptionsPlugin.ts
index 681ff9579cd..b16a927d46b 100644
--- a/packages/migrate/loaderOptionsPlugin/loaderOptionsPlugin.ts
+++ b/packages/migrate/loaderOptionsPlugin/loaderOptionsPlugin.ts
@@ -1,14 +1,10 @@
import isEmpty = require("lodash/isEmpty");
-import {
- createOrUpdatePluginByName,
- findPluginsByName,
- safeTraverse,
-} from "@webpack-cli/utils/ast-utils";
+import { createOrUpdatePluginByName, findPluginsByName, safeTraverse } from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
-interface ILoaderOptions {
+interface LoaderOptions {
debug?: boolean;
minimize?: boolean;
}
@@ -23,18 +19,18 @@ interface ILoaderOptions {
*
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
- const loaderOptions: ILoaderOptions = {};
+export default function(j: JSCodeshift, ast: Node): Node {
+ const loaderOptions: LoaderOptions = {};
// If there is debug: true, set debug: true in the plugin
if (ast.find(j.Identifier, { name: "debug" }).size()) {
loaderOptions.debug = true;
- ast
- .find(j.Identifier, { name: "debug" })
- .forEach((p: INode): void => {
+ ast.find(j.Identifier, { name: "debug" }).forEach(
+ (p: Node): void => {
p.parent.prune();
- });
+ }
+ );
}
// If there is UglifyJsPlugin, set minimize: true
@@ -44,18 +40,12 @@ export default function(j: IJSCodeshift, ast: INode): INode {
return ast
.find(j.ArrayExpression)
- .filter(
- (path: INode): boolean =>
- safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins",
- )
- .forEach((path: INode): void => {
- if (!isEmpty(loaderOptions)) {
- createOrUpdatePluginByName(
- j,
- path,
- "webpack.LoaderOptionsPlugin",
- loaderOptions,
- );
+ .filter((path: Node): boolean => safeTraverse(path, ["parent", "value", "key", "name"]) === "plugins")
+ .forEach(
+ (path: Node): void => {
+ if (!isEmpty(loaderOptions)) {
+ createOrUpdatePluginByName(j, path, "webpack.LoaderOptionsPlugin", loaderOptions);
+ }
}
- });
+ );
}
diff --git a/packages/migrate/loaders/loaders.ts b/packages/migrate/loaders/loaders.ts
index e3b5b920fbb..0f5452c2ac1 100644
--- a/packages/migrate/loaders/loaders.ts
+++ b/packages/migrate/loaders/loaders.ts
@@ -1,6 +1,6 @@
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -13,7 +13,7 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
+export default function(j: JSCodeshift, ast: Node): Node {
/**
* Creates an Array expression out of loaders string
*
@@ -54,46 +54,46 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} path - object expression ast with array expression instead of loaders string
*/
- const createArrayExpressionFromArray = (path: INode): INode => {
- const value: INode = path.value;
+ const createArrayExpressionFromArray = (path: Node): Node => {
+ const value: Node = (path.value as Node);
// Find paths with `loaders` keys in the given Object
- const paths: INode[] = value.properties.filter((prop: INode): boolean =>
- prop.key.name.startsWith("loader"),
- );
+ const paths: Node[] = value.properties.filter((prop: Node): boolean => prop.key.name.startsWith("loader"));
// For each pair of key and value
- paths.forEach((pair: INode): void => {
- // Replace 'loaders' Identifier with 'use'
- pair.key.name = "use";
- // If the value is an Array
- if (pair.value.type === j.ArrayExpression.name) {
- // replace its elements
- const pairValue: INode = pair.value;
- pair.value = j.arrayExpression(
- pairValue.elements.map((arrElement: INode): INode => {
- // If items of the array are Strings
- if (arrElement.type === j.Literal.name) {
- // Replace with `{ loader: LOADER }` Object
- return j.objectExpression([
- utils.createProperty(j, "loader", arrElement.value),
- ]);
- }
- // otherwise keep the existing element
- return arrElement;
- }),
- );
- // If the value is String of loaders like 'style!css'
- } else if (pair.value.type === j.Literal.name) {
- // Replace it with Array expression of loaders
- const literalValue: INode = pair.value;
- pair.value = j.arrayExpression(
- literalValue.value.split("!").map((loader: string): INode => {
- return j.objectExpression([
- utils.createProperty(j, "loader", loader),
- ]);
- }),
- );
+ paths.forEach(
+ (pair: Node): void => {
+ // Replace 'loaders' Identifier with 'use'
+ pair.key.name = "use";
+ // If the value is an Array
+ if ((pair.value as Node).type === j.ArrayExpression.name) {
+ // replace its elements
+ const pairValue = pair.value as Node;
+ pair.value = j.arrayExpression(
+ pairValue.elements.map(
+ (arrElement: Node): Node => {
+ // If items of the array are Strings
+ if (arrElement.type === j.Literal.name) {
+ // Replace with `{ loader: LOADER }` Object
+ return j.objectExpression([utils.createProperty(j, "loader", (arrElement.value as Node))]);
+ }
+ // otherwise keep the existing element
+ return arrElement;
+ }
+ )
+ );
+ // If the value is String of loaders like 'style!css'
+ } else if ((pair.value as Node).type === j.Literal.name) {
+ // Replace it with Array expression of loaders
+ const literalValue = pair.value as Node;
+ pair.value = j.arrayExpression(
+ (literalValue.value as string).split("!").map(
+ (loader: string): Node => {
+ return j.objectExpression([utils.createProperty(j, "loader", loader)]);
+ }
+ )
+ );
+ }
}
- });
+ );
return path;
};
@@ -105,26 +105,24 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} objectExpression - an new object expression ast containing the query parameters
*/
- const createLoaderWithQuery = (p: INode): INode => {
- const properties: INode[] = p.value.properties;
+ const createLoaderWithQuery = (p: Node): Node => {
+ const properties: Node[] = (p.value as Node).properties;
const loaderValue: string = properties.reduce(
- (val: string, prop: INode): string => (prop.key.name === "loader" ? prop.value.value : val),
- "",
+ (val: string, prop: Node): string => (prop.key.name === "loader" ? (prop.value as Node).value as string: val),
+ ""
);
const loader: string = loaderValue.split("?")[0];
const query: string = loaderValue.split("?")[1];
- const options: INode[] = query.split("&").map((option: string): INode => {
- const param: string[] = option.split("=");
- const key: string = param[0];
- const val: string | boolean = param[1] || true; // No value in query string means it is truthy value
- return j.objectProperty(j.identifier(key), utils.createLiteral(j, val));
- });
- const loaderProp: INode = utils.createProperty(j, "loader", loader);
- const queryProp: INode = j.property(
- "init",
- j.identifier("options"),
- j.objectExpression(options),
+ const options: Node[] = query.split("&").map(
+ (option: string): Node => {
+ const param: string[] = option.split("=");
+ const key: string = param[0];
+ const val: string | boolean = param[1] || true; // No value in query string means it is truthy value
+ return j.objectProperty(j.identifier(key), utils.createLiteral(j, val));
+ }
);
+ const loaderProp: Node = utils.createProperty(j, "loader", loader);
+ const queryProp: Node = j.property("init", j.identifier("options"), j.objectExpression(options));
return j.objectExpression([loaderProp, queryProp]);
};
@@ -136,11 +134,10 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Boolean} hasLoaderQueryString - whether the loader object contains a query string
*/
- const findLoaderWithQueryString = (p: INode): boolean => {
- return p.value.properties.reduce((predicate: boolean, prop: INode): boolean => {
+ const findLoaderWithQueryString = (p: Node): boolean => {
+ return (p.value as Node).properties.reduce((predicate: boolean, prop: Node): boolean => {
return (
- (utils.safeTraverse(prop, ["value", "value", "indexOf"]) &&
- prop.value.value.indexOf("?") > -1) ||
+ (utils.safeTraverse(prop, ["value", "value", "indexOf"]) && ((prop.value as Node).value as string).indexOf("?") > -1) ||
predicate
);
}, false);
@@ -155,16 +152,9 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Boolean} isLoadersProp - whether the identifier is the `loaders` prop in the `module` object
*/
- const checkForLoader = (path: INode): boolean =>
- path.value.name === "loaders" &&
- utils.safeTraverse(path, [
- "parent",
- "parent",
- "parent",
- "node",
- "key",
- "name",
- ]) === "module";
+ const checkForLoader = (path: Node): boolean =>
+ (path.value as Node).name === "loaders" &&
+ utils.safeTraverse(path, ["parent", "parent", "parent", "node", "key", "name"]) === "module";
/**
* Puts pre- or postLoader into `loaders` object and adds the appropriate `enforce` property
@@ -173,32 +163,36 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} p - object expression with a `loaders` object and appropriate `enforce` properties
*/
- const fitIntoLoaders = (p: INode): INode => {
- let loaders: INode = null;
- p.value.properties.map((prop: INode): void => {
- const keyName = prop.key.name;
- if (keyName === "loaders") {
- loaders = prop.value;
+ const fitIntoLoaders = (p: Node): Node => {
+ let loaders: Node = null;
+ (p.value as Node).properties.map(
+ (prop: Node): void => {
+ const keyName = prop.key.name;
+ if (keyName === "loaders") {
+ loaders = prop.value as Node;
+ }
}
- });
- p.value.properties.map((prop: INode): void => {
- const keyName = prop.key.name;
- if (keyName !== "loaders") {
- const enforceVal: string = keyName === "preLoaders" ? "pre" : "post";
- prop.value.elements.map((elem: INode): void => {
- elem.properties.push(utils.createProperty(j, "enforce", enforceVal));
- if (loaders && loaders.type === "ArrayExpression") {
- loaders.elements.push(elem);
- } else {
- prop.key.name = "loaders";
- }
- });
+ );
+ (p.value as Node).properties.map(
+ (prop: Node): void => {
+ const keyName = prop.key.name;
+ if (keyName !== "loaders") {
+ const enforceVal: string = keyName === "preLoaders" ? "pre" : "post";
+ (prop.value as Node).elements.map(
+ (elem: Node): void => {
+ elem.properties.push(utils.createProperty(j, "enforce", enforceVal));
+ if (loaders && loaders.type === "ArrayExpression") {
+ loaders.elements.push(elem);
+ } else {
+ prop.key.name = "loaders";
+ }
+ }
+ );
+ }
}
- });
+ );
if (loaders) {
- p.value.properties = p.value.properties.filter(
- (prop: INode): boolean => prop.key.name === "loaders",
- );
+ (p.value as Node).properties = (p.value as Node).properties.filter((prop: Node): boolean => prop.key.name === "loaders");
}
return p;
};
@@ -209,10 +203,10 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const prepostLoaders = (_?: void): INode =>
+ const prepostLoaders = (): Node =>
ast
.find(j.ObjectExpression)
- .filter((p: INode): boolean => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"]))
+ .filter((p: Node): boolean => utils.findObjWithOneOfKeys(p, ["preLoaders", "postLoaders"]))
.forEach(fitIntoLoaders);
/**
@@ -221,11 +215,11 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const loadersToRules = (_?: void): INode =>
+ const loadersToRules = (): Node =>
ast
.find(j.Identifier)
.filter(checkForLoader)
- .forEach((p: INode): string => (p.value.name = "rules"));
+ .forEach((p: Node): string => ((p.value as Node).name = "rules"));
/**
* Convert `loader` and `loaders` to Array of {Rule.Use}
@@ -233,19 +227,13 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const loadersToArrayExpression = (_?: void): INode | void =>
+ const loadersToArrayExpression = (): Node | void =>
ast
.find(j.ObjectExpression)
- .filter((path: INode): boolean => utils.findObjWithOneOfKeys(path, ["loader", "loaders"]))
+ .filter((path: Node): boolean => utils.findObjWithOneOfKeys(path, ["loader", "loaders"]))
.filter(
- (path: INode): boolean =>
- utils.safeTraverse(path, [
- "parent",
- "parent",
- "node",
- "key",
- "name",
- ]) === "rules",
+ (path: Node): boolean =>
+ utils.safeTraverse(path, ["parent", "parent", "node", "key", "name"]) === "rules"
)
.forEach(createArrayExpressionFromArray);
@@ -271,10 +259,10 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const loaderWithQueryParam = (_?: void): INode =>
+ const loaderWithQueryParam = (): Node =>
ast
.find(j.ObjectExpression)
- .filter((p: INode): boolean => utils.findObjWithOneOfKeys(p, ["loader"]))
+ .filter((p: Node): boolean => utils.findObjWithOneOfKeys(p, ["loader"]))
.filter(findLoaderWithQueryString)
.replaceWith(createLoaderWithQuery);
@@ -295,10 +283,10 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const loaderWithQueryProp = (_?: void): INode =>
+ const loaderWithQueryProp = (): Node =>
ast
.find(j.Identifier)
- .filter((p: INode): boolean => p.value.name === "query")
+ .filter((p: Node): boolean => (p.value as Node).name === "query")
.replaceWith(j.identifier("options"));
/**
@@ -308,18 +296,22 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const addLoaderSuffix = (_?: void): INode =>
- ast.find(j.ObjectExpression).forEach((path: INode): void => {
- path.value.properties.forEach((prop: INode): void => {
- if (
- prop.key.name === "loader" &&
- utils.safeTraverse(prop, ["value", "value"]) &&
- !prop.value.value.endsWith("-loader")
- ) {
- prop.value = j.literal(prop.value.value + "-loader");
- }
- });
- });
+ const addLoaderSuffix = (): Node =>
+ ast.find(j.ObjectExpression).forEach(
+ (path: Node): void => {
+ (path.value as Node).properties.forEach(
+ (prop: Node): void => {
+ if (
+ prop.key.name === "loader" &&
+ utils.safeTraverse(prop, ["value", "value"]) &&
+ !((prop.value as Node).value as string).endsWith("-loader")
+ ) {
+ prop.value = j.literal((prop.value as Node).value as string + "-loader");
+ }
+ }
+ );
+ }
+ );
/**
*
@@ -329,26 +321,28 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} objectExpression - an use object expression ast containing the options and loader
*/
- const fitOptionsToUse = (p: INode): INode => {
- let options: INode = null;
- p.value.properties.forEach((prop: INode): void => {
- const keyName: string = prop.key.name;
- if (keyName === "options") {
- options = prop;
+ const fitOptionsToUse = (p: Node): Node => {
+ let options: Node = null;
+ (p.value as Node).properties.forEach(
+ (prop: Node): void => {
+ const keyName: string = prop.key.name;
+ if (keyName === "options") {
+ options = prop;
+ }
}
- });
+ );
if (options) {
- p.value.properties = p.value.properties.filter(
- (prop: INode): boolean => prop.key.name !== "options",
- );
+ (p.value as Node).properties = (p.value as Node).properties.filter((prop: Node): boolean => prop.key.name !== "options");
- p.value.properties.forEach((prop: INode): void => {
- const keyName = prop.key.name;
- if (keyName === "use") {
- prop.value.elements[0].properties.push(options);
+ (p.value as Node).properties.forEach(
+ (prop: Node): void => {
+ const keyName = prop.key.name;
+ if (keyName === "use") {
+ (prop.value as Node).elements[0].properties.push(options);
+ }
}
- });
+ );
}
return p;
@@ -360,10 +354,10 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - jscodeshift ast
*/
- const moveOptionsToUse = (_?: void): INode =>
+ const moveOptionsToUse = (): Node =>
ast
.find(j.ObjectExpression)
- .filter((p: INode): boolean => utils.findObjWithOneOfKeys(p, ["use"]))
+ .filter((p: Node): boolean => utils.findObjWithOneOfKeys(p, ["use"]))
.forEach(fitOptionsToUse);
const transforms = [
@@ -373,7 +367,7 @@ export default function(j: IJSCodeshift, ast: INode): INode {
loaderWithQueryParam,
loaderWithQueryProp,
addLoaderSuffix,
- moveOptionsToUse,
+ moveOptionsToUse
];
transforms.forEach((t: Function): void => t());
diff --git a/packages/migrate/migrate.ts b/packages/migrate/migrate.ts
index 09baf1b087d..bfed7bee56d 100644
--- a/packages/migrate/migrate.ts
+++ b/packages/migrate/migrate.ts
@@ -11,13 +11,12 @@ import noEmitOnErrorsPluginTransform from "./noEmitOnErrorsPlugin/noEmitOnErrors
import removeDeprecatedPluginsTransform from "./removeDeprecatedPlugins/removeDeprecatedPlugins";
import removeJsonLoaderTransform from "./removeJsonLoader/removeJsonLoader";
import resolveTransform from "./resolve/resolve";
-import { INode } from "./types/NodePath";
import uglifyJsPluginTransform from "./uglifyJsPlugin/uglifyJsPlugin";
-interface ITransformsObject {
+interface TransformsObject {
bannerPluginTransform: object;
commonsChunkPluginTransform?: object;
- extractTextPluginTransform: object; /* tslint:disable */
+ extractTextPluginTransform: object;
loaderOptionsPluginTransform: object;
loadersTransform: object;
noEmitOnErrorsPluginTransform: object;
@@ -27,8 +26,7 @@ interface ITransformsObject {
uglifyJsPluginTransform: object;
}
-/* tslint:disable object-literal-sort-keys */
-const transformsObject: ITransformsObject = {
+const transformsObject: TransformsObject = {
loadersTransform,
resolveTransform,
removeJsonLoaderTransform,
@@ -38,10 +36,10 @@ const transformsObject: ITransformsObject = {
extractTextPluginTransform,
noEmitOnErrorsPluginTransform,
removeDeprecatedPluginsTransform,
- commonsChunkPluginTransform,
+ commonsChunkPluginTransform
};
-interface ILazyTransformObject {
+interface LazyTransformObject {
loadersTransform?: (ast: object, source: string) => pLazy<{}>;
resolveTransform?: (ast: object, source: string) => pLazy<{}>;
removeJsonLoaderTransform?: (ast: object, source: string) => pLazy<{}>;
@@ -53,16 +51,6 @@ interface ILazyTransformObject {
removeDeprecatedPluginsTransform?: (ast: object, source: string) => pLazy<{}>;
commonsChunkPluginTransform?: (ast: object, source: string) => pLazy<{}>;
}
-/* tslint:enable object-literal-sort-keys */
-
-export const transformations: ILazyTransformObject =
- Object
- .keys(transformsObject)
- .reduce((res: object, key: string): ILazyTransformObject => {
- res[key] = (ast: object, source: string) =>
- transformSingleAST(ast, source, transformsObject[key]);
- return res;
- }, {});
/**
*
@@ -78,23 +66,29 @@ export const transformations: ILazyTransformObject =
export const transformSingleAST = (
ast: object,
source: string,
- transformFunction: (jscodeshift: object, ast: object, source: string) => object)
- : pLazy<{}> => {
-
- return new pLazy((
- resolve: (value?: {} | PromiseLike<{}>) => void,
- reject: (reason?: object) => void,
- ): void => {
- setTimeout((_?: void): void => {
- try {
- resolve(transformFunction(jscodeshift, ast, source));
- } catch (err) {
- reject(err);
- }
- }, 0);
- });
+ transformFunction: (jscodeshift: object, ast: object, source: string) => object
+): pLazy<{}> => {
+ return new pLazy(
+ (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: object) => void): void => {
+ setTimeout((): void => {
+ try {
+ resolve(transformFunction(jscodeshift, ast, source));
+ } catch (err) {
+ reject(err);
+ }
+ }, 0);
+ }
+ );
};
+export const transformations: LazyTransformObject = Object.keys(transformsObject).reduce(
+ (res: object, key: string): LazyTransformObject => {
+ res[key] = (ast: object, source: string): object => transformSingleAST(ast, source, transformsObject[key]);
+ return res;
+ },
+ {}
+);
+
/**
*
* Transforms a given piece of source code by applying selected transformations to the AST.
@@ -111,24 +105,26 @@ export const transformSingleAST = (
export const transform = (
source: string,
transforms?: Iterable>,
- options?: object)
- : Promise => {
-
- const ast: INode = jscodeshift(source);
+ options?: object
+): Promise => {
+ const ast = jscodeshift(source);
const recastOptions: object = Object.assign(
{
- quote: "single",
+ quote: "single"
},
- options,
+ options
);
- transforms =
- transforms || Object.keys(transformations).map((k: string): Function => transformations[k]);
+ transforms = transforms || Object.keys(transformations).map((k: string): Function => transformations[k]);
- return pEachSeries(transforms, (f: Function) => f(ast, source))
- .then((value: Function[]): string | PromiseLike => {
- return ast.toSource(recastOptions);
- })
- .catch((err: object) => {
- console.error(err);
- });
+ return pEachSeries(transforms, (f: Function): void => f(ast, source))
+ .then(
+ (): string | PromiseLike => {
+ return ast.toSource(recastOptions);
+ }
+ )
+ .catch(
+ (err: object): void => {
+ console.error(err);
+ }
+ );
};
diff --git a/packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.ts b/packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.ts
index 21750bc8663..658d2c1359f 100644
--- a/packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.ts
+++ b/packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.ts
@@ -1,9 +1,6 @@
-import {
- addOrUpdateConfigObject,
- findAndRemovePluginByName,
-} from "@webpack-cli/utils/ast-utils";
+import { addOrUpdateConfigObject, findAndRemovePluginByName } from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -14,23 +11,13 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @param {Node} ast - jscodeshift ast to transform
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
+export default function(j: JSCodeshift, ast: Node): Node {
// Remove old plugin
- const root: INode = findAndRemovePluginByName(
- j,
- ast,
- "webpack.optimize.ModuleConcatenationPlugin",
- );
+ const root: Node = findAndRemovePluginByName(j, ast, "webpack.optimize.ModuleConcatenationPlugin");
// Add new optimizations option
if (root) {
- addOrUpdateConfigObject(
- j,
- root,
- "optimizations",
- "concatenateModules",
- j.booleanLiteral(true),
- );
+ addOrUpdateConfigObject(j, root, "optimizations", "concatenateModules", j.booleanLiteral(true));
}
return ast;
diff --git a/packages/migrate/namedModulesPlugin/namedModulesPlugin.ts b/packages/migrate/namedModulesPlugin/namedModulesPlugin.ts
index 98c7e2ceb9c..34faab3cd4b 100644
--- a/packages/migrate/namedModulesPlugin/namedModulesPlugin.ts
+++ b/packages/migrate/namedModulesPlugin/namedModulesPlugin.ts
@@ -1,9 +1,6 @@
-import {
- addOrUpdateConfigObject,
- findAndRemovePluginByName,
-} from "@webpack-cli/utils/ast-utils";
+import { addOrUpdateConfigObject, findAndRemovePluginByName } from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -14,19 +11,13 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @param {Node} ast - jscodeshift ast to transform
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
+export default function(j: JSCodeshift, ast: Node): Node {
// Remove old plugin
- const root: INode = findAndRemovePluginByName(j, ast, "webpack.NamedModulesPlugin");
+ const root: Node = findAndRemovePluginByName(j, ast, "webpack.NamedModulesPlugin");
// Add new optimizations option
if (root) {
- addOrUpdateConfigObject(
- j,
- root,
- "optimizations",
- "namedModules",
- j.booleanLiteral(true),
- );
+ addOrUpdateConfigObject(j, root, "optimizations", "namedModules", j.booleanLiteral(true));
}
return ast;
diff --git a/packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.ts b/packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.ts
index c45ce923185..567d688a47c 100644
--- a/packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.ts
+++ b/packages/migrate/noEmitOnErrorsPlugin/noEmitOnErrorsPlugin.ts
@@ -1,8 +1,5 @@
-import {
- addOrUpdateConfigObject,
- findAndRemovePluginByName,
-} from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { addOrUpdateConfigObject, findAndRemovePluginByName } from "@webpack-cli/utils/ast-utils";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -13,23 +10,13 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @param {Node} ast - jscodeshift ast to transform
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
+export default function(j: JSCodeshift, ast: Node): Node {
// Remove old plugin
- const root: INode = findAndRemovePluginByName(
- j,
- ast,
- "webpack.NoEmitOnErrorsPlugin",
- );
+ const root: Node = findAndRemovePluginByName(j, ast, "webpack.NoEmitOnErrorsPlugin");
// Add new optimizations option
if (root) {
- addOrUpdateConfigObject(
- j,
- root,
- "optimizations",
- "noEmitOnErrors",
- j.booleanLiteral(true),
- );
+ addOrUpdateConfigObject(j, root, "optimizations", "noEmitOnErrors", j.booleanLiteral(true));
}
return ast;
diff --git a/packages/migrate/outputPath/outputPath.ts b/packages/migrate/outputPath/outputPath.ts
index 5e88223d808..e3d1c0bd087 100644
--- a/packages/migrate/outputPath/outputPath.ts
+++ b/packages/migrate/outputPath/outputPath.ts
@@ -1,6 +1,20 @@
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
+
+
+function replaceWithPath(
+ j: JSCodeshift,
+ p: Node,
+ pathVarName: string,
+): Node {
+ const convertedPath: Node = j.callExpression(
+ j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false),
+ [j.identifier("__dirname"), p.value as Node],
+ );
+
+ return convertedPath;
+}
/**
*
@@ -10,18 +24,17 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @param {Node} ast - jscodeshift ast to transform
* @returns {Node} ast - jscodeshift ast
*/
-
-export default function(j: IJSCodeshift, ast: INode): INode | void {
- const literalOutputPath: INode = ast
+export default function(j: JSCodeshift, ast: Node): Node | void {
+ const literalOutputPath: Node = ast
.find(j.ObjectExpression)
.filter(
- (p: INode): boolean =>
+ (p: Node): boolean =>
utils.safeTraverse(p, ["parentPath", "value", "key", "name"]) ===
"output",
)
.find(j.Property)
.filter(
- (p: INode): boolean =>
+ (p: Node): boolean =>
utils.safeTraverse(p, ["value", "key", "name"]) === "path" &&
utils.safeTraverse(p, ["value", "value", "type"]) === "Literal",
);
@@ -29,18 +42,20 @@ export default function(j: IJSCodeshift, ast: INode): INode | void {
if (literalOutputPath) {
let pathVarName = "path";
let isPathPresent = false;
- const pathDeclaration: INode = ast
+ const pathDeclaration: Node = ast
.find(j.VariableDeclarator)
.filter(
- (p: INode): boolean =>
+ (p: Node): boolean =>
utils.safeTraverse(p, ["value", "init", "callee", "name"]) ===
"require",
)
.filter(
- (p: INode): boolean =>
+ (p: Node): boolean =>
utils.safeTraverse(p, ["value", "init", "arguments"]) &&
- p.value.init.arguments.reduce(
- (isPresent: boolean, a: INode): boolean => {
+ // TODO: to fix when we have proper typing (@types/jscodeshift)
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (p.value as any).init.arguments.reduce(
+ (isPresent: boolean, a: Node): boolean => {
return (a.type === "Literal" && a.value === "path") || isPresent;
},
false,
@@ -50,23 +65,23 @@ export default function(j: IJSCodeshift, ast: INode): INode | void {
if (pathDeclaration) {
isPathPresent = true;
pathDeclaration.forEach(
- (p: INode): void => {
- pathVarName = utils.safeTraverse(p, ["value", "id", "name"]);
+ (p: Node): void => {
+ pathVarName = utils.safeTraverse(p, ["value", "id", "name"]) as string;
},
);
}
const finalPathName = pathVarName;
literalOutputPath
.find(j.Literal)
- .replaceWith((p: INode): INode => replaceWithPath(j, p, finalPathName));
+ .replaceWith((p: Node): Node => replaceWithPath(j, p, finalPathName));
if (!isPathPresent) {
- const pathRequire: INode = utils.getRequire(j, "path", "path");
+ const pathRequire: Node = utils.getRequire(j, "path", "path");
return ast
.find(j.Program)
.replaceWith(
- (p: INode): INode =>
- j.program([].concat(pathRequire).concat(p.value.body)),
+ (p: Node): Node =>
+ j.program([].concat(pathRequire).concat((p.value as Node).body)),
);
}
}
@@ -74,15 +89,3 @@ export default function(j: IJSCodeshift, ast: INode): INode | void {
return ast;
}
-function replaceWithPath(
- j: IJSCodeshift,
- p: INode,
- pathVarName: string,
-): INode {
- const convertedPath: INode = j.callExpression(
- j.memberExpression(j.identifier(pathVarName), j.identifier("join"), false),
- [j.identifier("__dirname"), p.value],
- );
-
- return convertedPath;
-}
diff --git a/packages/migrate/package-lock.json b/packages/migrate/package-lock.json
index 4c6b238c144..c70bc03abc9 100644
--- a/packages/migrate/package-lock.json
+++ b/packages/migrate/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@webpack-cli/migrate",
- "version": "0.1.3",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -67,7 +67,7 @@
},
"@types/listr": {
"version": "0.13.0",
- "resolved": "http://registry.npmjs.org/@types/listr/-/listr-0.13.0.tgz",
+ "resolved": "https://registry.npmjs.org/@types/listr/-/listr-0.13.0.tgz",
"integrity": "sha512-8DOy0JCGwwAf76xmU0sRzSZCWKSPPA9djRcTYTsyqBPnMdGOjZ5tjmNswC4J9mgKZudte2tuTo1l14R1/t5l/g==",
"dev": true,
"requires": {
@@ -100,7 +100,7 @@
},
"@types/rx": {
"version": "4.1.1",
- "resolved": "http://registry.npmjs.org/@types/rx/-/rx-4.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/@types/rx/-/rx-4.1.1.tgz",
"integrity": "sha1-WY/JSla67ZdfGUV04PVy/Y5iekg=",
"dev": true,
"requires": {
@@ -488,7 +488,7 @@
},
"ansi-escapes": {
"version": "3.1.0",
- "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
"integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw=="
},
"ansi-regex": {
@@ -840,7 +840,7 @@
},
"array-equal": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
"dev": true
},
@@ -991,7 +991,7 @@
},
"chalk": {
"version": "1.1.3",
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
@@ -1011,7 +1011,7 @@
},
"supports-color": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
@@ -1245,7 +1245,7 @@
},
"babel-plugin-istanbul": {
"version": "4.1.6",
- "resolved": "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
"integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
"dev": true,
"requires": {
@@ -1308,7 +1308,7 @@
},
"babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0",
- "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
},
"babel-plugin-syntax-trailing-function-commas": {
@@ -1943,7 +1943,7 @@
},
"browserify-aes": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"dev": true,
"requires": {
@@ -1980,7 +1980,7 @@
},
"browserify-rsa": {
"version": "4.0.1",
- "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"dev": true,
"requires": {
@@ -2023,7 +2023,7 @@
},
"buffer": {
"version": "4.9.1",
- "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"dev": true,
"requires": {
@@ -2458,7 +2458,7 @@
},
"string-width": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
@@ -2640,7 +2640,7 @@
},
"create-hash": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"dev": true,
"requires": {
@@ -2653,7 +2653,7 @@
},
"create-hmac": {
"version": "1.1.7",
- "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"dev": true,
"requires": {
@@ -2894,7 +2894,7 @@
},
"diffie-hellman": {
"version": "5.0.3",
- "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"dev": true,
"requires": {
@@ -3152,7 +3152,7 @@
},
"expand-range": {
"version": "1.8.2",
- "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"requires": {
"fill-range": "^2.1.0"
@@ -4381,7 +4381,7 @@
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"dev": true,
"requires": {
@@ -4434,7 +4434,7 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"dev": true,
"requires": {
@@ -4504,7 +4504,7 @@
},
"is-generator-fn": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz",
"integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=",
"dev": true
},
@@ -5412,7 +5412,7 @@
},
"chalk": {
"version": "1.1.3",
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
@@ -5441,7 +5441,7 @@
},
"supports-color": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
@@ -5551,7 +5551,7 @@
},
"chalk": {
"version": "1.1.3",
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
@@ -5571,7 +5571,7 @@
},
"supports-color": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
@@ -5849,7 +5849,7 @@
},
"mute-stream": {
"version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
+ "resolved": "http://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
},
"nan": {
@@ -6327,7 +6327,7 @@
},
"path-browserify": {
"version": "0.0.0",
- "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
"dev": true
},
@@ -7151,7 +7151,7 @@
},
"resolve": {
"version": "1.1.7",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
"dev": true
},
@@ -7864,7 +7864,7 @@
},
"sprintf-js": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
@@ -7929,7 +7929,7 @@
},
"stream-browserify": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
+ "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
"dev": true,
"requires": {
@@ -8008,7 +8008,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
@@ -8284,7 +8284,7 @@
},
"tty-browserify": {
"version": "0.0.0",
- "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
@@ -8547,7 +8547,7 @@
},
"vm-browserify": {
"version": "0.0.4",
- "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"dev": true,
"requires": {
@@ -8715,7 +8715,7 @@
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"dev": true,
"requires": {
@@ -8735,7 +8735,7 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"dev": true,
"requires": {
diff --git a/packages/migrate/removeDeprecatedPlugins/removeDeprecatedPlugins.ts b/packages/migrate/removeDeprecatedPlugins/removeDeprecatedPlugins.ts
index 01030eb7686..e7f7518bdad 100644
--- a/packages/migrate/removeDeprecatedPlugins/removeDeprecatedPlugins.ts
+++ b/packages/migrate/removeDeprecatedPlugins/removeDeprecatedPlugins.ts
@@ -2,7 +2,7 @@ import chalk from "chalk";
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -14,37 +14,34 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode) {
- // List of deprecated plugins to remove
- // each item refers to webpack.optimize.[NAME] construct
- const deprecatedPlugingsList: string[] = [
- "webpack.optimize.OccurrenceOrderPlugin",
- "webpack.optimize.DedupePlugin",
- ];
+export default function(j: JSCodeshift, ast: Node): Node {
+ // List of deprecated plugins to remove
+ // each item refers to webpack.optimize.[NAME] construct
+ const deprecatedPlugingsList: string[] = [
+ "webpack.optimize.OccurrenceOrderPlugin",
+ "webpack.optimize.DedupePlugin"
+ ];
- return utils.findPluginsByName(j, ast, deprecatedPlugingsList).forEach(
- (path: INode): void => {
- // For now we only support the case where plugins are defined in an Array
- const arrayPath: INode = utils.safeTraverse(path, ["parent", "value"]);
+ return utils.findPluginsByName(j, ast, deprecatedPlugingsList).forEach(
+ (path: Node): void => {
+ // For now we only support the case where plugins are defined in an Array
+ const arrayPath = utils.safeTraverse(path, ["parent", "value"]) as Node;
- if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) {
- // Check how many plugins are defined and
- // if there is only last plugin left remove `plugins: []` node
- const arrayElementsPath: INode[] = utils.safeTraverse(arrayPath, [
- "elements",
- ]);
- if (arrayElementsPath && arrayElementsPath.length === 1) {
- j(path.parent.parent).remove();
- } else {
- j(path).remove();
- }
- } else {
- console.error(`
+ if (arrayPath && utils.isType(arrayPath, "ArrayExpression")) {
+ // Check how many plugins are defined and
+ // if there is only last plugin left remove `plugins: []` node
+ //
+ const arrayElementsPath = utils.safeTraverse(arrayPath, ["elements"]) as Node[];
+ if (arrayElementsPath && arrayElementsPath.length === 1) {
+ j(path.parent.parent).remove();
+ } else {
+ j(path).remove();
+ }
+ } else {
+ console.error(`
${chalk.red("Please remove deprecated plugins manually. ")}
-See ${chalk.underline(
- "https://webpack.js.org/guides/migrating/",
- )} for more information.`);
+See ${chalk.underline("https://webpack.js.org/guides/migrating/")} for more information.`);
+ }
}
- },
- );
+ );
}
diff --git a/packages/migrate/removeJsonLoader/removeJsonLoader.ts b/packages/migrate/removeJsonLoader/removeJsonLoader.ts
index 88d7a4fae5f..1fcd9c379cb 100644
--- a/packages/migrate/removeJsonLoader/removeJsonLoader.ts
+++ b/packages/migrate/removeJsonLoader/removeJsonLoader.ts
@@ -1,6 +1,8 @@
import * as utils from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
+
+type TransformCallback = (astNode: Node) => void;
/**
*
@@ -11,7 +13,7 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
+export default function(j: JSCodeshift, ast: Node): Node {
/**
*
* Remove the loader with name `name` from the given NodePath
@@ -21,14 +23,16 @@ export default function(j: IJSCodeshift, ast: INode): INode {
* @returns {void}
*/
- function removeLoaderByName(path: INode, name: string): void {
- const loadersNode: INode = path.value.value;
+ function removeLoaderByName(path: Node, name: string): void {
+ const loadersNode = (path.value as Node).value as Node;
switch (loadersNode.type) {
case j.ArrayExpression.name: {
- const loaders: string[] = loadersNode.elements.map((p: INode): string => {
- return utils.safeTraverse(p, ["properties", "0", "value", "value"]);
- });
+ const loaders: Node[] = loadersNode.elements.map(
+ (p: Node): Node => {
+ return utils.safeTraverse(p, ["properties", "0", "value", "value"]) as Node;
+ }
+ );
const loaderIndex: number = loaders.indexOf(name);
if (loaders.length && loaderIndex > -1) {
@@ -55,19 +59,19 @@ export default function(j: IJSCodeshift, ast: INode): INode {
}
}
- function removeLoaders(astNode: INode) {
+ function removeLoaders(astNode: Node): void {
astNode
.find(j.Property, { key: { name: "use" } })
- .forEach((path: INode): void => removeLoaderByName(path, "json-loader"));
+ .forEach((path: Node): void => removeLoaderByName(path, "json-loader"));
astNode
.find(j.Property, { key: { name: "loader" } })
- .forEach((path: INode): void => removeLoaderByName(path, "json-loader"));
+ .forEach((path: Node): void => removeLoaderByName(path, "json-loader"));
}
- const transforms: Array<(astNode: INode) => void> = [removeLoaders];
+ const transforms: TransformCallback[] = [removeLoaders];
- transforms.forEach((t: (astNode: INode) => void): void => t(ast));
+ transforms.forEach((t: TransformCallback): void => t(ast));
return ast;
}
diff --git a/packages/migrate/resolve/resolve.ts b/packages/migrate/resolve/resolve.ts
index c79f5cca4c3..be60e4e69b0 100644
--- a/packages/migrate/resolve/resolve.ts
+++ b/packages/migrate/resolve/resolve.ts
@@ -1,4 +1,4 @@
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -9,22 +9,19 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function transformer(j: IJSCodeshift, ast: INode): INode {
-
- const getRootVal = (p: INode): INode => {
- return p.node.value.properties.filter((prop: INode): boolean => prop.key.name === "root")[0];
+export default function transformer(j: JSCodeshift, ast: Node): Node {
+ const getRootVal = (p: Node): Node => {
+ return (p.node.value as Node).properties.filter((prop: Node): boolean => prop.key.name === "root")[0];
};
- const getRootIndex = (p: INode): number => {
- return p.node.value.properties.reduce((rootIndex: number, prop: INode, index: number): number => {
+ const getRootIndex = (p: Node): number => {
+ return (p.node.value as Node).properties.reduce((rootIndex: number, prop: Node, index: number): number => {
return prop.key.name === "root" ? index : rootIndex;
}, -1);
};
- const isModulePresent = (p: INode): INode | false => {
- const modules: INode[] = p.node.value.properties.filter(
- (prop: INode): boolean => prop.key.name === "modules",
- );
+ const isModulePresent = (p: Node): Node | false => {
+ const modules: Node[] = (p.node.value as Node).properties.filter((prop: Node): boolean => prop.key.name === "modules");
return modules.length > 0 && modules[0];
};
@@ -38,46 +35,42 @@ export default function transformer(j: IJSCodeshift, ast: INode): INode {
* @returns {Node} ast - ast node
*/
- const createModuleArray = (p: INode): INode => {
-
- const rootVal: INode = getRootVal(p);
+ const createModuleArray = (p: Node): Node => {
+ const rootVal: Node = getRootVal(p);
- let modulesVal: INode[] = null;
+ let modulesVal: Node[] = null;
- if (rootVal.value.type === "ArrayExpression") {
- modulesVal = rootVal.value.elements;
+ if ((rootVal.value as Node).type === "ArrayExpression") {
+ modulesVal = (rootVal.value as Node).elements;
} else {
- modulesVal = [rootVal.value];
+ modulesVal = [rootVal.value as Node];
}
- let module: INode | false = isModulePresent(p);
+ let module: Node | false = isModulePresent(p);
if (!module) {
- module = j.property(
- "init",
- j.identifier("modules"),
- j.arrayExpression(modulesVal),
- );
- p.node.value.properties = p.node.value.properties.concat([module]);
+ module = j.property("init", j.identifier("modules"), j.arrayExpression(modulesVal));
+ (p.node.value as Node).properties = (p.node.value as Node).properties.concat([module]);
} else {
- module.value.elements = module.value.elements.concat(modulesVal);
+ (module.value as Node).elements = (module.value as Node).elements.concat(modulesVal);
}
const rootIndex: number = getRootIndex(p);
- p.node.value.properties.splice(rootIndex, 1);
+ (p.node.value as Node).properties.splice(rootIndex, 1);
return p;
};
return ast
.find(j.Property)
- .filter((p: INode): boolean => {
- return (
- p.node.key.name === "resolve" &&
- p.node.value.properties.filter((prop: INode): boolean => prop.key.name === "root")
- .length === 1
- );
- })
+ .filter(
+ (p: Node): boolean => {
+ return (
+ p.node.key.name === "resolve" &&
+ (p.node.value as Node).properties.filter((prop: Node): boolean => prop.key.name === "root").length === 1
+ );
+ }
+ )
.forEach(createModuleArray);
}
diff --git a/packages/migrate/types/NodePath.ts b/packages/migrate/types/NodePath.ts
index e40bdf3cba8..1b828378ddb 100644
--- a/packages/migrate/types/NodePath.ts
+++ b/packages/migrate/types/NodePath.ts
@@ -1,100 +1,99 @@
-export interface INode extends Object {
+export interface Node extends Object {
id?: {
name: string;
};
- arguments?: INode[];
- body?: INode[];
- elements?: INode[];
+ arguments?: Node[];
+ body?: Node[];
+ elements?: Node[];
expression?: {
left: {
- computed: boolean,
- object: INode,
- property: INode,
- type: string,
- },
- operator: string,
- right: INode,
- type: string,
+ computed: boolean;
+ object: Node;
+ property: Node;
+ type: string;
+ };
+ operator: string;
+ right: Node;
+ type: string;
+ value?: string;
};
- filter?: (p: (p: INode) => boolean) => INode;
- find?: (objectExpression: object, filterExpression?: object) => INode;
- forEach?: (p: (p: INode) => void) => INode;
- get?: (property: string) => INode;
- remove?: (_?: void) => void;
- nodes?: (_?: void) => INode[];
- pop?: (_?: void) => INode;
+ filter?: (p: (p: Node) => boolean) => Node;
+ find?: (objectExpression: object, filterExpression?: object) => Node;
+ forEach?: (p: (p: Node) => void) => Node;
+ get?: (property: string) => Node;
+ remove?: () => void;
+ nodes?: () => Node[];
+ pop?: () => Node;
key?: {
name: string;
- value: INode | string;
+ value: Node | string;
};
- node?: INode;
+ node?: Node;
name?: string;
object?: object;
- parent?: INode;
- properties?: INode[];
- property?: INode;
+ parent?: Node;
+ properties?: Node[];
+ property?: Node;
prune?: Function;
- replaceWith?: (objectExpression: object) => INode;
- size?: (_?: void) => number;
+ replaceWith?: (objectExpression: object) => Node;
+ size?: () => number;
type?: string;
- value?: INode | string | any;
- toSource?: (object: {
- quote?: string,
- }) => string;
+ value?: Node | string | Node[];
+ toSource?: (
+ object: {
+ quote?: string;
+ }
+ ) => string;
source?: string;
- ast?: INode;
- rules?: IModuleRule[];
- __paths?: INode[];
+ ast?: Node;
+ rules?: ModuleRule[];
+
+ declarations?: Node[];
+
+ __paths?: Node[];
}
-interface IModuleRule {
+interface ModuleRule {
loader?: string;
}
-interface IExpressionObject {
+interface ExpressionObject {
name?: string;
}
-export interface IJSCodeshift extends Object {
- (source?: INode | string): INode;
- withParser?: (parser: string) => IJSCodeshift;
- identifier?: (key: string) => INode;
- literal?: (key: valueType) => INode;
- memberExpression?: (node1: INode, node2: INode, bool?: boolean) => INode;
- objectProperty?: (key: INode, property: valueType) => INode;
- objectExpression?: (properties: INode[]) => INode;
- newExpression?: (expression: INode, args: INode[]) => INode;
- callExpression?: (expression: INode, args: INode[]) => INode;
- variableDeclarator?: (key: INode, args: INode) => INode;
- variableDeclaration?: (key: string, args: INode[]) => INode;
- arrayExpression?: (args?: INode[]) => INode;
- property?: (type: string, key: INode, value: INode) => INode;
- program?: (nodes: INode[]) => INode;
- booleanLiteral?: (bool: boolean) => INode;
- arrowFunctionExpression?: (params: INode[], body: INode, exp: INode) => INode;
- blockStatement?: (body: INode[]) => INode;
- ifStatement?: (test: INode, consequent: INode, alternate?: INode) => INode;
- returnStatement?: (arg: INode) => INode;
- binaryExpression?: (operator: string, left: INode, right: INode) => INode;
-
- Property?: IExpressionObject;
- NewExpression?: IExpressionObject;
- CallExpression?: IExpressionObject;
- VariableDeclarator?: IExpressionObject;
- Identifier?: IExpressionObject;
- Literal?: IExpressionObject;
- ArrayExpression?: IExpressionObject;
- MemberExpression?: IExpressionObject;
- FunctionExpression?: IExpressionObject;
- ObjectExpression?: IExpressionObject;
- BlockStatement?: IExpressionObject;
- Program?: IExpressionObject;
- ArrowFunctionExpression?: IExpressionObject;
+export interface JSCodeshift extends Object {
+ (source?: Node | string): Node;
+ withParser?: (parser: string) => JSCodeshift;
+ identifier?: (key: string) => Node;
+ literal?: (key: valueType) => Node;
+ memberExpression?: (node1: Node, node2: Node, bool?: boolean) => Node;
+ objectProperty?: (key: Node, property: valueType) => Node;
+ objectExpression?: (properties: Node[]) => Node;
+ newExpression?: (expression: Node, args: Node[]) => Node;
+ callExpression?: (expression: Node, args: Node[]) => Node;
+ variableDeclarator?: (key: Node, args: Node) => Node;
+ variableDeclaration?: (key: string, args: Node[]) => Node;
+ arrayExpression?: (args?: Node[]) => Node;
+ property?: (type: string, key: Node, value: Node) => Node;
+ program?: (nodes: Node[]) => Node;
+ booleanLiteral?: (bool: boolean) => Node;
+ Property?: ExpressionObject;
+ NewExpression?: ExpressionObject;
+ CallExpression?: ExpressionObject;
+ VariableDeclarator?: ExpressionObject;
+ Identifier?: ExpressionObject;
+ Literal?: ExpressionObject;
+ ArrayExpression?: ExpressionObject;
+ MemberExpression?: ExpressionObject;
+ FunctionExpression?: ExpressionObject;
+ ObjectExpression?: ExpressionObject;
+ BlockStatement?: ExpressionObject;
+ Program?: ExpressionObject;
filters?: {
VariableDeclarator: {
- requiresModule: Function,
- },
+ requiresModule: Function;
+ };
};
}
-export type valueType = string | number | boolean | any[] | INode | null;
+export type valueType = string | number | boolean | Node | null;
diff --git a/packages/migrate/uglifyJsPlugin/uglifyJsPlugin.ts b/packages/migrate/uglifyJsPlugin/uglifyJsPlugin.ts
index ef74dec417f..71980715a60 100644
--- a/packages/migrate/uglifyJsPlugin/uglifyJsPlugin.ts
+++ b/packages/migrate/uglifyJsPlugin/uglifyJsPlugin.ts
@@ -3,10 +3,10 @@ import {
findPluginsArrayAndRemoveIfEmpty,
findPluginsByName,
getRequire,
- safeTraverse,
+ safeTraverse
} from "@webpack-cli/utils/ast-utils";
-import { IJSCodeshift, INode } from "../types/NodePath";
+import { JSCodeshift, Node } from "../types/NodePath";
/**
*
@@ -23,36 +23,33 @@ import { IJSCodeshift, INode } from "../types/NodePath";
* @returns {Node} ast - jscodeshift ast
*/
-export default function(j: IJSCodeshift, ast: INode): INode {
-
+export default function(j: JSCodeshift, ast: Node): Node {
let pluginVariableAssignment: string = null;
- const searchForRequirePlugin: INode = ast
+ const searchForRequirePlugin: Node = ast
.find(j.VariableDeclarator)
- .filter(
- j.filters.VariableDeclarator.requiresModule("uglifyjs-webpack-plugin"),
- );
+ .filter(j.filters.VariableDeclarator.requiresModule("uglifyjs-webpack-plugin"));
/**
* Look for a variable declaration which requires uglifyjs-webpack-plugin
* saves the name of this variable.
*/
- searchForRequirePlugin.forEach((node: INode): void => {
- pluginVariableAssignment = node.value.id.name;
- });
+ searchForRequirePlugin.forEach(
+ (node: Node): void => {
+ pluginVariableAssignment = (node.value as Node).id.name;
+ }
+ );
- pluginVariableAssignment = !pluginVariableAssignment
- ? "webpack.optimize.UglifyJsPlugin"
- : pluginVariableAssignment;
+ pluginVariableAssignment = !pluginVariableAssignment ? "webpack.optimize.UglifyJsPlugin" : pluginVariableAssignment;
- findPluginsByName(j, ast, [pluginVariableAssignment])
- .forEach((node: INode): void => {
+ findPluginsByName(j, ast, [pluginVariableAssignment]).forEach(
+ (node: Node): void => {
let expressionContent: object = null;
- const configBody: INode = safeTraverse(node, ["parent", "parent", "parent"]);
+ const configBody = safeTraverse(node, ["parent", "parent", "parent"]);
// options passed to plugin
- const pluginOptions: INode[] = node.value.arguments;
+ const pluginOptions: Node[] = (node.value as Node).arguments;
/**
* check if there are any options passed to UglifyWebpackPlugin
@@ -61,70 +58,55 @@ export default function(j: IJSCodeshift, ast: INode): INode {
*/
if (pluginOptions.length) {
/*
- * If user is using UglifyJsPlugin directly from webpack
- * transformation must:
- * - remove it
- * - add require for terser-webpack-plugin
- * - add to minimizer
- */
+ * If user is using UglifyJsPlugin directly from webpack
+ * transformation must:
+ * - remove it
+ * - add require for terser-webpack-plugin
+ * - add to minimizer
+ */
if (pluginVariableAssignment) {
// remove require for uglify-webpack-plugin
searchForRequirePlugin.remove();
// create require for terser-webpack-plugin
- const pathRequire: INode = getRequire(
- j,
- "TerserPlugin",
- "terser-webpack-plugin",
- );
+ const pathRequire: Node = getRequire(j, "TerserPlugin", "terser-webpack-plugin");
// prepend to source code.
- ast
- .find(j.Program)
- .replaceWith((p: INode): INode =>
- j.program([].concat(pathRequire).concat(p.value.body)),
- );
+ ast.find(j.Program).replaceWith(
+ (p: Node): Node => j.program([].concat(pathRequire).concat((p.value as Node).body))
+ );
expressionContent = j.property(
"init",
j.identifier("minimizer"),
- j.arrayExpression([
- j.newExpression(j.identifier("TerserPlugin"), [pluginOptions[0]]),
- ]),
+ j.arrayExpression([j.newExpression(j.identifier("TerserPlugin"), [pluginOptions[0]])])
);
} else {
- expressionContent = j.property(
- "init",
- j.identifier("minimizer"),
- j.arrayExpression([node.value]),
- );
+ expressionContent = j.property("init", j.identifier("minimizer"), j.arrayExpression([node.value as Node]));
}
} else {
- searchForRequirePlugin.forEach((n: INode): void => j(n).remove());
+ searchForRequirePlugin.forEach((n: Node): void => j(n).remove());
}
const minimizeProperty = createProperty(j, "minimize", "true");
// creates optimization property at the body of the config.
if (expressionContent) {
- configBody.value.properties.push(
+ ((configBody as Node).value as Node).properties.push(
j.property(
"init",
j.identifier("optimization"),
- j.objectExpression([minimizeProperty, expressionContent]),
- ),
+ j.objectExpression([minimizeProperty, expressionContent])
+ )
);
} else {
- configBody.value.properties.push(
- j.property(
- "init",
- j.identifier("optimization"),
- j.objectExpression([minimizeProperty]),
- ),
+ ((configBody as Node).value as Node).properties.push(
+ j.property("init", j.identifier("optimization"), j.objectExpression([minimizeProperty]))
);
}
// remove the old Uglify plugin from Plugins array.
j(node).remove();
- });
+ }
+ );
findPluginsArrayAndRemoveIfEmpty(j, ast);
diff --git a/packages/remove/.eslintrc b/packages/remove/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/remove/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/remove/README.md b/packages/remove/README.md
index 9ec0202d772..f6404874945 100644
--- a/packages/remove/README.md
+++ b/packages/remove/README.md
@@ -1,10 +1,10 @@
# webpack-cli remove
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/remove.svg)](https://www.npmjs.com/package/@webpack-cli/remove)
+[![NPM Downloads][downloads]][downloads-url]
## Description
-This package contains the logic to remove properties of a webpack configuration file. It will run a generator that prompts the user for questions of which property to remove in their webpack configuration file.
+This package contains the logic to remove properties of a webpack configuration file. It will run a generator that prompts the user for questions of which property to remove in their webpack configuration file.
## Installation
@@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/remove
To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
### Node
+
```js
const remove = require("@webpack-cli/remove").default;
remove();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli remove
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/remove.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/remove
diff --git a/packages/serve/.eslintrc b/packages/serve/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/serve/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/serve/README.md b/packages/serve/README.md
index aab9613599c..204f5b65813 100644
--- a/packages/serve/README.md
+++ b/packages/serve/README.md
@@ -1,10 +1,10 @@
# webpack-cli serve
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/serve.svg)](https://www.npmjs.com/package/@webpack-cli/serve)
+[![NPM Downloads][downloads]][downloads-url]
## Description
-This package contains the logic to run webpack-serve without using webpack-serve directly.
+This package contains the logic to run [webpack-dev-server](https://github.com/webpack/webpack-dev-server) to serve your webpack app and provide live reloading.
## Installation
@@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/serve
To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
### Node
+
```js
const serve = require("@webpack-cli/serve").default;
serve();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli serve
```
+
+[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/index.ts b/packages/serve/index.ts
index 950ae78d3b7..8ae5a867368 100644
--- a/packages/serve/index.ts
+++ b/packages/serve/index.ts
@@ -17,7 +17,7 @@ import { List } from "@webpack-cli/webpack-scaffold";
const spawnNPMWithArg = (cmd: string): SpawnSyncReturns =>
spawn.sync("npm", ["install", "webpack-dev-server", cmd], {
- stdio: "inherit",
+ stdio: "inherit"
});
/**
@@ -30,7 +30,7 @@ const spawnNPMWithArg = (cmd: string): SpawnSyncReturns =>
const spawnYarnWithArg = (cmd: string): SpawnSyncReturns =>
spawn.sync("yarn", ["add", "webpack-dev-server", cmd], {
- stdio: "inherit",
+ stdio: "inherit"
});
/**
@@ -51,40 +51,34 @@ const getRootPathModule = (dep: string): string => path.resolve(process.cwd(), d
* @returns {Function} invokes the devServer API
*/
-export default function serve(...args: string[]) {
+export default function serve(): Promise {
const packageJSONPath = getRootPathModule("package.json");
if (!packageJSONPath) {
- console.error(
- "\n",
- chalk.red("✖ Could not find your package.json file"),
- "\n",
- );
+ console.error("\n", chalk.red("✖ Could not find your package.json file"), "\n");
process.exit(1);
}
+ // TODO: to refactor this dynamic require and use import()
+ // eslint-disable-next-line
const packageJSON: object = require(packageJSONPath);
/*
* We gotta do this, cause some configs might not have devdep,
* dep or optional dep, so we'd need sanity checks for each
- */
+ */
const hasDevServerDep: string[] = packageJSON
- ? Object.keys(packageJSON).filter((p: string) => packageJSON[p]["webpack-dev-server"])
+ ? Object.keys(packageJSON).filter((p: string): boolean => packageJSON[p]["webpack-dev-server"])
: [];
if (hasDevServerDep.length) {
- const WDSPath: string = getRootPathModule(
- "node_modules/webpack-dev-server/bin/webpack-dev-server.js",
- );
+ const WDSPath: string = getRootPathModule("node_modules/webpack-dev-server/bin/webpack-dev-server.js");
if (!WDSPath) {
console.error(
"\n",
- chalk.red(
- "✖ Could not find the webpack-dev-server dependency in node_modules root path",
- ),
+ chalk.red("✖ Could not find the webpack-dev-server dependency in node_modules root path")
);
console.info(
chalk.bold.green(" ✔︎"),
"Try this command:",
- chalk.bold.green("rm -rf node_modules && npm install"),
+ chalk.bold.green("rm -rf node_modules && npm install")
);
process.exit(1);
}
@@ -92,14 +86,12 @@ export default function serve(...args: string[]) {
} else {
process.stdout.write(
"\n" +
- chalk.bold(
- "✖ We didn't find any webpack-dev-server dependency in your project,",
- ) +
+ chalk.bold("✖ We didn't find any webpack-dev-server dependency in your project,") +
"\n" +
chalk.bold.green(" 'webpack serve'") +
" " +
chalk.bold("requires you to have it installed ") +
- "\n\n",
+ "\n\n"
);
return inquirer
.prompt([
@@ -107,65 +99,68 @@ export default function serve(...args: string[]) {
default: "Y",
message: "Do you want to install it? (default: Y)",
name: "confirmDevserver",
- type: "confirm",
- },
+ type: "confirm"
+ }
])
- .then((answer: {
- confirmDevserver: boolean,
- }) => {
- if (answer.confirmDevserver) {
- return inquirer
- .prompt(
- List(
- "confirmDepType",
- "What kind of dependency do you want it to be under? (default: devDependency)",
- ["devDependency", "optionalDependency", "dependency"],
- ),
- )
- .then((depTypeAns: {
- confirmDepType: string;
- }) => {
- const packager: string = getRootPathModule("package-lock.json")
- ? "npm"
- : "yarn";
- let spawnAction: (_?: void) => SpawnSyncReturns;
- if (depTypeAns.confirmDepType === "devDependency") {
- if (packager === "yarn") {
- spawnAction = (_?: void) => spawnYarnWithArg("--dev");
- } else {
- spawnAction = (_?: void) => spawnNPMWithArg("--save-dev");
- }
- }
- if (depTypeAns.confirmDepType === "dependency") {
- if (packager === "yarn") {
- spawnAction = (_?: void) => spawnYarnWithArg(" ");
- } else {
- spawnAction = (_?: void) => spawnNPMWithArg("--save");
+ .then(
+ (answer: { confirmDevserver: boolean }): Promise => {
+ if (answer.confirmDevserver) {
+ return inquirer
+ .prompt(
+ List(
+ "confirmDepType",
+ "What kind of dependency do you want it to be under? (default: devDependency)",
+ ["devDependency", "optionalDependency", "dependency"]
+ )
+ )
+ .then(
+ (depTypeAns: { confirmDepType: string }): Promise => {
+ const packager: string = getRootPathModule("package-lock.json") ? "npm" : "yarn";
+ let spawnAction: () => SpawnSyncReturns;
+ if (depTypeAns.confirmDepType === "devDependency") {
+ if (packager === "yarn") {
+ spawnAction = (): SpawnSyncReturns => spawnYarnWithArg("--dev");
+ } else {
+ spawnAction = (): SpawnSyncReturns => spawnNPMWithArg("--save-dev");
+ }
+ }
+ if (depTypeAns.confirmDepType === "dependency") {
+ if (packager === "yarn") {
+ spawnAction = (): SpawnSyncReturns => spawnYarnWithArg(" ");
+ } else {
+ spawnAction = (): SpawnSyncReturns => spawnNPMWithArg("--save");
+ }
+ }
+ if (depTypeAns.confirmDepType === "optionalDependency") {
+ if (packager === "yarn") {
+ spawnAction = (): SpawnSyncReturns =>
+ spawnYarnWithArg("--optional");
+ } else {
+ spawnAction = (): SpawnSyncReturns =>
+ spawnNPMWithArg("--save-optional");
+ }
+ }
+ return processPromise(spawnAction()).then(
+ (): Promise => {
+ // Recursion doesn't work well with require call being cached
+ delete require.cache[require.resolve(packageJSONPath)];
+ return serve();
+ }
+ );
}
- }
- if (depTypeAns.confirmDepType === "optionalDependency") {
- if (packager === "yarn") {
- spawnAction = (_?: void) => spawnYarnWithArg("--optional");
- } else {
- spawnAction = (_?: void) => spawnNPMWithArg("--save-optional");
- }
- }
- return processPromise(spawnAction())
- .then((_: void) => {
- // Recursion doesn't work well with require call being cached
- delete require.cache[require.resolve(packageJSONPath)];
- return serve();
- });
- });
- } else {
- console.error(chalk.bold.red("✖ Serve aborted due cancelling"));
+ );
+ } else {
+ console.error(chalk.bold.red("✖ Serve aborted due cancelling"));
+ process.exitCode = 1;
+ }
+ }
+ )
+ .catch(
+ (err: object): void => {
+ console.error(chalk.red("✖ Serve aborted due to some errors"));
+ console.error(err);
process.exitCode = 1;
}
- })
- .catch((err: object) => {
- console.error(chalk.red("✖ Serve aborted due to some errors"));
- console.error(err);
- process.exitCode = 1;
- });
+ );
}
}
diff --git a/packages/update/.eslintrc b/packages/update/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/update/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/update/README.md b/packages/update/README.md
index dd038a61038..ae6ab2e2dad 100644
--- a/packages/update/README.md
+++ b/packages/update/README.md
@@ -1,6 +1,6 @@
# webpack-cli update
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/update.svg)](https://www.npmjs.com/package/@webpack-cli/update)
+[![NPM Downloads][downloads]][downloads-url]
## Description
@@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/update
To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
### Node
+
```js
const update = require("@webpack-cli/update").default;
update();
```
### CLI (via `webpack-cli`)
+
```bash
npx webpack-cli update
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/update.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/update
diff --git a/packages/utils/.eslintrc b/packages/utils/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/utils/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/utils/README.md b/packages/utils/README.md
index 2ea21274d09..ec10524f063 100644
--- a/packages/utils/README.md
+++ b/packages/utils/README.md
@@ -1,6 +1,6 @@
# webpack-cli utils (WIP, not yet published)
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/utils.svg)](https://www.npmjs.com/package/@webpack-cli/utils)
+[![NPM Downloads][downloads]][downloads-url]
## Description
@@ -13,13 +13,14 @@ npm i -D webpack-cli @webpack-cli/utils
```
## Contents
- - AST transformations
- - Checking NPM registry
- - A Recursive AST parser
- - Checking Local Configurations
- - Yeoman Generator Adapter
- - Package Resolver
- - Test Utilities for Jest
+
+- AST transformations
+- Checking NPM registry
+- A Recursive AST parser
+- Checking Local Configurations
+- Yeoman Generator Adapter
+- Package Resolver
+- Test Utilities for Jest
## Usage
@@ -29,3 +30,6 @@ npm i -D webpack-cli @webpack-cli/utils
const utils = require("@webpack-cli/utils");
// API yet to be exposed
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/utils.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/utils
diff --git a/packages/utils/__tests__/.eslintrc b/packages/utils/__tests__/.eslintrc
new file mode 100644
index 00000000000..5d4340a351d
--- /dev/null
+++ b/packages/utils/__tests__/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "root": true,
+ "extends": ["../.eslintrc"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["off"]
+ }
+}
diff --git a/packages/utils/__tests__/ast-utils.test.ts b/packages/utils/__tests__/ast-utils.test.ts
index b9c8e34576c..6883531049f 100644
--- a/packages/utils/__tests__/ast-utils.test.ts
+++ b/packages/utils/__tests__/ast-utils.test.ts
@@ -2,7 +2,7 @@
import * as j from "jscodeshift/dist/core";
import * as utils from "../ast-utils";
-import { INode } from "../types/NodePath";
+import { Node } from "../types/NodePath";
describe("utils", () => {
describe("createProperty", () => {
@@ -106,7 +106,7 @@ const a = { plugs: [] }
describe("createOrUpdatePluginByName", () => {
it("should create a new plugin without arguments", () => {
const ast = j("{ plugins: [] }");
- ast.find(j.ArrayExpression).forEach((node: INode) => {
+ ast.find(j.ArrayExpression).forEach((node: Node) => {
utils.createOrUpdatePluginByName(j, node, "Plugin");
});
expect(ast.toSource()).toMatchSnapshot();
@@ -114,9 +114,9 @@ const a = { plugs: [] }
it("should create a new plugin with arguments", () => {
const ast = j("{ plugins: [] }");
- ast.find(j.ArrayExpression).forEach((node: INode) => {
+ ast.find(j.ArrayExpression).forEach((node: Node) => {
utils.createOrUpdatePluginByName(j, node, "Plugin", {
- foo: "bar",
+ foo: "bar"
});
});
expect(ast.toSource()).toMatchSnapshot();
@@ -124,9 +124,9 @@ const a = { plugs: [] }
it("should add an object as an argument", () => {
const ast = j("[new Plugin()]");
- ast.find(j.ArrayExpression).forEach((node: INode) => {
+ ast.find(j.ArrayExpression).forEach((node: Node) => {
utils.createOrUpdatePluginByName(j, node, "Plugin", {
- foo: true,
+ foo: true
});
});
expect(ast.toSource()).toMatchSnapshot();
@@ -134,13 +134,13 @@ const a = { plugs: [] }
it("should merge options objects", () => {
const ast = j("[new Plugin({ foo: true })]");
- ast.find(j.ArrayExpression).forEach((node: INode) => {
+ ast.find(j.ArrayExpression).forEach((node: Node) => {
utils.createOrUpdatePluginByName(j, node, "Plugin", {
bar: "baz",
- foo: false,
+ foo: false
});
utils.createOrUpdatePluginByName(j, node, "Plugin", {
- "baz-long": true,
+ "baz-long": true
});
});
expect(ast.toSource()).toMatchSnapshot();
@@ -192,8 +192,8 @@ const a = { plugs: [] }
expect(
ast
.find(j.ObjectExpression)
- .filter((p) => utils.findObjWithOneOfKeys(p, ["a"]))
- .size(),
+ .filter(p => utils.findObjWithOneOfKeys(p, ["a"]))
+ .size()
).toEqual(1);
});
});
@@ -208,12 +208,12 @@ const a = { plugs: [] }
describe("safeTraverse", () => {
it("should safe traverse", () => {
const testObject = {
- type: "NodeType",
+ type: "NodeType"
};
const p = {
foo: {
- bar: testObject,
- },
+ bar: testObject
+ }
};
const require = utils.safeTraverse(p, ["foo", "bar"]);
expect(require).toEqual(testObject);
@@ -221,14 +221,14 @@ const a = { plugs: [] }
it("should safe traverse thrice", () => {
const type = {
- type: "NodeType",
+ type: "NodeType"
};
const p = {
parent: {
value: {
- value: type,
- },
- },
+ value: type
+ }
+ }
};
const traversedValue = utils.safeTraverse(p, ["parent", "value", "value"]);
expect(traversedValue).toEqual(type);
@@ -241,9 +241,9 @@ const a = { plugs: [] }
const p = {
value: {
value: {
- type: NODE_TYPE,
- },
- },
+ type: NODE_TYPE
+ }
+ }
};
const typeValue = utils.safeTraverseAndGetType(p);
expect(typeValue).toEqual(NODE_TYPE);
@@ -254,9 +254,9 @@ const a = { plugs: [] }
const p = {
foo: {
bar: {
- type: NODE_TYPE,
- },
- },
+ type: NODE_TYPE
+ }
+ }
};
const typeValue = utils.safeTraverseAndGetType(p);
expect(typeValue).toEqual(false);
@@ -273,14 +273,14 @@ const a = { plugs: [] }
super: [
"yeah",
{
- loader: "'eslint-loader'",
- },
- ],
+ loader: "'eslint-loader'"
+ }
+ ]
};
const root = ast.find(j.ObjectExpression);
- root.forEach((p) => {
+ root.forEach(p => {
utils.addProperty(j, p, "entry", propertyValue);
});
@@ -306,14 +306,14 @@ const a = { plugs: [] }
super: [
"yeah",
{
- loader: "'eslint-loader'",
- },
- ],
+ loader: "'eslint-loader'"
+ }
+ ]
};
const root = ast.find(j.ObjectExpression);
- utils.findRootNodesByName(j, root, "entry").forEach((p: INode) => {
+ utils.findRootNodesByName(j, root, "entry").forEach((p: Node) => {
j(p).replaceWith(utils.addProperty(j, p, "entry", propertyValue, "add"));
});
diff --git a/packages/utils/__tests__/package-manager.test.ts b/packages/utils/__tests__/package-manager.test.ts
index 036f10604bb..baa4204822a 100644
--- a/packages/utils/__tests__/package-manager.test.ts
+++ b/packages/utils/__tests__/package-manager.test.ts
@@ -7,7 +7,9 @@ jest.mock("cross-spawn");
jest.mock("fs");
describe("package-manager", () => {
+ // eslint-disable-next-line
const spawn = require("cross-spawn");
+ // eslint-disable-next-line
const fs = require("fs");
const defaultSyncResult = {
@@ -50,7 +52,7 @@ describe("package-manager", () => {
fs.existsSync.mockReturnValueOnce(true);
}
- spawn.sync.mockReturnValue(defaultSyncResult);
+ jest.spyOn(spawn, "sync").mockReturnValue(defaultSyncResult);
it("should return 'yarn' from getPackageManager if it's installed", () => {
expect(packageManager.getPackageManager()).toEqual("yarn");
diff --git a/packages/utils/__tests__/resolve-packages.test.ts b/packages/utils/__tests__/resolve-packages.test.ts
index d571dc01762..765b907f1d2 100644
--- a/packages/utils/__tests__/resolve-packages.test.ts
+++ b/packages/utils/__tests__/resolve-packages.test.ts
@@ -7,7 +7,7 @@ function mockPromise(value) {
const mockedPromise = {
then(callback) {
return mockPromise(callback(value));
- },
+ }
};
return isValueAPromise ? value : mockedPromise;
@@ -18,14 +18,14 @@ function spawnChild(pkg) {
function getLoc(option) {
const packageModule = [];
- option.filter((pkg) => {
- mockPromise(spawnChild(pkg)).then((_) => {
+ option.filter(pkg => {
+ mockPromise(spawnChild(pkg)).then(() => {
try {
const loc = path.join("..", "..", "node_modules", pkg);
packageModule.push(loc);
} catch (err) {
throw new Error(
- "Package wasn't validated correctly.." + "Submit an issue for " + pkg + " if this persists",
+ "Package wasn't validated correctly.." + "Submit an issue for " + pkg + " if this persists"
);
}
});
@@ -60,7 +60,7 @@ describe("resolve-packages", () => {
moduleLoc = getLoc(["webpack-scaffold-ylvis", "webpack-scaffold-noop"]);
expect(moduleLoc).toEqual([
path.normalize("../../node_modules/webpack-scaffold-ylvis"),
- path.normalize("../../node_modules/webpack-scaffold-noop"),
+ path.normalize("../../node_modules/webpack-scaffold-noop")
]);
});
});
diff --git a/packages/utils/ast-utils.ts b/packages/utils/ast-utils.ts
index 53e2e60e685..7a6fed5a657 100644
--- a/packages/utils/ast-utils.ts
+++ b/packages/utils/ast-utils.ts
@@ -1,4 +1,4 @@
-import { IJSCodeshift, INode, valueType } from "./types/NodePath";
+import { JSCodeshift, Node, valueType } from "./types/NodePath";
import * as validateIdentifier from "./validate-identifier";
/**
@@ -6,11 +6,13 @@ import * as validateIdentifier from "./validate-identifier";
* Traverse safely over a path object for array for paths
* @param {Object} obj - Object on which we traverse
* @param {Array} paths - Array of strings containing the traversal path
- * @returns {Any} Value at given traversal path
+ * @returns {Node} Value at given traversal path
*/
-function safeTraverse(obj: INode, paths: string[]): any {
- let val: INode = obj;
+function safeTraverse(obj: Node, paths: string[]): Node | Node[] {
+ // TODO: to revisit the type of this function, it's not clear what should return.
+ // Sometimes its return type is used as string
+ let val: Node = obj;
let idx = 0;
while (idx < paths.length) {
@@ -30,8 +32,8 @@ function safeTraverse(obj: INode, paths: string[]): any {
* @returns {String|Boolean} type at given path.
*/
-function safeTraverseAndGetType(path: INode): string | boolean {
- const pathValue: INode = safeTraverse(path, ["value", "value"]);
+function safeTraverseAndGetType(path: Node): string | boolean {
+ const pathValue = safeTraverse(path, ["value", "value"]) as Node;
return pathValue ? pathValue.type : false;
}
@@ -41,17 +43,15 @@ function safeTraverseAndGetType(path: INode): string | boolean {
* @returns {String} member expression string.
*/
-function memberExpressionToPathString(path: INode): string {
+function memberExpressionToPathString(path: Node): string {
if (path && path.object) {
- return [memberExpressionToPathString(path.object), path.property.name].join(
- ".",
- );
+ return [memberExpressionToPathString(path.object), path.property.name].join(".");
}
return path.name;
}
// Convert Array like ['webpack', 'optimize', 'DedupePlugin'] to nested MemberExpressions
-function pathsToMemberExpression(j: IJSCodeshift, paths: string[]): INode {
+function pathsToMemberExpression(j: JSCodeshift, paths: string[]): Node {
if (!paths.length) {
return null;
} else if (paths.length === 1) {
@@ -59,10 +59,7 @@ function pathsToMemberExpression(j: IJSCodeshift, paths: string[]): INode {
} else {
const first: string[] = paths.slice(0, 1);
const rest: string[] = paths.slice(1);
- return j.memberExpression(
- pathsToMemberExpression(j, rest),
- pathsToMemberExpression(j, first),
- );
+ return j.memberExpression(pathsToMemberExpression(j, rest), pathsToMemberExpression(j, first));
}
}
@@ -77,15 +74,14 @@ function pathsToMemberExpression(j: IJSCodeshift, paths: string[]): INode {
* @returns {Node} Node that has the pluginName
*/
-function findPluginsByName(j: IJSCodeshift, node: INode, pluginNamesArray: string[]): INode {
- return node
- .find(j.NewExpression)
- .filter((path: INode): boolean => {
+function findPluginsByName(j: JSCodeshift, node: Node, pluginNamesArray: string[]): Node {
+ return node.find(j.NewExpression).filter(
+ (path: Node): boolean => {
return pluginNamesArray.some(
- (plugin: string) =>
- memberExpressionToPathString(path.get("callee").value) === plugin,
+ (plugin: string): boolean => memberExpressionToPathString(path.get("callee").value as Node) === plugin
);
- });
+ }
+ );
}
/**
@@ -95,20 +91,15 @@ function findPluginsByName(j: IJSCodeshift, node: INode, pluginNamesArray: strin
* @returns {Node} rootNode modified AST.
*/
-function findPluginsArrayAndRemoveIfEmpty(j: IJSCodeshift, rootNode: INode): INode {
- return rootNode
- .find(j.Identifier, { name: "plugins" })
- .forEach((node: INode) => {
- const elements: INode[] = safeTraverse(node, [
- "parent",
- "value",
- "value",
- "elements",
- ]);
+function findPluginsArrayAndRemoveIfEmpty(j: JSCodeshift, rootNode: Node): Node {
+ return rootNode.find(j.Identifier, { name: "plugins" }).forEach(
+ (node: Node): void => {
+ const elements = safeTraverse(node, ["parent", "value", "value", "elements"]) as Node[];
if (!elements.length) {
j(node.parent).remove();
}
- });
+ }
+ );
}
/**
@@ -121,51 +112,10 @@ function findPluginsArrayAndRemoveIfEmpty(j: IJSCodeshift, rootNode: INode): INo
* @returns {Node} found node and
*/
-function findRootNodesByName(j: IJSCodeshift, node: INode, propName: string): INode {
+function findRootNodesByName(j: JSCodeshift, node: Node, propName: string): Node {
return node.find(j.Property, { key: { name: propName } });
}
-/**
- *
- * Creates an Object's property with a given key and value
- *
- * @param {any} j — jscodeshift API
- * @param {String | Number} key - Property key
- * @param {String | Number | Boolean} value - Property value
- * @returns {Node}
- */
-
-function createProperty(j: IJSCodeshift, key: string | number, value: valueType): INode {
- return j.property(
- "init",
- createIdentifierOrLiteral(j, key),
- createLiteral(j, value),
- );
-}
-
-/**
- *
- * Creates an appropriate literal property
- *
- * @param {any} j — jscodeshift API
- * @param {String | Boolean | Number} val
- * @returns {Node}
- */
-
-function createLiteral(j: IJSCodeshift, val: valueType): INode {
- let literalVal: valueType = val;
- // We'll need String to native type conversions
- if (typeof val === "string") {
- // 'true' => true
- if (val === "true") { literalVal = true; }
- // 'false' => false
- if (val === "false") { literalVal = false; }
- // '1' => 1
- if (!isNaN(Number(val))) { literalVal = Number(val); }
- }
- return j.literal(literalVal);
-}
-
/**
*
* Creates an appropriate identifier or literal property
@@ -175,12 +125,12 @@ function createLiteral(j: IJSCodeshift, val: valueType): INode {
* @returns {Node}
*/
-function createIdentifierOrLiteral(j: IJSCodeshift, val: valueType): INode {
+function createIdentifierOrLiteral(j: JSCodeshift, val: valueType): Node {
// IPath | IPath doesn't work, find another way
let literalVal = val;
// We'll need String to native type conversions
if (!Array.isArray(val)) {
- if (typeof val === "string" || typeof val === "object" && val.__paths) {
+ if (typeof val === "string" || (typeof val === "object" && val.__paths)) {
// 'true' => true
if (val === "true") {
literalVal = true;
@@ -197,7 +147,7 @@ function createIdentifierOrLiteral(j: IJSCodeshift, val: valueType): INode {
return j.literal(literalVal);
}
if (typeof val === "object" && val.__paths) {
- const regExpVal = val.__paths[0].value.program.body[0].expression;
+ const regExpVal = ((val.__paths[0].value as JSCodeshift).program as Node).body[0].expression;
return j.literal(regExpVal.value);
} else if (typeof literalVal === "string") {
// Use identifier instead
@@ -214,6 +164,49 @@ function createIdentifierOrLiteral(j: IJSCodeshift, val: valueType): INode {
return j.literal(literalVal);
}
+/**
+ *
+ * Creates an appropriate literal property
+ *
+ * @param {any} j — jscodeshift API
+ * @param {String | Boolean | Number} val
+ * @returns {Node}
+ */
+
+function createLiteral(j: JSCodeshift, val: valueType): Node {
+ let literalVal: valueType = val;
+ // We'll need String to native type conversions
+ if (typeof val === "string") {
+ // 'true' => true
+ if (val === "true") {
+ literalVal = true;
+ }
+ // 'false' => false
+ if (val === "false") {
+ literalVal = false;
+ }
+ // '1' => 1
+ if (!isNaN(Number(val))) {
+ literalVal = Number(val);
+ }
+ }
+ return j.literal(literalVal);
+}
+
+/**
+ *
+ * Creates an Object's property with a given key and value
+ *
+ * @param {any} j — jscodeshift API
+ * @param {String | Number} key - Property key
+ * @param {String | Number | Boolean} value - Property value
+ * @returns {Node}
+ */
+
+function createProperty(j: JSCodeshift, key: string | number, value: valueType): Node {
+ return j.property("init", createIdentifierOrLiteral(j, key), createLiteral(j, value));
+}
+
/**
*
* Adds or updates the value of a key within a root
@@ -228,35 +221,32 @@ function createIdentifierOrLiteral(j: IJSCodeshift, val: valueType): INode {
*/
function addOrUpdateConfigObject(
- j: IJSCodeshift, rootNode: INode, configProperty: string, key: string, value: valueType,
+ j: JSCodeshift,
+ rootNode: Node,
+ configProperty: string,
+ key: string,
+ value: valueType
): void {
-
- const propertyExists = rootNode.properties.filter(
- (node: INode): boolean => node.key.name === configProperty,
- ).length;
+ const propertyExists = rootNode.properties.filter((node: Node): boolean => node.key.name === configProperty).length;
if (propertyExists) {
rootNode.properties
- .filter((path: INode): boolean => path.key.name === configProperty)
- .forEach((path: INode) => {
- const newProperties = path.value.properties.filter(
- (p: INode) => p.key.name !== key,
- );
- newProperties.push(
- j.objectProperty(
- j.identifier(key), value,
- ),
- );
- path.value.properties = newProperties;
- });
+ .filter((path: Node): boolean => path.key.name === configProperty)
+ .forEach(
+ (path: Node): void => {
+ const newProperties = (path.value as Node).properties.filter(
+ (p: Node): boolean => p.key.name !== key
+ );
+ newProperties.push(j.objectProperty(j.identifier(key), value));
+ (path.value as Node).properties = newProperties;
+ }
+ );
} else {
rootNode.properties.push(
j.objectProperty(
j.identifier(configProperty),
- j.objectExpression(
- [j.objectProperty(j.identifier(key), value)],
- ),
- ),
+ j.objectExpression([j.objectProperty(j.identifier(key), value)])
+ )
);
}
}
@@ -272,20 +262,22 @@ function addOrUpdateConfigObject(
* @returns {Node | Void} - path to the root webpack configuration object if plugin is found
*/
-function findAndRemovePluginByName(j: IJSCodeshift, node: INode, pluginName: string): INode {
- let rootPath: INode;
+function findAndRemovePluginByName(j: JSCodeshift, node: Node, pluginName: string): Node {
+ let rootPath: Node;
findPluginsByName(j, node, [pluginName])
- .filter((path: INode): boolean => safeTraverse(path, ["parent", "value"]))
- .forEach((path: INode) => {
- rootPath = safeTraverse(path, ["parent", "parent", "parent", "value"]);
- const arrayPath: INode = path.parent.value;
- if (arrayPath.elements && arrayPath.elements.length === 1) {
- j(path.parent.parent).remove();
- } else {
- j(path).remove();
+ .filter((path: Node): boolean => !!safeTraverse(path, ["parent", "value"]))
+ .forEach(
+ (path: Node): void => {
+ rootPath = safeTraverse(path, ["parent", "parent", "parent", "value"]) as Node;
+ const arrayPath = path.parent.value as Node;
+ if (arrayPath.elements && arrayPath.elements.length === 1) {
+ j(path.parent.parent).remove();
+ } else {
+ j(path).remove();
+ }
}
- });
+ );
return rootPath;
}
@@ -303,62 +295,68 @@ function findAndRemovePluginByName(j: IJSCodeshift, node: INode, pluginName: str
* @returns {Void}
*/
-function createOrUpdatePluginByName(j: IJSCodeshift, rootNodePath: INode, pluginName: string, options?: object): void {
- const pluginInstancePath: INode = findPluginsByName(j, j(rootNodePath), [
- pluginName,
- ]);
- let optionsProps: INode[];
+function createOrUpdatePluginByName(j: JSCodeshift, rootNodePath: Node, pluginName: string, options?: object): void {
+ const pluginInstancePath: Node = findPluginsByName(j, j(rootNodePath), [pluginName]);
+ let optionsProps: Node[];
if (options) {
- optionsProps = Object.keys(options).map((key: string) => {
- return createProperty(j, key, options[key]);
- });
+ optionsProps = Object.keys(options).map(
+ (key: string): Node => {
+ return createProperty(j, key, options[key]);
+ }
+ );
}
// If plugin declaration already exist
if (pluginInstancePath.size()) {
- pluginInstancePath.forEach((path: INode) => {
- // There are options we want to pass as argument
- if (optionsProps) {
- const args: INode[] = path.value.arguments;
- if (args.length) {
- // Plugin is called with object as arguments
- // we will merge those objects
- const currentProps: INode = j(path)
- .find(j.ObjectExpression)
- .get("properties");
-
- optionsProps.forEach((opt: INode) => {
- // Search for same keys in the existing object
- const existingProps = j(currentProps)
- .find(j.Identifier)
- .filter((p: INode): boolean => opt.key.value === p.value.name);
-
- if (existingProps.size()) {
- // Replacing values for the same key
- existingProps.forEach((p: INode) => {
- j(p.parent).replaceWith(opt);
- });
- } else {
- // Adding new key:values
- currentProps.value.push(opt);
- }
- });
- } else {
- // Plugin is called without arguments
- args.push(j.objectExpression(optionsProps));
+ pluginInstancePath.forEach(
+ (path: Node): void => {
+ // There are options we want to pass as argument
+ if (optionsProps) {
+ const args: Node[] = (path.value as Node).arguments;
+ if (args.length) {
+ // Plugin is called with object as arguments
+ // we will merge those objects
+ const currentProps: Node = j(path)
+ .find(j.ObjectExpression)
+ .get("properties");
+
+ optionsProps.forEach(
+ (opt: Node): void => {
+ // Search for same keys in the existing object
+ const existingProps = j(currentProps)
+ .find(j.Identifier)
+ .filter((p: Node): boolean => opt.key.value === (p.value as Node).name);
+
+ if (existingProps.size()) {
+ // Replacing values for the same key
+ existingProps.forEach(
+ (p: Node): void => {
+ j(p.parent).replaceWith(opt);
+ }
+ );
+ } else {
+ // Adding new key:values
+ (currentProps.value as Node[]).push(opt);
+ }
+ }
+ );
+ } else {
+ // Plugin is called without arguments
+ args.push(j.objectExpression(optionsProps));
+ }
}
}
- });
+ );
} else {
- let argumentsArray: INode[] = [];
+ let argumentsArray: Node[] = [];
if (optionsProps) {
argumentsArray = [j.objectExpression(optionsProps)];
}
const loaderPluginInstance = j.newExpression(
pathsToMemberExpression(j, pluginName.split(".").reverse()),
- argumentsArray,
+ argumentsArray
);
- rootNodePath.value.elements.push(loaderPluginInstance);
+ (rootNodePath.value as Node).elements.push(loaderPluginInstance);
}
}
@@ -373,12 +371,14 @@ function createOrUpdatePluginByName(j: IJSCodeshift, rootNodePath: INode, plugin
* @returns {String} variable name - ex. 'const s = require(s) gives "s"`
*/
-function findVariableToPlugin(j: IJSCodeshift, rootNode: INode, pluginPackageName: string): string {
- const moduleVarNames: INode[] = rootNode
+function findVariableToPlugin(j: JSCodeshift, rootNode: Node, pluginPackageName: string): string {
+ const moduleVarNames: Node[] = rootNode
.find(j.VariableDeclarator)
.filter(j.filters.VariableDeclarator.requiresModule(pluginPackageName))
.nodes();
- if (moduleVarNames.length === 0) { return null; }
+ if (moduleVarNames.length === 0) {
+ return null;
+ }
return moduleVarNames.pop().id.name;
}
@@ -390,12 +390,12 @@ function findVariableToPlugin(j: IJSCodeshift, rootNode: INode, pluginPackageNam
* @returns {Boolean}
*/
-function isType(path: INode, type: string): boolean {
+function isType(path: Node, type: string): boolean {
return path.type === type;
}
-function findObjWithOneOfKeys(p: INode, keyNames: string[]) {
- return p.value.properties.reduce((predicate: boolean, prop: INode) => {
+function findObjWithOneOfKeys(p: Node, keyNames: string[]): boolean {
+ return (p.value as Node).properties.reduce((predicate: boolean, prop: Node): boolean => {
const name: string = prop.key.name;
return keyNames.indexOf(name) > -1 || predicate;
}, false);
@@ -410,12 +410,12 @@ function findObjWithOneOfKeys(p: INode, keyNames: string[]) {
* @returns {Node} - the created ast
*/
-function getRequire(j: IJSCodeshift, constName: string, packagePath: string): INode {
+function getRequire(j: JSCodeshift, constName: string, packagePath: string): Node {
return j.variableDeclaration("const", [
j.variableDeclarator(
j.identifier(constName),
- j.callExpression(j.identifier("require"), [j.literal(packagePath)]),
- ),
+ j.callExpression(j.identifier("require"), [j.literal(packagePath)])
+ )
]);
}
@@ -430,32 +430,33 @@ function getRequire(j: IJSCodeshift, constName: string, packagePath: string): IN
* @returns {Node} - the created ast
*/
-function addProperty(j: IJSCodeshift, p: INode, key: string, value: valueType, action?: string): INode {
+function addProperty(j: JSCodeshift, p: Node, key: string, value: valueType, action?: string): Node {
if (!p) {
return;
}
let valForNode: valueType;
if (Array.isArray(value)) {
- let arrExp: INode = j.arrayExpression([]);
+ let arrExp: Node = j.arrayExpression([]);
if (safeTraverseAndGetType(p) === "ArrayExpression") {
- arrExp = p.value.value;
+ arrExp = (p.value as Node).value as Node;
}
- value.forEach((val: valueType) => {
- addProperty(j, arrExp, null, val);
- });
+ value.forEach(
+ (val: valueType): void => {
+ addProperty(j, arrExp, null, val);
+ }
+ );
valForNode = arrExp;
- } else if (
- typeof value === "object" &&
- !(value.__paths || value instanceof RegExp)
- ) {
- let objectExp: INode = j.objectExpression([]);
+ } else if (typeof value === "object" && !(value.__paths || value instanceof RegExp)) {
+ let objectExp: Node = j.objectExpression([]);
if (safeTraverseAndGetType(p) === "ObjectExpression") {
- objectExp = p.value.value;
+ objectExp = (p.value as Node).value as Node;
}
// object -> loop through it
- Object.keys(value).forEach((prop: string) => {
- addProperty(j, objectExp, prop, value[prop]);
- });
+ Object.keys(value).forEach(
+ (prop: string): void => {
+ addProperty(j, objectExp, prop, value[prop]);
+ }
+ );
valForNode = objectExp;
} else {
valForNode = createIdentifierOrLiteral(j, value);
@@ -468,14 +469,16 @@ function addProperty(j: IJSCodeshift, p: INode, key: string, value: valueType, a
}
// we only return the generated pushVal which will be replace the node path
- if (action === "add") { return pushVal; }
+ if (action === "add") {
+ return pushVal;
+ }
if (p.properties) {
p.properties.push(pushVal);
return p;
}
- if (p.value && p.value.properties) {
- p.value.properties.push(pushVal);
+ if (p.value && (p.value as Node).properties) {
+ (p.value as Node).properties.push(pushVal);
return p;
}
if (p.elements) {
@@ -495,8 +498,7 @@ function addProperty(j: IJSCodeshift, p: INode, key: string, value: valueType, a
* @returns {Node} - the created ast
*/
-function removeProperty(j: IJSCodeshift, ast: INode, key: string, value: valueType): INode {
-
+function removeProperty(j: JSCodeshift, ast: Node, key: string, value: valueType): Node {
if (typeof value === "object" && !Array.isArray(value)) {
// override for module.rules / loaders
if (key === "module" && value.rules) {
@@ -504,12 +506,14 @@ function removeProperty(j: IJSCodeshift, ast: INode, key: string, value: valueTy
.find(j.Property, {
value: {
type: "Literal",
- value: value.rules[0].loader,
- },
+ value: value.rules[0].loader
+ }
})
- .forEach((p: INode) => {
- j(p.parent).remove();
- });
+ .forEach(
+ (p: Node): void => {
+ j(p.parent).remove();
+ }
+ );
}
}
@@ -517,14 +521,16 @@ function removeProperty(j: IJSCodeshift, ast: INode, key: string, value: valueTy
if (Array.isArray(value)) {
return ast
.find(j.Literal, {
- value: value[0],
+ value: value[0]
})
- .forEach((p: INode) => {
- const configKey = safeTraverse(p, ["parent", "parent", "node", "key", "name"]);
- if (configKey === key) {
- j(p).remove();
+ .forEach(
+ (p: Node): void => {
+ const configKey = safeTraverse(p, ["parent", "parent", "node", "key", "name"]);
+ if (configKey === key) {
+ j(p).remove();
+ }
}
- });
+ );
}
// value => literal string / boolean / nested object
@@ -533,19 +539,23 @@ function removeProperty(j: IJSCodeshift, ast: INode, key: string, value: valueTy
objKeyToRemove = key;
} else if (typeof value === "object") {
for (const innerKey in value) {
- if (value[innerKey] === null) { objKeyToRemove = innerKey; }
+ if (value[innerKey] === null) {
+ objKeyToRemove = innerKey;
+ }
}
}
return ast
.find(j.Property, {
key: {
name: objKeyToRemove,
- type: "Identifier",
- },
+ type: "Identifier"
+ }
})
- .forEach((p: INode) => {
- j(p).remove();
- });
+ .forEach(
+ (p: Node): void => {
+ j(p).remove();
+ }
+ );
}
/**
@@ -560,20 +570,23 @@ function removeProperty(j: IJSCodeshift, ast: INode, key: string, value: valueTy
* @returns ast - jscodeshift API
*/
-function parseTopScope(j: IJSCodeshift, ast: INode, value: string[], action: string): boolean | INode {
- function createTopScopeProperty(p: INode): boolean {
- value.forEach((n: string) => {
- if (
- !p.value.body[0].declarations ||
- n.indexOf(p.value.body[0].declarations[0].id.name) <= 0
- ) {
- p.value.body.splice(-1, 0, n);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+function parseTopScope(j: JSCodeshift, ast: Node, value: string[], action: string): boolean | Node {
+ function createTopScopeProperty(p: Node): boolean {
+ value.forEach(
+ (n: string): void => {
+ if (
+ !(p.value as Node).body[0].declarations ||
+ n.indexOf((p.value as Node).body[0].declarations[0].id.name) <= 0
+ ) {
+ (p.value as Node).body.splice(-1, 0, n);
+ }
}
- });
+ );
return false; // TODO: debug later
}
if (value) {
- return ast.find(j.Program).filter((p: INode): boolean => createTopScopeProperty(p));
+ return ast.find(j.Program).filter((p: Node): boolean => createTopScopeProperty(p));
} else {
return ast;
}
@@ -591,36 +604,36 @@ function parseTopScope(j: IJSCodeshift, ast: INode, value: string[], action: str
* @returns ast - jscodeshift API
*/
-function parseMerge(j: IJSCodeshift, ast: INode, value: string, action: string): boolean | INode {
- function createMergeProperty(p: INode) {
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+function parseMerge(j: JSCodeshift, ast: Node, value: string, action: string): boolean | Node {
+ function createMergeProperty(p: Node): boolean {
// FIXME Use j.callExp()
- const exportsDecl: INode[] = p.value.body.map((n: INode) => {
- if (n.expression) {
- return n.expression.right;
+ const exportsDecl: Node[] = (p.value as Node).body.map(
+ (n: Node): Node => {
+ if (n.expression) {
+ return n.expression.right;
+ }
}
- });
+ );
const bodyLength = exportsDecl.length;
- const newVal: INode = {};
+ const newVal: Node = {};
newVal.type = "ExpressionStatement";
newVal.expression = {
left: {
computed: false,
object: j.identifier("module"),
property: j.identifier("exports"),
- type: "MemberExpression",
+ type: "MemberExpression"
},
operator: "=",
- right: j.callExpression(j.identifier("merge"), [
- j.identifier(value),
- exportsDecl.pop(),
- ]),
- type: "AssignmentExpression",
+ right: j.callExpression(j.identifier("merge"), [j.identifier(value), exportsDecl.pop()]),
+ type: "AssignmentExpression"
};
- p.value.body[bodyLength - 1] = newVal;
+ (p.value as Node).body[bodyLength - 1] = newVal;
return false; // TODO: debug later
}
if (value) {
- return ast.find(j.Program).filter((p: INode): boolean => createMergeProperty(p));
+ return ast.find(j.Program).filter((p: Node): boolean => createMergeProperty(p));
} else {
return ast;
}
@@ -645,5 +658,5 @@ export {
addProperty,
removeProperty,
parseTopScope,
- parseMerge,
+ parseMerge
};
diff --git a/packages/utils/copy-utils.ts b/packages/utils/copy-utils.ts
index 5f78d92b3d4..85674f714a3 100644
--- a/packages/utils/copy-utils.ts
+++ b/packages/utils/copy-utils.ts
@@ -1,13 +1,5 @@
import * as path from "path";
-interface IGenerator {
- fs: {
- copy(from: string, to: string, options?: object): void;
- copyTpl(from: string, to: string, context: object, templateOptions?: object, copyOptions?: object): void;
- };
- destinationPath: (path: string) => string;
-}
-
/**
* Takes in a file path in the `./templates` directory. Copies that
* file to the destination, with the `.tpl` extension stripped.
@@ -16,10 +8,9 @@ interface IGenerator {
* @param {string} templateDir Absolute path to template directory
* @returns {Function} A curried function that takes a file path and copies it
*/
-export const generatorCopy = (
- generator,
- templateDir: string,
-): (filePath: string) => void => (filePath: string): void => {
+export const generatorCopy = (generator, templateDir: string): ((filePath: string) => void) => (
+ filePath: string
+): void => {
const sourceParts = templateDir.split(path.delimiter);
sourceParts.push.apply(sourceParts, filePath.split("/"));
const targetParts = path.dirname(filePath).split("/");
@@ -27,7 +18,7 @@ export const generatorCopy = (
generator.fs.copy(
path.join.apply(null, sourceParts),
- generator.destinationPath(path.join.apply(null, targetParts)),
+ generator.destinationPath(path.join.apply(null, targetParts))
);
};
@@ -45,8 +36,8 @@ export const generatorCopy = (
export const generatorCopyTpl = (
generator,
templateDir: string,
- templateData: object,
-): (filePath: string) => void => (filePath: string): void => {
+ templateData: object
+): ((filePath: string) => void) => (filePath: string): void => {
const sourceParts = templateDir.split(path.delimiter);
sourceParts.push.apply(sourceParts, filePath.split("/"));
const targetParts = path.dirname(filePath).split("/");
@@ -55,6 +46,6 @@ export const generatorCopyTpl = (
generator.fs.copyTpl(
path.join.apply(null, sourceParts),
generator.destinationPath(path.join.apply(null, targetParts)),
- templateData,
+ templateData
);
};
diff --git a/packages/utils/defineTest.ts b/packages/utils/defineTest.ts
index a5ee041d26f..350e03a05ba 100644
--- a/packages/utils/defineTest.ts
+++ b/packages/utils/defineTest.ts
@@ -1,27 +1,28 @@
+/* eslint-disable @typescript-eslint/explicit-function-return-type */
import * as fs from "fs";
import * as path from "path";
-import { IJSCodeshift, INode } from "./types/NodePath";
+import { JSCodeshift, Node } from "./types/NodePath";
-interface IModule {
- (
- jscodeshift: IJSCodeshift,
- ast: INode,
- initOptions: string | boolean | object,
- action: string,
- transformName?: string,
- ): INode;
- default: transformType;
- parser: string;
+interface Module {
+ (
+ jscodeshift: JSCodeshift,
+ ast: Node,
+ initOptions: string | boolean | object,
+ action: string,
+ transformName?: string
+ ): Node;
+ default: transformType;
+ parser: string;
}
type transformType = (
- jscodeshift: IJSCodeshift,
- ast: INode,
- initOptions: string | boolean | object,
- action: object | string,
- transformName?: string,
-) => INode;
+ jscodeshift: JSCodeshift,
+ ast: Node,
+ initOptions: string | boolean | object,
+ action: object | string,
+ transformName?: string
+) => Node;
/**
* Utility function to run a jscodeshift script within a unit test.
@@ -48,54 +49,45 @@ type transformType = (
* @return {Function} Function that fires of the transforms
*/
function runSingleTransform(
- dirName: string,
- transformName: string,
- testFilePrefix: string,
- initOptions: object | boolean | string,
- action: object | string,
+ dirName: string,
+ transformName: string,
+ testFilePrefix: string,
+ initOptions: object | boolean | string,
+ action: object | string
): string {
- if (!testFilePrefix) {
- testFilePrefix = transformName;
- }
- const fixtureDir = path.join(
- dirName,
- "__tests__",
- "__testfixtures__",
- );
- const inputPath = path.join(fixtureDir, `${testFilePrefix}.input.js`);
- const source = fs.readFileSync(inputPath, "utf8");
+ if (!testFilePrefix) {
+ testFilePrefix = transformName;
+ }
+ const fixtureDir = path.join(dirName, "__tests__", "__testfixtures__");
+ const inputPath = path.join(fixtureDir, `${testFilePrefix}.input.js`);
+ const source = fs.readFileSync(inputPath, "utf8");
- let module: IModule;
- // Assumes transform and test are on the same level
- if (action) {
- module = require(path.join(dirName, "recursive-parser.ts"));
- } else {
- module = require(path.join(dirName, `${transformName}.ts`));
- }
- // Handle ES6 modules using default export for the transform
- const transform = module.default ? module.default : module;
+ let module: Module;
+ // Assumes transform and test are on the same level
+ if (action) {
+ module = require(path.join(dirName, "recursive-parser.ts"));
+ } else {
+ module = require(path.join(dirName, `${transformName}.ts`));
+ }
+ // Handle ES6 modules using default export for the transform
+ const transform = module.default ? module.default : module;
- // Jest resets the module registry after each test, so we need to always get
- // a fresh copy of jscodeshift on every test run.
- let jscodeshift: IJSCodeshift = require("jscodeshift/dist/core");
- if (module.parser) {
- jscodeshift = jscodeshift.withParser(module.parser);
- }
- const ast: INode = jscodeshift(source);
- if (initOptions || typeof initOptions === "boolean") {
- return transform(
- jscodeshift,
- ast,
- initOptions,
- action,
- transformName,
- ).toSource({
- quote: "single",
- });
- }
- return transform(jscodeshift, ast, source, action).toSource({
- quote: "single",
- });
+ // Jest resets the module registry after each test, so we need to always get
+ // a fresh copy of jscodeshift on every test run.
+ // eslint-disable-next-line
+ let jscodeshift: JSCodeshift = require("jscodeshift/dist/core");
+ if (module.parser) {
+ jscodeshift = jscodeshift.withParser(module.parser);
+ }
+ const ast: Node = jscodeshift(source);
+ if (initOptions || typeof initOptions === "boolean") {
+ return transform(jscodeshift, ast, initOptions, action, transformName).toSource({
+ quote: "single"
+ });
+ }
+ return transform(jscodeshift, ast, source, action).toSource({
+ quote: "single"
+ });
}
/**
@@ -116,19 +108,19 @@ function runSingleTransform(
* @return {Void} Jest makes sure to execute the globally defined functions
*/
export default function defineTest(
- dirName: string,
- transformName: string,
- testFilePrefix?: string,
- transformObject?: object | string,
- action?: object | string,
+ dirName: string,
+ transformName: string,
+ testFilePrefix?: string,
+ transformObject?: object | string,
+ action?: object | string
): void {
- const testName: string = testFilePrefix
- ? `transforms correctly using "${testFilePrefix}" data`
- : "transforms correctly";
- describe(transformName, () => {
- it(testName, () => {
- const output = runSingleTransform(dirName, transformName, testFilePrefix, transformObject, action);
- expect(output).toMatchSnapshot();
- });
- });
+ const testName: string = testFilePrefix
+ ? `transforms correctly using "${testFilePrefix}" data`
+ : "transforms correctly";
+ describe(transformName, () => {
+ it(testName, () => {
+ const output = runSingleTransform(dirName, transformName, testFilePrefix, transformObject, action);
+ expect(output).toMatchSnapshot();
+ });
+ });
}
diff --git a/packages/utils/modify-config-helper.ts b/packages/utils/modify-config-helper.ts
index 219a45ae5fe..5d25385c8c0 100644
--- a/packages/utils/modify-config-helper.ts
+++ b/packages/utils/modify-config-helper.ts
@@ -3,12 +3,12 @@ import * as fs from "fs";
import * as logSymbols from "log-symbols";
import * as path from "path";
import * as yeoman from "yeoman-environment";
-import Generator = require("yeoman-generator");
+import * as Generator from "yeoman-generator";
+
import runTransform from "./scaffold";
-import { IGenerator, IYeoman } from "./types/Yeoman";
-export interface IConfig extends Object {
+export interface Config extends Object {
item?: {
name: string;
};
@@ -18,10 +18,10 @@ export interface IConfig extends Object {
webpackOptions: object;
}
-export interface ITransformConfig extends Object {
+export interface TransformConfig extends Object {
configPath?: string;
configFile?: string;
- config?: IConfig;
+ config?: Config;
}
const DEFAULT_WEBPACK_CONFIG_FILENAME = "webpack.config.js";
@@ -40,11 +40,10 @@ const DEFAULT_WEBPACK_CONFIG_FILENAME = "webpack.config.js";
export default function modifyHelperUtil(
action: string,
- generator: IGenerator,
+ generator: typeof Generator,
configFile: string = DEFAULT_WEBPACK_CONFIG_FILENAME,
- packages?: string[])
- : Function {
-
+ packages?: string[]
+): typeof Generator {
let configPath: string | null = null;
if (action !== "init") {
@@ -57,7 +56,7 @@ export default function modifyHelperUtil(
chalk.green(" SUCCESS ") +
"Found config " +
chalk.cyan(configFile + "\n") +
- "\n",
+ "\n"
);
} else {
process.stdout.write(
@@ -65,10 +64,10 @@ export default function modifyHelperUtil(
logSymbols.error +
chalk.red(" ERROR ") +
chalk.cyan(configFile) +
- " not found. Please specify a valid path to your webpack config like " +
+ " not found. Please specify a valid path to your webpack config like \n " +
chalk.white("$ ") +
chalk.cyan(`webpack-cli ${action} webpack.dev.js`) +
- "\n",
+ "\n"
);
return;
}
@@ -79,58 +78,69 @@ export default function modifyHelperUtil(
if (!generator) {
generator = class extends Generator {
- public initializing() {
- packages.forEach((pkgPath: string) => {
- return (this as IGenerator).composeWith(require.resolve(pkgPath));
- });
+ public initializing(): void {
+ packages.forEach(
+ (pkgPath: string): Generator => {
+ return this.composeWith(require.resolve(pkgPath), {});
+ }
+ );
}
};
}
+
env.registerStub(generator, generatorName);
-
- env.run(generatorName).then((_: void) => {
- let configModule: object;
- try {
- const confPath = path.resolve(process.cwd(), ".yo-rc.json");
- configModule = require(confPath);
- // Change structure of the config to be transformed
- const tmpConfig: object = {};
- Object.keys(configModule).forEach((prop: string): void => {
- const configs = Object.keys(configModule[prop].configuration);
- configs.forEach((conf: string): void => {
- tmpConfig[conf] = configModule[prop].configuration[conf];
- });
- });
- configModule = tmpConfig;
- } catch (err) {
- console.error(
- chalk.red("\nCould not find a yeoman configuration file.\n"),
- );
- console.error(
- chalk.red(
- "\nPlease make sure to use 'this.config.set('configuration', this.configuration);' at the end of the generator.\n",
- ),
- );
- Error.stackTraceLimit = 0;
- process.exitCode = -1;
- }
- const transformConfig: ITransformConfig = Object.assign(
- {
- configFile: !configPath ? null : fs.readFileSync(configPath, "utf8"),
- configPath,
- },
- configModule,
- );
- return runTransform(transformConfig, action);
- }).catch((err) => {
- console.error(
- chalk.red(
- `
+ env.run(generatorName, {
+ configFile
+ }).then(
+ (): void => {
+ let configModule: object;
+ try {
+ const confPath = path.resolve(process.cwd(), ".yo-rc.json");
+ configModule = require(confPath);
+ // Change structure of the config to be transformed
+ const tmpConfig: object = {};
+ Object.keys(configModule).forEach(
+ (prop: string): void => {
+ const configs = Object.keys(configModule[prop].configuration);
+ configs.forEach(
+ (conf: string): void => {
+ tmpConfig[conf] = configModule[prop].configuration[conf];
+ }
+ );
+ }
+ );
+ configModule = tmpConfig;
+ } catch (err) {
+ console.error(chalk.red("\nCould not find a yeoman configuration file.\n"));
+ console.error(
+ chalk.red(
+ "\nPlease make sure to use 'this.config.set('configuration', this.configuration);' at the end of the generator.\n"
+ )
+ );
+ Error.stackTraceLimit = 0;
+ process.exitCode = -1;
+ }
+ const transformConfig: TransformConfig = Object.assign(
+ {
+ configFile: !configPath ? null : fs.readFileSync(configPath, "utf8"),
+ configPath
+ },
+ configModule
+ );
+ return runTransform(transformConfig, action);
+ }
+ )
+ .catch(
+ (err): void => {
+ console.error(
+ chalk.red(
+ `
Unexpected Error
please file an issue here https://github.com/webpack/webpack-cli/issues/new?template=Bug_report.md
- `,
- ),
+ `
+ )
+ );
+ console.error(err);
+ }
);
- console.error(err);
- });
}
diff --git a/packages/utils/npm-exists.ts b/packages/utils/npm-exists.ts
index 2abc29b40c3..0db70f11883 100644
--- a/packages/utils/npm-exists.ts
+++ b/packages/utils/npm-exists.ts
@@ -1,5 +1,7 @@
import * as got from "got";
+// TODO: to understand the type
+// eslint-disable-next-line
const constant = (value: boolean) => (res: got.Response): boolean | PromiseLike => value;
/**
@@ -11,11 +13,13 @@ const constant = (value: boolean) => (res: got.Response): boolean | Prom
* based on if it exists or not
*/
+// TODO: figure out the correct type here
+// eslint-disable-next-line
export default function npmExists(moduleName: string): Promise {
const hostname = "https://www.npmjs.org";
const pkgUrl = `${hostname}/package/${moduleName}`;
return got(pkgUrl, {
- method: "HEAD",
+ method: "HEAD"
})
.then(constant(true))
.catch(constant(false));
diff --git a/packages/utils/npm-packages-exists.ts b/packages/utils/npm-packages-exists.ts
index 2ad1d797510..7c0d441589e 100644
--- a/packages/utils/npm-packages-exists.ts
+++ b/packages/utils/npm-packages-exists.ts
@@ -18,46 +18,52 @@ const WEBPACK_SCAFFOLD_PREFIX = "webpack-scaffold";
export default function npmPackagesExists(pkg: string[]): void {
const acceptedPackages: string[] = [];
- function resolvePackagesIfReady() {
+ function resolvePackagesIfReady(): void | Function {
if (acceptedPackages.length === pkg.length) {
return resolvePackages(acceptedPackages);
}
}
- pkg.forEach((scaffold: string): void => {
- if (isLocalPath(scaffold)) {
- // If the scaffold is a path to a local folder, no name validation is necessary.
- acceptedPackages.push(scaffold);
- resolvePackagesIfReady();
- return;
- }
+ pkg.forEach(
+ (scaffold: string): void => {
+ if (isLocalPath(scaffold)) {
+ // If the scaffold is a path to a local folder, no name validation is necessary.
+ acceptedPackages.push(scaffold);
+ resolvePackagesIfReady();
+ return;
+ }
- // The scaffold is on npm; validate name and existence
- if (
- scaffold.length <= WEBPACK_SCAFFOLD_PREFIX.length ||
- scaffold.slice(0, WEBPACK_SCAFFOLD_PREFIX.length) !== WEBPACK_SCAFFOLD_PREFIX
- ) {
- throw new TypeError(
- chalk.bold(`${scaffold} isn't a valid name.\n`) +
- chalk.red(
- `\nIt should be prefixed with '${WEBPACK_SCAFFOLD_PREFIX}', but have different suffix.\n`,
- ),
- );
- }
+ // The scaffold is on npm; validate name and existence
+ if (
+ scaffold.length <= WEBPACK_SCAFFOLD_PREFIX.length ||
+ scaffold.slice(0, WEBPACK_SCAFFOLD_PREFIX.length) !== WEBPACK_SCAFFOLD_PREFIX
+ ) {
+ throw new TypeError(
+ chalk.bold(`${scaffold} isn't a valid name.\n`) +
+ chalk.red(
+ `\nIt should be prefixed with '${WEBPACK_SCAFFOLD_PREFIX}', but have different suffix.\n`
+ )
+ );
+ }
- npmExists(scaffold)
- .then((moduleExists: boolean) => {
- if (moduleExists) {
- acceptedPackages.push(scaffold);
- } else {
- Error.stackTraceLimit = 0;
- throw new TypeError(`Cannot resolve location of package ${scaffold}.`);
- }
- })
- .catch((err: IError) => {
- console.error(err.stack || err);
- process.exit(0);
- })
- .then(resolvePackagesIfReady);
- });
+ npmExists(scaffold)
+ .then(
+ (moduleExists: boolean): void => {
+ if (moduleExists) {
+ acceptedPackages.push(scaffold);
+ } else {
+ Error.stackTraceLimit = 0;
+ throw new TypeError(`Cannot resolve location of package ${scaffold}.`);
+ }
+ }
+ )
+ .catch(
+ (err: Error): void => {
+ console.error(err.stack || err);
+ process.exit(0);
+ }
+ )
+ .then(resolvePackagesIfReady);
+ }
+ );
}
diff --git a/packages/utils/package-lock.json b/packages/utils/package-lock.json
index 5c04b28b295..efe1c450fdd 100644
--- a/packages/utils/package-lock.json
+++ b/packages/utils/package-lock.json
@@ -75,6 +75,27 @@
"@types/node": "*"
}
},
+ "@types/inquirer": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-6.0.1.tgz",
+ "integrity": "sha512-O9rEHE9iBvYaFAGS0fAlDzqY/3CsOrRKzni4zwnAEce2JrHUEbXAce2Pwwe8ZGzmQkucwSXn1tSiKig37INgfA==",
+ "dev": true,
+ "requires": {
+ "@types/through": "*",
+ "rxjs": ">=6.4.0"
+ },
+ "dependencies": {
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ }
+ }
+ },
"@types/jest": {
"version": "23.3.11",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.11.tgz",
@@ -100,11 +121,41 @@
"dev": true
},
"@types/prettier": {
- "version": "1.15.2",
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.15.2.tgz",
- "integrity": "sha512-XIB0ZCaFZmWUHAa9dBqP5UKXXHwuukmVlP+XcyU94dui2k+l2lG+CHAbt2ffenHPUqoIs5Beh8Pdf2YEq/CZ7A==",
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.16.1.tgz",
+ "integrity": "sha512-db6pZL5QY3JrlCHBhYQzYDci0xnoDuxfseUuguLRr3JNk+bnCfpkK6p8quiUDyO8A0vbpBKkk59Fw125etrNeA==",
"dev": true
},
+ "@types/through": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.29.tgz",
+ "integrity": "sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/yeoman-generator": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-3.1.2.tgz",
+ "integrity": "sha512-Wr67yKgBKxKJ9eUNCL5WuKuc3e9CSCbdw8nMDiBatp+/NHgvriqUGjt5kbWBIfLG9yRdIKaxT4Tf8L+VVd7qSA==",
+ "dev": true,
+ "requires": {
+ "@types/inquirer": "*",
+ "rxjs": ">=6.4.0"
+ },
+ "dependencies": {
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ }
+ }
+ },
"abab": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
@@ -465,7 +516,7 @@
},
"array-equal": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM="
},
"array-union": {
@@ -569,7 +620,7 @@
},
"chalk": {
"version": "1.1.3",
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
@@ -581,7 +632,7 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
@@ -808,7 +859,7 @@
},
"babel-plugin-istanbul": {
"version": "4.1.6",
- "resolved": "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
"integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
"requires": {
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
@@ -869,7 +920,7 @@
},
"babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0",
- "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
},
"babel-plugin-syntax-trailing-function-commas": {
@@ -1619,7 +1670,7 @@
"dependencies": {
"colors": {
"version": "1.0.3",
- "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
}
}
@@ -2942,7 +2993,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2960,11 +3012,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2977,15 +3031,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -3088,7 +3145,8 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -3098,6 +3156,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -3110,17 +3169,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -3137,6 +3199,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -3209,7 +3272,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -3219,6 +3283,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -3294,7 +3359,8 @@
},
"safe-buffer": {
"version": "5.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -3324,6 +3390,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -3341,6 +3408,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -3379,11 +3447,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -3399,7 +3469,7 @@
},
"get-stream": {
"version": "3.0.0",
- "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-value": {
@@ -3872,7 +3942,7 @@
},
"into-stream": {
"version": "3.1.0",
- "resolved": "http://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
"integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=",
"requires": {
"from2": "^2.1.1",
@@ -3912,7 +3982,7 @@
},
"is-builtin-module": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "^1.0.0"
@@ -4395,7 +4465,7 @@
},
"jest-get-type": {
"version": "22.4.3",
- "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w=="
},
"jest-haste-map": {
@@ -4728,7 +4798,7 @@
},
"jsesc": {
"version": "1.3.0",
- "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
},
"json-buffer": {
@@ -4758,7 +4828,7 @@
},
"json5": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
},
"jsprim": {
@@ -4822,7 +4892,7 @@
},
"load-json-file": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "^4.1.2",
@@ -4834,7 +4904,7 @@
"dependencies": {
"pify": {
"version": "2.3.0",
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
@@ -5059,7 +5129,7 @@
},
"minimist": {
"version": "0.0.8",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mixin-deep": {
@@ -5083,7 +5153,7 @@
},
"mkdirp": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
@@ -5213,7 +5283,7 @@
},
"strip-ansi": {
"version": "0.1.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
"integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE="
}
}
@@ -5395,7 +5465,7 @@
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-locale": {
@@ -5410,12 +5480,12 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"p-cancelable": {
"version": "0.4.1",
- "resolved": "http://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
"integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ=="
},
"p-each-series": {
@@ -5433,7 +5503,7 @@
},
"p-is-promise": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
},
"p-limit": {
@@ -5516,7 +5586,7 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-key": {
@@ -5541,7 +5611,7 @@
"dependencies": {
"pify": {
"version": "2.3.0",
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
@@ -5595,9 +5665,9 @@
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks="
},
"prettier": {
- "version": "1.15.3",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz",
- "integrity": "sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg=="
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
+ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw=="
},
"pretty-bytes": {
"version": "5.1.0",
@@ -5661,7 +5731,7 @@
},
"query-string": {
"version": "5.1.1",
- "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
"integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
"requires": {
"decode-uri-component": "^0.2.0",
@@ -5747,7 +5817,7 @@
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
@@ -5832,7 +5902,7 @@
},
"regexpu-core": {
"version": "2.0.0",
- "resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
"integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
"requires": {
"regenerate": "^1.2.1",
@@ -5842,12 +5912,12 @@
},
"regjsgen": {
"version": "0.2.0",
- "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc="
},
"regjsparser": {
"version": "0.1.5",
- "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"requires": {
"jsesc": "~0.5.0"
@@ -5855,7 +5925,7 @@
"dependencies": {
"jsesc": {
"version": "0.5.0",
- "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0="
}
}
@@ -6049,7 +6119,7 @@
},
"safe-regex": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"requires": {
"ret": "~0.1.10"
@@ -6326,7 +6396,7 @@
},
"minimist": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
@@ -6711,7 +6781,7 @@
},
"strip-eof": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"supports-color": {
@@ -6729,7 +6799,7 @@
},
"temp": {
"version": "0.8.3",
- "resolved": "http://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
"integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
"requires": {
"os-tmpdir": "^1.0.0",
@@ -6738,7 +6808,7 @@
"dependencies": {
"rimraf": {
"version": "2.2.8",
- "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
}
}
@@ -6772,7 +6842,7 @@
},
"through": {
"version": "2.3.8",
- "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"through2": {
@@ -6919,7 +6989,7 @@
},
"underscore": {
"version": "1.6.0",
- "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag="
},
"union-value": {
@@ -7094,7 +7164,7 @@
"dependencies": {
"pify": {
"version": "2.3.0",
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
@@ -7126,7 +7196,7 @@
"dependencies": {
"minimist": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
@@ -7196,7 +7266,7 @@
},
"wrap-ansi": {
"version": "2.1.0",
- "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "^1.0.1",
@@ -7223,7 +7293,7 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
@@ -7276,7 +7346,7 @@
},
"yargs": {
"version": "11.1.0",
- "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz",
"integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==",
"requires": {
"cliui": "^4.0.0",
@@ -7408,7 +7478,7 @@
},
"minimist": {
"version": "1.2.0",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"ms": {
diff --git a/packages/utils/package-manager.ts b/packages/utils/package-manager.ts
index 0a48e062607..888b974ef18 100644
--- a/packages/utils/package-manager.ts
+++ b/packages/utils/package-manager.ts
@@ -4,16 +4,11 @@ import * as spawn from "cross-spawn";
import * as fs from "fs";
import * as path from "path";
-interface ISpawnFunctions {
+interface SpawnFunctions {
npm: (pkg: string, isNew: boolean) => SpawnSyncReturns;
yarn: (pkg: string, isNew: boolean) => SpawnSyncReturns;
}
-const SPAWN_FUNCTIONS: ISpawnFunctions = {
- npm: spawnNPM,
- yarn: spawnYarn,
-};
-
/**
*
* Spawns a new process using npm
@@ -25,7 +20,7 @@ const SPAWN_FUNCTIONS: ISpawnFunctions = {
function spawnNPM(pkg: string, isNew: boolean): SpawnSyncReturns {
return spawn.sync("npm", [isNew ? "install" : "update", "-g", pkg], {
- stdio: "inherit",
+ stdio: "inherit"
});
}
@@ -40,25 +35,14 @@ function spawnNPM(pkg: string, isNew: boolean): SpawnSyncReturns {
function spawnYarn(pkg: string, isNew: boolean): SpawnSyncReturns {
return spawn.sync("yarn", ["global", isNew ? "add" : "upgrade", pkg], {
- stdio: "inherit",
+ stdio: "inherit"
});
}
-/**
- *
- * Spawns a new process that installs the scaffold/dependency
- *
- * @param {String} pkg - The dependency to be installed
- * @returns {Function} spawn - Installs the package
- */
-
-export function spawnChild(pkg: string): SpawnSyncReturns {
- const rootPath: string = getPathToGlobalPackages();
- const pkgPath: string = path.resolve(rootPath, pkg);
- const packageManager: string = getPackageManager();
- const isNew: boolean = !fs.existsSync(pkgPath);
- return SPAWN_FUNCTIONS[packageManager](pkg, isNew);
-}
+const SPAWN_FUNCTIONS: SpawnFunctions = {
+ npm: spawnNPM,
+ yarn: spawnYarn
+};
/**
*
@@ -69,9 +53,7 @@ export function spawnChild(pkg: string): SpawnSyncReturns {
*/
export function getPackageManager(): string {
- const hasLocalNPM = fs.existsSync(
- path.resolve(process.cwd(), "package-lock.json"),
- );
+ const hasLocalNPM = fs.existsSync(path.resolve(process.cwd(), "package-lock.json"));
const hasLocalYarn = fs.existsSync(path.resolve(process.cwd(), "yarn.lock"));
if (hasLocalNPM) {
return "npm";
@@ -109,3 +91,18 @@ export function getPathToGlobalPackages(): string {
return require("global-modules");
}
+/**
+ *
+ * Spawns a new process that installs the scaffold/dependency
+ *
+ * @param {String} pkg - The dependency to be installed
+ * @returns {SpawnSyncReturns} spawn - Installs the package
+ */
+export function spawnChild(pkg: string): SpawnSyncReturns {
+ const rootPath: string = getPathToGlobalPackages();
+ const pkgPath: string = path.resolve(rootPath, pkg);
+ const packageManager: string = getPackageManager();
+ const isNew: boolean = !fs.existsSync(pkgPath);
+
+ return SPAWN_FUNCTIONS[packageManager](pkg, isNew);
+}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 512f289e354..f234ab8f8d1 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -19,7 +19,7 @@
"jscodeshift": "^0.5.1",
"log-symbols": "^2.2.0",
"p-each-series": "^1.0.0",
- "prettier": "^1.15.2",
+ "prettier": "^1.17.0",
"yeoman-environment": "^2.3.4",
"yeoman-generator": "^3.1.1"
},
@@ -31,7 +31,8 @@
"@types/log-symbols": "^2.0.0",
"@types/node": "^10.12.9",
"@types/p-each-series": "^1.0.0",
- "@types/prettier": "^1.15.0",
+ "@types/prettier": "^1.16.1",
+ "@types/yeoman-generator": "^3.1.2",
"typescript": "^3.1.6"
},
"scripts": {
diff --git a/packages/utils/recursive-parser.ts b/packages/utils/recursive-parser.ts
index f6c9f03b7eb..a6312798f5b 100644
--- a/packages/utils/recursive-parser.ts
+++ b/packages/utils/recursive-parser.ts
@@ -1,9 +1,13 @@
import * as utils from "./ast-utils";
-import { IJSCodeshift, INode, valueType } from "./types/NodePath";
+import { JSCodeshift, Node, valueType } from "./types/NodePath";
export default function recursiveTransform(
- j: IJSCodeshift, ast: INode, key: string, value: valueType, action: string,
-): boolean | INode {
+ j: JSCodeshift,
+ ast: Node,
+ key: string,
+ value: valueType,
+ action: string
+): boolean | Node {
if (key === "topScope") {
if (Array.isArray(value)) {
return utils.parseTopScope(j, ast, value, action);
@@ -15,46 +19,39 @@ export default function recursiveTransform(
return utils.parseMerge(j, ast, value, action);
}
}
- const node: INode = utils.findRootNodesByName(j, ast, key);
+ const node: Node = utils.findRootNodesByName(j, ast, key);
// get module.exports prop
const root = ast
.find(j.ObjectExpression)
- .filter((p: INode): boolean => {
- return (
- utils.safeTraverse(p, [
- "parentPath",
- "value",
- "left",
- "object",
- "name",
- ]) === "module" &&
- utils.safeTraverse(p, [
- "parentPath",
- "value",
- "left",
- "property",
- "name",
- ]) === "exports"
- );
- })
- .filter((p: INode): boolean => p.value.properties);
+ .filter(
+ (p: Node): boolean => {
+ return (
+ utils.safeTraverse(p, ["parentPath", "value", "left", "object", "name"]) === "module" &&
+ utils.safeTraverse(p, ["parentPath", "value", "left", "property", "name"]) === "exports"
+ );
+ }
+ )
+ .filter((p: Node): boolean => !!(p.value as Node).properties);
if (node.size() !== 0) {
if (action === "add") {
- return utils.findRootNodesByName(j, root, key)
- .forEach((p: INode) => {
+ return utils.findRootNodesByName(j, root, key).forEach(
+ (p: Node): void => {
j(p).replaceWith(utils.addProperty(j, p, key, value, action));
- });
+ }
+ );
} else if (action === "remove") {
return utils.removeProperty(j, root, key, value);
}
} else {
- return root.forEach((p: INode) => {
- if (value) {
- // init, add new property
- utils.addProperty(j, p, key, value, null);
+ return root.forEach(
+ (p: Node): void => {
+ if (value) {
+ // init, add new property
+ utils.addProperty(j, p, key, value, null);
+ }
}
- });
+ );
}
}
diff --git a/packages/utils/resolve-packages.ts b/packages/utils/resolve-packages.ts
index 9cfbc21fa32..9f7b2918f33 100644
--- a/packages/utils/resolve-packages.ts
+++ b/packages/utils/resolve-packages.ts
@@ -6,7 +6,7 @@ import { getPathToGlobalPackages } from "./package-manager";
import { spawnChild } from "./package-manager";
import { isLocalPath } from "./path-utils";
-interface IChildProcess {
+interface ChildProcess {
status: number;
}
@@ -18,14 +18,16 @@ interface IChildProcess {
* @returns {Promise} promise - Returns a promise to the installation
*/
-export function processPromise(child: IChildProcess): Promise {
- return new Promise((resolve: (_?: void) => void, reject: (_?: void) => void) => {
- if (child.status !== 0) {
- reject();
- } else {
- resolve();
+export function processPromise(child: ChildProcess): Promise {
+ return new Promise(
+ (resolve: () => void, reject: () => void): void => {
+ if (child.status !== 0) {
+ reject();
+ } else {
+ resolve();
+ }
}
- });
+ );
}
/**
@@ -48,46 +50,52 @@ export function resolvePackages(pkg: string[]): Function | void {
}
}
- pkg.forEach((scaffold: string) => {
- // Resolve paths to modules on local filesystem
- if (isLocalPath(scaffold)) {
- let absolutePath: string = scaffold;
-
- try {
- absolutePath = path.resolve(process.cwd(), scaffold);
- require.resolve(absolutePath);
- packageLocations.push(absolutePath);
- } catch (err) {
- console.error(`Cannot find a generator at ${absolutePath}.`);
- console.error("\nReason:\n");
- console.error(chalk.bold.red(err));
- process.exitCode = 1;
- }
-
- invokeGeneratorIfReady();
- return;
- }
+ pkg.forEach(
+ (scaffold: string): void => {
+ // Resolve paths to modules on local filesystem
+ if (isLocalPath(scaffold)) {
+ let absolutePath: string = scaffold;
- // Resolve modules on npm registry
- processPromise(spawnChild(scaffold))
- .then((_: void) => {
try {
- const globalPath: string = getPathToGlobalPackages();
- packageLocations.push(path.resolve(globalPath, scaffold));
+ absolutePath = path.resolve(process.cwd(), scaffold);
+ require.resolve(absolutePath);
+ packageLocations.push(absolutePath);
} catch (err) {
- console.error("Package wasn't validated correctly..");
- console.error("Submit an issue for", pkg, "if this persists");
- console.error("\nReason: \n");
+ console.error(`Cannot find a generator at ${absolutePath}.`);
+ console.error("\nReason:\n");
console.error(chalk.bold.red(err));
process.exitCode = 1;
}
- })
- .catch((err: string) => {
- console.error("Package couldn't be installed, aborting..");
- console.error("\nReason: \n");
- console.error(chalk.bold.red(err));
- process.exitCode = 1;
- })
- .then(invokeGeneratorIfReady);
- });
+
+ invokeGeneratorIfReady();
+ return;
+ }
+
+ // Resolve modules on npm registry
+ processPromise(spawnChild(scaffold))
+ .then(
+ (): void => {
+ try {
+ const globalPath: string = getPathToGlobalPackages();
+ packageLocations.push(path.resolve(globalPath, scaffold));
+ } catch (err) {
+ console.error("Package wasn't validated correctly..");
+ console.error("Submit an issue for", pkg, "if this persists");
+ console.error("\nReason: \n");
+ console.error(chalk.bold.red(err));
+ process.exitCode = 1;
+ }
+ }
+ )
+ .catch(
+ (err: string): void => {
+ console.error("Package couldn't be installed, aborting..");
+ console.error("\nReason: \n");
+ console.error(chalk.bold.red(err));
+ process.exitCode = 1;
+ }
+ )
+ .then(invokeGeneratorIfReady);
+ }
+ );
}
diff --git a/packages/utils/run-prettier.ts b/packages/utils/run-prettier.ts
index 794f86923b8..bf4980150d9 100644
--- a/packages/utils/run-prettier.ts
+++ b/packages/utils/run-prettier.ts
@@ -19,18 +19,17 @@ export default function runPrettier(outputPath: string, source: string, cb?: Fun
try {
prettySource = prettier.format(source, {
filepath: outputPath,
- parser: "babylon",
+ parser: "babel",
singleQuote: true,
tabWidth: 1,
useTabs: true,
});
} catch (err) {
process.stdout.write(
- "\n" +
- chalk.yellow(
- `WARNING: Could not apply prettier to ${outputPath}` +
- " due validation error, but the file has been created\n",
- ),
+ `\n${chalk.yellow(
+ `WARNING: Could not apply prettier to ${outputPath}` +
+ " due validation error, but the file has been created\n",
+ )}`,
);
prettySource = source;
error = err;
diff --git a/packages/utils/scaffold.ts b/packages/utils/scaffold.ts
index 637fdc5b83f..8da1fd7df79 100644
--- a/packages/utils/scaffold.ts
+++ b/packages/utils/scaffold.ts
@@ -4,12 +4,12 @@ import pEachSeries = require("p-each-series");
import * as path from "path";
import { findProjectRoot } from "./path-utils";
-import { IError } from "../init/types";
-import { IConfig, ITransformConfig } from "./modify-config-helper";
+import { Error } from "../init/types";
+import { Config, TransformConfig } from "./modify-config-helper";
import propTypes from "./prop-types";
import astTransform from "./recursive-parser";
import runPrettier from "./run-prettier";
-import { INode } from "./types/NodePath";
+import { Node } from "./types/NodePath";
/**
*
@@ -20,7 +20,7 @@ import { INode } from "./types/NodePath";
* @returns {Array} - An array with keys on which transformations need to be run
*/
-function mapOptionsToTransform(config: IConfig): string[] {
+function mapOptionsToTransform(config: Config): string[] {
return Object.keys(config.webpackOptions).filter((k: string): boolean => propTypes.has(k));
}
@@ -34,72 +34,71 @@ function mapOptionsToTransform(config: IConfig): string[] {
* and writes the file
*/
-export default function runTransform(transformConfig: ITransformConfig, action: string): void {
+export default function runTransform(transformConfig: TransformConfig, action: string): void {
// webpackOptions.name sent to nameTransform if match
- const webpackConfig = Object.keys(transformConfig).filter((p: string): boolean => {
- return p !== "configFile" && p !== "configPath";
- });
+ const webpackConfig = Object.keys(transformConfig).filter(
+ (p: string): boolean => {
+ return p !== "configFile" && p !== "configPath";
+ }
+ );
const initActionNotDefined = action && action !== "init" ? true : false;
- webpackConfig.forEach((scaffoldPiece: string) => {
- const config: IConfig = transformConfig[scaffoldPiece];
+ webpackConfig.forEach(
+ (scaffoldPiece: string): Promise => {
+ const config: Config = transformConfig[scaffoldPiece];
- const transformations = mapOptionsToTransform(config);
+ const transformations = mapOptionsToTransform(config);
- if (config.topScope && transformations.indexOf("topScope") === -1) {
- transformations.push("topScope");
- }
-
- if (config.merge) {
- transformations.push("merge");
- }
+ if (config.topScope && transformations.indexOf("topScope") === -1) {
+ transformations.push("topScope");
+ }
- const ast: INode = j(
- initActionNotDefined
- ? transformConfig.configFile
- : "module.exports = {}",
- );
+ if (config.merge) {
+ transformations.push("merge");
+ }
- const transformAction: string = action || null;
+ const ast: Node = j(initActionNotDefined ? transformConfig.configFile : "module.exports = {}");
- return pEachSeries(transformations, (f: string): boolean | INode => {
- if (f === "merge" || f === "topScope") {
- return astTransform(j, ast, f, config[f], transformAction);
- }
- return astTransform(j, ast, f, config.webpackOptions[f], transformAction);
- })
- .then((value: string[]): void | PromiseLike => {
- let configurationName: string;
- if (!config.configName) {
- configurationName = "webpack.config.js";
- } else {
- configurationName = "webpack." + config.configName + ".js";
- }
+ const transformAction: string = action || null;
- const projectRoot = findProjectRoot();
- const outputPath: string = initActionNotDefined
- ? transformConfig.configPath
- : path.join(projectRoot || process.cwd(), configurationName);
- const source: string = ast.toSource({
- quote: "single",
+ return pEachSeries(
+ transformations,
+ (f: string): boolean | Node => {
+ if (f === "merge" || f === "topScope") {
+ // TODO: typing here is difficult to understand
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return astTransform(j, ast, f, config[f] as any, transformAction);
+ }
+ return astTransform(j, ast, f, config.webpackOptions[f], transformAction);
+ })
+ .then((): void | PromiseLike => {
+ let configurationName: string;
+ if (!config.configName) {
+ configurationName = "webpack.config.js";
+ } else {
+ configurationName = "webpack." + config.configName + ".js";
+ }
+ const projectRoot = findProjectRoot();
+ const outputPath: string = initActionNotDefined
+ ? transformConfig.configPath
+ : path.join(projectRoot || process.cwd(), configurationName);
+ const source: string = ast.toSource({
+ quote: "single",
+ });
+ runPrettier(outputPath, source);
+ })
+ .catch((err: Error): void => {
+ console.error(err.message ? err.message : err);
});
- runPrettier(outputPath, source);
-
- })
- .catch((err: IError) => {
- console.error(err.message ? err.message : err);
- });
});
- let successMessage: string = `Congratulations! Your new webpack configuration file has been created!\n`;
+ let successMessage: string =
+ chalk.green(`Congratulations! Your new webpack configuration file has been created!\n\n`) +
+ `You can now run ${chalk.green("npm run start")} to run your project!\n\n`;
+
if (initActionNotDefined && transformConfig.config.item) {
- successMessage = `Congratulations! ${
+ successMessage = chalk.green(`Congratulations! ${
transformConfig.config.item
- } has been ${action}ed!\n`;
+ } has been ${action}ed!\n`);
}
- process.stdout.write(
- "\n" +
- chalk.green(
- successMessage,
- ),
- );
+ process.stdout.write(`\n${successMessage}`);
}
diff --git a/packages/utils/types/NodePath.ts b/packages/utils/types/NodePath.ts
index d082ddc6587..1b828378ddb 100644
--- a/packages/utils/types/NodePath.ts
+++ b/packages/utils/types/NodePath.ts
@@ -1,93 +1,99 @@
-export interface INode extends Object {
+export interface Node extends Object {
id?: {
name: string;
};
- arguments?: INode[];
- body?: INode[];
- elements?: INode[];
+ arguments?: Node[];
+ body?: Node[];
+ elements?: Node[];
expression?: {
left: {
- computed: boolean,
- object: INode,
- property: INode,
- type: string,
- },
- operator: string,
- right: INode,
- type: string,
+ computed: boolean;
+ object: Node;
+ property: Node;
+ type: string;
+ };
+ operator: string;
+ right: Node;
+ type: string;
+ value?: string;
};
- filter?: (p: (p: INode) => boolean) => INode;
- find?: (objectExpression: object, filterExpression?: object) => INode;
- forEach?: (p: (p: INode) => void) => INode;
- get?: (property: string) => INode;
- remove?: (_?: void) => void;
- nodes?: (_?: void) => INode[];
- pop?: (_?: void) => INode;
+ filter?: (p: (p: Node) => boolean) => Node;
+ find?: (objectExpression: object, filterExpression?: object) => Node;
+ forEach?: (p: (p: Node) => void) => Node;
+ get?: (property: string) => Node;
+ remove?: () => void;
+ nodes?: () => Node[];
+ pop?: () => Node;
key?: {
name: string;
- value: INode | string;
+ value: Node | string;
};
- node?: INode;
+ node?: Node;
name?: string;
object?: object;
- parent?: INode;
- properties?: INode[];
- property?: INode;
+ parent?: Node;
+ properties?: Node[];
+ property?: Node;
prune?: Function;
- replaceWith?: (objectExpression: object) => INode;
- size?: (_?: void) => number;
+ replaceWith?: (objectExpression: object) => Node;
+ size?: () => number;
type?: string;
- value?: INode | string | any;
- toSource?: (object: {
- quote?: string,
- }) => string;
+ value?: Node | string | Node[];
+ toSource?: (
+ object: {
+ quote?: string;
+ }
+ ) => string;
source?: string;
- ast?: INode;
- rules?: IModuleRule[];
- __paths?: INode[];
+ ast?: Node;
+ rules?: ModuleRule[];
+
+ declarations?: Node[];
+
+ __paths?: Node[];
}
-interface IModuleRule {
+interface ModuleRule {
loader?: string;
}
-interface IExpressionObject {
+interface ExpressionObject {
name?: string;
}
-export interface IJSCodeshift extends Object {
- (source?: INode | string): INode;
- withParser?: (parser: string) => IJSCodeshift;
- identifier?: (key: string) => INode;
- literal?: (key: valueType) => INode;
- memberExpression?: (node1: INode, node2: INode, bool?: boolean) => INode;
- objectProperty?: (key: INode, property: valueType) => INode;
- objectExpression?: (properties: INode[]) => INode;
- newExpression?: (expression: INode, args: INode[]) => INode;
- callExpression?: (expression: INode, args: INode[]) => INode;
- variableDeclarator?: (key: INode, args: INode) => INode;
- variableDeclaration?: (key: string, args: INode[]) => INode;
- arrayExpression?: (args?: INode[]) => INode;
- property?: (type: string, key: INode, value: INode) => INode;
- program?: (nodes: INode[]) => INode;
- booleanLiteral?: (bool: boolean) => INode;
- Property?: IExpressionObject;
- NewExpression?: IExpressionObject;
- CallExpression?: IExpressionObject;
- VariableDeclarator?: IExpressionObject;
- Identifier?: IExpressionObject;
- Literal?: IExpressionObject;
- ArrayExpression?: IExpressionObject;
- MemberExpression?: IExpressionObject;
- FunctionExpression?: IExpressionObject;
- ObjectExpression?: IExpressionObject;
- BlockStatement?: IExpressionObject;
- Program?: IExpressionObject;
+export interface JSCodeshift extends Object {
+ (source?: Node | string): Node;
+ withParser?: (parser: string) => JSCodeshift;
+ identifier?: (key: string) => Node;
+ literal?: (key: valueType) => Node;
+ memberExpression?: (node1: Node, node2: Node, bool?: boolean) => Node;
+ objectProperty?: (key: Node, property: valueType) => Node;
+ objectExpression?: (properties: Node[]) => Node;
+ newExpression?: (expression: Node, args: Node[]) => Node;
+ callExpression?: (expression: Node, args: Node[]) => Node;
+ variableDeclarator?: (key: Node, args: Node) => Node;
+ variableDeclaration?: (key: string, args: Node[]) => Node;
+ arrayExpression?: (args?: Node[]) => Node;
+ property?: (type: string, key: Node, value: Node) => Node;
+ program?: (nodes: Node[]) => Node;
+ booleanLiteral?: (bool: boolean) => Node;
+ Property?: ExpressionObject;
+ NewExpression?: ExpressionObject;
+ CallExpression?: ExpressionObject;
+ VariableDeclarator?: ExpressionObject;
+ Identifier?: ExpressionObject;
+ Literal?: ExpressionObject;
+ ArrayExpression?: ExpressionObject;
+ MemberExpression?: ExpressionObject;
+ FunctionExpression?: ExpressionObject;
+ ObjectExpression?: ExpressionObject;
+ BlockStatement?: ExpressionObject;
+ Program?: ExpressionObject;
filters?: {
VariableDeclarator: {
- requiresModule: Function,
- },
+ requiresModule: Function;
+ };
};
}
-export type valueType = string | number | boolean | any[] | INode | null;
+export type valueType = string | number | boolean | Node | null;
diff --git a/packages/utils/types/Yeoman.ts b/packages/utils/types/Yeoman.ts
deleted file mode 100644
index 4c56a771c00..00000000000
--- a/packages/utils/types/Yeoman.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-interface IRunEnv extends Object {
- on?: (event: string, callbackFn: Function) => void;
-}
-
-export interface IYeoman extends Object {
- registerStub?(generator: IGenerator, namespace: string): void;
- run?(target: string, options?: object, done?: Function): IRunEnv;
-}
-
-export interface IGenerator extends Object {
- composeWith?: (path: string) => void;
-}
diff --git a/packages/utils/types/index.ts b/packages/utils/types/index.ts
index fd94138d988..dba558d3ccf 100644
--- a/packages/utils/types/index.ts
+++ b/packages/utils/types/index.ts
@@ -1,4 +1,4 @@
-interface IError {
- stack?: object;
- message?: string;
+interface Error {
+ stack?: string;
+ message: string;
}
diff --git a/packages/utils/validate-identifier.ts b/packages/utils/validate-identifier.ts
index b3d0b155acf..272b01f364a 100644
--- a/packages/utils/validate-identifier.ts
+++ b/packages/utils/validate-identifier.ts
@@ -8,13 +8,7 @@ function isKeyword(code: string): boolean {
case 2:
return code === "if" || code === "in" || code === "do";
case 3:
- return (
- code === "var" ||
- code === "for" ||
- code === "new" ||
- code === "try" ||
- code === "let"
- );
+ return code === "var" || code === "for" || code === "new" || code === "try" || code === "let";
case 4:
return (
code === "this" ||
@@ -61,9 +55,7 @@ function isKeyword(code: string): boolean {
case 8:
return code === "function" || code === "continue" || code === "debugger";
case 9:
- return (
- code === "protected" || code === "interface" || code === "arguments"
- );
+ return code === "protected" || code === "interface" || code === "arguments";
case 10:
return code === "instanceof" || code === "implements";
default:
@@ -77,19 +69,13 @@ function isKeyword(code: string): boolean {
// are only applied when a character is found to actually have a
// code point above 128.
-/* tslint:disable: max-line-length */
let nonASCIIidentifierStartChars =
-"\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+ "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
let nonASCIIidentifierChars =
-"\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
-/* tslint:enable: max-line-length */
+ "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
-const nonASCIIidentifierStart: RegExp = new RegExp(
- "[" + nonASCIIidentifierStartChars + "]",
-);
-const nonASCIIidentifier: RegExp = new RegExp(
- "[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]",
-);
+const nonASCIIidentifierStart: RegExp = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier: RegExp = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
@@ -425,7 +411,7 @@ const astralIdentifierStartCodes = [
12,
221,
16355,
- 541,
+ 541
];
const astralIdentifierCodes = [
@@ -548,7 +534,7 @@ const astralIdentifierCodes = [
4305,
6,
792618,
- 239,
+ 239
];
// This has a complexity linear to the value of the code. The
@@ -558,10 +544,14 @@ function isInAstralSet(code: number, set: number[]): boolean {
let pos = 0x10000;
for (let i = 0; i < set.length; i += 2) {
pos += set[i];
- if (pos > code) { return false; }
+ if (pos > code) {
+ return false;
+ }
pos += set[i + 1];
- if (pos >= code) { return true; }
+ if (pos >= code) {
+ return true;
+ }
}
}
@@ -569,16 +559,49 @@ function isInAstralSet(code: number, set: number[]): boolean {
function isIdentifierStart(code: string): boolean {
const c: number = code.charCodeAt(0);
- if (c < 65) { return c === 36; }
- if (c < 91) { return true; }
- if (c < 97) { return c === 95; }
- if (c < 123) { return true; }
+ if (c < 65) {
+ return c === 36;
+ }
+ if (c < 91) {
+ return true;
+ }
+ if (c < 97) {
+ return c === 95;
+ }
+ if (c < 123) {
+ return true;
+ }
if (c <= 0xffff) {
return c >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(c));
}
return isInAstralSet(c, astralIdentifierStartCodes);
}
+function validationChar(charCode: number): boolean {
+ if (charCode < 48) {
+ return charCode === 36;
+ }
+ if (charCode < 58) {
+ return true;
+ }
+ if (charCode < 65) {
+ return false;
+ }
+ if (charCode < 91) {
+ return true;
+ }
+ if (charCode < 97) {
+ return charCode === 95;
+ }
+ if (charCode < 123) {
+ return true;
+ }
+ if (charCode <= 0xffff) {
+ return charCode >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(charCode));
+ }
+ return isInAstralSet(charCode, astralIdentifierStartCodes) || isInAstralSet(charCode, astralIdentifierCodes);
+}
+
// Test whether a given character is part of an identifier.
function isIdentifierChar(code: string): boolean {
@@ -595,24 +618,4 @@ function isIdentifierChar(code: string): boolean {
}
}
-function validationChar(charCode: number): boolean {
- if (charCode < 48) { return charCode === 36; }
- if (charCode < 58) { return true; }
- if (charCode < 65) { return false; }
- if (charCode < 91) { return true; }
- if (charCode < 97) { return charCode === 95; }
- if (charCode < 123) { return true; }
- if (charCode <= 0xffff) {
- return charCode >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(charCode));
- }
- return (
- isInAstralSet(charCode, astralIdentifierStartCodes) ||
- isInAstralSet(charCode, astralIdentifierCodes)
- );
-}
-
-export {
- isIdentifierChar,
- isIdentifierStart,
- isKeyword,
-};
+export { isIdentifierChar, isIdentifierStart, isKeyword };
diff --git a/packages/webpack-scaffold/.eslintrc b/packages/webpack-scaffold/.eslintrc
new file mode 100644
index 00000000000..365d9f85d71
--- /dev/null
+++ b/packages/webpack-scaffold/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "extends": [
+ "../../.eslintrc.js",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"]
+}
diff --git a/packages/webpack-scaffold/README.md b/packages/webpack-scaffold/README.md
index fcd01de288f..413c223a51a 100755
--- a/packages/webpack-scaffold/README.md
+++ b/packages/webpack-scaffold/README.md
@@ -1,6 +1,6 @@
# webpack-scaffold
-[![npm](https://img.shields.io/npm/dm/@webpack-cli/webpack-scaffold.svg)](https://www.npmjs.com/package/@webpack-cli/webpack-scaffold)
+[![NPM Downloads][downloads]][downloads-url]
This is the utility suite for creating a webpack `scaffold`, it contains utility functions to help you work with [Inquirer](https://github.com/SBoudrias/Inquirer.js/) prompting and scaffolding.
@@ -11,20 +11,24 @@ npm i -D webpack-cli @webpack-cli/webpack-scaffold
```
# API
-- [parseValue](#parsevalue)
-- [createArrowFunction](#createarrowfunction)
-- [createRegularFunction](#createregularfunction)
-- [createDynamicPromise](#createdynamicpromise)
-- [createAssetFilterFunction](#createassetfilterfunction)
-- [createExternalFunction](#createexternalfunction)
-- [createRequire](#createrequire)
-- [Inquirer](#inquirer)
- - [List](#list)
- - [RawList](#rawlist)
- - [CheckList](#checklist)
- - [Input](#input)
- - [InputValidate](#inputvalidate)
- - [Confirm](#confirm)
+
+- [webpack-scaffold](#webpack-scaffold)
+- [Installation](#installation)
+- [API](#api)
+ - [parseValue](#parsevalue)
+ - [createArrowFunction](#createarrowfunction)
+ - [createRegularFunction](#createregularfunction)
+ - [createDynamicPromise](#createdynamicpromise)
+ - [createAssetFilterFunction](#createassetfilterfunction)
+ - [createExternalFunction](#createexternalfunction)
+ - [createRequire](#createrequire)
+ - [Inquirer](#inquirer)
+ - [List](#list)
+ - [RawList](#rawlist)
+ - [CheckList](#checklist)
+ - [Input](#input)
+ - [InputValidate](#inputvalidate)
+ - [Confirm](#confirm)
## parseValue
@@ -33,9 +37,9 @@ Param: `String`
Used when you cannot use regular conventions. Handy for examples like `RegExp` or `output.sourcePrefix`
```js
-const parseValue = require('@webpack-cli/webpack-scaffold').parseValue;
+const parseValue = require("@webpack-cli/webpack-scaffold").parseValue;
-this.configuration.myScaffold.webpackOptions.output.sourcePrefix = parseValue('\t')
+this.configuration.myScaffold.webpackOptions.output.sourcePrefix = parseValue("\t");
// sourcePrefix: '\t'
```
@@ -46,9 +50,9 @@ Param: `String`
Generally used when dealing with an entry point as an arrow function
```js
-const createArrowFunction = require('@webpack-cli/webpack-scaffold').createArrowFunction;
+const createArrowFunction = require("@webpack-cli/webpack-scaffold").createArrowFunction;
-this.configuration.myScaffold.webpackOptions.entry = createArrowFunction('app.js')
+this.configuration.myScaffold.webpackOptions.entry = createArrowFunction("app.js");
// entry: () => 'app.js'
```
@@ -59,9 +63,9 @@ Param: `String`
Used when creating a function that returns a single value
```js
-const createRegularFunction = require('@webpack-cli/webpack-scaffold').createRegularFunction;
+const createRegularFunction = require("@webpack-cli/webpack-scaffold").createRegularFunction;
-this.configuration.myScaffold.webpackOptions.entry = createRegularFunction('app.js')
+this.configuration.myScaffold.webpackOptions.entry = createRegularFunction("app.js");
// entry: function() { return 'app.js' }
```
@@ -72,12 +76,12 @@ Param: `Array` | `String`
Used to create a dynamic entry point
```js
-const createDynamicPromise = require('@webpack-cli/webpack-scaffold').createDynamicPromise;
+const createDynamicPromise = require("@webpack-cli/webpack-scaffold").createDynamicPromise;
-this.confguration.myScaffold.webpackOptions.entry = createDynamicPromise('app.js')
+this.confguration.myScaffold.webpackOptions.entry = createDynamicPromise("app.js");
// entry: () => new Promise((resolve) => resolve('app.js'))
-this.configuration.myScaffold.webpackOptions.entry = createDynamicPromise(['app.js', 'index.js'])
+this.configuration.myScaffold.webpackOptions.entry = createDynamicPromise(["app.js", "index.js"]);
// entry: () => new Promise((resolve) => resolve(['app.js','index.js']))
```
@@ -88,9 +92,9 @@ Param: `String`
Used to create an [assetFilterFunction](https://webpack.js.org/configuration/performance/#performance-assetfilter)
```js
-const createAssetFilterFunction = require('@webpack-cli/webpack-scaffold').createAssetFilterFunction;
+const createAssetFilterFunction = require("@webpack-cli/webpack-scaffold").createAssetFilterFunction;
-this.configuration.myScaffold.webpackOptions.performance.assetFilter = createAssetFilterFunction('js')
+this.configuration.myScaffold.webpackOptions.performance.assetFilter = createAssetFilterFunction("js");
// assetFilter: function (assetFilename) { return assetFilename.endsWith('.js'); }
```
@@ -101,9 +105,9 @@ Param: `String`
Used to create an [general function from Externals](https://webpack.js.org/configuration/externals/#function)
```js
-const createExternalFunction = require('@webpack-cli/webpack-scaffold').createExternalFunction;
+const createExternalFunction = require("@webpack-cli/webpack-scaffold").createExternalFunction;
-this.configuration.myScaffold.webpackOptions.externals = [createExternalFunction('^yourregex$')]
+this.configuration.myScaffold.webpackOptions.externals = [createExternalFunction("^yourregex$")];
/*
externals: [
function(context, request, callback) {
@@ -122,9 +126,9 @@ Param: `String`
Used to create a module in `topScope`
```js
-const createRequire = require('@webpack-cli/webpack-scaffold').createRequire;
+const createRequire = require("@webpack-cli/webpack-scaffold").createRequire;
-this.configuration.myScaffold.topScope = [createRequire('webpack')]
+this.configuration.myScaffold.topScope = [createRequire("webpack")];
// const webpack = require('webpack')
```
@@ -137,21 +141,21 @@ Param: `name, message, choices`
Creates a List from Inquirer
```js
-const List = require('@webpack-cli/webpack-scaffold').List;
+const List = require("@webpack-cli/webpack-scaffold").List;
-List('entry', 'what kind of entry do you want?', ['Array', 'Function'])
+List("entry", "what kind of entry do you want?", ["Array", "Function"]);
```
-### RawList
+### RawList
Param: `name, message, choices`
Creates a RawList from Inquirer
```js
-const RawList = require('@webpack-cli/webpack-scaffold').RawList;
+const RawList = require("@webpack-cli/webpack-scaffold").RawList;
-RawList('entry', 'what kind of entry do you want?', ['Array', 'Function'])
+RawList("entry", "what kind of entry do you want?", ["Array", "Function"]);
```
### CheckList
@@ -161,50 +165,53 @@ Param: `name, message, choices`
Creates a CheckList(`checkbox`) from Inquirer
```js
-const CheckList = require('@webpack-cli/webpack-scaffold').CheckList;
+const CheckList = require("@webpack-cli/webpack-scaffold").CheckList;
-CheckList('entry', 'what kind of entry do you want?', ['Array', 'Function'])
+CheckList("entry", "what kind of entry do you want?", ["Array", "Function"]);
```
-### Input
+### Input
-Param: `name, message`
+Param: `name, message, [default]`
Creates an Input from Inquirer
```js
-const Input = require('@webpack-cli/webpack-scaffold').Input;
+const Input = require("@webpack-cli/webpack-scaffold").Input;
-Input('entry', 'what is your entry point?')
+Input("entry", "what is your entry point?", "src/index");
```
### InputValidate
-Param: `name, message, validate`
+Param: `name, message, [validate, default]`
Creates an Input from Inquirer
```js
-const InputValidate = require('@webpack-cli/webpack-scaffold').InputValidate;
-
-const validation = (value) => {
- if(value.length > 4) {
- return true;
- } else {
- return 'Wow, that was short!'
- }
-}
-InputValidate('entry', 'what is your entry point?', validation)
+const InputValidate = require("@webpack-cli/webpack-scaffold").InputValidate;
+
+const validation = value => {
+ if (value.length > 4) {
+ return true;
+ } else {
+ return "Your answer must be longer than 4 characters, try again";
+ }
+};
+InputValidate("entry", "what is your entry point?", validation, "src/index");
```
### Confirm
-Param: `name, message, default`
+Param: `name, message, [default]`
Creates an Input from Inquirer
```js
-const Confirm = require('@webpack-cli/webpack-scaffold').Confirm;
+const Confirm = require("@webpack-cli/webpack-scaffold").Confirm;
-Confirm('contextConfirm', 'Is this your context?')
+Confirm("contextConfirm", "Is this your context?");
```
+
+[downloads]: https://img.shields.io/npm/dm/@webpack-cli/webpack-scaffold.svg
+[downloads-url]: https://www.npmjs.com/package/@webpack-cli/webpack-scaffold
diff --git a/packages/webpack-scaffold/__tests__/.eslintrc b/packages/webpack-scaffold/__tests__/.eslintrc
new file mode 100644
index 00000000000..5d4340a351d
--- /dev/null
+++ b/packages/webpack-scaffold/__tests__/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "root": true,
+ "extends": ["../.eslintrc"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["off"]
+ }
+}
diff --git a/packages/webpack-scaffold/__tests__/__snapshots__/index.test.ts.snap b/packages/webpack-scaffold/__tests__/__snapshots__/index.test.ts.snap
index 0304203ef64..2bb1ed2117f 100755
--- a/packages/webpack-scaffold/__tests__/__snapshots__/index.test.ts.snap
+++ b/packages/webpack-scaffold/__tests__/__snapshots__/index.test.ts.snap
@@ -9,6 +9,16 @@ Object {
}
`;
+exports[`utils Inquirer should make an Input object with validation and default value 1`] = `
+Object {
+ "default": "my-plugin",
+ "message": "what is your plugin?",
+ "name": "plugins",
+ "type": "input",
+ "validate": [Function],
+}
+`;
+
exports[`utils createArrowFunction should stringify an arrow function 1`] = `"() => 'app.js'"`;
exports[`utils createAssetFilterFunction should stringify an assetFilterFunction 1`] = `
diff --git a/packages/webpack-scaffold/__tests__/index.test.ts b/packages/webpack-scaffold/__tests__/index.test.ts
index 0db475e179a..2d0ccef8582 100755
--- a/packages/webpack-scaffold/__tests__/index.test.ts
+++ b/packages/webpack-scaffold/__tests__/index.test.ts
@@ -81,6 +81,14 @@ describe("utils", () => {
type: "input",
});
});
+ it("should make an Input object", () => {
+ expect(utils.Input("plugins", "what is your plugin?", "my-plugin")).toEqual({
+ default: "my-plugin",
+ message: "what is your plugin?",
+ name: "plugins",
+ type: "input",
+ });
+ });
it("should make a Confirm object", () => {
expect(utils.Confirm("context", "what is your context?")).toEqual({
default: true,
@@ -102,5 +110,10 @@ describe("utils", () => {
utils.InputValidate("plugins", "what is your plugin?", () => true),
).toMatchSnapshot();
});
+ it("should make an Input object with validation and default value", () => {
+ expect(
+ utils.InputValidate("plugins", "what is your plugin?", () => true, "my-plugin"),
+ ).toMatchSnapshot();
+ });
});
});
diff --git a/packages/webpack-scaffold/index.ts b/packages/webpack-scaffold/index.ts
index e666071046d..6c609b8e522 100755
--- a/packages/webpack-scaffold/index.ts
+++ b/packages/webpack-scaffold/index.ts
@@ -1,25 +1,5 @@
import * as jscodeshift from "jscodeshift";
-
-export interface IInquirerScaffoldObject {
- type?: string;
- name: string;
- message: string;
- choices?: ((answers: Object) => string) | string[];
- default?: string | number | boolean | string[] | number[]
- | ((answers: Object) => (string | number | boolean | string[] | number[]));
- validate?: ((input: string) => boolean | string);
- when?: ((answers: Object) => boolean) | boolean;
- store?: boolean;
- filter?: (name: string) => string;
-}
-
-export interface IInquirerList extends IInquirerScaffoldObject {
- choices?: string[];
-}
-
-export interface IInquirerInput extends IInquirerScaffoldObject {
- validate?: (input: string) => string | boolean;
-}
+import * as Generator from "yeoman-generator";
export function createArrowFunction(value: string): string {
return `() => '${value}'`;
@@ -33,9 +13,11 @@ export function createDynamicPromise(arrOrString: string[] | string): string {
if (Array.isArray(arrOrString)) {
return (
"() => new Promise((resolve) => resolve([" +
- arrOrString.map((func: string): string => {
- return "'" + func + "'";
- }) +
+ arrOrString.map(
+ (func: string): string => {
+ return "'" + func + "'";
+ }
+ ) +
"]))"
);
} else {
@@ -67,63 +49,76 @@ export function createRequire(val: string): string {
return `const ${val} = require('${val}');`;
}
-export function List(name: string, message: string, choices: string[]): IInquirerList {
+export function List(name: string, message: string, choices: string[]): Generator.Question {
return {
choices,
message,
name,
- type: "list",
+ type: "list"
};
}
-export function RawList(name: string, message: string, choices: string[]): IInquirerList {
+export function RawList(name: string, message: string, choices: string[]): Generator.Question {
return {
choices,
message,
name,
- type: "rawlist",
+ type: "rawlist"
};
}
-export function CheckList(name: string, message: string, choices: string[]): IInquirerList {
+export function CheckList(name: string, message: string, choices: string[]): Generator.Question {
return {
choices,
message,
name,
- type: "checkbox",
+ type: "checkbox"
};
}
-export function Input(name: string, message: string): IInquirerInput {
+export function Input(name: string, message: string, defaultChoice?: string): Generator.Question {
return {
+ default: defaultChoice,
message,
name,
- type: "input",
+ type: "input"
};
}
-export function InputValidate(name: string, message: string, cb?: (input: string) => string | boolean): IInquirerInput {
- return {
+export function InputValidate(
+ name: string,
+ message: string,
+ cb?: (input: string) => string | boolean,
+ defaultChoice?: string,
+ ): Generator.Question {
+ const input: Generator.Question = {
message,
name,
type: "input",
- validate: cb,
+ validate: cb
};
+ if (defaultChoice) input.default = defaultChoice;
+ return input;
}
-export function Confirm(name: string, message: string, defaultChoice: boolean = true): IInquirerScaffoldObject {
+export function Confirm(name: string, message: string, defaultChoice: boolean = true): Generator.Question {
return {
default: defaultChoice,
message,
name,
- type: "confirm",
+ type: "confirm"
};
}
-export function AutoComplete(name: string, message: string, options: object = {}) {
- return Object.assign({
- message,
- name,
- type: "autocomplete",
- }, options);
+// TODO: to understand this type
+// eslint-disable-next-line
+export function AutoComplete(name: string, message: string, options: object = {}): any {
+ return Object.assign(
+ {
+ message,
+ name,
+ type: "autocomplete"
+ },
+ options
+ );
}
diff --git a/packages/webpack-scaffold/package-lock.json b/packages/webpack-scaffold/package-lock.json
index 9ef7540efc7..825247992d0 100644
--- a/packages/webpack-scaffold/package-lock.json
+++ b/packages/webpack-scaffold/package-lock.json
@@ -1,9 +1,44 @@
{
"name": "@webpack-cli/webpack-scaffold",
- "version": "0.1.3",
+ "version": "0.1.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@types/inquirer": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-6.0.1.tgz",
+ "integrity": "sha512-O9rEHE9iBvYaFAGS0fAlDzqY/3CsOrRKzni4zwnAEce2JrHUEbXAce2Pwwe8ZGzmQkucwSXn1tSiKig37INgfA==",
+ "dev": true,
+ "requires": {
+ "@types/through": "*",
+ "rxjs": ">=6.4.0"
+ }
+ },
+ "@types/node": {
+ "version": "11.13.8",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.8.tgz",
+ "integrity": "sha512-szA3x/3miL90ZJxUCzx9haNbK5/zmPieGraZEe4WI+3srN0eGLiT22NXeMHmyhNEopn+IrxqMc7wdVwvPl8meg==",
+ "dev": true
+ },
+ "@types/through": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.29.tgz",
+ "integrity": "sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/yeoman-generator": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-3.1.2.tgz",
+ "integrity": "sha512-Wr67yKgBKxKJ9eUNCL5WuKuc3e9CSCbdw8nMDiBatp+/NHgvriqUGjt5kbWBIfLG9yRdIKaxT4Tf8L+VVd7qSA==",
+ "dev": true,
+ "requires": {
+ "@types/inquirer": "*",
+ "rxjs": ">=6.4.0"
+ }
+ },
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -97,7 +132,7 @@
"dependencies": {
"jsesc": {
"version": "1.3.0",
- "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
}
}
@@ -883,7 +918,7 @@
},
"expand-range": {
"version": "1.8.2",
- "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"requires": {
"fill-range": "^2.1.0"
@@ -1098,12 +1133,12 @@
},
"jsesc": {
"version": "0.5.0",
- "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0="
},
"json5": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
},
"kind-of": {
@@ -1162,12 +1197,12 @@
},
"minimist": {
"version": "0.0.8",
- "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
@@ -1214,7 +1249,7 @@
},
"strip-ansi": {
"version": "0.1.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
"integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE="
}
}
@@ -1243,12 +1278,12 @@
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"parse-glob": {
@@ -1264,7 +1299,7 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"preserve": {
@@ -1347,7 +1382,7 @@
},
"regexpu-core": {
"version": "2.0.0",
- "resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
"integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
"requires": {
"regenerate": "^1.2.1",
@@ -1357,12 +1392,12 @@
},
"regjsgen": {
"version": "0.2.0",
- "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc="
},
"regjsparser": {
"version": "0.1.5",
- "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"requires": {
"jsesc": "~0.5.0"
@@ -1393,9 +1428,18 @@
},
"rimraf": {
"version": "2.2.8",
- "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
},
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -1426,7 +1470,7 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
@@ -1434,12 +1478,12 @@
},
"supports-color": {
"version": "2.0.0",
- "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"temp": {
"version": "0.8.3",
- "resolved": "http://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
"integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
"requires": {
"os-tmpdir": "^1.0.0",
@@ -1456,6 +1500,12 @@
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
+ "tslib": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
+ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
+ "dev": true
+ },
"typescript": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz",
@@ -1464,7 +1514,7 @@
},
"underscore": {
"version": "1.6.0",
- "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag="
},
"write-file-atomic": {
diff --git a/packages/webpack-scaffold/package.json b/packages/webpack-scaffold/package.json
index a23ecb5b273..26096b56a7c 100644
--- a/packages/webpack-scaffold/package.json
+++ b/packages/webpack-scaffold/package.json
@@ -13,6 +13,7 @@
"jscodeshift": "^0.5.1"
},
"devDependencies": {
+ "@types/yeoman-generator": "^3.1.2",
"typescript": "^3.1.6"
},
"scripts": {
diff --git a/tsconfig.base.json b/tsconfig.base.json
index d92fae8bb6a..dc260d82933 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -4,7 +4,8 @@
"module": "commonjs",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
- "skipLibCheck": true
+ "skipLibCheck": true,
+ "resolveJsonModule": true,
},
"include": ["packages/**/*.ts"],
"exclude": [
diff --git a/tsconfig.packages.json b/tsconfig.packages.json
index 87eae9c0e2a..3f4af061bd6 100644
--- a/tsconfig.packages.json
+++ b/tsconfig.packages.json
@@ -1,5 +1,5 @@
{
- "extends": "tsconfig.base.json",
+ "extends": "./tsconfig.base.json",
"compilerOptions": {
"declaration": true
}
diff --git a/tslint.json b/tslint.json
deleted file mode 100644
index ee672ce2d93..00000000000
--- a/tslint.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "defaultSeverity": "error",
- "extends": [
- "tslint:recommended"
- ],
- "jsRules": {},
- "rules": {
- "indent": [
- true,
- "tabs",
- 4
- ],
- "ban-types": [
- false
- ],
- "no-console": [true, "log"]
- },
- "rulesDirectory": [],
- "linterOptions": {
- "exclude": [
- "node_modules/**",
- "packages/*/node_modules/**"
- ]
- }
-}