diff --git a/.eslintrc.js b/.eslintrc.js index 6cd6d03..0b93eda 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,13 +1,16 @@ -const Neutrino = require('./packages/neutrino'); +const { Neutrino } = require('./packages/neutrino'); const airbnb = require('./packages/neutrino-preset-airbnb-base'); -const api = new Neutrino(); +const api = Neutrino(); api.use(airbnb, { eslint: { node: true, plugins: ['eslint-plugin-prettier'], rules: { + // Algebraic and functional types should allow capital constructors without new + 'babel/new-cap': 'off', + // Disable necessitating return after a callback 'callback-return': 'off', @@ -63,9 +66,15 @@ api.use(airbnb, { // Restrict usage of specified node modules 'no-restricted-modules': 'off', + // Allow return assign + 'no-return-assign': 'off', + // Allowing shadowing variable that share the same context as the outer scope 'no-shadow': 'off', + // It makes sense to have unused expressions to avoid imperative conditionals + 'no-unused-expressions': 'off', + // Allow use of synchronous methods (off by default) 'no-sync': 'off', diff --git a/.travis.yml b/.travis.yml index 57ca713..a755348 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ cache: - packages/neutrino-middleware-loader-merge/node_modules - packages/neutrino-middleware-minify/node_modules - packages/neutrino-middleware-named-modules/node_modules - - packages/neutrino-middleware-progress/node_modules - packages/neutrino-middleware-start-server/node_modules - packages/neutrino-middleware-style-loader/node_modules - packages/neutrino-preset-airbnb-base/node_modules diff --git a/docs/middleware/neutrino-middleware-progress/README.md b/docs/middleware/neutrino-middleware-progress/README.md deleted file mode 100644 index 4fc0478..0000000 --- a/docs/middleware/neutrino-middleware-progress/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Neutrino Progress Middleware -[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Join Slack][slack-image]][slack-url] - -`neutrino-middleware-progress` is Neutrino middleware for displaying a progress bar showing the progress of a build. - -## Requirements - -- Node.js v6.9+ -- Yarn or npm client -- Neutrino v5 - -## Installation - -`neutrino-middleware-progress` can be installed via the Yarn or npm clients. - -#### Yarn - -```bash -❯ yarn add neutrino-middleware-progress -``` - -#### npm - -```bash -❯ npm install --save neutrino-middleware-progress -``` - -## Usage - -`neutrino-middleware-progress` can be consumed from the Neutrino API, middleware, or presets. Require this package -and plug it into Neutrino: - -```js -const progress = require('neutrino-middleware-progress'); - -neutrino.use(progress); -``` - -## Customization - -`neutrino-middleware-progress` creates some conventions to make overriding the configuration easier once you are ready to -make changes. - -### Plugins - -The following is a list of plugins and their identifiers which can be overridden: - -- `progress`: Displays a bar showing progression of build. - -## Contributing - -This preset is part of the [neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev) repository, a monorepo -containing all resources for developing Neutrino and its core presets. Follow the -[contributing guide](../../contributing/README.md) for details. - -[npm-image]: https://img.shields.io/npm/v/neutrino-middleware-progress.svg -[npm-downloads]: https://img.shields.io/npm/dt/neutrino-middleware-progress.svg -[npm-url]: https://npmjs.org/package/neutrino-middleware-progress -[slack-image]: https://neutrino-slack.herokuapp.com/badge.svg -[slack-url]: https://neutrino-slack.herokuapp.com/ diff --git a/packages/neutrino-middleware-clean/index.js b/packages/neutrino-middleware-clean/index.js index 2daaeeb..3b8753e 100644 --- a/packages/neutrino-middleware-clean/index.js +++ b/packages/neutrino-middleware-clean/index.js @@ -6,5 +6,5 @@ module.exports = (neutrino, options) => { neutrino.config .plugin('clean') - .use(CleanPlugin, [paths, { root }]); + .use(CleanPlugin, [paths, { root, verbose: false }]); }; diff --git a/packages/neutrino-middleware-progress/README.md b/packages/neutrino-middleware-progress/README.md deleted file mode 100644 index 1283ade..0000000 --- a/packages/neutrino-middleware-progress/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Neutrino Progress Middleware -[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Join Slack][slack-image]][slack-url] - -`neutrino-middleware-progress` is Neutrino middleware for displaying a progress bar showing the progress of a build. - -## Requirements - -- Node.js v6.9+ -- Yarn or npm client -- Neutrino v5 - -## Installation - -`neutrino-middleware-progress` can be installed via the Yarn or npm clients. - -#### Yarn - -```bash -❯ yarn add neutrino-middleware-progress -``` - -#### npm - -```bash -❯ npm install --save neutrino-middleware-progress -``` - -## Usage - -`neutrino-middleware-progress` can be consumed from the Neutrino API, middleware, or presets. Require this package -and plug it into Neutrino: - -```js -const progress = require('neutrino-middleware-progress'); - -neutrino.use(progress); -``` - -## Customization - -`neutrino-middleware-progress` creates some conventions to make overriding the configuration easier once you are ready to -make changes. - -### Plugins - -The following is a list of plugins and their identifiers which can be overridden: - -- `progress`: Displays a bar showing progression of build. - -## Contributing - -This preset is part of the [neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev) repository, a monorepo -containing all resources for developing Neutrino and its core presets. Follow the -[contributing guide](https://neutrino.js.org/contributing) for details. - -[npm-image]: https://img.shields.io/npm/v/neutrino-middleware-progress.svg -[npm-downloads]: https://img.shields.io/npm/dt/neutrino-middleware-progress.svg -[npm-url]: https://npmjs.org/package/neutrino-middleware-progress -[slack-image]: https://neutrino-slack.herokuapp.com/badge.svg -[slack-url]: https://neutrino-slack.herokuapp.com/ diff --git a/packages/neutrino-middleware-progress/index.js b/packages/neutrino-middleware-progress/index.js deleted file mode 100644 index 25240e8..0000000 --- a/packages/neutrino-middleware-progress/index.js +++ /dev/null @@ -1,3 +0,0 @@ -const ProgressBarPlugin = require('progress-bar-webpack-plugin'); - -module.exports = ({ config }) => config.plugin('progress').use(ProgressBarPlugin); diff --git a/packages/neutrino-middleware-progress/package.json b/packages/neutrino-middleware-progress/package.json deleted file mode 100644 index 80f1483..0000000 --- a/packages/neutrino-middleware-progress/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "neutrino-middleware-progress", - "version": "5.0.0", - "description": "Neutrino middleware for displaying a progress bar during compilation", - "main": "index.js", - "keywords": [ - "neutrino", - "neutrino-middleware", - "progress", - "bar" - ], - "author": "Eli Perelman ", - "license": "MPL-2.0", - "repository": "https://github.com/mozilla-neutrino/neutrino-dev/tree/master/packages/neutrino-middleware-progress", - "homepage": "https://neutrino.js.org", - "bugs": "https://github.com/mozilla-neutrino/neutrino-dev/issues", - "dependencies": { - "progress-bar-webpack-plugin": "^1.9.3" - }, - "devDependencies": { - "webpack": "^2.2.1" - }, - "peerDependencies": { - "neutrino": "^5.0.0" - } -} diff --git a/packages/neutrino-middleware-progress/yarn.lock b/packages/neutrino-middleware-progress/yarn.lock deleted file mode 100644 index b5772ee..0000000 --- a/packages/neutrino-middleware-progress/yarn.lock +++ /dev/null @@ -1,1765 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -abbrev@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" - -acorn-dynamic-import@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - dependencies: - acorn "^4.0.3" - -acorn@^4.0.3, acorn@^4.0.4: - version "4.0.11" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" - -ajv-keywords@^1.1.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - -ajv@^4.7.0, ajv@^4.9.1: - version "4.11.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.4.tgz#ebf3a55d4b132ea60ff5847ae85d2ef069960b45" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" - dependencies: - arrify "^1.0.0" - micromatch "^2.1.5" - -aproba@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" - -are-we-there-yet@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.0 || ^1.1.13" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asn1.js@^4.0.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async@^2.1.2: - version "2.1.5" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" - -binary-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" - dependencies: - buffer-xor "^1.0.2" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - inherits "^2.0.1" - -browserify-cipher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.0.tgz#10773910c3c206d5420a46aad8694f820b85968f" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -buffer-shims@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - -buffer-xor@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chokidar@^1.4.3: - version "1.6.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" - dependencies: - inherits "^2.0.1" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -create-ecdh@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - ripemd160 "^1.0.0" - sha.js "^2.3.6" - -create-hmac@^1.1.0, create-hmac@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170" - dependencies: - create-hash "^1.1.0" - inherits "^2.0.1" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -crypto-browserify@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - -decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-extend@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -diffie-hellman@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -enhanced-resolve@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.5" - -errno@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - -error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -evp_bytestokey@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" - dependencies: - create-hash "^1.1.1" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" - -filename-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.29" - -fstream-ignore@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" - -gauge@~2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" - dependencies: - inherits "^2.0.1" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hmac-drbg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.0.tgz#3db471f45aae4a994a0688322171f51b8b91bee5" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hosted-git-info@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.2.0.tgz#7a0d097863d886c0fabbdcd37bf1758d8becf8a5" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -interpret@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.0.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.0.2, is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -json-loader@^0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" - dependencies: - extsprintf "1.0.2" - json-schema "0.2.3" - verror "1.3.6" - -kind-of@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" - dependencies: - is-buffer "^1.0.2" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" - -loader-utils@^0.2.16: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -lodash@^4.14.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -memory-fs@^0.4.0, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -miller-rabin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@~1.26.0: - version "1.26.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" - -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" - dependencies: - mime-db "~1.26.0" - -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - -minimatch@^3.0.0, minimatch@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -"mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -nan@^2.3.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" - -node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-pre-gyp@^0.6.29: - version "0.6.33" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz#640ac55198f6a925972e0c16c4ac26a034d5ecc9" - dependencies: - mkdirp "~0.5.1" - nopt "~3.0.6" - npmlog "^4.0.1" - rc "~1.1.6" - request "^2.79.0" - rimraf "~2.5.4" - semver "~5.3.0" - tar "~2.2.1" - tar-pack "~3.3.0" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" - -npmlog@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.1" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-keys@^1.0.10, object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object.assign@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.0" - object-keys "^1.0.10" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -once@^1.3.0, once@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -parse-asn1@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.0.0.tgz#35060f6d5015d37628c770f4e091a0b5a278bc23" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.9" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" - dependencies: - create-hmac "^1.1.2" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -process@^0.11.0: - version "0.11.9" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" - -progress-bar-webpack-plugin@^1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/progress-bar-webpack-plugin/-/progress-bar-webpack-plugin-1.9.3.tgz#81fb8bd8e38da6edaf9a20beed79bd978dd63c2a" - dependencies: - chalk "^1.1.1" - object.assign "^4.0.1" - progress "^1.1.8" - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - -public-encrypt@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -qs@~6.3.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -randomatic@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" - dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" - -randombytes@^2.0.0, randombytes@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" - -rc@~1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.3.tgz#9cf49463985df016c8ae8813097a9293a9b33729" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" - dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -request@^2.79.0: - version "2.80.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.80.0.tgz#8cc162d76d79381cdefdd3505d76b80b60589bd0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.0" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" - dependencies: - glob "^7.0.5" - -ripemd160@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" - -"semver@2 || 3 || 4 || 5", semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -sha.js@^2.3.6: - version "2.4.8" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" - dependencies: - inherits "^2.0.1" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - -source-map@^0.5.3, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -sshpk@^1.7.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.6.3.tgz#4c3ddbf9635968ea2cfd4e48d43de5def2625ac3" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.1.0" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -tapable@^0.2.5, tapable@~0.2.5: - version "0.2.6" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d" - -tar-pack@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" - dependencies: - debug "~2.2.0" - fstream "~1.0.10" - fstream-ignore "~1.0.5" - once "~1.3.3" - readable-stream "~2.1.4" - rimraf "~2.5.1" - tar "~2.2.1" - uid-number "~0.0.6" - -tar@~2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -timers-browserify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -uglify-js@^2.7.5: - version "2.8.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.9.tgz#01194b91cc0795214093c05594ef5ac1e0b2e900" - dependencies: - source-map "~0.5.1" - uglify-to-browserify "~1.0.0" - yargs "~3.10.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uid-number@~0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" - dependencies: - extsprintf "1.0.2" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -watchpack@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" - dependencies: - async "^2.1.2" - chokidar "^1.4.3" - graceful-fs "^4.1.2" - -webpack-sources@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750" - dependencies: - source-list-map "~0.1.7" - source-map "~0.5.3" - -webpack@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.2.1.tgz#7bb1d72ae2087dd1a4af526afec15eed17dda475" - dependencies: - acorn "^4.0.4" - acorn-dynamic-import "^2.0.0" - ajv "^4.7.0" - ajv-keywords "^1.1.1" - async "^2.1.2" - enhanced-resolve "^3.0.0" - interpret "^1.0.0" - json-loader "^0.5.4" - loader-runner "^2.3.0" - loader-utils "^0.2.16" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^3.1.0" - tapable "~0.2.5" - uglify-js "^2.7.5" - watchpack "^1.2.0" - webpack-sources "^0.1.4" - yargs "^6.0.0" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - -wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" - dependencies: - string-width "^1.0.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - dependencies: - camelcase "^3.0.0" - -yargs@^6.0.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" diff --git a/packages/neutrino-preset-karma/index.js b/packages/neutrino-preset-karma/index.js index a87251f..9670e51 100644 --- a/packages/neutrino-preset-karma/index.js +++ b/packages/neutrino-preset-karma/index.js @@ -44,7 +44,7 @@ module.exports = (neutrino) => { { singleRun: !watch, autoWatch: watch, - webpack: neutrino.getWebpackConfig() + webpack: neutrino.config.toConfig() } ]); diff --git a/packages/neutrino-preset-node/index.js b/packages/neutrino-preset-node/index.js index 7c52c20..3eec2a9 100644 --- a/packages/neutrino-preset-node/index.js +++ b/packages/neutrino-preset-node/index.js @@ -1,7 +1,6 @@ const banner = require('neutrino-middleware-banner'); const compile = require('neutrino-middleware-compile-loader'); const copy = require('neutrino-middleware-copy'); -const progress = require('neutrino-middleware-progress'); const clean = require('neutrino-middleware-clean'); const loaderMerge = require('neutrino-middleware-loader-merge'); const startServer = require('neutrino-middleware-start-server'); @@ -9,7 +8,7 @@ const hot = require('neutrino-middleware-hot'); const namedModules = require('neutrino-middleware-named-modules'); const nodeExternals = require('webpack-node-externals'); const { join } = require('path'); -const { pathOr } = require('ramda'); +const { path } = require('ramda'); const MODULES = join(__dirname, 'node_modules'); @@ -23,6 +22,16 @@ module.exports = (neutrino) => { } catch (ex) {} /* eslint-enable global-require no-empty */ + if (!path(['options', 'compile', 'targets', 'browsers'], neutrino)) { + Object.assign(neutrino.options, { + compile: { + targets: { + node: 6.9 + } + } + }); + } + neutrino.use(namedModules); neutrino.use(compile, { include: [neutrino.options.source, neutrino.options.tests], @@ -31,7 +40,7 @@ module.exports = (neutrino) => { presets: [ [require.resolve('babel-preset-env'), { modules: false, - targets: pathOr({ node: 6.9 }, ['options', 'compile', 'targets'], neutrino) + targets: neutrino.options.compile.targets }] ] } @@ -81,7 +90,6 @@ module.exports = (neutrino) => { if (process.env.NODE_ENV !== 'development') { neutrino.use(clean, { paths: [neutrino.options.output] }); - neutrino.use(progress); neutrino.use(copy, { patterns: [{ context: neutrino.options.source, from: '**/*' }], options: { ignore: ['*.js*'] } diff --git a/packages/neutrino-preset-node/package.json b/packages/neutrino-preset-node/package.json index 20a5425..49ccfaf 100644 --- a/packages/neutrino-preset-node/package.json +++ b/packages/neutrino-preset-node/package.json @@ -29,7 +29,6 @@ "neutrino-middleware-hot": "^5.0.0", "neutrino-middleware-loader-merge": "^5.0.0", "neutrino-middleware-named-modules": "^5.0.0", - "neutrino-middleware-progress": "^5.0.0", "neutrino-middleware-start-server": "^5.0.0" }, "peerDependencies": { diff --git a/packages/neutrino-preset-node/test/web_test.js b/packages/neutrino-preset-node/test/node_test.js similarity index 67% rename from packages/neutrino-preset-node/test/web_test.js rename to packages/neutrino-preset-node/test/node_test.js index 0ad9b60..b7462c1 100644 --- a/packages/neutrino-preset-node/test/web_test.js +++ b/packages/neutrino-preset-node/test/node_test.js @@ -1,23 +1,23 @@ import test from 'ava'; import { validate } from 'webpack'; -import Neutrino from 'neutrino'; +import { Neutrino } from 'neutrino'; test('loads preset', t => { t.notThrows(() => require('..')); }); test('uses preset', t => { - const api = new Neutrino(); + const api = Neutrino(); t.notThrows(() => api.use(require('..'))); }); test('valid preset', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use(require('..')); - const errors = validate(api.getWebpackConfig()); + const errors = validate(api.config.toConfig()); t.is(errors.length, 0); }); diff --git a/packages/neutrino-preset-react/test/web_test.js b/packages/neutrino-preset-react/test/react_test.js similarity index 67% rename from packages/neutrino-preset-react/test/web_test.js rename to packages/neutrino-preset-react/test/react_test.js index 0ad9b60..b7462c1 100644 --- a/packages/neutrino-preset-react/test/web_test.js +++ b/packages/neutrino-preset-react/test/react_test.js @@ -1,23 +1,23 @@ import test from 'ava'; import { validate } from 'webpack'; -import Neutrino from 'neutrino'; +import { Neutrino } from 'neutrino'; test('loads preset', t => { t.notThrows(() => require('..')); }); test('uses preset', t => { - const api = new Neutrino(); + const api = Neutrino(); t.notThrows(() => api.use(require('..'))); }); test('valid preset', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use(require('..')); - const errors = validate(api.getWebpackConfig()); + const errors = validate(api.config.toConfig()); t.is(errors.length, 0); }); diff --git a/packages/neutrino-preset-web/index.js b/packages/neutrino-preset-web/index.js index 1617fde..4b843e8 100644 --- a/packages/neutrino-preset-web/index.js +++ b/packages/neutrino-preset-web/index.js @@ -8,13 +8,12 @@ const htmlTemplate = require('neutrino-middleware-html-template'); const chunk = require('neutrino-middleware-chunk'); const hot = require('neutrino-middleware-hot'); const copy = require('neutrino-middleware-copy'); -const progress = require('neutrino-middleware-progress'); const clean = require('neutrino-middleware-clean'); const minify = require('neutrino-middleware-minify'); const loaderMerge = require('neutrino-middleware-loader-merge'); const namedModules = require('neutrino-middleware-named-modules'); const { join } = require('path'); -const { pathOr } = require('ramda'); +const { path, pathOr } = require('ramda'); const MODULES = join(__dirname, 'node_modules'); @@ -45,6 +44,23 @@ function devServer({ config }, options) { module.exports = (neutrino) => { const { config } = neutrino; + if (!path(['options', 'compile', 'targets', 'browsers'], neutrino)) { + Object.assign(neutrino.options, { + compile: { + targets: { + browsers: [ + 'last 2 Chrome versions', + 'last 2 Firefox versions', + 'last 2 Edge versions', + 'last 2 Opera versions', + 'last 2 Safari versions', + 'last 2 iOS versions' + ] + } + } + }); + } + neutrino.use(env); neutrino.use(htmlLoader); neutrino.use(styleLoader); @@ -61,16 +77,7 @@ module.exports = (neutrino) => { modules: false, useBuiltIns: true, include: ['transform-regenerator'], - targets: pathOr({ - browsers: [ - 'last 2 Chrome versions', - 'last 2 Firefox versions', - 'last 2 Edge versions', - 'last 2 Opera versions', - 'last 2 Safari versions', - 'last 2 iOS versions' - ] - }, ['options', 'compile', 'targets'], neutrino) + targets: neutrino.options.compile.targets }] ] } @@ -135,7 +142,6 @@ module.exports = (neutrino) => { .add('webpack/hot/dev-server'); } else { neutrino.use(clean, { paths: [neutrino.options.output] }); - neutrino.use(progress); neutrino.use(minify); neutrino.use(copy, { patterns: [{ context: neutrino.options.source, from: '**/*' }], diff --git a/packages/neutrino-preset-web/package.json b/packages/neutrino-preset-web/package.json index bb339e4..51c626a 100644 --- a/packages/neutrino-preset-web/package.json +++ b/packages/neutrino-preset-web/package.json @@ -36,7 +36,6 @@ "neutrino-middleware-loader-merge": "^5.0.0", "neutrino-middleware-image-loader": "^5.0.0", "neutrino-middleware-named-modules": "^5.0.0", - "neutrino-middleware-progress": "^5.0.0", "neutrino-middleware-minify": "^5.0.0", "neutrino-middleware-style-loader": "^5.0.0" }, diff --git a/packages/neutrino-preset-web/test/web_test.js b/packages/neutrino-preset-web/test/web_test.js index 2b3702d..c0751d0 100644 --- a/packages/neutrino-preset-web/test/web_test.js +++ b/packages/neutrino-preset-web/test/web_test.js @@ -1,23 +1,23 @@ import test from 'ava'; import { validate } from 'webpack'; -import Neutrino from 'neutrino'; +import { Neutrino } from 'neutrino'; test('loads preset', t => { t.notThrows(() => require('..')); }); test('uses preset', t => { - const api = new Neutrino(); + const api = Neutrino(); t.notThrows(() => api.use(require('..'))); }); test('valid preset', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use(require('..')); - const errors = validate(api.getWebpackConfig()); + const errors = validate(api.config.toConfig()); t.is(errors.length, 0); }); diff --git a/packages/neutrino/bin/build.js b/packages/neutrino/bin/build.js new file mode 100644 index 0000000..48bbb85 --- /dev/null +++ b/packages/neutrino/bin/build.js @@ -0,0 +1,23 @@ +const { build } = require('../src'); +const ora = require('ora'); + +module.exports = (middleware, options) => { + const spinner = ora('Building project').start(); + + return build(middleware, options) + .fork((errors) => { + spinner.fail('Building project failed'); + errors.forEach((err) => { + console.error(err.stack || err); + err.details && console.error(err.details); + }); + process.exit(1); + }, (stats) => { + spinner.succeed('Building project completed'); + console.log(stats.toString({ + colors: true, + chunks: false, + children: false + })); + }); +}; diff --git a/packages/neutrino/bin/inspect.js b/packages/neutrino/bin/inspect.js new file mode 100644 index 0000000..bf63b0e --- /dev/null +++ b/packages/neutrino/bin/inspect.js @@ -0,0 +1,7 @@ +const { inspect } = require('../src'); + +module.exports = (middleware, options) => inspect(middleware, options) + .fork((err) => { + console.error(err.stack || err); + process.exit(1); + }, console.log); diff --git a/packages/neutrino/bin/neutrino b/packages/neutrino/bin/neutrino index f74872c..30cd77f 100755 --- a/packages/neutrino/bin/neutrino +++ b/packages/neutrino/bin/neutrino @@ -4,16 +4,14 @@ // https://github.com/babel/babel-loader/pull/391 process.noDeprecation = true; -const Neutrino = require('../src/neutrino'); const yargs = require('yargs'); -const { pathOr, pipe, partialRight } = require('ramda'); -const { join } = require('path'); -const stringify = require('javascript-stringify'); -const sort = require('deep-sort-object'); -const optional = require('optional'); +const { pathOr } = require('ramda'); +const build = require('./build'); +const inspect = require('./inspect'); +const start = require('./start'); +const test = require('./test'); +const { getNodeEnv, getPackageJson } = require('../src/utils'); -// eslint-disable-next-line no-console -const inspect = pipe(sort, partialRight(stringify, [null, 2]), console.log, process.exit); const args = yargs .option('inspect', { description: 'Output a string representation of the configuration used by Neutrino and exit', @@ -53,26 +51,28 @@ const args = yargs .help() .argv; -function run(command, args) { - const pkg = optional(join(process.cwd(), 'package.json')) || {}; +// foldMiddleware :: Object -> Array +const foldMiddleware = (args) => { + const pkg = getPackageJson(); const pkgMiddleware = pathOr([], ['neutrino', 'use'], pkg); - const middleware = [...new Set(pkgMiddleware.concat(args.use))]; - const options = pathOr({}, ['neutrino', 'options'], pkg); - const config = pathOr({}, ['neutrino', 'config'], pkg); - const api = new Neutrino(Object.assign(options, { config })); - // Grab all middleware and merge them into a single webpack-chain config instance - api.import(middleware); + return [...new Set(pkgMiddleware.concat(args.use))]; +}; + +// normalizeOptions :: Object -> Object +const normalizeOptions = (args) => { + const pkg = getPackageJson(); + const options = pathOr({}, ['neutrino', 'options'], pkg); + const env = args.inspect ? getNodeEnv(args._[0], args.env) : args.env; - // Also grab any Neutrino config from package.json and merge it into the config at a higher precedence - api.use(() => api.config.merge(config)); + return Object.assign(options, { + config: pathOr({}, ['neutrino', 'config'], pkg), + args: Object.assign(args, { env }) + }); +}; - return args.inspect ? - inspect(api.getWebpackConfig()) : - api[command](args); -} +const cmd = args.inspect ? 'inspect' : args._[0]; +const middleware = foldMiddleware(args); +const options = normalizeOptions(args); -run(args._[0], args).catch((err) => { - console.error(err || `Error during ${args._[0]}`); - process.exit(1); -}); +({ build, inspect, start, test })[cmd](middleware, options); diff --git a/packages/neutrino/bin/start.js b/packages/neutrino/bin/start.js new file mode 100644 index 0000000..322ea83 --- /dev/null +++ b/packages/neutrino/bin/start.js @@ -0,0 +1,35 @@ +const { start } = require('../src'); +const ora = require('ora'); + +module.exports = (middleware, options) => { + const spinner = ora('Building project').start(); + + return start(middleware, options) + .fork((errors) => { + spinner.fail('Building project failed'); + errors.forEach((err) => { + console.error(err.stack || err); + err.details && console.error(err.details); + }); + + process.exit(1); + }, (compiler) => { // eslint-disable-line consistent-return + if (!compiler.options.devServer) { + return spinner.succeed('Build completed'); + } + + const { devServer } = compiler.options; + const protocol = devServer.https ? 'https' : 'http'; + const { host, port } = devServer; + + spinner.succeed(`Development server running on: ${protocol}://${host}:${port}`); + + const building = ora('Waiting for initial build to finish').start(); + + compiler.plugin('done', () => building.succeed('Build completed')); + compiler.plugin('compile', () => { + building.text = 'Source changed, re-compiling'; + building.start(); + }); + }); +}; diff --git a/packages/neutrino/bin/test.js b/packages/neutrino/bin/test.js new file mode 100644 index 0000000..ec84534 --- /dev/null +++ b/packages/neutrino/bin/test.js @@ -0,0 +1,7 @@ +const { test } = require('../src'); + +module.exports = (middleware, options) => test(middleware, options) + .fork((err) => { + console.error(err.stack || err); + process.exit(1); + }, Function.prototype); diff --git a/packages/neutrino/package.json b/packages/neutrino/package.json index 6f49f0e..ec5b4f1 100644 --- a/packages/neutrino/package.json +++ b/packages/neutrino/package.json @@ -2,7 +2,7 @@ "name": "neutrino", "version": "5.0.0", "description": "Create and build JS applications with managed configurations", - "main": "src/neutrino.js", + "main": "src/index.js", "bin": { "neutrino": "./bin/neutrino" }, @@ -24,10 +24,15 @@ "dependencies": { "deep-sort-object": "^1.0.1", "deepmerge": "^1.3.2", + "fluture": "^5.0.0", + "immutable": "^3.8.1", + "immutable-ext": "^1.0.8", "javascript-stringify": "^1.6.0", + "mitt": "^1.1.0", "optional": "^0.1.3", "ora": "^1.1.0", "ramda": "^0.23.0", + "ramda-fantasy": "^0.7.0", "webpack": "^2.2.1", "webpack-chain": "^3.0.0", "webpack-dev-server": "^2.4.1", diff --git a/packages/neutrino/src/api.js b/packages/neutrino/src/api.js new file mode 100644 index 0000000..7e5c381 --- /dev/null +++ b/packages/neutrino/src/api.js @@ -0,0 +1,71 @@ +const Config = require('webpack-chain'); +const merge = require('deepmerge'); +const { List } = require('immutable-ext'); +const Future = require('fluture'); +const mitt = require('mitt'); +const { chain, defaultTo, pipe } = require('ramda'); +const { createPaths, normalizePath, resolveAny, requireSafe } = require('./utils'); +const build = require('./build'); +const inspect = require('./inspect'); +const start = require('./start'); +const test = require('./test'); + +const getOptions = (options = {}) => { + const root = normalizePath(process.cwd(), defaultTo('', options.root)); + const base = normalizePath(root); + const source = base(defaultTo('src', options.source)); + const output = base(defaultTo('build', options.build)); + const tests = base(defaultTo('test', options.tests)); + const node_modules = base(defaultTo('node_modules', options.node_modules)); // eslint-disable-line camelcase + const entry = normalizePath(source, defaultTo('index.js', options.entry)); + + return merge(options, { root, source, output, tests, node_modules, entry }); +}; + +// Api :: () -> Object +const Api = pipe(getOptions, (options) => { + const listeners = {}; + + const api = merge(mitt(listeners), { + listeners, + options, + commands: {}, + config: new Config(), + + // emitForAll :: String -> payload -> Promise + emitForAll: (eventName, payload) => Promise + .all((api.listeners[eventName] || []).map(f => f(payload))), + + // register :: String command -> Future handler -> () + register: (command, handler) => api.commands[command] = handler, + + // requireMiddleware :: (Array String middleware) -> Future Error a + requires: middleware => List(middleware).map(pipe( + createPaths(api.options.root), + resolveAny, + chain(requireSafe) + )), + + // requiresAndUses :: Future Error a -> Future Error a + requiresAndUses: middleware => api.useRequires(api.requires(middleware)), + + // use :: Function middleware -> Object options -> IO () + use: (middleware, options = {}) => middleware(api, options), + + // useRequires :: Future Error a -> Future Error a + useRequires: requires => requires + // For all middleware, pass it to api.use() + .map(chain(Future.encase(api.use))) + // Fold the middleware down to a single Task/Future status + .reduce((f, current) => f.chain(() => current), Future.of()) + }); + + api.register('build', build); + api.register('inspect', inspect); + api.register('start', start); + api.register('test', test); + + return api; +}); + +module.exports = Api; diff --git a/packages/neutrino/src/build.js b/packages/neutrino/src/build.js new file mode 100644 index 0000000..ada024a --- /dev/null +++ b/packages/neutrino/src/build.js @@ -0,0 +1,16 @@ +const webpack = require('webpack'); +const Future = require('fluture'); +const { webpackErrors } = require('./utils'); + +// build :: Object config -> Future (Array Error) Function +const build = config => Future((reject, resolve) => { + const compiler = webpack(config); + + compiler.run((err, stats) => { + const errors = webpackErrors(err, stats); + + errors.length ? reject(errors) : resolve(stats); + }); +}); + +module.exports = build; diff --git a/packages/neutrino/src/devServer.js b/packages/neutrino/src/devServer.js new file mode 100644 index 0000000..23aab0d --- /dev/null +++ b/packages/neutrino/src/devServer.js @@ -0,0 +1,19 @@ +const merge = require('deepmerge'); +const webpack = require('webpack'); +const DevServer = require('webpack-dev-server'); +const Future = require('fluture'); + +// devServer :: Object webpackConfig -> Future () Function +const devServer = webpackConfig => new Future((reject, resolve) => { + const config = merge({ + devServer: { host: 'localhost', port: 5000, noInfo: true } + }, webpackConfig); + const { host, port } = config.devServer; + + const compiler = webpack(config); + const server = new DevServer(compiler, config.devServer); + + server.listen(port, host, () => resolve(compiler)); +}); + +module.exports = devServer; diff --git a/packages/neutrino/src/index.js b/packages/neutrino/src/index.js new file mode 100644 index 0000000..1ee3e27 --- /dev/null +++ b/packages/neutrino/src/index.js @@ -0,0 +1,46 @@ +const Api = require('./api'); +const { partial } = require('ramda'); +const Future = require('fluture'); +const { getNodeEnv, toArray } = require('./utils'); + +// run :: (String command -> Array middleware -> Object options) -> Future Error a +const run = (command, middleware, options) => { + const api = Api(options); + + process.env.NODE_ENV = getNodeEnv(command, api.options.args && api.options.args.env); + + // Require and use all middleware + return api.requiresAndUses(middleware) + // Also grab any config overrides and merge it into the config at a higher precedence + .map(() => api.config.merge(options.config)) + // Trigger all pre-events for the current command + .chain(() => Future.fromPromise2(api.emitForAll, `pre${command}`, api.options.args)) + // Execute the command + .chain(() => api.commands[command](api.config.toConfig())) + // Trigger all post-command events, resolving with the value of the command execution + .chain(value => Future + .fromPromise2(api.emitForAll, command, api.options.args) + .chain(() => Future.of(value))) + .mapRej(toArray); +}; + +// build :: (Array middleware -> Object options) -> Future Error a +const build = partial(run, ['build']); + +// inspect :: (Array middleware -> Object options) -> Future Error a +const inspect = partial(run, ['inspect']); + +// start :: (Array middleware -> Object options) -> Future Error a +const start = partial(run, ['start']); + +// test :: (Array middleware -> Object options) -> Future Error a +const test = partial(run, ['test']); + +module.exports = { + Neutrino: Api, + run, + build, + inspect, + start, + test +}; diff --git a/packages/neutrino/src/inspect.js b/packages/neutrino/src/inspect.js new file mode 100644 index 0000000..b178b38 --- /dev/null +++ b/packages/neutrino/src/inspect.js @@ -0,0 +1,9 @@ +const Future = require('fluture'); +const stringify = require('javascript-stringify'); +const sort = require('deep-sort-object'); +const { partialRight, pipe } = require('ramda'); + +// inspect :: Object config -> Future () String +const inspect = pipe(sort, partialRight(stringify, [null, 2]), Future.of); + +module.exports = inspect; diff --git a/packages/neutrino/src/neutrino.js b/packages/neutrino/src/neutrino.js deleted file mode 100644 index a3c9ba8..0000000 --- a/packages/neutrino/src/neutrino.js +++ /dev/null @@ -1,72 +0,0 @@ -const { join, isAbsolute } = require('path'); -const { EventEmitter } = require('events'); -const Config = require('webpack-chain'); -const merge = require('deepmerge'); -const { defaultTo, identity } = require('ramda'); -const requireMiddleware = require('./requireMiddleware'); -const build = require('./webpack/build'); -const develop = require('./webpack/develop'); -const watch = require('./webpack/watch'); - -const normalizePath = (path, root) => (isAbsolute(path) ? path : join(root, path)); - -module.exports = class Neutrino extends EventEmitter { - constructor(options = {}) { - super(); - - const root = normalizePath(options.root || '', process.cwd()); - const source = normalizePath(options.source || 'src', root); - const output = normalizePath(options.output || 'build', root); - const tests = normalizePath(options.tests || 'test', root); - const node_modules = normalizePath(options.node_modules || 'node_modules', root); // eslint-disable-line camelcase - const entry = normalizePath(options.entry || 'index.js', source); - - this.config = new Config(); - this.options = merge(options, { root, source, output, tests, node_modules, entry }); - } - - use(middleware, options = {}) { - middleware(this, options); - } - - import(middleware) { - this.require(middleware).forEach(middleware => this.use(middleware)); - } - - require(middleware) { - return requireMiddleware(middleware, this.options); - } - - getWebpackConfig() { - return this.config.toConfig(); - } - - emitForAll(eventName, payload) { - return Promise.all(this.listeners(eventName).map(fn => fn(payload))); - } - - build(args) { - return this.runCommand('build', args, build); - } - - start(args) { - return this.runCommand('start', args, this.getWebpackConfig().devServer ? develop : watch); - } - - test(args) { - return this.runCommand('test', args); - } - - runCommand(command, args = {}, fn = identity) { - process.env.NODE_ENV = defaultTo({ - build: 'production', - start: 'development', - test: 'test' - }[command], args.env); - - return this - .emitForAll(`pre${command}`, args) - .then(() => fn(this.getWebpackConfig())) - .then(() => this.emitForAll(command, args)); - } -} diff --git a/packages/neutrino/src/requireMiddleware.js b/packages/neutrino/src/requireMiddleware.js deleted file mode 100644 index cc1b777..0000000 --- a/packages/neutrino/src/requireMiddleware.js +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable global-require*/ -const { join } = require('path'); - -const castToArray = val => (Array.isArray(val) ? val : [val]); - -function requirePath(path, middleware) { - try { - return require(path); - } catch (exception) { - if (!/Cannot find module/.test(exception.message)) { - exception.message = `Neutrino was unable to load the module '${middleware}'. ` + - `Ensure this module exports a function and is free from errors.\n${exception.message}`; - throw exception; - } - - return undefined; - } -} - -module.exports = function requireMiddleware(middleware, options = {}) { - const root = options.root || process.cwd(); - - return castToArray(middleware).map((middleware) => { - const path = [ - join(root, middleware), - join(root, 'node_modules', middleware) - ].find(path => requirePath(path)); - - if (!path) { - throw new Error(`Neutrino cannot find a module with the name or path '${middleware}'. ` + - 'Ensure this module can be found relative to the root of the project.'); - } - - return require(path); - }); -}; diff --git a/packages/neutrino/src/start.js b/packages/neutrino/src/start.js new file mode 100644 index 0000000..b2550ec --- /dev/null +++ b/packages/neutrino/src/start.js @@ -0,0 +1,6 @@ +const { ifElse, propSatisfies } = require('ramda'); +const devServer = require('./devServer'); +const watch = require('./watch'); + +// start :: Object options -> Future (Array Error) Function +module.exports = ifElse(propSatisfies(Boolean, 'devServer'), devServer, watch); diff --git a/packages/neutrino/src/test.js b/packages/neutrino/src/test.js new file mode 100644 index 0000000..5a8c38a --- /dev/null +++ b/packages/neutrino/src/test.js @@ -0,0 +1,5 @@ +const Future = require('fluture'); +const { identity } = require('ramda'); + +// test :: Object options -> Future () Function +module.exports = () => Future.of(identity); diff --git a/packages/neutrino/src/utils.js b/packages/neutrino/src/utils.js new file mode 100644 index 0000000..61794f2 --- /dev/null +++ b/packages/neutrino/src/utils.js @@ -0,0 +1,64 @@ +const Future = require('fluture'); +const { cond, curry, defaultTo, identity, map, memoize, of, partialRight, pipe, reduce, T } = require('ramda'); +const { List } = require('immutable-ext'); +const { isAbsolute, join } = require('path'); +const optional = require('optional'); + +// any :: List -> Future a b +const any = reduce(Future.or, Future.reject('empty list')); + +// createPaths :: (String -> String) -> List String +const createPaths = curry((base, middleware) => List.of( + join(base, middleware), + join(base, 'node_modules', middleware), + middleware +)); + +// getNodeEnv :: String command -> String? env -> String +const getNodeEnv = (command = 'start', env) => defaultTo({ + build: 'production', + start: 'development', + test: 'test' +}[command] || 'development', env); + +// getPackageJson :: () -> Object +const getPackageJson = memoize(pipe( + process.cwd, + partialRight(join, ['package.json']), + optional, + defaultTo({}) +)); + +// normalize :: String base -> String path -> String +const normalizePath = curry((base, path) => (isAbsolute(path) ? path : join(base, path))); + +// resolveSafe :: String -> Future Error String +const resolveSafe = Future.encase(require.resolve); + +// requireSafe :: String -> Future Error a +const requireSafe = Future.encase(require); + +// resolveAny :: List -> Future Error String +const resolveAny = pipe(map(resolveSafe), any); + +// toArray :: a -> Array +const toArray = cond([ + [Array.isArray, identity], + [T, of] +]); + +// webpackErrors :: (Error|Array Error err -> Object stats) -> Array Error +const webpackErrors = (err, stats) => (err ? toArray(err) : stats.toJson().errors); + +module.exports = { + any, + createPaths, + getNodeEnv, + getPackageJson, + normalizePath, + requireSafe, + resolveAny, + resolveSafe, + toArray, + webpackErrors +}; diff --git a/packages/neutrino/src/watch.js b/packages/neutrino/src/watch.js new file mode 100644 index 0000000..2c9211f --- /dev/null +++ b/packages/neutrino/src/watch.js @@ -0,0 +1,16 @@ +const webpack = require('webpack'); +const Future = require('fluture'); +const { webpackErrors } = require('./utils'); + +// watch :: Object config -> Future (Array Error) () +const watch = config => new Future((reject, resolve) => { + const compiler = webpack(config); + + compiler.watch(config.watchOptions || {}, (err, stats) => { + const errors = webpackErrors(err, stats); + + errors.length ? reject(errors) : resolve(compiler); + }); +}); + +module.exports = watch; diff --git a/packages/neutrino/src/webpack/build.js b/packages/neutrino/src/webpack/build.js deleted file mode 100644 index cbf3f27..0000000 --- a/packages/neutrino/src/webpack/build.js +++ /dev/null @@ -1,10 +0,0 @@ -const webpack = require('webpack'); -const { handle, logErrors, logStats } = require('./utils'); - -module.exports = config => new Promise((resolve, reject) => { - const compiler = webpack(config); - - compiler.run(handle((errors, stats) => ( - errors.length ? reject(logErrors(errors)) : resolve(logStats(stats)) - ))); -}); diff --git a/packages/neutrino/src/webpack/develop.js b/packages/neutrino/src/webpack/develop.js deleted file mode 100644 index d557a7a..0000000 --- a/packages/neutrino/src/webpack/develop.js +++ /dev/null @@ -1,28 +0,0 @@ -const ora = require('ora'); -const merge = require('deepmerge'); -const webpack = require('webpack'); -const DevServer = require('webpack-dev-server'); - -module.exports = _config => new Promise((resolve) => { - const defaultDevServer = { host: 'localhost', port: 5000, noInfo: true }; - const config = merge({ devServer: defaultDevServer }, _config); - const protocol = config.devServer.https ? 'https' : 'http'; - const { host, port } = config.devServer; - - const starting = ora('Starting development server').start(); - const compiler = webpack(config); - const server = new DevServer(compiler, config.devServer); - const building = ora('Waiting for initial build to finish').start(); - - server.listen(port, host, () => { - starting.succeed(`Development server running on: ${protocol}://${host}:${port}`); - - compiler.plugin('done', () => building.succeed('Build completed')); - compiler.plugin('compile', () => { - building.text = 'Source changed, re-compiling'; - building.start(); - }); - }); - - process.on('SIGINT', resolve); -}); diff --git a/packages/neutrino/src/webpack/utils.js b/packages/neutrino/src/webpack/utils.js deleted file mode 100644 index 780b2ec..0000000 --- a/packages/neutrino/src/webpack/utils.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports.handle = fn => (err, stats) => fn(err ? [err] : stats.toJson().errors, stats); - -module.exports.logStats = (stats) => { - console.log(stats.toString({ - colors: true, - chunks: false, - children: false - })); - - return stats; -}; - -module.exports.logErrors = (errors) => { - errors.forEach((err) => { - console.error(err.stack || err); - if (err.details) { - console.error(err.details); - } - }); - - return errors; -}; diff --git a/packages/neutrino/src/webpack/watch.js b/packages/neutrino/src/webpack/watch.js deleted file mode 100644 index a65606e..0000000 --- a/packages/neutrino/src/webpack/watch.js +++ /dev/null @@ -1,15 +0,0 @@ -const webpack = require('webpack'); -const ora = require('ora'); -const { handle, logErrors } = require('./utils'); - -module.exports = config => new Promise((resolve) => { - const compiler = webpack(config); - const building = ora('Waiting for initial build to finish').start(); - - const watcher = compiler.watch(config.watchOptions || {}, handle((errors) => { - building.succeed('Build completed'); - logErrors(errors); - })); - - process.on('SIGINT', () => watcher.close(resolve)); -}); diff --git a/packages/neutrino/test/api_test.js b/packages/neutrino/test/api_test.js index 3e1110a..8eba51f 100644 --- a/packages/neutrino/test/api_test.js +++ b/packages/neutrino/test/api_test.js @@ -1,17 +1,17 @@ import test from 'ava'; -import Neutrino from '../src/neutrino'; +import { Neutrino } from '../src'; test('initializes with no arguments', t => { - t.notThrows(() => new Neutrino()); + t.notThrows(() => Neutrino()); }); test('initializes with options', t => { - t.notThrows(() => new Neutrino({ testing: true })); + t.notThrows(() => Neutrino({ testing: true })); }); test('initialization stores options', t => { const options = { alpha: 'a', beta: 'b', gamma: 'c' }; - const api = new Neutrino(options); + const api = Neutrino(options); t.is(api.options.alpha, options.alpha); t.is(api.options.beta, options.beta); @@ -19,19 +19,19 @@ test('initialization stores options', t => { }); test('creates an instance of webpack-chain', t => { - const api = new Neutrino(); + const api = Neutrino(); t.is(typeof api.config.toConfig, 'function'); }); test('middleware receives API instance', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use(n => t.is(n, api)); }); test('middleware receives default options', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use((api, options) => { t.deepEqual(options, {}); @@ -39,7 +39,7 @@ test('middleware receives default options', t => { }); test('middleware receives options parameter', t => { - const api = new Neutrino(); + const api = Neutrino(); const defaults = { alpha: 'a', beta: 'b', gamma: 'c' }; api.use((api, options) => { @@ -48,14 +48,14 @@ test('middleware receives options parameter', t => { }); test('triggers promisified event handlers', t => { - const api = new Neutrino(); + const api = Neutrino(); api.on('test', () => t.pass('test event triggered')); api.emitForAll('test'); }); test('events handle promise resolution', async t => { - const api = new Neutrino(); + const api = Neutrino(); api.on('test', () => Promise.resolve('alpha')); @@ -65,7 +65,7 @@ test('events handle promise resolution', async t => { }); test('events handle promise rejection', async t => { - const api = new Neutrino(); + const api = Neutrino(); api.on('test', () => Promise.reject(new Error('beta'))); @@ -75,7 +75,7 @@ test('events handle promise rejection', async t => { }); test('events handle multiple promise resolutions', async t => { - const api = new Neutrino(); + const api = Neutrino(); api.on('test', () => Promise.resolve('alpha')); api.on('test', () => Promise.resolve('beta')); @@ -86,47 +86,32 @@ test('events handle multiple promise resolutions', async t => { t.deepEqual(values, ['alpha', 'beta', 'gamma']); }); -test('import middleware for use', t => { - const api = new Neutrino({ root: __dirname }); +test('import middleware for use', async (t) => { + const api = Neutrino({ root: __dirname }); - api.import('fixtures/middleware'); - - t.notDeepEqual(api.getWebpackConfig(), {}); -}); - -test('command sets correct NODE_ENV', t => { - const api = new Neutrino(); - - api.runCommand('build'); - t.is(process.env.NODE_ENV, 'production'); - - api.runCommand('start'); - t.is(process.env.NODE_ENV, 'development'); - - api.runCommand('test'); - t.is(process.env.NODE_ENV, 'test'); - - api.runCommand('build', { env: 'development' }); - t.is(process.env.NODE_ENV, 'development'); + await api.requiresAndUses(['fixtures/middleware']).promise(); + t.notDeepEqual(api.config.toConfig(), {}); }); test('command emits events around execution', async (t) => { - const api = new Neutrino(); + const api = Neutrino(); const events = []; api.on('prebuild', () => events.push('alpha')); - api.on('build', () => events.push('gamma')); + api.on('build', () => events.push('beta')); + + await api.emitForAll('prebuild'); + await api.emitForAll('build'); - await api.runCommand('build', {}, () => events.push('beta')); - t.deepEqual(events, ['alpha', 'beta', 'gamma']); + t.deepEqual(events, ['alpha', 'beta']); }); test('creates a Webpack config', t => { - const api = new Neutrino(); + const api = Neutrino(); api.use(api => api.config.module .rule('compile') .test(/\.js$/)); - t.notDeepEqual(api.getWebpackConfig(), {}); + t.notDeepEqual(api.config.toConfig(), {}); }); diff --git a/packages/neutrino/test/requireMiddleware_test.js b/packages/neutrino/test/requireMiddleware_test.js deleted file mode 100644 index 681b31c..0000000 --- a/packages/neutrino/test/requireMiddleware_test.js +++ /dev/null @@ -1,45 +0,0 @@ -import { join } from 'path'; -import { outputFile as fsOutputFile, remove as fsRemove } from 'fs-extra'; -import pify from 'pify'; -import test from 'ava'; -import requireMiddleware from '../src/requireMiddleware'; - -const cwd = process.cwd(); -const outputFile = pify(fsOutputFile); -const remove = pify(fsRemove); - -const rootPath = join(__dirname, 'test-module'); -const rootMiddlewarePath = join(rootPath, 'middleware.js'); -const errorMiddlewarePath = join(rootPath, 'errorMiddleware.js'); -const modulePath = join(rootPath, 'node_modules', 'mymodule'); -const moduleMiddlewarePath = join(modulePath, 'index.js'); - -test.before(async (t) => { - await Promise.all([ - outputFile(rootMiddlewarePath, 'module.exports = "root"'), - outputFile(errorMiddlewarePath, '[;'), - outputFile(moduleMiddlewarePath, 'module.exports = "mymodule"') - ]) - process.chdir(rootPath); -}); - -test.after.always(async (t) => { - await remove(rootPath); - process.chdir(cwd); -}); - -test('requires middleware relative to root', t => { - t.is(requireMiddleware('middleware')[0], 'root'); -}); - -test('requires middleware from root/node_modules', t => { - t.is(requireMiddleware('mymodule')[0], 'mymodule'); -}); - -test('throws if middleware contains error', t => { - t.throws(() => requireMiddleware('errorMiddleware')); -}); - -test('throws if middleware cannot be found', t => { - t.throws(() => requireMiddleware('notExistent')); -}); diff --git a/packages/neutrino/test/require_test.js b/packages/neutrino/test/require_test.js new file mode 100644 index 0000000..bac90c1 --- /dev/null +++ b/packages/neutrino/test/require_test.js @@ -0,0 +1,52 @@ +import { join } from 'path'; +import { outputFile as fsOutputFile, remove as fsRemove } from 'fs-extra'; +import pify from 'pify'; +import test from 'ava'; +import { Neutrino } from '../src'; + +const cwd = process.cwd(); +const outputFile = pify(fsOutputFile); +const remove = pify(fsRemove); +const rootPath = join(__dirname, 'test-module'); +const rootMiddlewarePath = join(rootPath, 'middleware.js'); +const errorMiddlewarePath = join(rootPath, 'errorMiddleware.js'); +const modulePath = join(rootPath, 'node_modules', 'alpha'); +const moduleMiddlewarePath = join(modulePath, 'index.js'); + +test.before(async () => { + await Promise.all([ + outputFile(rootMiddlewarePath, 'module.exports = () => "root"'), + outputFile(errorMiddlewarePath, '[;'), + outputFile(moduleMiddlewarePath, 'module.exports = () => "alpha"') + ]); + process.chdir(rootPath); +}); + +test.after.always(async () => { + await remove(rootPath); + process.chdir(cwd); +}); + +test('requires middleware relative to root', t => { + const api = Neutrino(); + + api.requiresAndUses(['middleware']).value(v => t.is(v, 'root')); +}); + +test('requires middleware from root/node_modules', t => { + const api = Neutrino(); + + api.requiresAndUses(['alpha']).value(v => t.is(v, 'alpha')); +}); + +test('forks with error middleware contains error', async (t) => { + const api = Neutrino(); + + await t.throws(api.requiresAndUses(['errorMiddleware']).promise()); +}); + +test('throws if middleware cannot be found', async (t) => { + const api = Neutrino(); + + await t.throws(api.requiresAndUses(['nonExistent']).promise()); +}); diff --git a/packages/neutrino/test/run_test.js b/packages/neutrino/test/run_test.js new file mode 100644 index 0000000..9c48021 --- /dev/null +++ b/packages/neutrino/test/run_test.js @@ -0,0 +1,32 @@ +import test from 'ava'; +import commands from '../src'; + +test('run::build uses "production" NODE_ENV', t => { + commands.run('build'); + t.is(process.env.NODE_ENV, 'production'); +}); + +test('build uses "production" NODE_ENV', t => { + commands.build(); + t.is(process.env.NODE_ENV, 'production'); +}); + +test('start uses "development" NODE_ENV', t => { + commands.start(); + t.is(process.env.NODE_ENV, 'development'); +}); + +test('test uses "test" NODE_ENV', t => { + commands.test(); + t.is(process.env.NODE_ENV, 'test'); +}); + +test('inspect uses "development" NODE_ENV by default', t => { + commands.inspect(); + t.is(process.env.NODE_ENV, 'development'); +}); + +test('inspect uses overridden NODE_ENV', t => { + commands.inspect([], { args: { env: 'production' } }); + t.is(process.env.NODE_ENV, 'production'); +}); diff --git a/packages/neutrino/yarn.lock b/packages/neutrino/yarn.lock index 904b003..ff9736d 100644 --- a/packages/neutrino/yarn.lock +++ b/packages/neutrino/yarn.lock @@ -407,6 +407,13 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +concurrify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/concurrify/-/concurrify-0.1.1.tgz#ae8ae2cd5bded30aee315b3bd5322ae4de38ee85" + dependencies: + sanctuary-type-classes "^3.0.0" + sanctuary-type-identifiers "^1.0.0" + connect-history-api-fallback@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" @@ -738,6 +745,15 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" +fluture@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/fluture/-/fluture-5.0.0.tgz#5abd07756a12edc54907b7a6d40e61e717cd9b0f" + dependencies: + concurrify "^0.1.0" + inspect-f "^1.2.0" + sanctuary-type-classes "^3.0.0" + sanctuary-type-identifiers "^1.0.0" + for-in@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" @@ -975,6 +991,14 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" +immutable-ext@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/immutable-ext/-/immutable-ext-1.0.8.tgz#be49852c009b9c06cbceaf166c873a1d109a4ddc" + +immutable@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" + indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -998,6 +1022,10 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" +inspect-f@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/inspect-f/-/inspect-f-1.2.1.tgz#117573b5df57a509de6fe401131d426bac1592b5" + interpret@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" @@ -1324,6 +1352,10 @@ minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +mitt@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.1.0.tgz#22f0d57e2fedd39620a62bb41b7cdd93667d3c41" + mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -1645,7 +1677,13 @@ querystringify@0.0.x: version "0.0.4" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" -ramda@^0.23.0: +ramda-fantasy@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/ramda-fantasy/-/ramda-fantasy-0.7.0.tgz#ac77a7a5d55dfc1ddc224ac418e9be8900c65d17" + dependencies: + ramda ">=0.15.0" + +ramda@>=0.15.0, ramda@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.23.0.tgz#ccd13fff73497a93974e3e86327bfd87bd6e8e2b" @@ -1796,6 +1834,16 @@ ripemd160@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" +sanctuary-type-classes@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/sanctuary-type-classes/-/sanctuary-type-classes-3.0.1.tgz#65163f8e1dfdfdc05cf842b83b608fff921cda15" + dependencies: + sanctuary-type-identifiers "1.0.x" + +sanctuary-type-identifiers@1.0.x, sanctuary-type-identifiers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sanctuary-type-identifiers/-/sanctuary-type-identifiers-1.0.0.tgz#e8f359f006cb5e624cfb8464603fc114608bde9f" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"