From d3573f98f13e2e3b491e3d3b92889d23f2aa11ca Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 00:53:45 +0200 Subject: [PATCH 1/6] feat($config): Added support for environment-specific .env files and better handling for .env variab Now it is possible to have .env.development file and `ELM_APP_` prefixed variables --- config/env.js | 87 +++++++++++++++++++++++++++++++++-- config/webpack.config.dev.js | 9 ++-- config/webpack.config.prod.js | 11 +++-- scripts/build.js | 16 +++++-- scripts/start.js | 16 +++++-- 5 files changed, 119 insertions(+), 20 deletions(-) diff --git a/config/env.js b/config/env.js index 83f2be82..f612b395 100644 --- a/config/env.js +++ b/config/env.js @@ -1,10 +1,87 @@ 'use strict'; -function getClientEnvironment() { - return Object.keys(process.env).reduce((acc, current) => { - acc[`process.env.${current}`] = `"${process.env[current]}"`; - return acc; - }, {}); +const fs = require('fs'); +const path = require('path'); +const paths = require('./paths'); + +// Make sure that including paths.js after env.js will read .env variables. +delete require.cache[require.resolve('./paths')]; + +const NODE_ENV = process.env.NODE_ENV; +if (!NODE_ENV) { + throw new Error( + 'The NODE_ENV environment variable is required but was not specified.' + ); +} + +// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use +var dotenvFiles = [ + `${paths.dotenv}.${NODE_ENV}.local`, + `${paths.dotenv}.${NODE_ENV}`, + // Don't include `.env.local` for `test` environment + // since normally you expect tests to produce the same + // results for everyone + NODE_ENV !== 'test' && `${paths.dotenv}.local`, + paths.dotenv +].filter(Boolean); + +// Load environment variables from .env* files. Suppress warnings using silent +// if this file is missing. dotenv will never modify any environment variables +// that have already been set. +// https://github.com/motdotla/dotenv +dotenvFiles.forEach(dotenvFile => { + if (fs.existsSync(dotenvFile)) { + require('dotenv').config({ + path: dotenvFile + }); + } +}); + +// We support resolving modules according to `NODE_PATH`. +// This lets you use absolute paths in imports inside large monorepos: +// https://github.com/facebookincubator/create-react-app/issues/253. +// It works similar to `NODE_PATH` in Node itself: +// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders +// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. +// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. +// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421 +// We also resolve them to make sure all tools using them work consistently. +const appDirectory = fs.realpathSync(process.cwd()); +process.env.NODE_PATH = (process.env.NODE_PATH || '') + .split(path.delimiter) + .filter(folder => folder && !path.isAbsolute(folder)) + .map(folder => path.resolve(appDirectory, folder)) + .join(path.delimiter); + +// Grab NODE_ENV and ELM_APP_* environment variables and prepare them to be +// injected into the application via DefinePlugin in Webpack configuration. +const ELM_APP = /^ELM_APP_/i; + +function getClientEnvironment(publicUrl) { + const raw = Object.keys(process.env).filter(key => ELM_APP.test(key)).reduce(( + env, + key + ) => { + env[key] = process.env[key]; + return env; + }, { + // Useful for determining whether we’re running in production mode. + NODE_ENV: process.env.NODE_ENV || 'development', + // Useful for resolving the correct path to static assets in `public`. + // For example, . + // This should only be used as an escape hatch. Normally you would put + // images into the `src` and `import` them in code to get their paths. + PUBLIC_URL: publicUrl + }); + // Stringify all values so we can feed into Webpack DefinePlugin + const stringified = { + 'process.env': Object.keys(raw).reduce((env, key) => { + env[key] = JSON.stringify(raw[key]); + return env; + }, {}) + }; + + return { raw, stringified }; } module.exports = getClientEnvironment; diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 53317052..3f181ffa 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -1,5 +1,6 @@ 'use strict'; +const path = require('path'); const autoprefixer = require('autoprefixer'); const HotModuleReplacementPlugin = require('webpack/lib/HotModuleReplacementPlugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); @@ -16,6 +17,8 @@ const publicPath = '/'; // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz. const publicUrl = ''; +// Get environment variables to inject into our app. +const env = getClientEnvironment(publicUrl); module.exports = { devtool: 'eval', @@ -152,11 +155,9 @@ module.exports = { }, plugins: [ - new DefinePlugin(getClientEnvironment()), + new DefinePlugin(env.stringified), - new InterpolateHtmlPlugin({ - PUBLIC_URL: publicUrl - }), + new InterpolateHtmlPlugin(env.raw), new HtmlWebpackPlugin({ inject: true, diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index a8dd30b0..5ba08c4b 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -21,6 +21,9 @@ const shouldUseRelativeAssetPaths = publicPath === './'; // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. const publicUrl = publicPath.slice(0, -1); +// Get environment variables to inject into our app. +const env = getClientEnvironment(publicUrl); + // Note: defined here because it will be used more than once. const cssFilename = 'static/css/[name].[contenthash:8].css'; @@ -156,13 +159,11 @@ module.exports = { }, plugins: [ - new InterpolateHtmlPlugin({ - PUBLIC_URL: publicUrl - }), - new AssetsPlugin({ path: paths.appBuild }), - new DefinePlugin(getClientEnvironment()), + new DefinePlugin(env.stringified), + + new InterpolateHtmlPlugin(env.raw), // Minify the compiled JavaScript. new UglifyJsPlugin({ diff --git a/scripts/build.js b/scripts/build.js index 2cc24e26..a6efc73d 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -1,8 +1,18 @@ 'use strict'; -// Load environment variables from .env file. -// Suppress warnings if this file is missing. -require('dotenv').config({ silent: true }); +// Do this as the first thing so that any code reading it knows the right env. +process.env.BABEL_ENV = 'production'; +process.env.NODE_ENV = 'production'; + +// Makes the script crash on unhandled rejections instead of silently +// ignoring them. In the future, promise rejections that are not handled will +// terminate the Node.js process with a non-zero exit code. +process.on('unhandledRejection', err => { + throw err; +}); + +// Ensure environment variables are read. +require('../config/env'); const fs = require('fs-extra'); const chalk = require('chalk'); diff --git a/scripts/start.js b/scripts/start.js index 976c27c5..3c674234 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -1,8 +1,18 @@ 'use strict'; -// Load environment variables from .env file. -// Suppress warnings if this file is missing. -require('dotenv').config({ silent: true }); +// Do this as the first thing so that any code reading it knows the right env. +process.env.BABEL_ENV = 'development'; +process.env.NODE_ENV = 'development'; + +// Makes the script crash on unhandled rejections instead of silently +// ignoring them. In the future, promise rejections that are not handled will +// terminate the Node.js process with a non-zero exit code. +process.on('unhandledRejection', err => { + throw err; +}); + +// Ensure environment variables are read. +require('../config/env'); const fs = require('fs'); const path = require('path'); From 9379aed05b3765827d7505b08452ca9cbe779936 Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 00:54:46 +0200 Subject: [PATCH 2/6] feat($config): Enabled react-error-overlay Runtime JavaScritp errors will be displayed in an overlay --- config/webpack.config.dev.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 3f181ffa..b17c1daf 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -21,14 +21,23 @@ const publicUrl = ''; const env = getClientEnvironment(publicUrl); module.exports = { - devtool: 'eval', + devtool: 'cheap-module-source-map', entry: [ - // WebpackDevServer client. + // Include an alternative client for WebpackDevServer. A client's job is to + // connect to WebpackDevServer by a socket and get notified about changes. + // When you save a file, the client will either apply hot updates (in case + // of CSS changes), or refresh the page (in case of JS changes). When you + // make a syntax error, this client will display a syntax error overlay. + // Note: instead of the default WebpackDevServer client, we use a custom one + // to bring better experience for Create Elm App users. You can replace + // the line below with these two lines if you prefer the stock client: + // require.resolve('webpack-dev-server/client') + '?/', + // require.resolve('webpack/hot/dev-server'), require.resolve('react-dev-utils/webpackHotDevClient'), - // Replacement runtime. - require.resolve('webpack/hot/dev-server'), + // Errors should be considered fatal in development + require.resolve('react-error-overlay'), paths.appIndexJs ], @@ -44,7 +53,11 @@ module.exports = { // containing code from all our entry points, and the Webpack runtime. filename: 'static/js/bundle.js', - publicPath: publicPath + publicPath: publicPath, + + // Point sourcemap entries to original disk location (format as URL on Windows) + devtoolModuleFilenameTemplate: info => + path.resolve(info.absoluteResourcePath).replace(/\\/g, '/') }, resolve: { From f67298b225bbed93e092078b7961f8b9a2fd4151 Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 09:17:15 +0200 Subject: [PATCH 3/6] feat($dev): Added elm error highlightning in the terminal --- scripts/build.js | 5 ++++- scripts/start.js | 6 +++++- scripts/utils/highlightElmCompilerErrors.js | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 scripts/utils/highlightElmCompilerErrors.js diff --git a/scripts/build.js b/scripts/build.js index a6efc73d..b44498ec 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -22,6 +22,7 @@ const paths = require('../config/paths'); const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); +const highlightElmCompilerErrors = require('./utils/highlightElmCompilerErrors'); const measureFileSizesBeforeBuild = FileSizeReporter.measureFileSizesBeforeBuild; @@ -89,7 +90,9 @@ function build(previousFileSizes) { if (err) { return reject(err); } - const messages = formatWebpackMessages(stats.toJson({}, true)); + const messages = highlightElmCompilerErrors( + formatWebpackMessages(stats.toJson({}, true)) + ); if (messages.errors.length) { return reject(new Error(messages.errors.join('\n\n'))); } diff --git a/scripts/start.js b/scripts/start.js index 3c674234..1bd322a0 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -29,6 +29,7 @@ const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); const clearConsole = require('react-dev-utils/clearConsole'); const openBrowser = require('react-dev-utils/openBrowser'); const createDevServerConfig = require('../config/webpackDevServer.config'); +const highlightElmCompilerErrors = require('./utils/highlightElmCompilerErrors'); const paths = require('../config/paths'); if (fs.existsSync('elm-package.json') === false) { @@ -99,7 +100,10 @@ function createCompiler(webpack, config, appName, urls) { // We have switched off the default Webpack output in WebpackDevServer // options so we are going to "massage" the warnings and errors and present // them in a readable focused way. - const messages = formatWebpackMessages(stats.toJson({}, true)); + const messages = highlightElmCompilerErrors( + formatWebpackMessages(stats.toJson({}, true)) + ); + const isSuccessful = !messages.errors.length && !messages.warnings.length; if (isSuccessful) { console.log(chalk.green('Compiled successfully!')); diff --git a/scripts/utils/highlightElmCompilerErrors.js b/scripts/utils/highlightElmCompilerErrors.js new file mode 100644 index 00000000..45548d67 --- /dev/null +++ b/scripts/utils/highlightElmCompilerErrors.js @@ -0,0 +1,19 @@ +'use strict'; + +var chalk = require('chalk'); + +module.exports = function highlightElmCompilerErrors(messages) { + var errors = messages.errors; + var warnings = messages.warnings; + return errors.length > 0 + ? { + errors: errors.map(x => + x + .replace(/(--\s[A-Z\s]+-+\s.*\.elm\n)/g, chalk.cyan('$1')) + .replace(/(\n\s*)(\^+)/g, '$1' + chalk.red('$2')) + .replace(/(\d+\|)(>)/g, '$1' + chalk.bold(chalk.red('$2'))) + ), + warnings: warnings + } + : messages; +}; From 285bd1457fde99b3f283010cabcef25b04c868f6 Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 09:18:06 +0200 Subject: [PATCH 4/6] chore($dependencies): Upgraded the dependencies --- package.json | 10 +- yarn.lock | 315 ++++++++++++++++++++++++++------------------------- 2 files changed, 163 insertions(+), 162 deletions(-) diff --git a/package.json b/package.json index 859a8456..f2e4850b 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "elm-hot-loader": "0.5.4", "elm-test": "^0.18.7", "elm-webpack-loader": "^4.3.0", - "extract-text-webpack-plugin": "^2.1.2", + "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^0.11.2", - "fs-extra": "^3.0.1", + "fs-extra": "^4.0.0", "html-webpack-plugin": "^2.29.0", "http-proxy-middleware": "^0.17.3", "minimist": "1.2.0", @@ -49,12 +49,12 @@ "string-replace-loader": "^1.3.0", "style-loader": "^0.18.1", "url-loader": "^0.5.9", - "webpack": "^3.1.0", + "webpack": "^3.3.0", "webpack-dev-server": "^2.5.1" }, "devDependencies": { "babel-eslint": "^7.2.3", - "chai": "^4.0.2", + "chai": "^4.1.0", "commitizen": "^2.9.6", "cz-conventional-changelog": "^2.0.0", "dir-compare": "^1.3.0", @@ -63,7 +63,7 @@ "husky": "^0.14.3", "mocha": "^3.2.0", "nightmare": "^2.10.0", - "prettier": "^1.5.2", + "prettier": "^1.5.3", "rimraf": "^2.5.4", "semantic-release": "^6.3.2" }, diff --git a/yarn.lock b/yarn.lock index 119f6e2b..66eecd01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -36,8 +36,8 @@ github-url-from-git "^1.4.0" "@types/node@^7.0.18": - version "7.0.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.31.tgz#80ea4d175599b2a00149c29a10a4eb2dff592e86" + version "7.0.38" + resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.38.tgz#140ecc61930b328e72914237c58dd62c8829e94d" abbrev@1: version "1.1.0" @@ -71,8 +71,8 @@ acorn@^4.0.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" acorn@^5.0.0, acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + version "5.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" address@1.0.2, address@^1.0.1: version "1.0.2" @@ -100,23 +100,15 @@ ajv@^4.7.0, ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.0.0, ajv@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.1.tgz#dcd03045175883ba1b636e5ae9ec3df9ab85323a" +ajv@^5.0.0, ajv@^5.1.5, ajv@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" json-schema-traverse "^0.3.0" json-stable-stringify "^1.0.1" -ajv@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.1.6.tgz#4b2f1a19dece93d57ac216037e3e9791c7dd1564" - dependencies: - co "^4.6.0" - json-schema-traverse "^0.3.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" @@ -153,6 +145,10 @@ ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -205,8 +201,8 @@ arr-diff@^2.0.0: arr-flatten "^1.0.1" arr-flatten@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" array-filter@~0.0.0: version "0.0.1" @@ -251,8 +247,8 @@ arrify@^1.0.0: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" asap@^2.0.0, asap@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" asn1.js@^4.0.0: version "4.9.1" @@ -302,9 +298,9 @@ async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.0.1, async@^2.1.2: - version "2.4.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" +async@^2.0.1, async@^2.1.2, async@^2.4.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: lodash "^4.14.0" @@ -858,8 +854,8 @@ babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.25 to-fast-properties "^1.0.1" babylon@^6.17.0, babylon@^6.17.2: - version "6.17.3" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.3.tgz#1327d709950b558f204e5352587fd0290f8d8e48" + version "6.17.4" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" balanced-match@^0.4.2: version "0.4.2" @@ -870,8 +866,8 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + version "1.2.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" batch@0.6.1: version "0.6.1" @@ -919,8 +915,8 @@ bluebird@^3.4.6, bluebird@^3.4.7, bluebird@^3.5.0: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" 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" + version "4.11.7" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.7.tgz#ddb048e50d9482790094c13eb3fcfc833ce7ab46" bonjour@^3.5.0: version "3.5.0" @@ -1025,11 +1021,11 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: electron-to-chromium "^1.2.7" browserslist@^2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.5.tgz#e882550df3d1cd6d481c1a3e0038f2baf13a4711" + version "2.2.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.2.0.tgz#5e35ec993e467c6464b8cb708447386891de9f50" dependencies: - caniuse-lite "^1.0.30000684" - electron-to-chromium "^1.3.14" + caniuse-lite "^1.0.30000701" + electron-to-chromium "^1.3.15" buffer-equal@1.0.0: version "1.0.0" @@ -1059,9 +1055,9 @@ 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" -bytes@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.3.0.tgz#d5b680a165b6201739acb611542aabc2d8ceb070" +bytes@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" cachedir@^1.1.0: version "1.1.1" @@ -1115,12 +1111,12 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000686" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000686.tgz#d55b479ed6e6402c1fd3f1fd8f46e694d86ea464" + version "1.0.30000702" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000702.tgz#a60cd30f3ef44ae7b5ed12e9d9b70d4bff6352cb" -caniuse-lite@^1.0.30000684, caniuse-lite@^1.0.30000697: - version "1.0.30000698" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000698.tgz#8102e8978b1f36962f2a102432e4bf4eac7b6cbe" +caniuse-lite@^1.0.30000697, caniuse-lite@^1.0.30000701: + version "1.0.30000702" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000702.tgz#bd66e40345528fe0c001917d1d3f55454df634f1" caseless@~0.11.0: version "0.11.0" @@ -1137,9 +1133,9 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.2.tgz#2f7327c4de6f385dd7787999e2ab02697a32b83b" +chai@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.0.tgz#331a0391b55c3af8740ae9c3b7458bc1c3805e6d" dependencies: assertion-error "^1.0.1" check-error "^1.0.1" @@ -1185,7 +1181,7 @@ chokidar@1.6.0: optionalDependencies: fsevents "^1.0.0" -chokidar@^1.4.3, chokidar@^1.6.0, chokidar@^1.6.1: +chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: @@ -1205,10 +1201,11 @@ ci-info@^1.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" dependencies: inherits "^2.0.1" + safe-buffer "^5.0.1" circular-json@^0.3.1: version "0.3.1" @@ -1221,8 +1218,8 @@ clap@^1.0.9: chalk "^1.1.3" clean-css@4.1.x: - version "4.1.4" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.4.tgz#eec8811db27457e0078d8ca921fa81b72fa82bf4" + version "4.1.7" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.7.tgz#b9aea4f85679889cf3eae8b40349ec4ebdfdd032" dependencies: source-map "0.5.x" @@ -1279,8 +1276,8 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" coa@~1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.3.tgz#1b54a5e1dcf77c990455d4deea98c564416dc893" + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" dependencies: q "^1.1.2" @@ -1295,8 +1292,8 @@ color-convert@^1.0.0, color-convert@^1.3.0: color-name "^1.1.1" color-name@^1.0.0, color-name@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" color-string@^0.3.0: version "0.3.0" @@ -1340,12 +1337,16 @@ commander@1.0.4: dependencies: keypress "0.1.x" -commander@2.9.0, commander@2.9.x, commander@^2.8.1, commander@^2.9.0, commander@~2.9.0: +commander@2.9.0, commander@2.9.x, commander@~2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: graceful-readlink ">= 1.0.0" +commander@^2.8.1, commander@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + commitizen@^2.9.6: version "2.9.6" resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-2.9.6.tgz#c0d00535ef264da7f63737edfda4228983fa2291" @@ -1370,22 +1371,23 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" -compressible@~2.0.8: +compressible@~2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.10.tgz#feda1c7f7617912732b29bf8cf26252a20b9eecd" dependencies: mime-db ">= 1.27.0 < 2" compression@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.6.2.tgz#cceb121ecc9d09c52d7ad0c3350ea93ddd402bc3" + version "1.7.0" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.0.tgz#030c9f198f1643a057d776a738e922da4373012d" dependencies: accepts "~1.3.3" - bytes "2.3.0" - compressible "~2.0.8" - debug "~2.2.0" + bytes "2.5.0" + compressible "~2.0.10" + debug "2.6.8" on-headers "~1.0.1" - vary "~1.1.0" + safe-buffer "5.1.1" + vary "~1.1.1" concat-map@0.0.1: version "0.0.1" @@ -1443,8 +1445,8 @@ conventional-changelog@0.0.17: normalize-package-data "^1.0.3" conventional-commit-types@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.1.0.tgz#45d860386c9a2e6537ee91d8a1b61bd0411b3d04" + version "2.2.0" + resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946" convert-source-map@^1.1.0: version "1.5.0" @@ -1534,8 +1536,8 @@ cryptiles@2.x.x: 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" + version "3.11.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.1.tgz#948945efc6757a400d6e5e5af47194d10064279f" dependencies: browserify-cipher "^1.0.0" browserify-sign "^4.0.0" @@ -1701,7 +1703,7 @@ debug@2, debug@2.6.8, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.6.0, de dependencies: ms "2.0.0" -debug@2.2.0, debug@~2.2.0: +debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: @@ -1963,13 +1965,13 @@ electron-download@^3.0.1: semver "^5.3.0" sumchecker "^1.2.0" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.14: - version "1.3.14" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.14.tgz#64af0f9efd3c3c6acd57d71f83b49ca7ee9c4b43" +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.15: + version "1.3.16" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.16.tgz#d0e026735754770901ae301a21664cba45d92f7d" electron@^1.4.4: - version "1.7.3" - resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.3.tgz#839cab0a0598835a100dceede215988ba99c325b" + version "1.7.5" + resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.5.tgz#065a3102bf8b87102df50c50985fefe6c569045b" dependencies: "@types/node" "^7.0.18" electron-download "^3.0.1" @@ -2069,8 +2071,8 @@ error-ex@^1.2.0: is-arrayish "^0.2.1" es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.23" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.23.tgz#7578b51be974207a5487821b56538c224e4e7b38" + version "0.10.24" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.24.tgz#a55877c9924bc0c8d9bd3c2cbe17495ac1709b14" dependencies: es6-iterator "2" es6-symbol "~3.1" @@ -2095,8 +2097,8 @@ es6-map@^0.1.3: event-emitter "~0.3.5" es6-promise@^4.0.5: - version "4.1.0" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.0.tgz#dda03ca8f9f89bc597e689842929de7ba8cebdf0" + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" es6-set@~0.1.5: version "0.1.5" @@ -2204,9 +2206,9 @@ esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" esquery@^1.0.0: version "1.0.0" @@ -2215,20 +2217,16 @@ esquery@^1.0.0: estraverse "^4.0.0" esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" dependencies: - estraverse "~4.1.0" + estraverse "^4.1.0" object-assign "^4.0.1" -estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" - esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -2357,12 +2355,12 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extract-text-webpack-plugin@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.2.tgz#756ef4efa8155c3681833fbc34da53b941746d6c" +extract-text-webpack-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.0.tgz#90caa7907bc449f335005e3ac7532b41b00de612" dependencies: - async "^2.1.2" - loader-utils "^1.0.2" + async "^2.4.1" + loader-utils "^1.1.0" schema-utils "^0.3.0" webpack-sources "^1.0.1" @@ -2621,9 +2619,9 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.0.tgz#414fb4ca2d2170ba0014159d3a8aec3303418d9e" dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" @@ -2904,10 +2902,11 @@ hash-base@^2.0.0: inherits "^2.0.1" 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" + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" dependencies: - inherits "^2.0.1" + inherits "^2.0.3" + minimalistic-assert "^1.0.0" hawk@~3.1.3: version "3.1.3" @@ -2952,8 +2951,8 @@ homedir-polyfill@^1.0.0: parse-passwd "^1.0.0" hosted-git-info@^2.1.4, hosted-git-info@^2.1.5: - version "2.4.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" hpack.js@^2.1.6: version "2.1.6" @@ -3113,7 +3112,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3395,15 +3394,15 @@ js-base64@^2.1.9: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@^3.4.3, js-yaml@^3.8.4: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" + version "3.9.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce" dependencies: argparse "^1.0.7" - esprima "^3.1.1" + esprima "^4.0.0" js-yaml@~3.7.0: version "3.7.0" @@ -3417,8 +3416,8 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jschardet@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a" + version "1.5.0" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.0.tgz#a61f310306a5a71188e1b1acd08add3cfbb08b1e" jsesc@^0.5.0, jsesc@~0.5.0: version "0.5.0" @@ -3433,8 +3432,8 @@ json-loader@^0.5.4: resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" json-schema-traverse@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.0.tgz#0016c0b1ca1efe46d44d37541bcdfc19dcfae0db" + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" json-schema@0.2.3: version "0.2.3" @@ -3465,8 +3464,8 @@ jsonfile@^2.1.0: graceful-fs "^4.1.6" jsonfile@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.0.tgz#92e7c7444e5ffd5fa32e6a9ae8b85034df8347d0" + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" optionalDependencies: graceful-fs "^4.1.6" @@ -4114,8 +4113,8 @@ normalize-package-data@^1.0.3: semver "2 || 3 || 4" normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, "normalize-package-data@~1.0.1 || ^2.0.0": - version "2.3.8" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -4183,8 +4182,8 @@ npmconf@^2.1.2: uid-number "0.0.5" "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.0, npmlog@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -4802,12 +4801,12 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 supports-color "^3.2.3" postcss@^6.0.1, postcss@^6.0.2, postcss@^6.0.6: - version "6.0.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.6.tgz#bba4d58e884fc78c840d1539e10eddaabb8f73bd" + version "6.0.7" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.7.tgz#6a097477c46d13d0560a817d69abc0bae549d0a0" dependencies: chalk "^2.0.1" source-map "^0.5.6" - supports-color "^4.1.0" + supports-color "^4.2.0" prelude-ls@~1.1.2: version "1.1.2" @@ -4821,9 +4820,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3" +prettier@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.3.tgz#59dadc683345ec6b88f88b94ed4ae7e1da394bfe" pretty-bytes@^1.0.2: version "1.0.4" @@ -4833,8 +4832,8 @@ pretty-bytes@^1.0.2: meow "^3.1.0" pretty-error@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.0.tgz#87f4e9d706a24c87d6cbee9fabec001fcf8c75d8" + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" dependencies: renderkid "^2.0.1" utila "~0.4" @@ -5046,15 +5045,15 @@ readable-stream@1.0: string_decoder "~0.10.x" "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.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9: - version "2.2.11" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.11.tgz#0796b31f8d7688007ff0b93a8088d34aa17c0f72" + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: core-util-is "~1.0.0" - inherits "~2.0.1" + inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~1.0.6" - safe-buffer "~5.0.1" - string_decoder "~1.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" util-deprecate "~1.0.1" readable-stream@~1.1.9: @@ -5422,17 +5421,13 @@ rx@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" -safe-buffer@^5.0.1, safe-buffer@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" - -safe-buffer@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223" +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" sax@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" schema-utils@^0.3.0: version "0.3.0" @@ -5803,21 +5798,21 @@ string-width@^1.0.1, string-width@^1.0.2: strip-ansi "^3.0.0" string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" + strip-ansi "^4.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" -string_decoder@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.2.tgz#b29e1f4e1125fa97a10382b8a533737b7491e179" +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: - safe-buffer "~5.0.1" + safe-buffer "~5.1.0" stringstream@~0.0.4: version "0.0.5" @@ -5829,6 +5824,12 @@ strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.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" @@ -5879,7 +5880,7 @@ supports-color@^3.1.0, supports-color@^3.1.1, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0, supports-color@^4.1.0: +supports-color@^4.0.0, supports-color@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.0.tgz#ad986dc7eb2315d009b4d77c8169c2231a684037" dependencies: @@ -6081,8 +6082,8 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@3.0.x: - version "3.0.17" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.17.tgz#d228cd55c2df9b3d2f53f147568cb4cc4a72cc06" + version "3.0.25" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.25.tgz#3dc190b0ee437497e449bc6f785665b06afbe052" dependencies: commander "~2.9.0" source-map "~0.5.1" @@ -6216,8 +6217,8 @@ uuid@^2.0.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" v8flags@^2.0.10: version "2.1.1" @@ -6232,7 +6233,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.0, vary@~1.1.1: +vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" @@ -6258,12 +6259,12 @@ walk@^2.3.9: dependencies: foreachasync "^3.0.0" -watchpack@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" +watchpack@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" dependencies: async "^2.1.2" - chokidar "^1.4.3" + chokidar "^1.7.0" graceful-fs "^4.1.2" wbuf@^1.1.0, wbuf@^1.7.2: @@ -6314,9 +6315,9 @@ webpack-sources@^1.0.1: source-list-map "^2.0.0" source-map "~0.5.3" -webpack@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.1.0.tgz#ac0675e500db835f9ab2369d29ba096f51ad0731" +webpack@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.3.0.tgz#ce2f9e076566aba91f74887133a883fd7da187bc" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -6337,7 +6338,7 @@ webpack@^3.1.0: supports-color "^3.1.0" tapable "~0.2.5" uglifyjs-webpack-plugin "^0.4.6" - watchpack "^1.3.1" + watchpack "^1.4.0" webpack-sources "^1.0.1" yargs "^6.0.0" From 1fdf83ead44930688e5a6a2109c87ae7f5deeaae Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 21:06:47 +0200 Subject: [PATCH 5/6] fix($eject): Add the utility to ejected config and scripts --- scripts/eject.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/eject.js b/scripts/eject.js index 0598768b..d8a43f90 100644 --- a/scripts/eject.js +++ b/scripts/eject.js @@ -71,6 +71,10 @@ function performEject(pkg) { try { fs.copySync(path.resolve(__dirname, 'build.js'), './scripts/build.js'); fs.copySync(path.resolve(__dirname, 'start.js'), './scripts/start.js'); + fs.copySync( + path.resolve(__dirname, './utils/highlightElmCompilerErrors.js'), + './scripts/utils/highlightElmCompilerErrors.js' + ); fs.copySync(path.resolve(__dirname, '../config'), './config'); } catch (err) { console.log(chalk.red('Failed to copy scripts, the error is:\n')); From 7f2c6bdf586d7e401804e65c7ba43e793b68476f Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 19 Jul 2017 22:40:00 +0200 Subject: [PATCH 6/6] feat($debugger): Add an option to disable Elm Debugger in development mode --- config/webpack.config.dev.js | 2 +- template/README.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index b17c1daf..afea818a 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -105,7 +105,7 @@ module.exports = { options: { verbose: true, warn: true, - debug: true, + debug: !!process.env.ELM_DEBUGGER, pathToMake: paths.elmMake, forceWatch: true } diff --git a/template/README.md b/template/README.md index b845f3bc..ac441c62 100644 --- a/template/README.md +++ b/template/README.md @@ -18,6 +18,7 @@ You can find the most recent version of this guide [here](https://github.com/hal - [repl](#repl) - [make](#make) - [reactor](#reactor) +- [Turning off Elm Debugger](#turning-off-elm-debugger) - [Changing the Page ``](#changing-the-page-title) - [Adding a Stylesheet](#adding-a-stylesheet) - [Adding Images and Fonts](#adding-images-and-fonts) @@ -134,6 +135,11 @@ Alias for [elm-make](http://guide.elm-lang.org/get_started.html#elm-make) #### `reactor` Alias for [elm-reactor](http://guide.elm-lang.org/get_started.html#elm-reactor) + +## Turning off Elm Debugger + +To turn off Elm Debugger, set `ELM_DEBUGGER` environment variable to `false` + ## Changing the Page `<title>` You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “Elm App” to anything else.