diff --git a/.gitignore b/.gitignore index 3395ea12b6..9e3e18df72 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ coverage # Intellij idea *.iml .idea + +# Macos +.DS_Store diff --git a/.travis.yml b/.travis.yml index 8f0c46e7fb..65e2ffbe5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,7 @@ language: node_js node_js: - "8.0" - "7.2" - - "6.9" -before_install: - - if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi + - "6.11" install: - yarn install - yarn run build diff --git a/README.md b/README.md index 40ed8ee8bc..44649e4373 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

-> Nuxt.js is a framework for server-rendered Vue applications (inspired by [Next.js](https://github.com/zeit/next.js)) +> Nuxt.js is a Versatile Vue.js Framework ## ๐Ÿšง Under active development, [1.0](https://github.com/nuxt/nuxt.js/projects/1) will be released soon :fire: @@ -98,6 +98,7 @@ Support us with a monthly donation and help us continue our activities. [[Become - ๐Ÿ“˜ Documentation: [https://nuxtjs.org](https://nuxtjs.org) - ๐ŸŽฌ Video: [1 minute demo](https://www.youtube.com/watch?v=kmf-p-pTi40) - ๐Ÿฆ Twitter: [@nuxt_js](https://twitter.com/nuxt_js) +- ๐Ÿ‘ฅ [Nuxt.js Community](https://github.com/nuxt-community) - ๐Ÿ‘‰ [Play with Nuxt.js online](https://glitch.com/edit/#!/nuxt-hello-world) ## Getting started @@ -170,13 +171,8 @@ const Nuxt = require('nuxt') // Launch nuxt build with given options let config = require('./nuxt.config.js') let nuxt = new Nuxt(config) -nuxt.build() -.then(() => { - // You can use nuxt.render(req, res) or nuxt.renderRoute(route, context) -}) -.catch((e) => { - // An error happened during the build -}) + +// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context) ``` Learn more: https://nuxtjs.org/api/nuxt diff --git a/bin/nuxt b/bin/nuxt index 4e9019757d..35c82cf255 100755 --- a/bin/nuxt +++ b/bin/nuxt @@ -1,9 +1,9 @@ #!/usr/bin/env node -var join = require('path').join +const join = require('path').join -var defaultCommand = 'dev' -var commands = new Set([ +const defaultCommand = 'dev' +const commands = new Set([ defaultCommand, 'init', 'build', @@ -19,6 +19,13 @@ if (commands.has(cmd)) { cmd = defaultCommand } -var bin = join(__dirname, 'nuxt-' + cmd) +const bin = join(__dirname, 'nuxt-' + cmd) + +// Console error unhandled promises +process.on('unhandledRejection', function (err) { + /* eslint-disable no-console */ + console.error(err) + console.error('[nuxt] Unhandled promise rejection: ' + err) +}) require(bin) diff --git a/bin/nuxt-build b/bin/nuxt-build index 1af998d2be..845c0f4039 100755 --- a/bin/nuxt-build +++ b/bin/nuxt-build @@ -1,61 +1,71 @@ #!/usr/bin/env node // Show logs -process.env.DEBUG = 'nuxt:*' +process.env.DEBUG = process.env.DEBUG || 'nuxt:*' -var fs = require('fs') -var without = require('lodash').without -var Nuxt = require('../') -var resolve = require('path').resolve +const fs = require('fs') +const parseArgs = require('minimist') +const { Nuxt, Builder } = require('../') +const resolve = require('path').resolve +const debug = require('debug')('nuxt:build') +debug.color = 2 // Force green color -// --analyze option -var analyzeBuild = false -if (process.argv.indexOf('--analyze') !== -1 || process.argv.indexOf('-a') !== -1) { - analyzeBuild = true - process.argv = without(process.argv, '--analyze', '-a') +const argv = parseArgs(process.argv.slice(2), { + alias: { + h: 'help', + c: 'config-file', + a: 'analyze' + }, + boolean: ['h', 'a'], + string: ['c'], + default: { + c: 'nuxt.config.js' + } +}) + +if (argv.help) { + console.log(` + Description + Compiles the application for production deployment + Usage + $ nuxt build + Options + --analyze, -a Launch webpack-bundle-analyzer to optimize your bundles. + --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) + --help, -h Displays this message + `) + process.exit(0) } -var nuxtConfigFileName = 'nuxt.config.js' - -// --config-file option -var indexOfConfig = false -if (process.argv.indexOf('--config-file') !== -1) { - indexOfConfig = process.argv.indexOf('--config-file') -} else if (process.argv.indexOf('-c') !== -1) { - indexOfConfig = process.argv.indexOf('-c') -} - -if (indexOfConfig !== false) { - nuxtConfigFileName = process.argv.slice(indexOfConfig)[1] - process.argv = without(process.argv, '--config-file', '-c', nuxtConfigFileName) -} - -// Root directory parameter -var rootDir = resolve(process.argv.slice(2)[0] || '.') -var nuxtConfigFilePath = resolve(rootDir, nuxtConfigFileName) +const rootDir = resolve(argv._[0] || '.') +const nuxtConfigFile = resolve(rootDir, argv['config-file']) var options = {} -if (fs.existsSync(nuxtConfigFilePath)) { - options = require(nuxtConfigFilePath) -} else { - console.log(`Could not locate ${nuxtConfigFilePath}`) // eslint-disable-line no-console +if (fs.existsSync(nuxtConfigFile)) { + options = require(nuxtConfigFile) +} else if (argv['config-file'] !== 'nuxt.config.js') { + console.error(`> Could not load config file ${argv['config-file']}`) + process.exit(1) } - if (typeof options.rootDir !== 'string') { options.rootDir = rootDir } -options.dev = false // Create production build when calling `nuxt build` +// Create production build when calling `nuxt build` +options.dev = false +// Analyze option options.build = options.build || {} -if (analyzeBuild) { - options.build.analyze = analyzeBuild +if (argv.analyze) { + options.build.analyze = true } -console.log('[nuxt] Building...') // eslint-disable-line no-console -var nuxt = module.exports = new Nuxt(options) -nuxt.build() +debug('Building...') +const nuxt = new Nuxt(options) +const builder = new Builder(nuxt) + +builder.build() .then(() => { - console.log('[nuxt] Building done') // eslint-disable-line no-console + debug('Building done') }) .catch((err) => { console.error(err) // eslint-disable-line no-console diff --git a/bin/nuxt-dev b/bin/nuxt-dev index 4b1f733ce6..cb50c7397d 100755 --- a/bin/nuxt-dev +++ b/bin/nuxt-dev @@ -1,80 +1,113 @@ #!/usr/bin/env node // Show logs -process.env.DEBUG = 'nuxt:*' +process.env.DEBUG = process.env.DEBUG || 'nuxt:*' -var _ = require('lodash') -var debug = require('debug')('nuxt:build') +const _ = require('lodash') +const debug = require('debug')('nuxt:build') debug.color = 2 // force green color -var fs = require('fs') -var Nuxt = require('../') -var chokidar = require('chokidar') -var resolve = require('path').resolve -var without = require('lodash').without +const fs = require('fs') +const parseArgs = require('minimist') +const { Nuxt, Builder } = require('../') +const chokidar = require('chokidar') +const resolve = require('path').resolve -var nuxtConfigFileName = 'nuxt.config.js' +const argv = parseArgs(process.argv.slice(2), { + alias: { + h: 'help', + H: 'hostname', + p: 'port', + c: 'config-file' + }, + boolean: ['h'], + string: ['H', 'c'], + default: { + c: 'nuxt.config.js' + } +}) -// --config-file option -var indexOfConfig = false -if (process.argv.indexOf('--config-file') !== -1) { - indexOfConfig = process.argv.indexOf('--config-file') -} else if (process.argv.indexOf('-c') !== -1) { - indexOfConfig = process.argv.indexOf('-c') +if (argv.hostname === '') { + console.error(`> Provided hostname argument has no value`) + process.exit(1) } -if (indexOfConfig !== false) { - nuxtConfigFileName = process.argv.slice(indexOfConfig)[1] - process.argv = without(process.argv, '--config-file', '-c', nuxtConfigFileName) +if (argv.help) { + console.log(` + Description + Starts the application in development mode (hot-code reloading, error + reporting, etc) + Usage + $ nuxt dev -p -H + Options + --port, -p A port number on which to start the application + --hostname, -H Hostname on which to start the application + --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) + --help, -h Displays this message + `) + process.exit(0) } -var rootDir = resolve(process.argv.slice(2)[0] || '.') -var nuxtConfigFile = resolve(rootDir, nuxtConfigFileName) +const rootDir = resolve(argv._[0] || '.') +const nuxtConfigFile = resolve(rootDir, argv['config-file']) -var options = {} -if (fs.existsSync(nuxtConfigFile)) { - options = require(nuxtConfigFile) -} -if (typeof options.rootDir !== 'string') { - options.rootDir = rootDir -} -options.dev = true // Add hot reloading and watching changes +// Load config once for chokidar +const nuxtConfig = loadNuxtConfig() +_.defaultsDeep(nuxtConfig, { watchers: { chokidar: { ignoreInitial: true } } }) -var nuxt = module.exports = new Nuxt(options) -var port = process.env.PORT || process.env.npm_package_config_nuxt_port -var host = process.env.HOST || process.env.npm_package_config_nuxt_host -var server = nuxt.server = new nuxt.Server(nuxt).listen(port, host) +// Start dev +let dev = startDev() -listenOnConfigChanges(nuxt, server) - -function listenOnConfigChanges(nuxt, server) { - // Listen on nuxt.config.js changes - var build = _.debounce(() => { +// Start watching for nuxt.config.js changes +chokidar + .watch(nuxtConfigFile, nuxtConfig.watchers.chokidar) + .on('all', _.debounce(() => { debug('[nuxt.config.js] changed') - delete require.cache[nuxtConfigFile] - var options = {} - if (fs.existsSync(nuxtConfigFile)) { - try { - options = require(nuxtConfigFile) - } catch (e) { - return console.error(e) // eslint-disable-line no-console - } - } - options.rootDir = rootDir - nuxt.close() - .then(() => { - nuxt.renderer = null - debug('Rebuilding the app...') - return new Nuxt(options).build() - }) - .then((nuxt) => { - server.nuxt = nuxt - }) - .catch((error) => { - console.error('Error while rebuild the app:', error) // eslint-disable-line no-console - process.exit(1) - }) - }, 200) - var nuxtConfigFile = resolve(rootDir, nuxtConfigFileName) - chokidar.watch(nuxtConfigFile, Object.assign({}, nuxt.options.watchers.chokidar, {ignoreInitial: true})) - .on('all', build) + debug('Rebuilding the app...') + dev = dev.then(startDev) + }), 2500) + +function startDev (oldNuxt) { + // Get latest environment variables + const port = argv.port || process.env.PORT || process.env.npm_package_config_nuxt_port + const host = argv.hostname || process.env.HOST || process.env.npm_package_config_nuxt_host + + // Load options + let options = {} + try { + options = loadNuxtConfig() + } catch (err) { + console.error(err) + return // Wait for next reload + } + + // Create nuxt and builder instance + const nuxt = new Nuxt(options) + const builder = new Builder(nuxt) + + return Promise.resolve() + .then(() => builder.build()) // 1- Start build + .then(() => oldNuxt ? oldNuxt.close() : Promise.resolve()) // 2- Close old nuxt after successful build + .then(() => nuxt.listen(port, host)) // 3- Start listening + .then(() => nuxt) // 4- Pass new nuxt to watch chain +} + +function loadNuxtConfig () { + let options = {} + + if (fs.existsSync(nuxtConfigFile)) { + delete require.cache[nuxtConfigFile] + options = require(nuxtConfigFile) + } else if (argv['config-file'] !== 'nuxt.config.js') { + console.error(`> Could not load config file ${argv['config-file']}`) + process.exit(1) + } + + if (typeof options.rootDir !== 'string') { + options.rootDir = rootDir + } + + // Force development mode for add hot reloading and watching changes + options.dev = true + + return options } diff --git a/bin/nuxt-generate b/bin/nuxt-generate index c187810fa1..8cd5162fc2 100755 --- a/bin/nuxt-generate +++ b/bin/nuxt-generate @@ -1,29 +1,63 @@ #!/usr/bin/env node // Show logs -process.env.DEBUG = 'nuxt:*' +process.env.DEBUG = process.env.DEBUG || 'nuxt:*' -var fs = require('fs') -var Nuxt = require('../') -var resolve = require('path').resolve +const fs = require('fs') +const parseArgs = require('minimist') +const debug = require('debug')('nuxt:generate') -var rootDir = resolve(process.argv.slice(2)[0] || '.') -var nuxtConfigFile = resolve(rootDir, 'nuxt.config.js') +const { Nuxt, Builder, Generator } = require('../') +const resolve = require('path').resolve + +const argv = parseArgs(process.argv.slice(2), { + alias: { + h: 'help', + c: 'config-file' + }, + boolean: ['h'], + string: ['c'], + default: { + c: 'nuxt.config.js' + } +}) + +if (argv.help) { + console.log(` + Description + Generate a static web application (server-rendered) + Usage + $ nuxt generate + Options + --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) + --help, -h Displays this message + `) + process.exit(0) +} + +const rootDir = resolve(argv._[0] || '.') +const nuxtConfigFile = resolve(rootDir, argv['config-file']) var options = {} if (fs.existsSync(nuxtConfigFile)) { options = require(nuxtConfigFile) +} else if (argv['config-file'] !== 'nuxt.config.js') { + console.error(`> Could not load config file ${argv['config-file']}`) + process.exit(1) } if (typeof options.rootDir !== 'string') { options.rootDir = rootDir } options.dev = false // Force production mode (no webpack middleware called) -console.log('[nuxt] Generating...') // eslint-disable-line no-console -var nuxt = module.exports = new Nuxt(options) -nuxt.generate() +debug('Generating...') +const nuxt = new Nuxt(options) +const builder = new Builder(nuxt) +const generator = new Generator(nuxt, builder) +generator.generate() .then(() => { - console.log('[nuxt] Generate done') // eslint-disable-line no-console + debug('Generate done') + process.exit(0) }) .catch((err) => { console.error(err) // eslint-disable-line no-console diff --git a/bin/nuxt-start b/bin/nuxt-start index 8af26fbaf4..5e40ebd201 100755 --- a/bin/nuxt-start +++ b/bin/nuxt-start @@ -1,22 +1,72 @@ #!/usr/bin/env node -var fs = require('fs') -var Nuxt = require('../') -var resolve = require('path').resolve +const fs = require('fs') +const parseArgs = require('minimist') +const { Nuxt } = require('../') +const { join, resolve } = require('path') -var rootDir = resolve(process.argv.slice(2)[0] || '.') -var nuxtConfigFile = resolve(rootDir, 'nuxt.config.js') +const argv = parseArgs(process.argv.slice(2), { + alias: { + h: 'help', + H: 'hostname', + p: 'port', + c: 'config-file' + }, + boolean: ['h'], + string: ['H', 'c'], + default: { + c: 'nuxt.config.js' + } +}) + +if (argv.hostname === '') { + console.error(`> Provided hostname argument has no value`) + process.exit(1) +} + +if (argv.help) { + console.log(` + Description + Starts the application in production mode. + The application should be compiled with \`nuxt build\` first. + Usage + $ nuxt start -p -H + Options + --port, -p A port number on which to start the application + --hostname, -H Hostname on which to start the application + --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) + --help, -h Displays this message + `) + process.exit(0) +} + +const rootDir = resolve(argv._[0] || '.') +const nuxtConfigFile = resolve(rootDir, argv['config-file']) + +let options = {} -var options = {} if (fs.existsSync(nuxtConfigFile)) { options = require(nuxtConfigFile) +} else if (argv['config-file'] !== 'nuxt.config.js') { + console.error(`> Could not load config file ${argv['config-file']}`) + process.exit(1) } + if (typeof options.rootDir !== 'string') { options.rootDir = rootDir } -options.dev = false // Force production mode (no webpack middleware called) -var nuxt = module.exports = new Nuxt(options) -var port = process.env.PORT || process.env.npm_package_config_nuxt_port -var host = process.env.HOST || process.env.npm_package_config_nuxt_host -var server = nuxt.server = new nuxt.Server(nuxt).listen(port, host) +// Force production mode (no webpack middleware called) +options.dev = false + +// Check if project is built for production +const distDir = join(options.rootDir, options.buildDir || '.nuxt', 'dist') +if (!fs.existsSync(join(distDir, 'server-bundle.json'))) { + console.error('> No build files found, please run `nuxt build` before launching `nuxt start`') // eslint-disable-line no-console + process.exit(1) +} + +const nuxt = new Nuxt(options) +const port = argv.port || process.env.PORT || process.env.npm_package_config_nuxt_port +const host = argv.hostname || process.env.HOST || process.env.npm_package_config_nuxt_host +nuxt.listen(port, host) diff --git a/build/rollup.config.js b/build/rollup.config.js new file mode 100755 index 0000000000..3a55f6957f --- /dev/null +++ b/build/rollup.config.js @@ -0,0 +1,109 @@ +// Some parts brought from https://github.com/vuejs/vue/blob/dev/build/config.js +const { resolve } = require('path') +const rollupBabel = require('rollup-plugin-babel') +const rollupAlias = require('rollup-plugin-alias') +const rollupCommonJS = require('rollup-plugin-commonjs') +const rollupReplace = require('rollup-plugin-replace') +const rollupNodeResolve = require('rollup-plugin-node-resolve') +const packageJson = require('../package.json') + +const dependencies = Object.keys(packageJson.dependencies) +const version = packageJson.version || process.env.VERSION + +// ----------------------------- +// Banner +// ----------------------------- +const banner = + '/*!\n' + + ' * Nuxt.js v' + version + '\n' + + ' * Released under the MIT License.\n' + + ' */' + +// ----------------------------- +// Aliases +// ----------------------------- +const rootDir = resolve(__dirname, '..') +const libDir = resolve(rootDir, 'lib') +const distDir = resolve(rootDir, 'dist') + +const aliases = { + core: resolve(libDir, 'core/index.js'), + builder: resolve(libDir, 'builder/index.js'), + common: resolve(libDir, 'common/index.js'), + utils: resolve(libDir, 'common/utils.js'), + app: resolve(libDir, 'app') +} + +// ----------------------------- +// Builds +// ----------------------------- +const builds = { + nuxt: { + entry: resolve(libDir, 'index.js'), + dest: resolve(distDir, 'nuxt.js') + }, + core: { + entry: resolve(libDir, 'core/index.js'), + dest: resolve(distDir, 'core.js') + } +} + +// ----------------------------- +// Default config +// ----------------------------- +function genConfig (opts) { + const config = { + entry: opts.entry, + dest: opts.dest, + external: ['fs', 'path', 'http'].concat(dependencies, opts.external), + format: opts.format || 'cjs', + banner: opts.banner || banner, + moduleName: opts.moduleName || 'Nuxt', + sourceMap: true, + plugins: [ + rollupAlias(Object.assign({ + resolve: ['.js', '.json', '.jsx', '.ts'] + }, aliases, opts.alias)), + + rollupNodeResolve({ main: true, jsnext: true }), + + rollupCommonJS(), + + rollupBabel(Object.assign({ + exclude: 'node_modules/**', + plugins: [ + ['transform-runtime', { 'helpers': false, 'polyfill': false }], + 'transform-async-to-generator', + 'array-includes' + ], + presets: [ + 'babel-preset-es2015-rollup' + ], + 'env': { + 'test': { + 'plugins': [ 'istanbul' ] + } + } + }, opts.babel)), + + rollupReplace({ + __VERSION__: version + }) + ].concat(opts.plugins || []) + } + + if (opts.env) { + config.plugins.push(rollupReplace({ + 'process.env.NODE_ENV': JSON.stringify(opts.env) + })) + } + + return config +} + +if (process.env.TARGET) { + module.exports = genConfig(builds[process.env.TARGET]) +} else { + exports.getBuild = name => genConfig(builds[name]) + exports.getAllBuilds = () => Object.keys(builds).map(name => genConfig(builds[name])) +} diff --git a/build/start.js b/build/start.js new file mode 100755 index 0000000000..91da37ad05 --- /dev/null +++ b/build/start.js @@ -0,0 +1,92 @@ +#!/usr/bin/env node + +const { readFileSync, readJSONSync, writeFileSync, copySync, removeSync } = require('fs-extra') +const { resolve, relative } = require('path') + +// Dirs +const rootDir = resolve(__dirname, '..') +const startDir = resolve(rootDir, 'start') + +// Read main package.json +const packageJSON = readJSONSync(resolve(rootDir, 'package.json')) + +// Required and Excluded packages for start +let requires = [ + 'source-map-support' +] +const excludes = [ + 'path', + 'fs' +].concat(Object.keys(packageJSON.devDependencies)) + +// Parse dist/core.js for all external dependencies +const requireRegex = /require\('([-\w]+)'\)/g +const rawCore = readFileSync(resolve(rootDir, 'dist/core.js')) +let match = requireRegex.exec(rawCore) +while (match) { + requires.push(match[1]) + match = requireRegex.exec(rawCore) +} + +// Apply Excludes +requires = requires.filter(r => excludes.indexOf(r) === -1) + +// Resolve version constrains +let dependencies = {} +requires.forEach(r => { + if (!packageJSON.dependencies[r]) { + console.warn('cannot resolve dependency version for ' + r) + return + } + dependencies[r] = packageJSON.dependencies[r] +}) + +// Drop fields +let drops = ['devDependencies', 'scripts', 'nyc', 'types'] +drops.forEach(k => { + delete packageJSON[k] +}) + +// Update dependencies +packageJSON.dependencies = dependencies + +// Update package meta +packageJSON.name = 'nuxt-start' +packageJSON.description = 'runtime-only build for nuxt' + +// Update package.json +writeFileSync(resolve(startDir, 'package.json'), JSON.stringify(packageJSON, null, 2)) + +// Copy required files +const excludeFiles = [ + 'README.md', + '.gitignore' +] +packageJSON.files.forEach(file => { + if (excludeFiles.indexOf(file) !== -1) { + return + } + let src = resolve(rootDir, file) + let dst = resolve(startDir, file) + // console.log(relative(rootDir, src), '~>', relative(rootDir, dst)) + removeSync(dst) + copySync(src, dst) +}) + +// Remove extras +const extraFiles = [ + 'bin/nuxt-build', + 'bin/nuxt-generate', + 'bin/nuxt-dev', + 'dist/nuxt.js', + 'dist/nuxt.js.map' +] +extraFiles.forEach(file => { + removeSync(resolve(startDir, file)) +}) + +// Patch index.js +const startIndexjs = resolve(startDir, 'index.js') +writeFileSync(startIndexjs, String(readFileSync(startIndexjs)).replace('./dist/nuxt', './dist/core')) + +console.log('generated ' + packageJSON.name + '@' + packageJSON.version) diff --git a/examples/async-component-injection/assets/css/common.css b/examples/async-component-injection/assets/css/common.css new file mode 100644 index 0000000000..b4f5ee78bf --- /dev/null +++ b/examples/async-component-injection/assets/css/common.css @@ -0,0 +1,69 @@ +body { + font-family: "Roboto", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, serif; + text-rendering: optimizelegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 400; + font-size: 16px; + word-spacing: 1px; + color: #666; + margin: 0; +} +img { + border: none; +} +a { + color: #666; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease; +} +.header { + letter-spacing: 5px; + margin: 50px auto 15px; + text-align: center; +} +.header a { + font-size: 15px; + color: #444; +} +.links { + text-align: center; + font-family: "Roboto", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, serif; + color: #999; + font-size: 24px; + margin: 0; +} +.links a { + cursor: pointer; + padding: 2px; + margin: 0 3px; +} +.links img { + width: 15px; + height: 15px; +} +.header, +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-weight: 400; + color: #444; +} +.main { + max-width: 600px; + margin: 50px auto; + padding: 0 30px 50px; + position: relative; +} +@media screen and (max-width: 420px) { + .header { + margin: 40px auto 10px; + } + .header a { + font-size: 14px; + } +} diff --git a/examples/async-component-injection/assets/css/index.css b/examples/async-component-injection/assets/css/index.css new file mode 100644 index 0000000000..25870b834d --- /dev/null +++ b/examples/async-component-injection/assets/css/index.css @@ -0,0 +1,57 @@ +.main > ul { + list-style-type: none; + padding: 0; + padding-top: 4px; +} +.main > ul > li { + position: relative; + padding: 30px 0 30px; + border-bottom: 1px solid #e6e6e6; +} +.main > ul > li:first-child { + margin-top: -30px; +} +.main h2, +.main h3 { + letter-spacing: 1px; + margin: 0; + text-transform: uppercase; +} +.main h2 { + font-size: 20px; + letter-spacing: 1px; + margin-left: 120px; +} +.main h2 a { + color: #444; +} +.main h2 a:hover { + color: #f33; +} +.main h3 { + font-size: 13px; + color: #999; + position: absolute; + left: 0; + top: 33px; +} +@media screen and (max-width: 420px) { + .main h2 { + font-size: 16px; + margin-left: 0; + } + .main h2 a:hover { + color: #f66; + } + .main h3 { + font-size: 11px; + position: static; + margin-bottom: 10px; + } + .main ul li { + padding: 18px 0 20px; + } + .main ul li:first-child { + margin-top: -35px; + } +} diff --git a/examples/async-component-injection/assets/css/post.css b/examples/async-component-injection/assets/css/post.css new file mode 100644 index 0000000000..128b175f70 --- /dev/null +++ b/examples/async-component-injection/assets/css/post.css @@ -0,0 +1,307 @@ +.gutter pre { + color: #999; +} +pre { + color: #525252; +} +pre .function .keyword, +pre .constant { + color: #0092db; +} +pre .keyword, +pre .attribute { + color: #e96900; +} +pre .number, +pre .literal { + color: #ae81ff; +} +pre .tag, +pre .tag .title, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color: #2973b7; +} +pre .class .title { + color: #fff; +} +pre .symbol, +pre .symbol .string, +pre .value, +pre .regexp { + color: #42b983; +} +pre .title { + color: #a6e22e; +} +pre .tag .value, +pre .string, +pre .subst, +pre .haskell .type, +pre .preprocessor, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt { + color: #42b983; +} +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #b3b3b3; +} +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} +.main .post { + position: relative; + padding-bottom: 30px; + margin-bottom: 30px; + border-bottom: 1px solid #e6e6e6; +} +.main .post h1, +.main .post h2 { + text-transform: uppercase; + letter-spacing: 0px; +} +.main .post h1 a:hover, +.main .post h2 a:hover { + border-bottom: 3px solid #666; +} +.main .post h1 { + font-size: 32px; + margin: 0 0 45px; + letter-spacing: 1px; +} +.main .post h2 { + font-size: 24px; + margin: 60px 0 30px; + position: relative; +} +.main .post h2:before { + content: ''; + border-left: 5px solid #41b883; + position: absolute; + left: -15px; + height: 75%; + top: 12%; +} +.main .post h3 { + margin: 30px 0 15px; +} +.main .post .date { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-size: 13px; + color: #999; + margin: 0 0 30px; + letter-spacing: 1px; + position: initial; + text-transform: none; +} +.main .post .content { + text-align: left; + line-height: 1.8em; +} +.main .post .content p, +.main .post .content ul, +.main .post .content ol { + margin: 1em 0 1.5em; +} +.main .post .content strong { + font-weight: 600; + color: #444; +} +.main .post .content ol { + padding-left: 1.6em; +} +.main .post .content ul { + padding-left: 15px; + list-style-type: none; +} +.main .post .content ul li:before { + position: absolute; + font-weight: 600; + content: " ยท "; + margin: 0; + left: 0; +} +.main .post .content a { + color: #41b883; + border-bottom: 2px solid transparent; +} +.main .post .content a:hover { + color: #41b883; + border-bottom-color: #41b883; +} +.main .post .content .highlight, +.main .post .content .highlight table { + margin: 0; + width: 100%; +} +.main .post .content .highlight { + overflow-x: auto; +} +.main .post .content .highlight table, +.main .post .content .highlight tr, +.main .post .content .highlight td { + padding: 0; + border-collapse: collapse; +} +.main .post .content code { + font-family: "Roboto Mono", "Menlo", "Consolas", monospace; + font-size: 13px; + background-color: #f6f6f6; + padding: 3px 10px; + margin: 0 5px; + border-radius: 2px; +} +.main .post .content pre { + font-family: "Roboto Mono", "Menlo", "Consolas", monospace; + font-size: 13px; + overflow-x: auto; + text-align: left; + padding: 15px 25px; + background-color: #f6f6f6; + line-height: 1.5em; +} +.main .post .content .code pre { + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} +.main .post .content .gutter pre { + padding: 15px 0 15px 15px; + color: #75715e; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; +} +.main .post .content blockquote { + margin: 2em 0; + padding-left: 30px; + border-left: 5px solid #e6e6e6; +} +.main .post .content blockquote p { + font-size: 17px; + font-style: italic; + line-height: 1.8em; + color: #999; +} +.main .post img { + display: block; + max-width: 100%; +} +.blog-nav { + position: fixed; + bottom: 20px; + height: 20px; + line-height: 20px; + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-size: 15px; + color: #999; + text-decoration: none; + cursor: pointer; + letter-spacing: 1px; + border-bottom: 3px solid transparent; +} +.blog-nav:hover { + color: #333; + border-bottom-color: #333; +} +#newer { + left: 40px; +} +#older { + right: 40px; +} +.show-comments { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + text-align: center; +} +.show-comments a { + color: #999; + cursor: pointer; +} +.show-comments a:hover { + color: #666; +} +@media screen and (max-width: 900px) { + .main .post { + padding-bottom: 80px; + } + .blog-nav { + position: absolute; + bottom: 30px; + } + #newer { + left: 0; + } + #older { + right: 0; + } +} +@media screen and (max-width: 420px) { + .main { + margin-top: 32px; + } + .main .post h1 { + font-size: 24px; + margin: 0 0 30px; + } + .main .post h2 { + font-size: 20px; + margin: 30px 0 15px; + } + .main .post h3 { + font-size: 16px; + line-height: 1.3em; + } + .main .post .date { + font-size: 12px; + margin: 0 0 20px; + } + .main .post .content { + font-size: 15px; + } + .main .post .content pre { + font-size: 12px; + } + .main .post .content blockquote p { + font-size: 16px; + } + .blog-nav { + font-size: 14px; + color: #444; + } +} diff --git a/examples/async-component-injection/assets/img/github.png b/examples/async-component-injection/assets/img/github.png new file mode 100644 index 0000000000..3844ec302d Binary files /dev/null and b/examples/async-component-injection/assets/img/github.png differ diff --git a/examples/async-component-injection/assets/img/swimmer.jpg b/examples/async-component-injection/assets/img/swimmer.jpg new file mode 100644 index 0000000000..e22693d4e6 Binary files /dev/null and b/examples/async-component-injection/assets/img/swimmer.jpg differ diff --git a/examples/async-component-injection/assets/img/twitter.png b/examples/async-component-injection/assets/img/twitter.png new file mode 100644 index 0000000000..e84e1b8a28 Binary files /dev/null and b/examples/async-component-injection/assets/img/twitter.png differ diff --git a/examples/async-component-injection/layouts/default.vue b/examples/async-component-injection/layouts/default.vue new file mode 100644 index 0000000000..d3a922c8b4 --- /dev/null +++ b/examples/async-component-injection/layouts/default.vue @@ -0,0 +1,15 @@ + + diff --git a/examples/async-component-injection/nuxt.config.js b/examples/async-component-injection/nuxt.config.js new file mode 100644 index 0000000000..569cee3b0b --- /dev/null +++ b/examples/async-component-injection/nuxt.config.js @@ -0,0 +1,22 @@ +module.exports = { + head: { + title: 'Nuxt Blog', + meta: [ + { charset: 'utf-8' }, + { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' } + ], + link: [ + { rel: 'icon', href: '/favicon.ico', type: 'image/x-icon' }, + { rel: 'stylesheet', href: 'http://fonts.googleapis.com/css?family=Montserrat|Roboto:400,400italic,600|Roboto+Mono', type: 'text/css' } + ] + }, + css: [ + '@/assets/css/common.css' + ], + generate: { + routes: [ + '/deep-dive-into-ocean', + '/welcome-to-my-blog' + ] + } +} diff --git a/examples/offline-nuxt/package.json b/examples/async-component-injection/package.json similarity index 66% rename from examples/offline-nuxt/package.json rename to examples/async-component-injection/package.json index e202ad873a..4aeda9d845 100644 --- a/examples/offline-nuxt/package.json +++ b/examples/async-component-injection/package.json @@ -1,11 +1,11 @@ { - "name": "offline-config-nuxt", + "name": "components-injection-nuxt", + "dependencies": { + "nuxt": "latest" + }, "scripts": { "dev": "nuxt", "build": "nuxt build", - "start": "nuxt start" - }, - "dependencies": { - "nuxt": "latest" + "start": "nuxt" } } diff --git a/examples/async-component-injection/pages/_slug.vue b/examples/async-component-injection/pages/_slug.vue new file mode 100644 index 0000000000..10b87643d3 --- /dev/null +++ b/examples/async-component-injection/pages/_slug.vue @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/examples/dynamic-components/components/image.vue b/examples/dynamic-components/components/image.vue new file mode 100644 index 0000000000..f60da9a50e --- /dev/null +++ b/examples/dynamic-components/components/image.vue @@ -0,0 +1,36 @@ + + + + + \ No newline at end of file diff --git a/examples/dynamic-components/components/text.vue b/examples/dynamic-components/components/text.vue new file mode 100644 index 0000000000..856ed0f78c --- /dev/null +++ b/examples/dynamic-components/components/text.vue @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/examples/dynamic-components/js/messages.js b/examples/dynamic-components/js/messages.js new file mode 100644 index 0000000000..3d826501b3 --- /dev/null +++ b/examples/dynamic-components/js/messages.js @@ -0,0 +1,16 @@ +const messages = [ + { component: 'vText', data: 'Welcome to the Dynamic Component demo!' }, + { component: 'vText', data: 'Look at this nice picture:' }, + { component: 'vImage', data: 'https://placeimg.com/350/200/animals' }, + { component: 'vText', data: 'If you prefer, look at this code component:' }, + { component: 'vCode', data: 'var a = 1;\nvar b = 2;\nb = a;' }, + { component: 'vText', data: 'End of demo ๐ŸŽ‰' }, +] + +function streamMessages (fn, i = 0) { + if (i >= messages.length) return + fn(messages[i]) + setTimeout(() => streamMessages(fn, i + 1), 2000) +} + +export default streamMessages \ No newline at end of file diff --git a/examples/dynamic-components/nuxt.config.js b/examples/dynamic-components/nuxt.config.js new file mode 100644 index 0000000000..7656e08270 --- /dev/null +++ b/examples/dynamic-components/nuxt.config.js @@ -0,0 +1,9 @@ +module.exports = { + head: { + titleTemplate: 'Nuxt.js - Dynamic Components', + meta: [ + { charset: 'utf-8' }, + { name: 'viewport', content: 'width=device-width, initial-scale=1' } + ] + } +} \ No newline at end of file diff --git a/examples/dynamic-components/package.json b/examples/dynamic-components/package.json new file mode 100644 index 0000000000..061ad4c4fb --- /dev/null +++ b/examples/dynamic-components/package.json @@ -0,0 +1,11 @@ +{ + "name": "dynamic-components-nuxt", + "dependencies": { + "nuxt": "latest" + }, + "scripts": { + "dev": "nuxt", + "build": "nuxt build", + "start": "nuxt" + } +} diff --git a/examples/dynamic-components/pages/index.vue b/examples/dynamic-components/pages/index.vue new file mode 100755 index 0000000000..c66cfacb68 --- /dev/null +++ b/examples/dynamic-components/pages/index.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/examples/global-css/nuxt.config.js b/examples/global-css/nuxt.config.js index f5ae0a61d1..f916e5a053 100644 --- a/examples/global-css/nuxt.config.js +++ b/examples/global-css/nuxt.config.js @@ -1,12 +1,13 @@ -const { join } = require('path') - module.exports = { + head: { + meta: [ + { charset: 'utf-8' }, + { name: 'viewport', content: 'width=device-width, initial-scale=1' }, + { hid: 'description', name: 'description', content: 'Meta description' } + ] + }, css: [ - 'hover.css/css/hover-min.css', - 'bulma/bulma.sass', - join(__dirname, 'css/main.css') - ], - build: { - extractCSS: true - } + 'bulma/css/bulma.css', + '~/css/main.css' + ] } diff --git a/examples/global-css/package.json b/examples/global-css/package.json index 9a60d27928..75e5b4647d 100644 --- a/examples/global-css/package.json +++ b/examples/global-css/package.json @@ -1,11 +1,8 @@ { "name": "nuxt-global-css", "dependencies": { - "bulma": "^0.4.0", - "hover.css": "^2.2.0", - "node-sass": "^4.5.1", - "nuxt": "^0.10.0", - "sass-loader": "^6.0.3" + "bulma": "^0.4.3", + "nuxt": "latest" }, "scripts": { "dev": "nuxt", diff --git a/examples/head-elements/pages/about.vue b/examples/head-elements/pages/about.vue index 4118718f1d..745878904f 100644 --- a/examples/head-elements/pages/about.vue +++ b/examples/head-elements/pages/about.vue @@ -8,7 +8,7 @@ diff --git a/examples/i18n/pages/index.vue b/examples/i18n/pages/index.vue index fab3df9c9c..f0ca25b6f8 100644 --- a/examples/i18n/pages/index.vue +++ b/examples/i18n/pages/index.vue @@ -1,4 +1,4 @@ diff --git a/examples/middleware/layouts/default.vue b/examples/middleware/layouts/default.vue index 07f12ba8a8..089ea71ad0 100644 --- a/examples/middleware/layouts/default.vue +++ b/examples/middleware/layouts/default.vue @@ -6,7 +6,7 @@ diff --git a/examples/routes-transitions/nuxt.config.js b/examples/routes-transitions/nuxt.config.js index b904282bbc..c4264e9c56 100644 --- a/examples/routes-transitions/nuxt.config.js +++ b/examples/routes-transitions/nuxt.config.js @@ -2,6 +2,5 @@ module.exports = { build: { vendor: ['axios'] }, - css: ['assets/main.css'], - loading: false + css: ['~/assets/main.css'] } diff --git a/examples/routes-transitions/pages/users.vue b/examples/routes-transitions/pages/users.vue index ecf89457ce..ce5c065ba4 100644 --- a/examples/routes-transitions/pages/users.vue +++ b/examples/routes-transitions/pages/users.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/index.js b/index.js index 8e7487a896..24e035805e 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,16 @@ /*! * Nuxt.js * (c) 2016-2017 Chopin Brothers + * Core maintainer: Pooya (@pi0) * Released under the MIT License. */ +// Node Source Map Support +// https://github.com/evanw/node-source-map-support +require('source-map-support').install() + +// Fix babel flag +/* istanbul ignore else */ process.noDeprecation = true -var Nuxt = require('./dist/nuxt.js') - -module.exports = Nuxt.default ? Nuxt.default : Nuxt +module.exports = require('./dist/nuxt') diff --git a/lib/app/App.vue b/lib/app/App.vue index fa8ef6d403..e2e2cd4c8d 100644 --- a/lib/app/App.vue +++ b/lib/app/App.vue @@ -15,7 +15,7 @@ let layouts = { <% var layoutsKeys = Object.keys(layouts); layoutsKeys.forEach(function (key, i) { %> - "_<%= key %>": () => import('<%= layouts[key] %>' /* webpackChunkName: "layouts/<%= key %>" */)<%= (i + 1) < layoutsKeys.length ? ',' : '' %> + "_<%= key %>": () => import('<%= layouts[key] %>' /* webpackChunkName: "layouts/<%= key %>" */).then(m => m.default || m)<%= (i + 1) < layoutsKeys.length ? ',' : '' %> <% }) %> } diff --git a/lib/app/client.js b/lib/app/client.js index ccb2381d02..30fe630e75 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -1,185 +1,315 @@ -'use strict' - import Vue from 'vue' import middleware from './middleware' import { createApp, NuxtError } from './index' -import { applyAsyncData, sanitizeComponent, getMatchedComponents, getMatchedComponentsInstances, flatMapComponents, getContext, middlewareSeries, promisify, getLocation, compile } from './utils' +import { + applyAsyncData, + sanitizeComponent, + getMatchedComponents, + getMatchedComponentsInstances, + flatMapComponents, + getContext, + middlewareSeries, + promisify, + getLocation, + compile +} from './utils' + const noopData = () => { return {} } const noopFetch = () => {} + +// Global shared references let _lastPaths = [] let _lastComponentsFiles = [] - let app let router -<%= (store ? 'let store' : '') %> +<% if (store) { %>let store<% } %> + +// Try to rehydrate SSR data from window +const NUXT = window.__NUXT__ || {} +NUXT.components = window.__COMPONENTS__ || null + +// Create and mount App +createApp() +.then(mountApp) +.catch(err => { + console.error('[nuxt] Error while initializing app', err) +}) + +function componentOption(component, key, ...args) { + if (!component || !component.options || !component.options[key]) { + return {} + } + const option = component.options[key] + if (typeof option === 'function') { + return option(...args) + } + return option +} function mapTransitions(Components, to, from) { - return Components.map((Component) => { - let transition = Component.options.transition - if (typeof transition === 'function') { - return transition(to, from) + const componentTransitions = component => { + const transition = componentOption(component, 'transition', to, from) + return (typeof transition === 'string' ? { name: transition } : transition) + } + + return Components.map(Component => { + // Clone original object to prevent overrides + const transitions = Object.assign({}, componentTransitions(Component)) + + // Combine transitions & prefer `leave` transitions of 'from' route + if (from && from.matched.length && from.matched[0].components.default) { + const from_transitions = componentTransitions(from.matched[0].components.default) + Object.keys(from_transitions) + .filter(key => from_transitions[key] && key.toLowerCase().indexOf('leave') !== -1) + .forEach(key => { transitions[key] = from_transitions[key] }) } - return transition + + return transitions }) } -function loadAsyncComponents (to, from, next) { - const resolveComponents = flatMapComponents(to, (Component, _, match, key) => { - if (typeof Component === 'function' && !Component.options) { - return new Promise(function (resolve, reject) { - const _resolve = (Component) => { - Component = sanitizeComponent(Component) - match.components[key] = Component - resolve(Component) - } - Component().then(_resolve).catch(reject) - }) - } - Component = sanitizeComponent(Component) - match.components[key] = Component - return match.components[key] - }) +async function loadAsyncComponents (to, from, next) { + // Check if route hash changed const fromPath = from.fullPath.split('#')[0] const toPath = to.fullPath.split('#')[0] - this._hashChanged = (fromPath === toPath) - if (!this._hashChanged) { - <%= (loading ? 'this.$loading.start && this.$loading.start()' : '') %> + this._hashChanged = fromPath === toPath + + <% if (loading) { %> + if (!this._hashChanged && this.$loading.start) { + this.$loading.start() } - Promise.all(resolveComponents) - .then(() => next()) - .catch((err) => { - let statusCode = err.statusCode || err.status || (err.response && err.response.status) || 500 - this.error({ statusCode, message: err.message }) - next(false) + <% } %> + + try { + await Promise.all(flatMapComponents(to, (Component, _, match, key) => { + // If component already resolved + if (typeof Component !== 'function' || Component.options) { + const _Component = sanitizeComponent(Component) + match.components[key] = _Component + return _Component + } + + // Resolve component + return Component().then(Component => { + const _Component = sanitizeComponent(Component) + match.components[key] = _Component + return _Component + }) + })) + + next() + } catch (err) { + if (!err) err = {} + const statusCode = err.statusCode || err.status || (err.response && err.response.status) || 500 + this.error({ statusCode, message: err.message }) + next(false) + } +} + +// Get matched components +function resolveComponents(router) { + const path = getLocation(router.options.base) + + return flatMapComponents(router.match(path), (Component, _, match, key, index) => { + // If component already resolved + if (typeof Component !== 'function' || Component.options) { + const _Component = sanitizeComponent(Component) + match.components[key] = _Component + return _Component + } + + // Resolve component + return Component().then(Component => { + const _Component = sanitizeComponent(Component) + if (NUXT.serverRendered) { + applyAsyncData(_Component, NUXT.data[index]) + if (NUXT.components) { + Component.options.components = Object.assign(_Component.options.components, NUXT.components[index]) + } + _Component._Ctor = _Component + } + match.components[key] = _Component + return _Component + }) }) } function callMiddleware (Components, context, layout) { - // if layout is undefined, only call global middleware let midd = <%= serialize(router.middleware, { isJSON: true }) %> let unknownMiddleware = false + + // If layout is undefined, only call global middleware if (typeof layout !== 'undefined') { - midd = [] // exclude global middleware if layout defined (already called before) + midd = [] // Exclude global middleware if layout defined (already called before) if (layout.middleware) { midd = midd.concat(layout.middleware) } - Components.forEach((Component) => { + Components.forEach(Component => { if (Component.options.middleware) { midd = midd.concat(Component.options.middleware) } }) } - midd = midd.map((name) => { + + midd = midd.map(name => { if (typeof middleware[name] !== 'function') { unknownMiddleware = true this.error({ statusCode: 500, message: 'Unknown middleware ' + name }) } return middleware[name] }) - if (unknownMiddleware) return + + if (unknownMiddleware) return return middlewareSeries(midd, context) } async function render (to, from, next) { if (this._hashChanged) return next() - let layout + + // nextCalled is true when redirected let nextCalled = false - const _next = function (path) { - <%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %> + const _next = path => { + <% if(loading) { %>if(this.$loading.finish) this.$loading.finish()<% } %> if (nextCalled) return nextCalled = true next(path) } - let context = getContext({ to<%= (store ? ', store' : '') %>, isClient: true, next: _next.bind(this), error: this.error.bind(this) }, app) - let Components = getMatchedComponents(to) + + // Update context + const context = getContext({ + to, + <% if (store) { %>store,<% } %> + isClient: true, + next: _next.bind(this), + error: this.error.bind(this), + app + }) this._context = context this._dateLastError = this.$options._nuxt.dateErr this._hadError = !!this.$options._nuxt.err + + // Get route's matched components + const Components = getMatchedComponents(to) + + // If no Components matched, generate 404 if (!Components.length) { // Default layout await callMiddleware.call(this, Components, context) if (context._redirected) return + + // Load layout for error page layout = await this.loadLayout(typeof NuxtError.layout === 'function' ? NuxtError.layout(context) : NuxtError.layout) await callMiddleware.call(this, Components, context, layout) if (context._redirected) return + this.error({ statusCode: 404, message: 'This page could not be found.' }) return next() } + // Update ._data and other properties if hot reloaded - Components.forEach(function (Component) { + Components.forEach(Component => { if (Component._Ctor && Component._Ctor.options) { Component.options.asyncData = Component._Ctor.options.asyncData Component.options.fetch = Component._Ctor.options.fetch } }) + + // Apply transitions this.setTransitions(mapTransitions(Components, to, from)) + try { - // Set layout + // Call middleware await callMiddleware.call(this, Components, context) if (context._redirected) return - layout = Components[0].options.layout + + // Set layout + let layout = Components[0].options.layout if (typeof layout === 'function') { layout = layout(context) } layout = await this.loadLayout(layout) + + // Call middleware for layout await callMiddleware.call(this, Components, context, layout) if (context._redirected) return - // Pass validation? + + // Call .validate() let isValid = true - Components.forEach((Component) => { + Components.forEach(Component => { if (!isValid) return if (typeof Component.options.validate !== 'function') return isValid = Component.options.validate({ params: to.params || {}, - query : to.query || {}<%= (store ? ', store: context.store' : '') %> + query : to.query || {}, + <% if(store) { %>store: context.store <% } %> }) }) + // ...If .validate() returned false if (!isValid) { this.error({ statusCode: 404, message: 'This page could not be found.' }) return next() } + + // Call asyncData & fetch hooks on components matched by the route. await Promise.all(Components.map((Component, i) => { // Check if only children route changed Component._path = compile(to.matched[i].path)(to.params) if (!this._hadError && Component._path === _lastPaths[i] && (i + 1) !== Components.length) { return Promise.resolve() } + let promises = [] - // asyncData method - if (Component.options.asyncData && typeof Component.options.asyncData === 'function') { - var promise = promisify(Component.options.asyncData, context) - promise.then((asyncDataResult) => { + + const hasAsyncData = Component.options.asyncData && typeof Component.options.asyncData === 'function' + const hasFetch = !!Component.options.fetch + <% if(loading) { %>const loadingIncrease = (hasAsyncData && hasFetch) ? 30 : 45<% } %> + + // Call asyncData(context) + if (hasAsyncData) { + const promise = promisify(Component.options.asyncData, context) + .then(asyncDataResult => { applyAsyncData(Component, asyncDataResult) - <%= (loading ? 'this.$loading.increase && this.$loading.increase(30)' : '') %> + <% if(loading) { %>if(this.$loading.increase) this.$loading.increase(loadingIncrease)<% } %> }) promises.push(promise) } - if (Component.options.fetch) { - var p = Component.options.fetch(context) - if (!p || (!(p instanceof Promise) && (typeof p.then !== 'function'))) { p = Promise.resolve(p) } - <%= (loading ? 'p.then(() => this.$loading.increase && this.$loading.increase(30))' : '') %> + + // Call fetch(context) + if (hasFetch) { + let p = Component.options.fetch(context) + if (!p || (!(p instanceof Promise) && (typeof p.then !== 'function'))) { + p = Promise.resolve(p) + } + p.then(fetchResult => { + <% if(loading) { %>if(this.$loading.increase) this.$loading.increase(loadingIncrease)<% } %> + }) promises.push(p) } + return Promise.all(promises) })) + _lastPaths = Components.map((Component, i) => compile(to.matched[i].path)(to.params)) - <%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %> + + <% if(loading) { %>if(this.$loading.finish) this.$loading.finish()<% } %> + // If not redirected - if (!nextCalled) { - next() - } + if (!nextCalled) next() + } catch (error) { + if (!error) error = {} _lastPaths = [] error.statusCode = error.statusCode || error.status || (error.response && error.response.status) || 500 + + // Load error layout let layout = NuxtError.layout if (typeof layout === 'function') { layout = layout(context) } - this.loadLayout(layout) - .then(() => { - this.error(error) - next(false) - }) + await this.loadLayout(layout) + + this.error(error) + next(false) } } @@ -197,46 +327,74 @@ function normalizeComponents (to, ___) { } // When navigating on a different route but the same component is used, Vue.js -// will not update the instance data, so we have to update $data ourselves +// Will not update the instance data, so we have to update $data ourselves function fixPrepatch (to, ___) { if (this._hashChanged) return + Vue.nextTick(() => { - let instances = getMatchedComponentsInstances(to) + const instances = getMatchedComponentsInstances(to) + _lastComponentsFiles = instances.map((instance, i) => { if (!instance) return ''; + if (_lastPaths[i] === instance.constructor._path && typeof instance.constructor.options.data === 'function') { - let newData = instance.constructor.options.data.call(instance) + const newData = instance.constructor.options.data.call(instance) for (let key in newData) { Vue.set(instance.$data, key, newData[key]) } } + return instance.constructor.options.__file }) - // hide error component if no error + + // Hide error component if no error if (this._hadError && this._dateLastError === this.$options._nuxt.dateErr) { this.error() } + // Set layout let layout = this.$options._nuxt.err ? NuxtError.layout : to.matched[0].components.default.options.layout if (typeof layout === 'function') { layout = layout(this._context) } this.setLayout(layout) - // hot reloading + + <% if (isDev) { %> + // Hot reloading setTimeout(() => hotReloadAPI(this), 100) + <% } %> }) } +function nuxtReady (app) { + window._nuxtReadyCbs.forEach((cb) => { + if (typeof cb === 'function') { + cb(app) + } + }) + // Special JSDOM + if (typeof window._onNuxtLoaded === 'function') { + window._onNuxtLoaded(app) + } + // Add router hooks + router.afterEach(function (to, from) { + app.$nuxt.$emit('routeChanged', to, from) + }) +} + +<% if (isDev) { %> // Special hot reload with asyncData(context) function hotReloadAPI (_app) { if (!module.hot) return + let $components = [] let $nuxt = _app.$nuxt + while ($nuxt && $nuxt.$children && $nuxt.$children.length) { - $nuxt.$children.forEach(function (child, i) { + $nuxt.$children.forEach((child, i) => { if (child.$vnode.data.nuxtChild) { let hasAlready = false - $components.forEach(function (component) { + $components.forEach(component => { if (component.$options.__file === child.$options.__file) { hasAlready = true } @@ -248,13 +406,16 @@ function hotReloadAPI (_app) { $nuxt = child }) } + $components.forEach(addHotReload.bind(_app)) } function addHotReload ($component, depth) { if ($component.$vnode.data._hasHotReload) return $component.$vnode.data._hasHotReload = true + var _forceUpdate = $component.$forceUpdate.bind($component.$parent) + $component.$vnode.context.$forceUpdate = () => { let Components = getMatchedComponents(router.currentRoute) let Component = Components[depth] @@ -314,104 +475,80 @@ function addHotReload ($component, depth) { }) } } +<% } %> -// Load vue app -const NUXT = window.__NUXT__ || {} -if (!NUXT) { - throw new Error('[nuxt.js] cannot find the global variable __NUXT__, make sure the server is working.') -} -// Get matched components -const resolveComponents = function (router) { - const path = getLocation(router.options.base) - return flatMapComponents(router.match(path), (Component, _, match, key, index) => { - if (typeof Component === 'function' && !Component.options) { - return new Promise(function (resolve, reject) { - const _resolve = (Component) => { - Component = sanitizeComponent(Component) - if (NUXT.serverRendered) { - applyAsyncData(Component, NUXT.data[index]) - } - match.components[key] = Component - resolve(Component) - } - Component().then(_resolve).catch(reject) - }) - } - Component = sanitizeComponent(Component) - match.components[key] = Component - return Component - }) -} - -function nuxtReady (app) { - window._nuxtReadyCbs.forEach((cb) => { - if (typeof cb === 'function') { - cb(app) - } - }) - // Special JSDOM - if (typeof window._onNuxtLoaded === 'function') { - window._onNuxtLoaded(app) - } - // Add router hooks - router.afterEach(function (to, from) { - app.$nuxt.$emit('routeChanged', to, from) - }) -} - -createApp() -.then(async (__app) => { +async function mountApp(__app) { + // Set global variables app = __app.app router = __app.router - <%= (store ? 'store = __app.store' : '') %> + <% if (store) { %>store = __app.store <% } %> + + // Resolve route components const Components = await Promise.all(resolveComponents(router)) + + // Create Vue instance const _app = new Vue(app) + + // Load layout const layout = NUXT.layout || 'default' await _app.loadLayout(layout) _app.setLayout(layout) + + // Mounts Vue app to DOM element const mountApp = () => { _app.$mount('#__nuxt') + + // Listen for first Vue update Vue.nextTick(() => { - // Hot reloading - hotReloadAPI(_app) // Call window.onNuxtReady callbacks nuxtReady(_app) + <% if (isDev) { %> + // Enable hot reloading + hotReloadAPI(_app) + <% } %> }) } + + // Enable transitions _app.setTransitions = _app.$options._nuxt.setTransitions.bind(_app) if (Components.length) { _app.setTransitions(mapTransitions(Components, router.currentRoute)) - _lastPaths = router.currentRoute.matched.map((route) => compile(route.path)(router.currentRoute.params)) - _lastComponentsFiles = Components.map((Component) => Component.options.__file) + _lastPaths = router.currentRoute.matched.map(route => compile(route.path)(router.currentRoute.params)) + _lastComponentsFiles = Components.map(Component => Component.options.__file) } + + // Initialize error handler _app.error = _app.$options._nuxt.error.bind(_app) - _app.$loading = {} // to avoid error while _app.$nuxt does not exist + _app.$loading = {} // To avoid error while _app.$nuxt does not exist if (NUXT.error) _app.error(NUXT.error) + // Add router hooks router.beforeEach(loadAsyncComponents.bind(_app)) router.beforeEach(render.bind(_app)) router.afterEach(normalizeComponents) router.afterEach(fixPrepatch.bind(_app)) + + // If page already is server rendered if (NUXT.serverRendered) { mountApp() return } - render.call(_app, router.currentRoute, router.currentRoute, function (path) { - if (path) { - let mounted = false - router.afterEach(function () { - if (mounted) return - mounted = true - mountApp() - }) - router.push(path) + + render.call(_app, router.currentRoute, router.currentRoute, path => { + if (!path) { + normalizeComponents(router.currentRoute, router.currentRoute) + fixPrepatch.call(_app, router.currentRoute, router.currentRoute) + mountApp() return } - normalizeComponents(router.currentRoute, router.currentRoute) - fixPrepatch.call(_app, router.currentRoute, router.currentRoute) - mountApp() + + // Push the path and then mount app + let mounted = false + router.afterEach(() => { + if (mounted) return + mounted = true + mountApp() + }) + router.push(path) }) -}) -.catch((err) => { - console.error('[nuxt.js] Cannot load components', err) // eslint-disable-line no-console -}) +} \ No newline at end of file diff --git a/lib/app/components/nuxt-child.js b/lib/app/components/nuxt-child.js index becc3b82a8..492e002ac8 100644 --- a/lib/app/components/nuxt-child.js +++ b/lib/app/components/nuxt-child.js @@ -30,7 +30,7 @@ export default { functional: true, render (h, { parent, data }) { data.nuxtChild = true - + const _parent = parent const transitions = parent.$nuxt.nuxt.transitions const defaultTransition = parent.$nuxt.nuxt.defaultTransition let depth = 0 @@ -51,7 +51,7 @@ export default { let listeners = {} listenersKeys.forEach((key) => { if (typeof transition[key] === 'function') { - listeners[key] = transition[key] + listeners[key] = transition[key].bind(_parent) } }) return h('transition', { diff --git a/lib/app/components/nuxt.vue b/lib/app/components/nuxt.vue index b6eb339a31..01f71cc489 100644 --- a/lib/app/components/nuxt.vue +++ b/lib/app/components/nuxt.vue @@ -1,15 +1,16 @@ ` + APP += context.renderScripts() + } + + HEAD += context.renderStyles() + + let html = this.resources.ssrTemplate({ + HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(), + BODY_ATTRS: m.bodyAttrs.text(), + HEAD, + APP + }) + + return { + html, + resourceHints, + error: context.nuxt.error, + redirected: context.redirected + } + } + + async renderAndGetWindow (url, opts = {}) { + /* istanbul ignore if */ + if (!jsdom) { + try { + jsdom = require('jsdom') + } catch (e) /* istanbul ignore next */ { + console.error('Fail when calling nuxt.renderAndGetWindow(url)') // eslint-disable-line no-console + console.error('jsdom module is not installed') // eslint-disable-line no-console + console.error('Please install jsdom with: npm install --save-dev jsdom') // eslint-disable-line no-console + throw e + } + } + let options = { + resources: 'usable', // load subresources (https://github.com/tmpvar/jsdom#loading-subresources) + runScripts: 'dangerously', + beforeParse (window) { + // Mock window.scrollTo + window.scrollTo = () => { + } + } + } + if (opts.virtualConsole !== false) { + options.virtualConsole = new jsdom.VirtualConsole().sendTo(console) + } + url = url || 'http://localhost:3000' + const { window } = await jsdom.JSDOM.fromURL(url, options) + // If Nuxt could not be loaded (error from the server-side) + const nuxtExists = window.document.body.innerHTML.includes('window.__NUXT__') + /* istanbul ignore if */ + if (!nuxtExists) { + let error = new Error('Could not load the nuxt app') + error.body = window.document.body.innerHTML + throw error + } + // Used by nuxt.js to say when the components are loaded and the app ready + await new Promise((resolve) => { + window._onNuxtLoaded = () => resolve(window) + }) + // Send back window object + return window + } +} + +const parseTemplate = templateStr => _.template(templateStr, { + interpolate: /{{([\s\S]+?)}}/g +}) + +const resourceMap = [ + { + key: 'clientManifest', + fileName: 'vue-ssr-client-manifest.json', + transform: JSON.parse + }, + { + key: 'serverBundle', + fileName: 'server-bundle.json', + transform: JSON.parse + }, + { + key: 'ssrTemplate', + fileName: 'index.ssr.html', + transform: parseTemplate + }, + { + key: 'spaTemplate', + fileName: 'index.spa.html', + transform: parseTemplate + } +] + +// Protector utility against request to SSR bundle files +const ssrResourceRegex = new RegExp(resourceMap.map(resource => resource.fileName).join('|'), 'i') diff --git a/lib/generate.js b/lib/generate.js deleted file mode 100644 index 7525cb843d..0000000000 --- a/lib/generate.js +++ /dev/null @@ -1,161 +0,0 @@ -'use strict' - -import fs from 'fs-extra' -import pify from 'pify' -import _ from 'lodash' -import { resolve, join, dirname, sep } from 'path' -import { isUrl, promisifyRoute, waitFor } from './utils' -import { minify } from 'html-minifier' -const debug = require('debug')('nuxt:generate') -const copy = pify(fs.copy) -const remove = pify(fs.remove) -const writeFile = pify(fs.writeFile) -const mkdirp = pify(fs.mkdirp) - -const defaults = { - dir: 'dist', - routes: [], - interval: 0, - minify: { - collapseBooleanAttributes: true, - collapseWhitespace: true, - decodeEntities: true, - minifyCSS: true, - minifyJS: true, - processConditionalComments: true, - removeAttributeQuotes: false, - removeComments: false, - removeEmptyAttributes: true, - removeOptionalTags: true, - removeRedundantAttributes: true, - removeScriptTypeAttributes: false, - removeStyleLinkTypeAttributes: false, - removeTagWhitespace: false, - sortAttributes: true, - sortClassName: true, - trimCustomFragments: true, - useShortDoctype: true - } -} - -export default async function () { - const s = Date.now() - let errors = [] - /* - ** Wait for modules to be initialized - */ - await this.ready() - /* - ** Set variables - */ - this.options.generate = _.defaultsDeep(this.options.generate, defaults) - var srcStaticPath = resolve(this.srcDir, 'static') - var srcBuiltPath = resolve(this.buildDir, 'dist') - var distPath = resolve(this.dir, this.options.generate.dir) - var distNuxtPath = join(distPath, (isUrl(this.options.build.publicPath) ? '' : this.options.build.publicPath)) - /* - ** Launch build process - */ - await this.build() - /* - ** Clean destination folder - */ - try { - await remove(distPath) - debug('Destination folder cleaned') - } catch (e) {} - /* - ** Copy static and built files - */ - if (fs.existsSync(srcStaticPath)) { - await copy(srcStaticPath, distPath) - } - await copy(srcBuiltPath, distNuxtPath) - debug('Static & build files copied') - if (this.options.router.mode !== 'hash') { - // Resolve config.generate.routes promises before generating the routes - try { - var generateRoutes = await promisifyRoute(this.options.generate.routes || []) - } catch (e) { - console.error('Could not resolve routes') // eslint-disable-line no-console - console.error(e) // eslint-disable-line no-console - process.exit(1) - throw e // eslint-disable-line no-unreachable - } - } - function decorateWithPayloads (routes) { - let routeMap = {} - // Fill routeMap for known routes - routes.forEach((route) => { - routeMap[route] = { - route, - payload: null - } - }) - // Fill routeMap with given generate.routes - generateRoutes.forEach((route) => { - // route is either a string or like {route : "/my_route/1"} - const path = _.isString(route) ? route : route.route - routeMap[path] = { - route: path, - payload: route.payload || null - } - }) - return _.values(routeMap) - } - /* - ** Generate only index.html for router.mode = 'hash' - */ - let routes = (this.options.router.mode === 'hash') ? ['/'] : this.routes - routes = decorateWithPayloads(routes) - - while (routes.length) { - let n = 0 - await Promise.all(routes.splice(0, 500).map(async ({route, payload}) => { - await waitFor(n++ * this.options.generate.interval) - let html - try { - const res = await this.renderRoute(route, { _generate: true, payload }) - html = res.html - if (res.error) { - errors.push({ type: 'handled', route, error: res.error }) - } - } catch (err) { - /* istanbul ignore next */ - return errors.push({ type: 'unhandled', route, error: err }) - } - if (this.options.generate.minify) { - try { - html = minify(html, this.options.generate.minify) - } catch (err) /* istanbul ignore next */ { - const minifyErr = new Error(`HTML minification failed. Make sure the route generates valid HTML. Failed HTML:\n ${html}`) - errors.push({ type: 'unhandled', route, error: minifyErr }) - } - } - let path = join(route, sep, 'index.html') // /about -> /about/index.html - debug('Generate file: ' + path) - path = join(distPath, path) - // Make sure the sub folders are created - await mkdirp(dirname(path)) - await writeFile(path, html, 'utf8') - })) - } - // Add .nojekyll file to let Github Pages add the _nuxt/ folder - // https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ - const nojekyllPath = resolve(distPath, '.nojekyll') - writeFile(nojekyllPath, '') - const duration = Math.round((Date.now() - s) / 100) / 10 - debug(`HTML Files generated in ${duration}s`) - - if (errors.length) { - const report = errors.map(({ type, route, error }) => { - /* istanbul ignore if */ - if (type === 'unhandled') { - return `Route: '${route}'\n${error.stack}` - } else { - return `Route: '${route}' thrown an error: \n` + JSON.stringify(error) - } - }) - console.error('==== Error report ==== \n' + report.join('\n\n')) // eslint-disable-line no-console - } -} diff --git a/lib/index.js b/lib/index.js new file mode 100755 index 0000000000..bb877e8e7c --- /dev/null +++ b/lib/index.js @@ -0,0 +1,4 @@ +import core from './core' +import builder from './builder' + +export default Object.assign({}, core, builder) diff --git a/lib/nuxt.js b/lib/nuxt.js deleted file mode 100644 index a7373a8cc6..0000000000 --- a/lib/nuxt.js +++ /dev/null @@ -1,181 +0,0 @@ -'use strict' - -import _ from 'lodash' -import compression from 'compression' -import fs from 'fs-extra' -import pify from 'pify' -import Server from './server' -import Module from './module' -import * as build from './build' -import * as render from './render' -import generate from './generate' -import serveStatic from 'serve-static' -import { resolve, join } from 'path' -import * as utils from './utils' - -class Nuxt { - constructor (options = {}) { - const defaults = { - dev: (process.env.NODE_ENV !== 'production'), - buildDir: '.nuxt', - env: {}, - head: { - meta: [], - link: [], - style: [], - script: [] - }, - plugins: [], - css: [], - modules: [], - layouts: {}, - serverMiddleware: [], - ErrorPage: null, - loading: { - color: 'black', - failedColor: 'red', - height: '2px', - duration: 5000 - }, - transition: { - name: 'page', - mode: 'out-in' - }, - router: { - mode: 'history', - base: '/', - middleware: [], - linkActiveClass: 'nuxt-link-active', - linkExactActiveClass: 'nuxt-link-exact-active', - extendRoutes: null, - scrollBehavior: null - }, - render: { - http2: { - push: false - }, - static: {}, - gzip: { - threshold: 0 - }, - etag: { - weak: true // Faster for responses > 5KB - } - }, - watchers: { - webpack: {}, - chokidar: {} - } - } - // Sanitization - if (options.loading === true) delete options.loading - if (options.router && typeof options.router.middleware === 'string') options.router.middleware = [options.router.middleware] - if (options.router && typeof options.router.base === 'string') { - this._routerBaseSpecified = true - } - if (typeof options.transition === 'string') options.transition = {name: options.transition} - this.options = _.defaultsDeep(options, defaults) - // Ready variable - this._ready = false - // Env variables - this.dev = this.options.dev - // Explicit srcDir, rootDir and buildDir - this.dir = (typeof options.rootDir === 'string' && options.rootDir ? options.rootDir : process.cwd()) - this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? resolve(this.dir, options.srcDir) : this.dir) - this.buildDir = join(this.dir, options.buildDir) - options.rootDir = this.dir - options.srcDir = this.srcDir - options.buildDir = this.buildDir - // If store defined, update store options to true - if (fs.existsSync(join(this.srcDir, 'store'))) { - this.options.store = true - } - // If app.html is defined, set the template path to the user template - this.options.appTemplatePath = resolve(__dirname, 'views/app.template.html') - if (fs.existsSync(join(this.srcDir, 'app.html'))) { - this.options.appTemplatePath = join(this.srcDir, 'app.html') - } - // renderer used by Vue.js (via createBundleRenderer) - this.renderer = null - // For serving static/ files to / - this.serveStatic = pify(serveStatic(resolve(this.srcDir, 'static'), this.options.render.static)) - // For serving .nuxt/dist/ files (only when build.publicPath is not an URL) - this.serveStaticNuxt = pify(serveStatic(resolve(this.buildDir, 'dist'), { - maxAge: (this.dev ? 0 : '1y') // 1 year in production - })) - // gzip middleware for production - if (!this.dev && this.options.render.gzip) { - this.gzipMiddleware = pify(compression(this.options.render.gzip)) - } - // Add this.Server Class - this.Server = Server - // Add this.build - build.options.call(this) // Add build options - this.build = build.build.bind(this) - // Error template - this.errorTemplate = _.template(fs.readFileSync(resolve(__dirname, 'views', 'error.html'), 'utf8'), { - interpolate: /{{([\s\S]+?)}}/g - }) - // Add this.render and this.renderRoute - this.render = render.render.bind(this) - this.renderRoute = render.renderRoute.bind(this) - this.renderAndGetWindow = render.renderAndGetWindow.bind(this) - // Add this.generate - this.generate = generate.bind(this) - // Add this.utils (tests purpose) - this.utils = utils - // Add module integration - this.module = new Module(this) - // Init nuxt.js - this._ready = this.ready() - // Return nuxt.js instance - return this - } - - async ready () { - if (this._ready) { - await this._ready - return this - } - // Init modules - await this.module.ready() - // Launch build in development but don't wait for it to be finished - if (this.dev) { - this.build() - } else { - build.production.call(this) - } - return this - } - - close (callback) { - let promises = [] - /* istanbul ignore if */ - if (this.webpackDevMiddleware) { - const p = new Promise((resolve, reject) => { - this.webpackDevMiddleware.close(() => resolve()) - }) - promises.push(p) - } - /* istanbul ignore if */ - if (this.webpackServerWatcher) { - const p = new Promise((resolve, reject) => { - this.webpackServerWatcher.close(() => resolve()) - }) - promises.push(p) - } - /* istanbul ignore if */ - if (this.filesWatcher) { - this.filesWatcher.close() - } - /* istanbul ignore if */ - if (this.customFilesWatcher) { - this.customFilesWatcher.close() - } - return Promise.all(promises).then(() => { - if (typeof callback === 'function') callback() - }) - } -} - -export default Nuxt diff --git a/lib/render.js b/lib/render.js deleted file mode 100644 index 238c31a528..0000000000 --- a/lib/render.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict' - -import ansiHTML from 'ansi-html' -import serialize from 'serialize-javascript' -import generateETag from 'etag' -import fresh from 'fresh' -import { getContext, setAnsiColors, encodeHtml } from './utils' - -const debug = require('debug')('nuxt:render') -// force blue color -debug.color = 4 -setAnsiColors(ansiHTML) - -export async function render (req, res) { - // Wait for nuxt.js to be ready - await this.ready() - // Check if project is built for production - if (!this.renderer && !this.dev) { - console.error('> No build files found, please run `nuxt build` before launching `nuxt start`') // eslint-disable-line no-console - process.exit(1) - } - /* istanbul ignore if */ - if (!this.renderer || !this.appTemplate) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(this.render(req, res)) - }, 1000) - }) - } - // Get context - const context = getContext(req, res) - res.statusCode = 200 - try { - if (this.dev) { - // Call webpack middleware only in development - await this.webpackDevMiddleware(req, res) - await this.webpackHotMiddleware(req, res) - } - if (!this.dev && this.options.render.gzip) { - await this.gzipMiddleware(req, res) - } - // If base in req.url, remove it for the middleware and vue-router - if (this.options.router.base !== '/' && req.url.indexOf(this.options.router.base) === 0) { - // Compatibility with base url for dev server - req.url = req.url.replace(this.options.router.base, '/') - } - // Serve static/ files - await this.serveStatic(req, res) - // Serve .nuxt/dist/ files (only for production) - if (!this.dev && req.url.indexOf(this.options.build.publicPath) === 0) { - const url = req.url - req.url = req.url.replace(this.options.build.publicPath, '/') - await this.serveStaticNuxt(req, res) - /* istanbul ignore next */ - req.url = url - } - if (this.dev && req.url.indexOf(this.options.build.publicPath) === 0 && req.url.includes('.hot-update.json')) { - res.statusCode = 404 - return res.end() - } - const {html, error, redirected, resourceHints} = await this.renderRoute(req.url, context) - if (redirected) { - return html - } - if (error) { - res.statusCode = context.nuxt.error.statusCode || 500 - } - // ETag header - if (!error && this.options.render.etag) { - const etag = generateETag(html, this.options.render.etag) - if (fresh(req.headers, {etag})) { - res.statusCode = 304 - res.end() - return - } - res.setHeader('ETag', etag) - } - // HTTP2 push headers - if (!error && this.options.render.http2.push) { - // Parse resourceHints to extract HTTP.2 prefetch/push headers - // https://w3c.github.io/preload/#server-push-http-2 - const regex = /link rel="([^"]*)" href="([^"]*)" as="([^"]*)"/g - const pushAssets = [] - let m - while (m = regex.exec(resourceHints)) { // eslint-disable-line no-cond-assign - const [_, rel, href, as] = m // eslint-disable-line no-unused-vars - if (rel === 'preload') { - pushAssets.push(`<${href}>; rel=${rel}; as=${as}`) - } - } - // Pass with single Link header - // https://blog.cloudflare.com/http-2-server-push-with-multiple-assets-per-link-header - res.setHeader('Link', pushAssets.join(',')) - } - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(html)) - res.end(html, 'utf8') - return html - } catch (err) { - if (context.redirected) { - console.error(err) // eslint-disable-line no-console - return err - } - const html = this.errorTemplate({ - /* istanbul ignore if */ - error: err, - stack: ansiHTML(encodeHtml(err.stack)) - }) - res.statusCode = 500 - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(html)) - res.end(html, 'utf8') - return err - } -} - -export async function renderRoute (url, context = {}) { - // Wait for modules to be initialized - await this.ready() - // Log rendered url - debug(`Rendering url ${url}`) - // Add url and isSever to the context - context.url = url - context.isServer = true - // Call renderToString from the bundleRenderer and generate the HTML (will update the context as well) - let APP = await this.renderToString(context) - if (!context.nuxt.serverRendered) { - APP = '
' - } - const m = context.meta.inject() - let HEAD = m.meta.text() + m.title.text() + m.link.text() + m.style.text() + m.script.text() + m.noscript.text() - if (this._routerBaseSpecified) { - HEAD += `` - } - const resourceHints = context.renderResourceHints() - HEAD += resourceHints + context.renderStyles() - APP += `` - APP += context.renderScripts() - const html = this.appTemplate({ - HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(), - BODY_ATTRS: m.bodyAttrs.text(), - HEAD, - APP - }) - return { - html, - resourceHints, - error: context.nuxt.error, - redirected: context.redirected - } -} - -// Function used to do dom checking via jsdom -let jsdom = null -export async function renderAndGetWindow (url, opts = {}) { - /* istanbul ignore if */ - if (!jsdom) { - try { - jsdom = require('jsdom') - } catch (e) { - console.error('Fail when calling nuxt.renderAndGetWindow(url)') // eslint-disable-line no-console - console.error('jsdom module is not installed') // eslint-disable-line no-console - console.error('Please install jsdom with: npm install --save-dev jsdom') // eslint-disable-line no-console - process.exit(1) - } - } - let options = { - resources: 'usable', // load subresources (https://github.com/tmpvar/jsdom#loading-subresources) - runScripts: 'dangerously', - beforeParse (window) { - // Mock window.scrollTo - window.scrollTo = () => { - } - } - } - if (opts.virtualConsole !== false) { - options.virtualConsole = new jsdom.VirtualConsole().sendTo(console) - } - url = url || 'http://localhost:3000' - const {window} = await jsdom.JSDOM.fromURL(url, options) - // If Nuxt could not be loaded (error from the server-side) - const nuxtExists = window.document.body.innerHTML.includes('window.__NUXT__') - if (!nuxtExists) { - /* istanbul ignore next */ - let error = new Error('Could not load the nuxt app') - /* istanbul ignore next */ - error.body = window.document.body.innerHTML - throw error - } - // Used by nuxt.js to say when the components are loaded and the app ready - await new Promise((resolve) => { - window._onNuxtLoaded = () => resolve(window) - }) - // Send back window object - return window -} diff --git a/lib/server.js b/lib/server.js deleted file mode 100644 index 63766e4563..0000000000 --- a/lib/server.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict' - -const http = require('http') -const connect = require('connect') -const path = require('path') - -class Server { - constructor (nuxt) { - this.nuxt = nuxt - // Initialize - this.app = connect() - this.server = http.createServer(this.app) - this.nuxt.ready() - .then(() => { - // Add Middleware - this.nuxt.options.serverMiddleware.forEach(m => { - this.useMiddleware(m) - }) - // Add default render middleware - this.useMiddleware(this.render.bind(this)) - }) - return this - } - - useMiddleware (m) { - // Require if needed - if (typeof m === 'string') { - let src = m - // Using ~ or ./ shorthand to resolve from project srcDir - if (src.indexOf('~') === 0 || src.indexOf('./') === 0) { - src = path.join(this.nuxt.options.srcDir, src.substr(1)) - } - // eslint-disable-next-line no-eval - m = eval('require')(src) - } - if (m instanceof Function) { - this.app.use(m) - } else if (m && m.path && m.handler) { - this.app.use(m.path, m.handler) - } - } - - render (req, res, next) { - this.nuxt.render(req, res) - return this - } - - listen (port, host) { - host = host || '127.0.0.1' - port = port || 3000 - this.nuxt.ready() - .then(() => { - this.server.listen(port, host, () => { - console.log('Ready on http://%s:%s', host, port) // eslint-disable-line no-console - }) - }) - return this - } - - close (cb) { - return this.server.close(cb) - } -} - -export default Server diff --git a/lib/utils.js b/lib/utils.js deleted file mode 100644 index 4e69f0f636..0000000000 --- a/lib/utils.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict' -import { resolve, sep } from 'path' -import _ from 'lodash' - -export function encodeHtml (str) { - return str.replace(//g, '>') -} - -export function getContext (req, res) { - return { req, res } -} - -export function setAnsiColors (ansiHTML) { - ansiHTML.setColors({ - reset: ['efefef', 'a6004c'], - darkgrey: '5a012b', - yellow: 'ffab07', - green: 'aeefba', - magenta: 'ff84bf', - blue: '3505a0', - cyan: '56eaec', - red: '4e053a' - }) -} - -export async function waitFor (ms) { - return new Promise(function (resolve) { - setTimeout(resolve, (ms || 0)) - }) -} - -export function urlJoin () { - return [].slice.call(arguments).join('/').replace(/\/+/g, '/').replace(':/', '://') -} - -export function isUrl (url) { - return (url.indexOf('http') === 0 || url.indexOf('//') === 0) -} - -export function promisifyRoute (fn) { - // If routes is an array - if (Array.isArray(fn)) { - return Promise.resolve(fn) - } - // If routes is a function expecting a callback - if (fn.length === 1) { - return new Promise((resolve, reject) => { - fn(function (err, routeParams) { - if (err) { - reject(err) - } - resolve(routeParams) - }) - }) - } - let promise = fn() - if (!promise || (!(promise instanceof Promise) && (typeof promise.then !== 'function'))) { - promise = Promise.resolve(promise) - } - return promise -} - -export function sequence (tasks, fn) { - return tasks.reduce((promise, task) => promise.then(() => fn(task)), Promise.resolve()) -} - -export function chainFn (base, fn) { - /* istanbul ignore if */ - if (!(fn instanceof Function)) { - return - } - return function () { - if (base instanceof Function) { - base.apply(this, arguments) - } - fn.apply(this, arguments) - } -} - -export function wp (p) { - /* istanbul ignore if */ - if (/^win/.test(process.platform)) { - p = p.replace(/\\/g, '\\\\') - } - return p -} - -const reqSep = /\//g -const sysSep = _.escapeRegExp(sep) -const normalize = string => string.replace(reqSep, sysSep) - -export function r () { - let args = Array.from(arguments) - if (_.last(args).includes('~')) { - return wp(_.last(args)) - } - args = args.map(normalize) - return wp(resolve.apply(null, args)) -} diff --git a/lib/webpack/base.config.js b/lib/webpack/base.config.js deleted file mode 100644 index 406f198fb7..0000000000 --- a/lib/webpack/base.config.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict' - -import vueLoaderConfig from './vue-loader.config' -import { defaults } from 'lodash' -import { join } from 'path' -import { isUrl, urlJoin } from '../utils' -import { styleLoader, extractStyles } from './helpers' -import ExtractTextPlugin from 'extract-text-webpack-plugin' - -/* -|-------------------------------------------------------------------------- -| Webpack Shared Config -| -| This is the config which is extended by the server and client -| webpack config files -|-------------------------------------------------------------------------- -*/ -export default function ({ isClient, isServer }) { - const nodeModulesDir = join(__dirname, '..', 'node_modules') - let config = { - devtool: (this.dev ? 'cheap-module-source-map' : false), - entry: { - vendor: ['vue', 'vue-router', 'vue-meta'] - }, - output: { - publicPath: (isUrl(this.options.build.publicPath) ? this.options.build.publicPath : urlJoin(this.options.router.base, this.options.build.publicPath)) - }, - performance: { - maxEntrypointSize: 300000, - maxAssetSize: 300000, - hints: (this.dev ? false : 'warning') - }, - resolve: { - extensions: ['.js', '.json', '.vue', '.ts'], - // Disable for now - alias: { - '~': join(this.srcDir), - 'static': join(this.srcDir, 'static'), // use in template with - '~static': join(this.srcDir, 'static'), - 'assets': join(this.srcDir, 'assets'), // use in template with - '~assets': join(this.srcDir, 'assets'), - '~plugins': join(this.srcDir, 'plugins'), - '~store': join(this.buildDir, 'store'), - '~router': join(this.buildDir, 'router'), - '~pages': join(this.srcDir, 'pages'), - '~components': join(this.srcDir, 'components') - }, - modules: [ - join(this.dir, 'node_modules'), - nodeModulesDir - ] - }, - resolveLoader: { - modules: [ - join(this.dir, 'node_modules'), - nodeModulesDir - ] - }, - module: { - rules: [ - { - test: /\.vue$/, - loader: 'vue-loader', - query: vueLoaderConfig.call(this, { isClient, isServer }) - }, - { - test: /\.js$/, - loader: 'babel-loader', - exclude: /node_modules/, - query: defaults(this.options.build.babel, { - presets: ['vue-app'], - babelrc: false, - cacheDirectory: !!this.dev - }) - }, - { test: /\.css$/, use: styleLoader.call(this, 'css') }, - { test: /\.less$/, use: styleLoader.call(this, 'less', 'less-loader') }, - { test: /\.sass$/, use: styleLoader.call(this, 'sass', 'sass-loader?indentedSyntax&sourceMap') }, - { test: /\.scss$/, use: styleLoader.call(this, 'sass', 'sass-loader?sourceMap') }, - { test: /\.styl(us)?$/, use: styleLoader.call(this, 'stylus', 'stylus-loader') } - ] - }, - plugins: this.options.build.plugins - } - // CSS extraction - if (extractStyles.call(this)) { - config.plugins.push( - new ExtractTextPlugin({filename: this.options.build.filenames.css}) - ) - } - // Add nuxt build loaders (can be configured in nuxt.config.js) - config.module.rules = config.module.rules.concat(this.options.build.loaders) - // Return config - return config -} diff --git a/package.json b/package.json index f78ff073d6..2fd4f4b5e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)", "contributors": [ { @@ -23,6 +23,7 @@ "files": [ "bin", "dist", + "lib", "index.d.ts", "index.js" ], @@ -42,14 +43,23 @@ "bin": { "nuxt": "./bin/nuxt" }, + "nyc": { + "include": [ + "lib" + ] + }, "scripts": { - "test": "npm run lint && nyc ava --verbose --serial test/", + "test": "npm run lint && cross-env NODE_ENV=test npm run build:nuxt && nyc ava --verbose --serial test/ -- && nyc report --reporter=html", "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", - "lint": "eslint --ext .js,.vue bin lib pages test/*.js --ignore-pattern lib/app", - "build": "webpack", - "watch": "webpack --watch", + "lint": "eslint --ext .js,.vue bin lib pages test/*.js --ignore-pattern app", + "build": "rimraf dist/ && npm run build:nuxt && npm run build:core", + "build:nuxt": "rollup -c build/rollup.config.js --environment TARGET:nuxt", + "build:core": "rollup -c build/rollup.config.js --environment TARGET:core", + "watch": "npm run build:nuxt -- -w", + "make-start": "node ./build/start.js", "precommit": "npm run lint", - "prepublish": "npm run build", + "prepublish": "npm run build && npm run make-start", + "postpublish": "cd start && npm publish", "postinstall": "opencollective postinstall" }, "engines": { @@ -59,74 +69,93 @@ "dependencies": { "ansi-html": "^0.0.7", "autoprefixer": "^7.1.1", - "babel-core": "^6.24.1", - "babel-loader": "^7.0.0", + "babel-core": "^6.25.0", + "babel-loader": "^7.1.1", "babel-preset-es2015": "^6.24.1", "babel-preset-vue-app": "^1.2.0", + "chalk": "^2.0.1", "chokidar": "^1.7.0", - "compression": "^1.6.2", + "clone": "^2.1.1", + "compression": "^1.7.0", "connect": "^3.6.2", "css-loader": "^0.28.4", "debug": "^2.6.8", + "es6-promise": "^4.1.1", "etag": "^1.8.0", - "extract-text-webpack-plugin": "^2.1.0", - "file-loader": "^0.11.1", + "extract-text-webpack-plugin": "^3.0.0", + "file-loader": "^0.11.2", "fresh": "^0.5.0", "friendly-errors-webpack-plugin": "^1.6.1", - "fs-extra": "^3.0.1", + "fs-extra": "^4.0.0", "glob": "^7.1.2", "hash-sum": "^1.0.2", "html-minifier": "^3.5.2", - "html-webpack-plugin": "^2.28.0", + "html-webpack-plugin": "^2.29.0", "lodash": "^4.17.4", "memory-fs": "^0.4.1", - "offline-plugin": "^4.8.1", + "minimist": "^1.2.0", + "offline-plugin": "^4.8.3", "opencollective": "^1.0.3", "pify": "^3.0.0", - "post-compile-webpack-plugin": "^0.1.1", "preload-webpack-plugin": "^1.2.2", - "progress-bar-webpack-plugin": "^1.9.3", - "script-ext-html-webpack-plugin": "^1.8.1", + "progress-bar-webpack-plugin": "^1.10.0", + "script-ext-html-webpack-plugin": "^1.8.3", "serialize-javascript": "^1.3.0", "serve-static": "^1.12.3", - "url-loader": "^0.5.8", - "vue": "~2.3.3", - "vue-loader": "^12.2.1", + "source-map-support": "^0.4.15", + "tapable": "^0.2.6", + "tappable": "^1.1.0", + "url-loader": "^0.5.9", + "vue": "~2.4.1", + "vue-loader": "^13.0.1", "vue-meta": "^1.0.4", - "vue-router": "^2.5.3", - "vue-server-renderer": "~2.3.3", + "vue-router": "^2.7.0", + "vue-server-renderer": "~2.4.1", "vue-ssr-html-stream": "^2.2.0", - "vue-template-compiler": "~2.3.3", + "vue-template-compiler": "~2.4.1", "vuex": "^2.3.1", - "webpack": "^2.6.1", + "webpack": "^3.3.0", "webpack-bundle-analyzer": "^2.8.2", - "webpack-dev-middleware": "^1.10.2", - "webpack-hot-middleware": "^2.18.0", + "webpack-dev-middleware": "^1.11.0", + "webpack-hot-middleware": "^2.18.1", "webpack-node-externals": "^1.6.0" }, "devDependencies": { - "ava": "^0.19.1", + "ava": "^0.21.0", "babel-eslint": "^7.2.3", "babel-plugin-array-includes": "^2.0.3", + "babel-plugin-istanbul": "^4.1.4", "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-runtime": "^6.23.0", + "babel-preset-es2015-rollup": "^3.0.0", "babel-preset-stage-2": "^6.24.1", "codecov": "^2.2.0", "copy-webpack-plugin": "^4.0.1", - "eslint": "^3.19.0", + "cross-env": "^5.0.1", + "eslint": "^4.2.0", "eslint-config-standard": "^10.2.1", - "eslint-plugin-html": "^2.0.3", - "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^4.2.2", + "eslint-plugin-html": "^3.1.0", + "eslint-plugin-import": "^2.6.1", + "eslint-plugin-node": "^5.1.0", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-standard": "^3.0.1", "finalhandler": "^1.0.3", - "jsdom": "^11.0.0", + "jsdom": "^11.1.0", "json-loader": "^0.5.4", - "nyc": "^10.3.2", + "nyc": "^11.0.3", "request": "^2.81.0", "request-promise-native": "^1.0.4", - "std-mocks": "^1.0.1" + "rimraf": "^2.6.1", + "rollup": "^0.45.2", + "rollup-plugin-alias": "^1.3.1", + "rollup-plugin-babel": "^2.7.1", + "rollup-plugin-commonjs": "^8.0.2", + "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-replace": "^1.1.1", + "rollup-watch": "^4.3.1", + "server-destroy": "^1.0.1", + "std-mocks": "^1.0.1", + "uglify-js": "^3.0.23" }, "collective": { "type": "opencollective", diff --git a/start/.gitignore b/start/.gitignore new file mode 100644 index 0000000000..f0fd204587 --- /dev/null +++ b/start/.gitignore @@ -0,0 +1,3 @@ +* +!README.md +!package.json \ No newline at end of file diff --git a/start/README.md b/start/README.md new file mode 100644 index 0000000000..ea4d75d2f8 --- /dev/null +++ b/start/README.md @@ -0,0 +1,3 @@ +# Nuxt-Start + +WIP - Serve Nuxt.js Application for production \ No newline at end of file diff --git a/start/index.js b/start/index.js new file mode 100644 index 0000000000..673042912a --- /dev/null +++ b/start/index.js @@ -0,0 +1,16 @@ +/*! + * Nuxt.js + * (c) 2016-2017 Chopin Brothers + * Core maintainer: Pooya (@pi0) + * Released under the MIT License. + */ + +// Node Source Map Support +// https://github.com/evanw/node-source-map-support +require('source-map-support').install() + +// Fix babel flag +/* istanbul ignore else */ +process.noDeprecation = true + +module.exports = require('./dist/core') diff --git a/start/package.json b/start/package.json new file mode 100644 index 0000000000..a5f7d60bd4 --- /dev/null +++ b/start/package.json @@ -0,0 +1,72 @@ +{ + "name": "nuxt-start", + "version": "1.0.0-alpha.4", + "description": "runtime-only build for nuxt", + "contributors": [ + { + "name": "Sebastien Chopin (@Atinux)" + }, + { + "name": "Alexandre Chopin (@alexchopin)" + }, + { + "name": "Pooya Parsa (@pi0)" + } + ], + "main": "./index.js", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/nuxt/nuxt.js" + }, + "files": [ + "bin", + "dist", + "lib", + "index.d.ts", + "index.js" + ], + "keywords": [ + "nuxt", + "nuxt.js", + "nuxtjs", + "vue", + "vue.js", + "vuejs", + "vue universal", + "vue ssr", + "vue isomorphic", + "vue versatile" + ], + "homepage": "https://github.com/nuxt/nuxt.js#readme", + "bin": { + "nuxt": "./bin/nuxt" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10", + "npm": ">=3.0.0" + }, + "dependencies": { + "source-map-support": "^0.4.15", + "lodash": "^4.17.4", + "hash-sum": "^1.0.2", + "tappable": "^1.0.1", + "debug": "^2.6.8", + "chalk": "^2.0.1", + "ansi-html": "^0.0.7", + "serialize-javascript": "^1.3.0", + "etag": "^1.8.0", + "fresh": "^0.5.0", + "pify": "^3.0.0", + "serve-static": "^1.12.3", + "compression": "^1.7.0", + "fs-extra": "^3.0.1", + "vue-server-renderer": "~2.4.1", + "connect": "^3.6.2" + }, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/nuxtjs", + "logo": "https://opencollective.com/nuxtjs/logo.txt?reverse=true&variant=variant2" + } +} \ No newline at end of file diff --git a/test/basic.dev.test.js b/test/basic.dev.test.js index 42e60e22fa..a415ed4322 100644 --- a/test/basic.dev.test.js +++ b/test/basic.dev.test.js @@ -1,23 +1,23 @@ import test from 'ava' import { resolve } from 'path' -import rp from 'request-promise-native' +// import rp from 'request-promise-native' +import { Nuxt, Builder } from '../index.js' + const port = 4001 const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const options = { rootDir: resolve(__dirname, 'fixtures/basic'), dev: true } nuxt = new Nuxt(options) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('/stateless', async t => { @@ -26,17 +26,16 @@ test('/stateless', async t => { t.true(html.includes('

My component!

')) }) -test('/_nuxt/test.hot-update.json should returns empty html', async t => { - try { - await rp(url('/_nuxt/test.hot-update.json')) - } catch (err) { - t.is(err.statusCode, 404) - t.is(err.response.body, '') - } -}) +// test('/_nuxt/test.hot-update.json should returns empty html', async t => { +// try { +// await rp(url('/_nuxt/test.hot-update.json')) +// } catch (err) { +// t.is(err.statusCode, 404) +// t.is(err.response.body, '') +// } +// }) // Close server and ask nuxt to stop listening to file changes -test.after('Closing server and nuxt.js', t => { - server.close() - nuxt.close(() => {}) +test.after('Closing server and nuxt.js', async t => { + await nuxt.close() }) diff --git a/test/basic.fail.generate.test.js b/test/basic.fail.generate.test.js index c1c85a30fa..4a7bed3f51 100644 --- a/test/basic.fail.generate.test.js +++ b/test/basic.fail.generate.test.js @@ -1,35 +1,23 @@ import test from 'ava' import { resolve } from 'path' +import { Nuxt, Builder, Generator } from '../index.js' test('Fail with routes() which throw an error', async t => { - const Nuxt = require('../') const options = { rootDir: resolve(__dirname, 'fixtures/basic'), dev: false, + runBuild: true, generate: { - routes: function () { - return new Promise((resolve, reject) => { - reject(new Error('Not today!')) - }) + async routes () { + throw new Error('Not today!') } } } const nuxt = new Nuxt(options) - return new Promise((resolve) => { - var oldExit = process.exit - var oldCE = console.error // eslint-disable-line no-console - var _log = '' - console.error = (s) => { _log += s } // eslint-disable-line no-console - process.exit = (code) => { - process.exit = oldExit - console.error = oldCE // eslint-disable-line no-console - t.is(code, 1) - t.true(_log.includes('Could not resolve routes')) - resolve() - } - nuxt.generate() + const builder = new Builder(nuxt) + const generator = new Generator(nuxt, builder) + return generator.generate() .catch((e) => { t.true(e.message === 'Not today!') }) - }) }) diff --git a/test/basic.generate.test.js b/test/basic.generate.test.js index cc0c160912..b75e71a4b2 100644 --- a/test/basic.generate.test.js +++ b/test/basic.generate.test.js @@ -4,6 +4,8 @@ import http from 'http' import serveStatic from 'serve-static' import finalhandler from 'finalhandler' import rp from 'request-promise-native' +import { Nuxt, Builder, Generator } from '../index.js' + const port = 4002 const url = (route) => 'http://localhost:' + port + route @@ -12,15 +14,18 @@ let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const rootDir = resolve(__dirname, 'fixtures/basic') let config = require(resolve(rootDir, 'nuxt.config.js')) config.rootDir = rootDir config.dev = false + config.runBuild = true nuxt = new Nuxt(config) + const builder = new Builder(nuxt) + const generator = new Generator(nuxt, builder) try { - await nuxt.generate() // throw an error (of /validate route) - } catch (err) {} + await generator.generate() // throw an error (of /validate route) + } catch (err) { + } const serve = serveStatic(resolve(__dirname, 'fixtures/basic/dist')) server = http.createServer((req, res) => { serve(req, res, finalhandler(req, res)) diff --git a/test/basic.test.js b/test/basic.test.js index e064a5a4db..16146f2e1c 100755 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -2,24 +2,24 @@ import test from 'ava' import { resolve } from 'path' import rp from 'request-promise-native' import stdMocks from 'std-mocks' +import { Nuxt, Builder } from '../index.js' const port = 4003 const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const options = { rootDir: resolve(__dirname, 'fixtures/basic'), - dev: false + dev: false, + runBuild: true } nuxt = new Nuxt(options) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('/stateless', async t => { @@ -145,16 +145,25 @@ test('/redirect2', async t => { }) test('ETag Header', async t => { - const {headers: {etag}} = await rp(url('/stateless'), {resolveWithFullResponse: true}) + const { headers: { etag } } = await rp(url('/stateless'), { resolveWithFullResponse: true }) // Validate etag t.regex(etag, /W\/".*"$/) // Verify functionality - const error = await t.throws(rp(url('/stateless'), {headers: {'If-None-Match': etag}})) + const error = await t.throws(rp(url('/stateless'), { headers: { 'If-None-Match': etag } })) t.is(error.statusCode, 304) }) +test('/_nuxt/server-bundle.json should return 404', async t => { + const err = await t.throws(rp(url('/_nuxt/server-bundle.json'), { resolveWithFullResponse: true })) + t.is(err.statusCode, 404) +}) + +test('/_nuxt/ should return 404', async t => { + const err = await t.throws(rp(url('/_nuxt/'), { resolveWithFullResponse: true })) + t.is(err.statusCode, 404) +}) + // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { - server.close() nuxt.close() }) diff --git a/test/children.test.js b/test/children.test.js index 2536ed4e22..d6f470b868 100644 --- a/test/children.test.js +++ b/test/children.test.js @@ -1,22 +1,23 @@ import test from 'ava' import { resolve } from 'path' +import { Nuxt, Builder } from '../index.js' + const port = 4004 // const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const options = { rootDir: resolve(__dirname, 'fixtures/children'), - dev: false + dev: false, + runBuild: true } nuxt = new Nuxt(options) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('/parent', async t => { @@ -55,6 +56,5 @@ test('/parent/validate-child?key=12345', async t => { // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { - server.close() nuxt.close() }) diff --git a/test/dynamic-routes.test.js b/test/dynamic-routes.test.js index 40bd5446d2..9ac8eeda2d 100644 --- a/test/dynamic-routes.test.js +++ b/test/dynamic-routes.test.js @@ -2,79 +2,81 @@ import test from 'ava' import { resolve } from 'path' import fs from 'fs' import pify from 'pify' +import { Nuxt, Builder } from '../index.js' + const readFile = pify(fs.readFile) test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const nuxt = new Nuxt({ rootDir: resolve(__dirname, 'fixtures/dynamic-routes'), - dev: false + dev: false, + runBuild: true }) - await nuxt.build() + await new Builder(nuxt).build() }) test('Check .nuxt/router.js', t => { return readFile(resolve(__dirname, './fixtures/dynamic-routes/.nuxt/router.js'), 'utf-8') - .then((routerFile) => { - routerFile = routerFile - .slice(routerFile.indexOf('routes: [')) - .replace('routes: [', '[') - .replace(/ _[0-9A-z]+,/g, ' "",') - routerFile = routerFile.substr(routerFile.indexOf('['), routerFile.lastIndexOf(']') + 1) - let routes = eval('( ' + routerFile + ')') // eslint-disable-line no-eval - // pages/index.vue - t.is(routes[0].path, '/') - t.is(routes[0].name, 'index') - // pages/test/index.vue - t.is(routes[1].path, '/test') - t.is(routes[1].name, 'test') - // pages/posts.vue - t.is(routes[2].path, '/posts') - t.is(routes[2].name, 'posts') - t.is(routes[2].children.length, 1) - // pages/posts/_id.vue - t.is(routes[2].children[0].path, ':id?') - t.is(routes[2].children[0].name, 'posts-id') - // pages/parent.vue - t.is(routes[3].path, '/parent') - t.falsy(routes[3].name) // parent route has no name - // pages/parent/*.vue - t.is(routes[3].children.length, 3) // parent has 3 children - t.deepEqual(routes[3].children.map((r) => r.path), ['', 'teub', 'child']) - t.deepEqual(routes[3].children.map((r) => r.name), ['parent', 'parent-teub', 'parent-child']) - // pages/test/projects/index.vue - t.is(routes[4].path, '/test/projects') - t.is(routes[4].name, 'test-projects') - // pages/test/users.vue - t.is(routes[5].path, '/test/users') - t.falsy(routes[5].name) // parent route has no name - // pages/test/users/*.vue - t.is(routes[5].children.length, 5) // parent has 5 children - t.deepEqual(routes[5].children.map((r) => r.path), ['', 'projects', 'projects/:category', ':id', ':index/teub']) - t.deepEqual(routes[5].children.map((r) => r.name), ['test-users', 'test-users-projects', 'test-users-projects-category', 'test-users-id', 'test-users-index-teub']) - // pages/test/songs/toto.vue - t.is(routes[6].path, '/test/songs/toto') - t.is(routes[6].name, 'test-songs-toto') - // pages/test/songs/_id.vue - t.is(routes[7].path, '/test/songs/:id?') - t.is(routes[7].name, 'test-songs-id') - // pages/test/projects/_category.vue - t.is(routes[8].path, '/test/projects/:category') - t.is(routes[8].name, 'test-projects-category') - // pages/users/_id.vue - t.is(routes[9].path, '/users/:id?') - t.is(routes[9].name, 'users-id') - // pages/test/_.vue - t.is(routes[10].path, '/test/*') - t.is(routes[10].name, 'test-all') - // pages/_slug.vue - t.is(routes[11].path, '/:slug') - t.is(routes[11].name, 'slug') - // pages/_key/_id.vue - t.is(routes[12].path, '/:key/:id?') - t.is(routes[12].name, 'key-id') - // pages/_.vue - t.is(routes[13].path, '/*') - t.is(routes[13].name, 'all') - }) + .then((routerFile) => { + routerFile = routerFile + .slice(routerFile.indexOf('routes: [')) + .replace('routes: [', '[') + .replace(/ _[0-9A-z]+,/g, ' "",') + routerFile = routerFile.substr(routerFile.indexOf('['), routerFile.lastIndexOf(']') + 1) + let routes = eval('( ' + routerFile + ')') // eslint-disable-line no-eval + // pages/index.vue + t.is(routes[0].path, '/') + t.is(routes[0].name, 'index') + // pages/test/index.vue + t.is(routes[1].path, '/test') + t.is(routes[1].name, 'test') + // pages/posts.vue + t.is(routes[2].path, '/posts') + t.is(routes[2].name, 'posts') + t.is(routes[2].children.length, 1) + // pages/posts/_id.vue + t.is(routes[2].children[0].path, ':id?') + t.is(routes[2].children[0].name, 'posts-id') + // pages/parent.vue + t.is(routes[3].path, '/parent') + t.falsy(routes[3].name) // parent route has no name + // pages/parent/*.vue + t.is(routes[3].children.length, 3) // parent has 3 children + t.deepEqual(routes[3].children.map((r) => r.path), ['', 'teub', 'child']) + t.deepEqual(routes[3].children.map((r) => r.name), ['parent', 'parent-teub', 'parent-child']) + // pages/test/projects/index.vue + t.is(routes[4].path, '/test/projects') + t.is(routes[4].name, 'test-projects') + // pages/test/users.vue + t.is(routes[5].path, '/test/users') + t.falsy(routes[5].name) // parent route has no name + // pages/test/users/*.vue + t.is(routes[5].children.length, 5) // parent has 5 children + t.deepEqual(routes[5].children.map((r) => r.path), ['', 'projects', 'projects/:category', ':id', ':index/teub']) + t.deepEqual(routes[5].children.map((r) => r.name), ['test-users', 'test-users-projects', 'test-users-projects-category', 'test-users-id', 'test-users-index-teub']) + // pages/test/songs/toto.vue + t.is(routes[6].path, '/test/songs/toto') + t.is(routes[6].name, 'test-songs-toto') + // pages/test/songs/_id.vue + t.is(routes[7].path, '/test/songs/:id?') + t.is(routes[7].name, 'test-songs-id') + // pages/test/projects/_category.vue + t.is(routes[8].path, '/test/projects/:category') + t.is(routes[8].name, 'test-projects-category') + // pages/users/_id.vue + t.is(routes[9].path, '/users/:id?') + t.is(routes[9].name, 'users-id') + // pages/test/_.vue + t.is(routes[10].path, '/test/*') + t.is(routes[10].name, 'test-all') + // pages/_slug.vue + t.is(routes[11].path, '/:slug') + t.is(routes[11].name, 'slug') + // pages/_key/_id.vue + t.is(routes[12].path, '/:key/:id?') + t.is(routes[12].name, 'key-id') + // pages/_.vue + t.is(routes[13].path, '/*') + t.is(routes[13].name, 'all') + }) }) diff --git a/test/error.test.js b/test/error.test.js index 26fba45f6e..4b53f5ad56 100644 --- a/test/error.test.js +++ b/test/error.test.js @@ -1,22 +1,23 @@ import test from 'ava' import { resolve } from 'path' +import { Nuxt, Builder } from '../index.js' + const port = 4005 const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const options = { rootDir: resolve(__dirname, 'fixtures/error'), - dev: false + dev: false, + runBuild: true } nuxt = new Nuxt(options) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('/ should display an error', async t => { @@ -34,11 +35,11 @@ test('/404 should display an error too', async t => { test('/ with renderAndGetWindow()', async t => { const err = await t.throws(nuxt.renderAndGetWindow(url('/'))) - t.is(err.response.statusCode, 500) + t.true(String(err).includes('Error: socket hang up')) + // t.is(err.response.statusCode, 500) }) // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { - server.close() nuxt.close() }) diff --git a/test/fixtures/module/modules/basic/reverse.js b/test/fixtures/module/modules/basic/reverse.js index 39e01fba3b..5955969033 100755 --- a/test/fixtures/module/modules/basic/reverse.js +++ b/test/fixtures/module/modules/basic/reverse.js @@ -7,3 +7,5 @@ function $reverseStr (str) { } Vue.prototype.$reverseStr = $reverseStr + +export default undefined diff --git a/test/fixtures/module/modules/empty/index.js b/test/fixtures/module/modules/empty/index.js index b994d6d28a..e9d4d060d1 100755 --- a/test/fixtures/module/modules/empty/index.js +++ b/test/fixtures/module/modules/empty/index.js @@ -1,4 +1,7 @@ - module.exports = function middlewareModule (options) { // Empty module } + +module.exports.meta = { + name: 'Empty Module!' +} diff --git a/test/fixtures/module/modules/middleware/index.js b/test/fixtures/module/modules/middleware/index.js index d8e21640ab..4fee13ae84 100755 --- a/test/fixtures/module/modules/middleware/index.js +++ b/test/fixtures/module/modules/middleware/index.js @@ -1,4 +1,3 @@ - module.exports = function middlewareModule (options) { return new Promise((resolve, reject) => { // Add /api endpoint diff --git a/test/fixtures/module/modules/middleware/midd1.js b/test/fixtures/module/modules/middleware/midd1.js index 4c109b5637..78ec0d0355 100644 --- a/test/fixtures/module/modules/middleware/midd1.js +++ b/test/fixtures/module/modules/middleware/midd1.js @@ -1,4 +1,4 @@ module.exports = function (req, res, next) { - res.setHeader('x-midd-1', 'ok') - next() -} \ No newline at end of file + res.setHeader('x-midd-1', 'ok') + next() +} diff --git a/test/fixtures/module/modules/middleware/midd2.js b/test/fixtures/module/modules/middleware/midd2.js index 95ae3940dc..64babff282 100644 --- a/test/fixtures/module/modules/middleware/midd2.js +++ b/test/fixtures/module/modules/middleware/midd2.js @@ -1,4 +1,4 @@ module.exports = function (req, res, next) { - res.setHeader('x-midd-2', 'ok') - next() -} \ No newline at end of file + res.setHeader('x-midd-2', 'ok') + next() +} diff --git a/test/fixtures/module/modules/tapable/index.js b/test/fixtures/module/modules/tapable/index.js new file mode 100644 index 0000000000..48fc69466f --- /dev/null +++ b/test/fixtures/module/modules/tapable/index.js @@ -0,0 +1,18 @@ +module.exports = function () { + let ctr = 1 + + // Add hook for module + this.nuxt.plugin('module', moduleContainer => { + this.nuxt.__module_hook = moduleContainer && ctr++ + }) + + // Add hook for renderer + this.nuxt.plugin('renderer', renderer => { + this.nuxt.__renderer_hook = renderer && ctr++ + }) + + // Add hook for build + this.nuxt.plugin('build', builder => { + this.nuxt.__builder_hook = builder && ctr++ + }) +} diff --git a/test/fixtures/module/modules/template/index.js b/test/fixtures/module/modules/template/index.js index 7e85b80d56..6033364d55 100644 --- a/test/fixtures/module/modules/template/index.js +++ b/test/fixtures/module/modules/template/index.js @@ -1,11 +1,12 @@ const path = require('path') module.exports = function () { - // Disable parsing pages/ - this.nuxt.createRoutes = () => {} - // Add /api endpoint - this.addTemplate({ - fileName: 'router.js', - src: path.resolve(this.nuxt.srcDir, 'router.js') - }) + // Disable parsing pages/ + this.nuxt.options.build.createRoutes = () => {} + + // Add /api endpoint + this.addTemplate({ + fileName: 'router.js', + src: path.resolve(this.options.srcDir, 'router.js') + }) } diff --git a/test/fixtures/module/nuxt.config.js b/test/fixtures/module/nuxt.config.js index 19e591d11d..9b53c2a7d1 100755 --- a/test/fixtures/module/nuxt.config.js +++ b/test/fixtures/module/nuxt.config.js @@ -1,7 +1,8 @@ module.exports = { loading: true, modules: [ - '~modules/basic', + '~/modules/basic', + '~/modules/tapable', { src: '~/modules/middleware', options: { diff --git a/test/fixtures/module/router.js b/test/fixtures/module/router.js index 629c9d4ffc..4856380eca 100644 --- a/test/fixtures/module/router.js +++ b/test/fixtures/module/router.js @@ -3,20 +3,23 @@ import Router from 'vue-router' Vue.use(Router) +const indexPage = () => import('~/views/index.vue').then(m => m.default || m) +const aboutPage = () => import('~/views/about.vue').then(m => m.default || m) + export function createRouter () { return new Router({ mode: 'history', routes: [ - { - path: "/", - component: require('~/views/index.vue'), - name: "index" - }, - { - path: "/about", - component: require('~/views/about.vue'), - name: "about" - } + { + path: '/', + component: indexPage, + name: 'index' + }, + { + path: '/about', + component: aboutPage, + name: 'about' + } ] }) } diff --git a/test/fixtures/ssr/components/test.vue b/test/fixtures/ssr/components/test.vue new file mode 100644 index 0000000000..cdc10f9b6f --- /dev/null +++ b/test/fixtures/ssr/components/test.vue @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/test/fixtures/ssr/lib/db.js b/test/fixtures/ssr/lib/db.js new file mode 100644 index 0000000000..9c173807f6 --- /dev/null +++ b/test/fixtures/ssr/lib/db.js @@ -0,0 +1,4 @@ + +let idCtr = 0 + +export const nextId = () => ++idCtr diff --git a/test/fixtures/ssr/pages/asyncComponent.vue b/test/fixtures/ssr/pages/asyncComponent.vue new file mode 100644 index 0000000000..947aa7994c --- /dev/null +++ b/test/fixtures/ssr/pages/asyncComponent.vue @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/test/fixtures/ssr/pages/asyncData.vue b/test/fixtures/ssr/pages/asyncData.vue new file mode 100644 index 0000000000..5f194666ed --- /dev/null +++ b/test/fixtures/ssr/pages/asyncData.vue @@ -0,0 +1,15 @@ + + + diff --git a/test/fixtures/ssr/pages/component.vue b/test/fixtures/ssr/pages/component.vue new file mode 100644 index 0000000000..316ad6e5ec --- /dev/null +++ b/test/fixtures/ssr/pages/component.vue @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/test/fixtures/ssr/pages/data.vue b/test/fixtures/ssr/pages/data.vue new file mode 100644 index 0000000000..f627b7b373 --- /dev/null +++ b/test/fixtures/ssr/pages/data.vue @@ -0,0 +1,15 @@ + + + diff --git a/test/fixtures/ssr/pages/fetch.vue b/test/fixtures/ssr/pages/fetch.vue new file mode 100644 index 0000000000..27ed0ec8bc --- /dev/null +++ b/test/fixtures/ssr/pages/fetch.vue @@ -0,0 +1,14 @@ + + + diff --git a/test/fixtures/ssr/pages/store.vue b/test/fixtures/ssr/pages/store.vue new file mode 100644 index 0000000000..767e0f3b23 --- /dev/null +++ b/test/fixtures/ssr/pages/store.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/fixtures/ssr/store/index.js b/test/fixtures/ssr/store/index.js new file mode 100644 index 0000000000..e98ccc4f5d --- /dev/null +++ b/test/fixtures/ssr/store/index.js @@ -0,0 +1,22 @@ +import { nextId } from '@/lib/db' + +export const state = () => { + return { + id: nextId(), + id2: 0 + } +} + +export const mutations = { + setId2 (state, id) { + state.id2 = id + } +} + +export const actions = { + nuxtServerInit ({ commit, state }, { route }) { + if (route.query.onServerInit === '1') { + commit('setId2', nextId()) + } + } +} diff --git a/test/fixtures/with-config/nuxt.config.js b/test/fixtures/with-config/nuxt.config.js index f9e56aa032..339e770469 100644 --- a/test/fixtures/with-config/nuxt.config.js +++ b/test/fixtures/with-config/nuxt.config.js @@ -7,18 +7,17 @@ module.exports = { routes.push({ name: 'about-bis', path: '/about-bis', - component: '~pages/about.vue' + component: '~/pages/about.vue' }) } }, transition: 'test', offline: true, plugins: [ - '~plugins/test.js', - { src: '~plugins/offline.js', ssr: false }, - { src: '~plugins/only-client.js', ssr: false } + '~/plugins/test.js', // Use ~ for deprication warning coverage + { src: '~/plugins/only-client.js', ssr: false } ], - loading: '~components/loading', + loading: '~/components/loading', env: { bool: true, num: 23, @@ -39,6 +38,9 @@ module.exports = { { src: '~/assets/app.css' } ], render: { + http2: { + push: true + }, static: { maxAge: '1y' } diff --git a/test/fixtures/with-config/plugins/offline.js b/test/fixtures/with-config/plugins/offline.js deleted file mode 100644 index bfccf62930..0000000000 --- a/test/fixtures/with-config/plugins/offline.js +++ /dev/null @@ -1,4 +0,0 @@ -if (process.env.NODE_ENV === 'production') { - var OfflinePlugin = require('offline-plugin/runtime') - OfflinePlugin.install() -} diff --git a/test/index.test.js b/test/index.test.js index f910f1ea5e..8e3fbf745e 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,81 +1,44 @@ import test from 'ava' import { resolve } from 'path' - -const Nuxt = require('../') +import { Nuxt, Builder } from '../index.js' test('Nuxt.js Class', t => { t.is(typeof Nuxt, 'function') }) test.serial('Nuxt.js Instance', async t => { - process.env.NODE_ENV = 'production' - const nuxt = new Nuxt() + const nuxt = new Nuxt({ + rootDir: resolve(__dirname, 'fixtures', 'empty') + }) t.is(typeof nuxt, 'object') - t.is(nuxt.dev, false) - t.is(typeof nuxt.build, 'function') - t.is(typeof nuxt.generate, 'function') - delete process.env.NODE_ENV + t.is(nuxt.options.dev, true) + t.is(typeof nuxt._ready.then, 'function') + await nuxt.ready() + t.is(nuxt.initialized, true) }) -test.serial('Fail when build not done and try to render', async t => { - const nuxt = new Nuxt({ - dev: false, - rootDir: resolve(__dirname, 'fixtures/empty') - }) - return new Promise((resolve) => { - var oldExit = process.exit - var oldCE = console.error // eslint-disable-line no-console - var _log = '' - console.error = (s) => { _log += s } // eslint-disable-line no-console - process.exit = (code) => { - process.exit = oldExit - console.error = oldCE // eslint-disable-line no-console - t.is(code, 1) - t.true(_log.includes('No build files found, please run `nuxt build` before launching `nuxt start`')) - resolve() - } - nuxt.render() - }) -}) - -test.serial('Fail to build when no pages/ directory but is in the parent', async t => { +test.serial('Fail to build when no pages/ directory but is in the parent', t => { const nuxt = new Nuxt({ dev: false, + runBuild: true, rootDir: resolve(__dirname, 'fixtures', 'empty', 'pages') }) - return new Promise((resolve) => { - var oldExit = process.exit - var oldCE = console.error // eslint-disable-line no-console - var _log = '' - console.error = (s) => { _log += s } // eslint-disable-line no-console - process.exit = (code) => { - process.exit = oldExit - console.error = oldCE // eslint-disable-line no-console - t.is(code, 1) - t.true(_log.includes('No `pages` directory found. Did you mean to run `nuxt` in the parent (`../`) directory?')) - resolve() - } - nuxt.build() + return new Builder(nuxt).build().catch(err => { + let s = String(err) + t.true(s.includes('No `pages` directory found')) + t.true(s.includes('Did you mean to run `nuxt` in the parent (`../`) directory?')) }) }) -test.serial('Fail to build when no pages/ directory', async t => { +test.serial('Fail to build when no pages/ directory', t => { const nuxt = new Nuxt({ dev: false, + runBuild: true, rootDir: resolve(__dirname) }) - return new Promise((resolve) => { - var oldExit = process.exit - var oldCE = console.error // eslint-disable-line no-console - var _log = '' - console.error = (s) => { _log += s } // eslint-disable-line no-console - process.exit = (code) => { - process.exit = oldExit - console.error = oldCE // eslint-disable-line no-console - t.is(code, 1) - t.true(_log.includes('Couldn\'t find a `pages` directory. Please create one under the project root')) - resolve() - } - nuxt.build() + return new Builder(nuxt).build().catch(err => { + let s = String(err) + t.true(s.includes('Couldn\'t find a `pages` directory')) + t.true(s.includes('Please create one under the project root')) }) }) diff --git a/test/module.test.js b/test/module.test.js index 58e15de574..83f3005c4c 100755 --- a/test/module.test.js +++ b/test/module.test.js @@ -1,26 +1,24 @@ import test from 'ava' -import { resolve } from 'path' +import { resolve, normalize } from 'path' import rp from 'request-promise-native' +import { Nuxt, Builder } from '../index.js' const port = 4006 const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null - -const wp = p => /^win/.test(process.platform) ? p.replace(/[\\/]/g, '\\\\') : p // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const rootDir = resolve(__dirname, 'fixtures/module') let config = require(resolve(rootDir, 'nuxt.config.js')) config.rootDir = rootDir config.dev = false + config.runBuild = true nuxt = new Nuxt(config) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('Vendor', async t => { @@ -28,7 +26,8 @@ test('Vendor', async t => { }) test('Plugin', async t => { - t.true(nuxt.options.plugins[0].src.includes(wp('fixtures/module/.nuxt/basic.reverse.')), 'plugin added to config') + t.true(normalize(nuxt.options.plugins[0].src) + .includes(normalize('fixtures/module/.nuxt/basic.reverse.')), 'plugin added to config') const { html } = await nuxt.renderRoute('/') t.true(html.includes('

TXUN

'), 'plugin works') }) @@ -38,8 +37,13 @@ test('Middleware', async t => { t.is(response, 'It works!', '/api response is correct') }) +test('Tapable', async t => { + t.is(nuxt.__module_hook, 1) + t.is(nuxt.__renderer_hook, 2) + t.is(nuxt.__builder_hook, 3) +}) + // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { - server.close() nuxt.close() }) diff --git a/test/ssr.test.js b/test/ssr.test.js new file mode 100755 index 0000000000..c3be1a519f --- /dev/null +++ b/test/ssr.test.js @@ -0,0 +1,89 @@ +import test from 'ava' +import { resolve } from 'path' +import { Nuxt, Builder, Utils } from '..' +import { uniq } from 'lodash' + +const port = 4008 +let nuxt = null + +// Utils +const range = n => [...Array(n).keys()] +const FOOBAR_REGEX = /([\s\S]*)<\/foobar>/ +const match = (regex, text) => (regex.exec(text) || [])[1] + +// Init nuxt.js and create server listening on localhost:4000 +test.before('Init Nuxt.js', async t => { + const options = { + rootDir: resolve(__dirname, 'fixtures/ssr'), + dev: false, + render: { + resourceHints: false + }, + build: { + extractCSS: true + } + } + nuxt = new Nuxt(options) + await new Builder(nuxt).build() + await nuxt.listen(port, 'localhost') +}) + +// == Uniq Test == +// The idea behind is pages using a shared nextId() which retuns an increamenting id +// So all responses should strictly be different and length of unique responses should equal to responses +// We strictly compare {id} section +// Because other response parts such as window.__NUXT may be different resulting false positive passes. +const uniqueTest = async (t, url) => { + let results = [] + + await Utils.parallel(range(20), async () => { + let { html } = await nuxt.renderRoute(url) + let foobar = match(FOOBAR_REGEX, html) + results.push(parseInt(foobar)) + }) + + let isUnique = uniq(results).length === results.length + + if (!isUnique) { + /* eslint-disable no-console */ + console.log(url + '\n' + results.join(', ') + '\n') + } + + t.true(isUnique) + + return results +} + +test('unique responses with data()', async t => { + await uniqueTest(t, '/data') +}) + +test('unique responses with component', async t => { + await uniqueTest(t, '/component') +}) + +test.todo('unique responses with async components (wait Vue 2.4)') +// test('unique responses with async components', async t => { +// await uniqueTest(t, '/asyncComponent') +// }) + +test('unique responses with asyncData()', async t => { + await uniqueTest(t, '/asyncData') +}) + +test('unique responses with store initial state', async t => { + await uniqueTest(t, '/store') +}) + +test('unique responses with nuxtServerInit', async t => { + await uniqueTest(t, '/store?onServerInit=1') +}) + +test('unique responses with fetch', async t => { + await uniqueTest(t, '/fetch') +}) + +// Close server and ask nuxt to stop listening to file changes +test.after('Closing server and nuxt.js', t => { + nuxt.close() +}) diff --git a/test/utils.test.js b/test/utils.test.js index 3a2aff00ff..de741554ac 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -1,22 +1,15 @@ import test from 'ava' import ansiHTML from 'ansi-html' - -let utils -// Init nuxt.js and create server listening on localhost:4000 -test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') - let nuxt = new Nuxt({ dev: false }) - utils = nuxt.utils -}) +import { Utils } from '../index.js' test('encodeHtml', t => { const html = '

Hello

' - t.is(utils.encodeHtml(html), '<h1>Hello</h1>') + t.is(Utils.encodeHtml(html), '<h1>Hello</h1>') }) test('getContext', t => { - let ctx = utils.getContext({ a: 1 }, { b: 2 }) - t.is(utils.getContext.length, 2) + let ctx = Utils.getContext({ a: 1 }, { b: 2 }) + t.is(Utils.getContext.length, 2) t.is(typeof ctx.req, 'object') t.is(typeof ctx.res, 'object') t.is(ctx.req.a, 1) @@ -24,29 +17,29 @@ test('getContext', t => { }) test('setAnsiColors', t => { - utils.setAnsiColors(ansiHTML) + Utils.setAnsiColors(ansiHTML) t.pass() }) test('waitFor', async (t) => { let s = Date.now() - await utils.waitFor(100) + await Utils.waitFor(100) t.true(Date.now() - s >= 100) - await utils.waitFor() + await Utils.waitFor() }) test('urlJoin', t => { - t.is(utils.urlJoin('test', '/about'), 'test/about') + t.is(Utils.urlJoin('test', '/about'), 'test/about') }) test('promisifyRoute (array)', t => { const array = [1] - const promise = utils.promisifyRoute(array) + const promise = Utils.promisifyRoute(array) t.is(typeof promise, 'object') return promise - .then((res) => { - t.is(res, array) - }) + .then((res) => { + t.is(res, array) + }) }) test('promisifyRoute (fn => array)', t => { @@ -54,12 +47,12 @@ test('promisifyRoute (fn => array)', t => { const fn = function () { return array } - const promise = utils.promisifyRoute(fn) + const promise = Utils.promisifyRoute(fn) t.is(typeof promise, 'object') return promise - .then((res) => { - t.is(res, array) - }) + .then((res) => { + t.is(res, array) + }) }) test('promisifyRoute (fn => promise)', t => { @@ -69,24 +62,24 @@ test('promisifyRoute (fn => promise)', t => { resolve(array) }) } - const promise = utils.promisifyRoute(fn) + const promise = Utils.promisifyRoute(fn) t.is(typeof promise, 'object') return promise - .then((res) => { - t.is(res, array) - }) + .then((res) => { + t.is(res, array) + }) }) test('promisifyRoute (fn(cb) with error)', t => { const fn = function (cb) { cb(new Error('Error here')) } - const promise = utils.promisifyRoute(fn) + const promise = Utils.promisifyRoute(fn) t.is(typeof promise, 'object') return promise - .catch((e) => { - t.is(e.message, 'Error here') - }) + .catch((e) => { + t.is(e.message, 'Error here') + }) }) test('promisifyRoute (fn(cb) with result)', t => { @@ -94,10 +87,10 @@ test('promisifyRoute (fn(cb) with result)', t => { const fn = function (cb) { cb(null, array) } - const promise = utils.promisifyRoute(fn) + const promise = Utils.promisifyRoute(fn) t.is(typeof promise, 'object') return promise - .then((res) => { - t.is(res, array) - }) + .then((res) => { + t.is(res, array) + }) }) diff --git a/test/with-config.test.js b/test/with-config.test.js index 07c299f245..83b6747a8e 100644 --- a/test/with-config.test.js +++ b/test/with-config.test.js @@ -1,24 +1,24 @@ import test from 'ava' import { resolve } from 'path' import rp from 'request-promise-native' +import { Nuxt, Builder } from '../index.js' const port = 4007 const url = (route) => 'http://localhost:' + port + route let nuxt = null -let server = null // Init nuxt.js and create server listening on localhost:4000 test.before('Init Nuxt.js', async t => { - const Nuxt = require('../') const rootDir = resolve(__dirname, 'fixtures/with-config') let config = require(resolve(rootDir, 'nuxt.config.js')) config.rootDir = rootDir config.dev = false + config.runBuild = true nuxt = new Nuxt(config) - await nuxt.build() - server = new nuxt.Server(nuxt) - server.listen(port, 'localhost') + await new Builder(nuxt).build() + + await nuxt.listen(port, 'localhost') }) test('/', async t => { @@ -90,7 +90,7 @@ test('/test/about-bis (added with extendRoutes)', async t => { test('Check stats.json generated by build.analyze', t => { const stats = require(resolve(__dirname, 'fixtures/with-config/.nuxt/dist/stats.json')) - t.is(stats.assets.length, 29) + t.is(stats.assets.length, 27) }) test('Check /test.txt with custom serve-static options', async t => { @@ -100,15 +100,5 @@ test('Check /test.txt with custom serve-static options', async t => { // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { - server.close() nuxt.close() }) - -test.after('Should be able to start Nuxt with build done', async t => { - const Nuxt = require('../') - const rootDir = resolve(__dirname, 'fixtures/with-config') - let config = require(resolve(rootDir, 'nuxt.config.js')) - config.rootDir = rootDir - config.dev = false - nuxt = new Nuxt(config) -}) diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 946eb0d6db..0000000000 --- a/webpack.config.js +++ /dev/null @@ -1,59 +0,0 @@ - -// Until babel-loader 7 is released -process.noDeprecation = true - -var nodeExternals = require('webpack-node-externals') -var ProgressBarPlugin = require('progress-bar-webpack-plugin') -var CopyWebpackPlugin = require('copy-webpack-plugin') -var resolve = require('path').resolve -var r = function (p) { return resolve(__dirname, p) } - -module.exports = { - target: 'node', - node: { - __dirname: false, - __filename: false - }, - devtool: 'source-map', - entry: r('./lib/nuxt.js'), - output: { - path: r('./dist'), - filename: 'nuxt.js', - libraryTarget: 'commonjs2' - }, - externals: [ - nodeExternals() - ], - module: { - rules: [ - { - test: /\.json$/, - loader: 'json-loader' - }, - { - test: /\.js$/, - loader: 'babel-loader', - exclude: /node_modules/, - query: { - plugins: [ - 'transform-async-to-generator', - 'array-includes', - 'transform-runtime' - ], - presets: [ - ['es2015', { modules: false }], - 'stage-2' - ], - cacheDirectory: true - } - } - ] - }, - plugins: [ - new CopyWebpackPlugin([ - { from: 'lib/app', to: 'app' }, - { from: 'lib/views', to: 'views' } - ]), - new ProgressBarPlugin() - ] -} diff --git a/yarn.lock b/yarn.lock index d77c849ad0..3b6b5e7dff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,9 +6,9 @@ version "2.0.0" resolved "https://registry.yarnpkg.com/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz#2fc1fe3c211a71071a4eca7b8f7af5842cd1ae7c" -"@ava/babel-preset-stage-4@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.0.0.tgz#a613b5e152f529305422546b072d47facfb26291" +"@ava/babel-preset-stage-4@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz#ae60be881a0babf7d35f52aba770d1f6194f76bd" dependencies: babel-plugin-check-es2015-constants "^6.8.0" babel-plugin-syntax-trailing-function-commas "^6.20.0" @@ -30,16 +30,23 @@ "@ava/babel-plugin-throws-helper" "^2.0.0" babel-plugin-espower "^2.3.2" -"@ava/pretty-format@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@ava/pretty-format/-/pretty-format-1.1.0.tgz#d0a57d25eb9aeab9643bdd1a030642b91c123e28" +"@ava/write-file-atomic@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ava/write-file-atomic/-/write-file-atomic-2.2.0.tgz#d625046f3495f1f5e372135f473909684b429247" dependencies: - ansi-styles "^2.2.1" - esutils "^2.0.2" + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + slide "^1.1.5" + +"@concordance/react@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@concordance/react/-/react-1.0.0.tgz#fcf3cad020e5121bfd1c61d05bc3516aac25f734" + dependencies: + arrify "^1.0.1" "@types/node@^6.0.46": - version "6.0.73" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.73.tgz#85dc4bb6f125377c75ddd2519a1eeb63f0a4ed70" + version "6.0.84" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.84.tgz#193ffe5a9f42864d425ffd9739d95b753c6a1eab" abab@^1.0.3: version "1.0.3" @@ -78,25 +85,38 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.3, acorn@^4.0.4: +acorn@^4.0.1, acorn@^4.0.3, acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.0.1, acorn@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" +acorn@^5.0.0, acorn@^5.0.1, acorn@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" -ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: +ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1: +ajv-keywords@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" + +ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" +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" + 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" @@ -123,6 +143,10 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + ansi-html@0.0.7, ansi-html@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -131,13 +155,17 @@ 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" -ansi-styles@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.0.0.tgz#5404e93a544c4fec7f048262977bebfe3155e0c1" +ansi-styles@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" dependencies: color-convert "^1.0.0" @@ -159,8 +187,8 @@ append-transform@^0.4.0: default-require-extensions "^1.0.0" aproba@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" archy@^1.0.0: version "1.0.0" @@ -194,8 +222,8 @@ arr-exclude@^1.0.0: resolved "https://registry.yarnpkg.com/arr-exclude/-/arr-exclude-1.0.0.tgz#dfc7c2e552a270723ccda04cf3128c8cbfe5c631" 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-differ@^1.0.0: version "1.0.0" @@ -265,9 +293,9 @@ async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2: - version "2.4.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" +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" @@ -291,44 +319,46 @@ autoprefixer@^6.3.1: postcss-value-parser "^3.2.3" autoprefixer@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.1.tgz#97bc854c7d0b979f8d6489de547a0d17fb307f6d" + version "7.1.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.2.tgz#fbeaf07d48fd878e0682bf7cbeeade728adb2b18" dependencies: - browserslist "^2.1.3" - caniuse-lite "^1.0.30000670" + browserslist "^2.1.5" + caniuse-lite "^1.0.30000697" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^6.0.1" + postcss "^6.0.6" postcss-value-parser "^3.2.3" ava-init@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ava-init/-/ava-init-0.2.0.tgz#9304c8b4c357d66e3dfdae1fbff47b1199d5c55d" + version "0.2.1" + resolved "https://registry.yarnpkg.com/ava-init/-/ava-init-0.2.1.tgz#75ac4c8553326290d2866e63b62fa7035684bd58" dependencies: arr-exclude "^1.0.0" - execa "^0.5.0" + execa "^0.7.0" has-yarn "^1.0.0" read-pkg-up "^2.0.0" - write-pkg "^2.0.0" + write-pkg "^3.1.0" -ava@^0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/ava/-/ava-0.19.1.tgz#43dd82435ad19b3980ffca2488f05daab940b273" +ava@^0.21.0: + version "0.21.0" + resolved "https://registry.yarnpkg.com/ava/-/ava-0.21.0.tgz#cd8d8ea3546f57150dea38548b9f72f8ca583d29" dependencies: - "@ava/babel-preset-stage-4" "^1.0.0" + "@ava/babel-preset-stage-4" "^1.1.0" "@ava/babel-preset-transform-test-files" "^3.0.0" - "@ava/pretty-format" "^1.1.0" + "@ava/write-file-atomic" "^2.2.0" + "@concordance/react" "^1.0.0" + ansi-escapes "^2.0.0" + ansi-styles "^3.1.0" arr-flatten "^1.0.1" array-union "^1.0.1" array-uniq "^1.0.2" arrify "^1.0.0" auto-bind "^1.1.0" ava-init "^0.2.0" - babel-code-frame "^6.16.0" babel-core "^6.17.0" bluebird "^3.0.0" caching-transform "^1.0.0" - chalk "^1.0.0" + chalk "^2.0.1" chokidar "^1.4.2" clean-stack "^1.1.1" clean-yaml-object "^0.1.0" @@ -338,59 +368,59 @@ ava@^0.19.1: co-with-promise "^4.6.0" code-excerpt "^2.1.0" common-path-prefix "^1.0.0" + concordance "^3.0.0" convert-source-map "^1.2.0" core-assert "^0.2.0" currently-unhandled "^0.4.1" debug "^2.2.0" - diff "^3.0.1" - diff-match-patch "^1.0.0" dot-prop "^4.1.0" empower-core "^0.6.1" equal-length "^1.0.0" figures "^2.0.0" - find-cache-dir "^0.1.1" + find-cache-dir "^1.0.0" fn-name "^2.0.0" get-port "^3.0.0" globby "^6.0.0" has-flag "^2.0.0" - hullabaloo-config-manager "^1.0.0" + hullabaloo-config-manager "^1.1.0" ignore-by-default "^1.0.0" + import-local "^0.1.1" indent-string "^3.0.0" is-ci "^1.0.7" is-generator-fn "^1.0.0" is-obj "^1.0.0" is-observable "^0.2.0" is-promise "^2.1.0" - jest-diff "19.0.0" - jest-snapshot "19.0.2" js-yaml "^3.8.2" last-line-stream "^1.0.0" + lodash.clonedeepwith "^4.5.0" lodash.debounce "^4.0.3" lodash.difference "^4.3.0" lodash.flatten "^4.2.0" - lodash.isequal "^4.5.0" loud-rejection "^1.2.0" - matcher "^0.1.1" + make-dir "^1.0.0" + matcher "^1.0.0" md5-hex "^2.0.0" meow "^3.7.0" - mkdirp "^0.5.1" - ms "^0.7.1" + ms "^2.0.0" multimatch "^2.1.0" observable-to-promise "^0.5.0" - option-chain "^0.1.0" + option-chain "^1.0.0" package-hash "^2.0.0" pkg-conf "^2.0.0" plur "^2.0.0" pretty-ms "^2.0.0" require-precompiled "^0.1.0" - resolve-cwd "^1.0.0" + resolve-cwd "^2.0.0" + safe-buffer "^5.1.1" slash "^1.0.0" source-map-support "^0.4.0" stack-utils "^1.0.0" - strip-ansi "^3.0.1" + strip-ansi "^4.0.0" strip-bom-buf "^1.0.0" - supports-color "^3.2.3" + supports-color "^4.0.0" time-require "^0.1.2" + trim-off-newlines "^1.0.1" unique-temp-dir "^1.0.0" update-notifier "^2.1.0" @@ -402,7 +432,7 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -410,20 +440,20 @@ babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: esutils "^2.0.2" js-tokens "^3.0.0" -babel-core@^6.17.0, babel-core@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" +babel-core@6, babel-core@^6.17.0, babel-core@^6.24.1, babel-core@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" dependencies: babel-code-frame "^6.22.0" - babel-generator "^6.24.1" + babel-generator "^6.25.0" babel-helpers "^6.24.1" babel-messages "^6.23.0" babel-register "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - babylon "^6.11.0" + babel-template "^6.25.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" convert-source-map "^1.1.0" debug "^2.1.1" json5 "^0.5.0" @@ -443,13 +473,13 @@ babel-eslint@^7.2.3: babel-types "^6.23.0" babylon "^6.17.0" -babel-generator@^6.1.0, babel-generator@^6.18.0, babel-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" +babel-generator@^6.1.0, babel-generator@^6.18.0, babel-generator@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" dependencies: babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.24.1" + babel-types "^6.25.0" detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.2.0" @@ -578,11 +608,11 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-loader@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.0.0.tgz#2e43a66bee1fff4470533d0402c8a4532fafbaf7" +babel-loader@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.1.tgz#b87134c8b12e3e4c2a94e0546085bc680a2b8488" dependencies: - find-cache-dir "^0.1.1" + find-cache-dir "^1.0.0" loader-utils "^1.0.2" mkdirp "^0.5.1" @@ -614,6 +644,20 @@ babel-plugin-espower@^2.3.2: espurify "^1.6.0" estraverse "^4.1.1" +babel-plugin-external-helpers@^6.18.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -707,7 +751,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es20 babel-types "^6.24.1" lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: +babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.9.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: @@ -902,8 +946,8 @@ babel-polyfill@6.23.0: regenerator-runtime "^0.10.0" babel-preset-env@^1.2.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.1.tgz#d2eca6af179edf27cdc305a84820f601b456dd0b" + version "1.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-syntax-trailing-function-commas "^6.22.0" @@ -936,7 +980,15 @@ babel-preset-env@^1.2.1: invariant "^2.2.2" semver "^5.3.0" -babel-preset-es2015@^6.24.1: +babel-preset-es2015-rollup@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015-rollup/-/babel-preset-es2015-rollup-3.0.0.tgz#854b63ecde2ee98cac40e882f67bfcf185b1f24a" + dependencies: + babel-plugin-external-helpers "^6.18.0" + babel-preset-es2015 "^6.3.13" + require-relative "^0.8.7" + +babel-preset-es2015@^6.24.1, babel-preset-es2015@^6.3.13: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" dependencies: @@ -1022,50 +1074,54 @@ babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.16.0, babel-template@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" dependencies: babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - babylon "^6.11.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" lodash "^4.2.0" -babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" +babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" dependencies: babel-code-frame "^6.22.0" babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.24.1" - babylon "^6.15.0" + babel-types "^6.25.0" + babylon "^6.17.2" debug "^2.2.0" globals "^9.0.0" invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" dependencies: babel-runtime "^6.22.0" esutils "^2.0.2" lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.1.0, babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.17.0: - version "6.17.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" +babylon@^6.1.0, babylon@^6.17.0, babylon@^6.17.2, babylon@^6.17.4: + version "6.17.4" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" -balanced-match@^0.4.1, balanced-match@^0.4.2: +balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "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" bcrypt-pbkdf@^1.0.0: version "1.0.1" @@ -1096,8 +1152,8 @@ bluebird@^3.0.0, bluebird@^3.0.5, bluebird@^3.1.1, bluebird@^3.4.7: 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" boolbase@~1.0.0: version "1.0.0" @@ -1110,22 +1166,22 @@ boom@2.x.x: hoek "2.x.x" boxen@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.1.0.tgz#b1b69dd522305e807a99deee777dbd6e5167b102" + version "1.2.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.2.0.tgz#03478d84be7fe02189b80904d81d6a80384368f1" dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" - chalk "^1.1.1" + chalk "^2.0.1" cli-boxes "^1.0.0" string-width "^2.0.0" - term-size "^0.1.0" + term-size "^1.2.0" widest-line "^1.0.0" brace-expansion@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: - balanced-match "^0.4.1" + balanced-match "^1.0.0" concat-map "0.0.1" braces@^1.8.2: @@ -1140,6 +1196,12 @@ brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" +browser-resolve@^1.11.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + 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" @@ -1198,21 +1260,17 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" -browserslist@^2.1.2, browserslist@^2.1.3: - version "2.1.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053" +browserslist@^2.1.2, browserslist@^2.1.5: + version "2.2.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.2.0.tgz#5e35ec993e467c6464b8cb708447386891de9f50" dependencies: - caniuse-lite "^1.0.30000670" - electron-to-chromium "^1.3.11" + caniuse-lite "^1.0.30000701" + electron-to-chromium "^1.3.15" buf-compare@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a" -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" @@ -1225,7 +1283,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1233,9 +1291,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" caching-transform@^1.0.0: version "1.0.1" @@ -1294,7 +1352,7 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -camelcase@^4.0.0: +camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -1308,12 +1366,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.30000676" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000676.tgz#82ea578237637c8ff34a28acaade373b624c4ea8" + version "1.0.30000701" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000701.tgz#2e32b06993bf3dbd90b43d93f04e26d11afddcba" -caniuse-lite@^1.0.30000670: - version "1.0.30000676" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000676.tgz#1e962123f48073f0c51c4ea0651dd64d25786498" +caniuse-lite@^1.0.30000697, caniuse-lite@^1.0.30000701: + version "1.0.30000701" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000701.tgz#9d673cf6b74dcb3d5c21d213176b011ac6a45baa" capture-stack-trace@^1.0.0: version "1.0.0" @@ -1352,7 +1410,15 @@ chalk@^0.4.0: has-color "~0.1.0" strip-ansi "~0.1.0" -chokidar@^1.4.2, chokidar@^1.4.3, chokidar@^1.7.0: +chalk@^2.0.0, chalk@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.4.2, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: @@ -1372,24 +1438,25 @@ 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" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" clap@^1.0.9: - version "1.1.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.3.tgz#b3bd36e93dd4cbfb395a3c26896352445265c05b" + version "1.2.0" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" dependencies: chalk "^1.1.3" clean-css@4.1.x: - version "4.1.3" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.3.tgz#07cfe8980edb20d455ddc23aadcf1e04c6e509ce" + version "4.1.7" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.7.tgz#b9aea4f85679889cf3eae8b40349ec4ebdfdd032" dependencies: source-map "0.5.x" @@ -1405,12 +1472,6 @@ cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -1452,6 +1513,10 @@ clone@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" +clone@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + co-with-promise@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co-with-promise/-/co-with-promise-4.6.0.tgz#413e7db6f5893a60b942cf492c4bec93db415ab7" @@ -1463,8 +1528,8 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" coa@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.2.tgz#2ba9fec3b4aa43d7a49d7e6c3561e92061b6bcec" + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" dependencies: q "^1.1.2" @@ -1493,8 +1558,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" @@ -1528,12 +1593,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.9.x, 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.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + common-path-prefix@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-1.0.0.tgz#cd52f6f0712e0baab97d6f9732874f22f47752c0" @@ -1542,28 +1611,29 @@ 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.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.6.2.tgz#cceb121ecc9d09c52d7ad0c3350ea93ddd402bc3" +compression@^1.7.0: + 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" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.2: +concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1571,6 +1641,22 @@ concat-stream@^1.5.2: readable-stream "^2.2.2" typedarray "^0.0.6" +concordance@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/concordance/-/concordance-3.0.0.tgz#b2286af54405fc995fc7345b0b106d8dd073cb29" + dependencies: + date-time "^2.1.0" + esutils "^2.0.2" + fast-diff "^1.1.1" + function-name-support "^0.2.0" + js-string-escape "^1.0.1" + lodash.clonedeep "^4.5.0" + lodash.flattendeep "^4.4.0" + lodash.merge "^4.6.0" + md5-hex "^2.0.0" + semver "^5.3.0" + well-known-symbols "^1.0.0" + config-chain@~1.1.5: version "1.1.11" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" @@ -1723,12 +1809,12 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-spawn-async@^2.1.1: - version "2.2.5" - resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" +cross-env@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.1.tgz#ff4e72ea43b47da2486b43a7f2043b2609e44913" dependencies: - lru-cache "^4.0.0" - which "^1.2.8" + cross-spawn "^5.1.0" + is-windows "^1.0.0" cross-spawn@^4, cross-spawn@^4.0.0: version "4.0.2" @@ -1737,6 +1823,14 @@ cross-spawn@^4, cross-spawn@^4.0.0: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1744,8 +1838,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" @@ -1890,6 +1984,12 @@ date-time@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/date-time/-/date-time-0.1.1.tgz#ed2f6d93d9790ce2fd66d5b5ff3edd5bbcbf3b07" +date-time@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2" + dependencies: + time-zone "^1.0.0" + de-indent@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" @@ -1898,19 +1998,13 @@ debug-log@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -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: - ms "0.7.1" - debug@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" dependencies: ms "2.0.0" -debug@^2.1.1, debug@^2.2.0, debug@^2.6.3, debug@^2.6.8: +debug@2.6.8, debug@^2.1.1, debug@^2.2.0, debug@^2.6.3, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -1933,8 +2027,8 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" deepmerge@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.3.2.tgz#1663691629d4dbfe364fa12a2a4f0aa86aa3a050" + version "1.5.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.0.tgz#00bc5b88fd23b8130f9f5049071c3420e07a5465" default-require-extensions@^1.0.0: version "1.0.0" @@ -1998,14 +2092,6 @@ detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" -diff-match-patch@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.0.tgz#1cc3c83a490d67f95d91e39f6ad1f2e086b63048" - -diff@^3.0.0, diff@^3.0.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" - diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -2122,9 +2208,9 @@ ejs@^2.3.4, ejs@^2.5.6: version "2.5.6" resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.6.tgz#479636bfa3fe3b1debd52087f0acb204b4f19c88" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.11: - version "1.3.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.13.tgz#1b3a5eace6e087bb5e257a100b0cbfe81b2891fc" +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.15: + version "1.3.15" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.15.tgz#08397934891cbcfaebbd18b82a95b5a481138369" elliptic@^6.0.0: version "6.4.0" @@ -2143,8 +2229,8 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" empower-core@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/empower-core/-/empower-core-0.6.1.tgz#6c187f502fcef7554d57933396aac655483772b1" + version "0.6.2" + resolved "https://registry.yarnpkg.com/empower-core/-/empower-core-0.6.2.tgz#5adef566088e31fba80ba0a36df47d7094169144" dependencies: call-signature "0.0.2" core-js "^2.0.0" @@ -2159,9 +2245,9 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -enhanced-resolve@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" +enhanced-resolve@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz#950964ecc7f0332a42321b673b38dc8ff15535b3" dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" @@ -2195,8 +2281,8 @@ error-stack-parser@^2.0.0: stackframe "^1.0.3" es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.21" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.21.tgz#19a725f9e51d0300bbc1e8e821109fd9daf55925" + 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" @@ -2224,6 +2310,10 @@ es6-map@^0.1.3: es6-symbol "~3.1.1" event-emitter "~0.3.5" +es6-promise@^4.1.1: + 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" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -2282,50 +2372,48 @@ eslint-config-standard@^10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" +eslint-import-resolver-node@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" + debug "^2.6.8" + resolve "^1.2.0" -eslint-module-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" +eslint-module-utils@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" dependencies: - debug "2.2.0" + debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-html@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-2.0.3.tgz#7c89883ab0c85fa5d28b666a14a4e906aa90b897" +eslint-plugin-html@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-3.1.0.tgz#2eb999b48840b7184edf1c953976a73307151e44" dependencies: htmlparser2 "^3.8.2" -eslint-plugin-import@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.3.0.tgz#37c801e0ada0e296cbdf20c3f393acb5b52af36b" +eslint-plugin-import@^2.6.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" dependencies: builtin-modules "^1.1.1" contains-path "^0.1.0" - debug "^2.2.0" + debug "^2.6.8" doctrine "1.5.0" - eslint-import-resolver-node "^0.2.0" - eslint-module-utils "^2.0.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.1.1" has "^1.0.1" lodash.cond "^4.3.0" minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-node@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" +eslint-plugin-node@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.1.0.tgz#bc8cdb85180d0b4d946a2531640e2a4dd7a4e6d4" dependencies: - ignore "^3.0.11" - minimatch "^3.0.2" - object-assign "^4.0.1" - resolve "^1.1.7" + ignore "^3.3.3" + minimatch "^3.0.4" + resolve "^1.3.3" semver "5.3.0" eslint-plugin-promise@^3.5.0: @@ -2336,45 +2424,50 @@ eslint-plugin-standard@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" -eslint@^3.19.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: - babel-code-frame "^6.16.0" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.2.0.tgz#a2b3184111b198e02e9c7f3cca625a5e01c56b3d" + dependencies: + ajv "^5.2.0" + babel-code-frame "^6.22.0" chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" + concat-stream "^1.6.0" + debug "^2.6.8" doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" + eslint-scope "^3.7.1" + espree "^3.4.3" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" + inquirer "^3.0.6" is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" + js-yaml "^3.8.4" + json-stable-stringify "^1.0.1" levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" + path-is-inside "^1.0.2" + pluralize "^4.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" strip-json-comments "~2.0.1" - table "^3.7.8" + table "^4.0.1" text-table "~0.2.0" - user-home "^2.0.0" espower-location-detector@^1.0.0: version "1.0.0" @@ -2385,7 +2478,7 @@ espower-location-detector@^1.0.0: source-map "^0.5.0" xtend "^4.0.0" -espree@^3.4.0: +espree@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" dependencies: @@ -2396,9 +2489,9 @@ esprima@^2.6.0, esprima@^2.7.1: 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" espurify@^1.6.0: version "1.7.0" @@ -2413,23 +2506,27 @@ 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@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -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" +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + +estree-walker@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" esutils@^2.0.2: version "2.0.2" @@ -2456,17 +2553,6 @@ evp_bytestokey@^1.0.0: dependencies: create-hash "^1.1.1" -execa@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.4.0.tgz#4eb6467a36a095fabb2970ff9d5e3fb7bce6ebc3" - dependencies: - cross-spawn-async "^2.1.1" - is-stream "^1.1.0" - npm-run-path "^1.0.0" - object-assign "^4.0.1" - path-key "^1.0.0" - strip-eof "^1.0.0" - execa@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" @@ -2479,9 +2565,17 @@ execa@^0.5.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" expand-brackets@^0.1.4: version "0.1.5" @@ -2532,7 +2626,7 @@ extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.1: +external-editor@^2.0.1, external-editor@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" dependencies: @@ -2546,19 +2640,27 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extract-text-webpack-plugin@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.0.tgz#69315b885f876dbf96d3819f6a9f1cca7aebf159" +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: - ajv "^4.11.2" - async "^2.1.2" - loader-utils "^1.0.2" - webpack-sources "^0.1.0" + async "^2.4.1" + loader-utils "^1.1.0" + schema-utils "^0.3.0" + webpack-sources "^1.0.1" extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-diff@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.1.tgz#0aea0e4e605b6a2189f0e936d4b7fbaf1b7cfd9b" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2567,13 +2669,6 @@ fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -2587,9 +2682,9 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" -file-loader@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.1.tgz#6b328ee1234a729e4e47d36375dd6d35c0e1db84" +file-loader@^0.11.2: + version "0.11.2" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34" dependencies: loader-utils "^1.0.2" @@ -2631,14 +2726,22 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" -find-up@^1.0.0, find-up@^1.1.2: +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +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" -find-up@^2.0.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -2675,7 +2778,7 @@ foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" -foreground-child@^1.3.3, foreground-child@^1.5.3: +foreground-child@^1.5.3, foreground-child@^1.5.6: version "1.5.6" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" dependencies: @@ -2720,9 +2823,9 @@ fs-extra@^0.26.4: path-is-absolute "^1.0.0" rimraf "^2.2.8" -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" @@ -2733,11 +2836,11 @@ fs.realpath@^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" + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.29" + node-pre-gyp "^0.6.36" fstream-ignore@^1.0.5: version "1.0.5" @@ -2760,6 +2863,10 @@ function-bind@^1.0.2, function-bind@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-name-support@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/function-name-support/-/function-name-support-0.2.0.tgz#55d3bfaa6eafd505a50f9bc81fdf57564a0bb071" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -2835,7 +2942,7 @@ glob@^6.0.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2: +glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2846,9 +2953,9 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.14.0: - version "9.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" +globals@^9.0.0, globals@^9.17.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" globby@^5.0.0: version "5.0.0" @@ -2974,10 +3081,11 @@ hash-sum@^1.0.2: resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04" 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" @@ -3012,8 +3120,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - 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" html-comment-regex@^1.1.0: version "1.1.1" @@ -3042,9 +3150,9 @@ html-minifier@^3.2.3, html-minifier@^3.5.2: relateurl "0.2.x" uglify-js "3.0.x" -html-webpack-plugin@^2.28.0: - version "2.28.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.28.0.tgz#2e7863b57e5fd48fe263303e2ffc934c3064d009" +html-webpack-plugin@^2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.29.0.tgz#e987f421853d3b6938c8c4c8171842e5fd17af23" dependencies: bluebird "^3.4.7" html-minifier "^3.2.3" @@ -3094,9 +3202,9 @@ https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" -hullabaloo-config-manager@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hullabaloo-config-manager/-/hullabaloo-config-manager-1.0.1.tgz#c72be7ba249a67c99b6ba3eb1f55837fa01acd8f" +hullabaloo-config-manager@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.1.tgz#1d9117813129ad035fd9e8477eaf066911269fe3" dependencies: dot-prop "^4.1.0" es6-error "^4.0.2" @@ -3109,16 +3217,17 @@ hullabaloo-config-manager@^1.0.0: lodash.merge "^4.6.0" md5-hex "^2.0.0" package-hash "^2.0.0" - pkg-dir "^1.0.0" - resolve-from "^2.0.0" + pkg-dir "^2.0.0" + resolve-from "^3.0.0" + safe-buffer "^5.0.1" iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.17" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.17.tgz#4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d" + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" icss-replace-symbols@^1.1.0: version "1.1.0" @@ -3138,10 +3247,21 @@ ignore-by-default@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" -ignore@^3.0.11, ignore@^3.2.0: +ignore@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + +import-local@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3171,7 +3291,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" @@ -3201,22 +3321,23 @@ inquirer@3.0.6: strip-ansi "^3.0.0" through "^2.3.6" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" +inquirer@^3.0.6: + version "3.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.0.tgz#45b44c2160c729d7578c54060b3eed94487bb42b" dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" - figures "^1.3.5" + external-editor "^2.0.4" + figures "^2.0.0" lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" through "^2.3.6" interpret@^1.0.0: @@ -3238,8 +3359,8 @@ ipaddr.js@1.3.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.3.0.tgz#1e03a52fdad83a8bbb2b25cbf4998b4cffcd3dec" irregular-plurals@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.2.0.tgz#38f299834ba8c00c30be9c554e137269752ff3ac" + version "1.3.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.3.0.tgz#7af06931bdf74be33dcf585a13e06fccc16caecf" is-absolute-url@^2.0.0: version "2.1.0" @@ -3276,8 +3397,8 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" is-equal-shallow@^0.1.3: version "0.1.3" @@ -3333,7 +3454,11 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + +is-my-json-valid@^2.12.4: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: @@ -3346,12 +3471,18 @@ is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" -is-number@^2.0.2, is-number@^2.1.0: +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-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" @@ -3434,6 +3565,10 @@ is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3456,29 +3591,29 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-lib-coverage@^1.1.0, istanbul-lib-coverage@^1.1.1: +istanbul-lib-coverage@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" -istanbul-lib-hook@^1.0.6: +istanbul-lib-hook@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.7.1: - version "1.7.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#6014b03d3470fb77638d5802508c255c06312e56" +istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.13.0" + babylon "^6.17.4" istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-report@^1.1.0: +istanbul-lib-report@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" dependencies: @@ -3487,7 +3622,7 @@ istanbul-lib-report@^1.1.0: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.0: +istanbul-lib-source-maps@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" dependencies: @@ -3497,83 +3632,12 @@ istanbul-lib-source-maps@^1.2.0: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.1.0: +istanbul-reports@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" dependencies: handlebars "^4.0.3" -jest-diff@19.0.0, jest-diff@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c" - dependencies: - chalk "^1.1.3" - diff "^3.0.0" - jest-matcher-utils "^19.0.0" - pretty-format "^19.0.0" - -jest-file-exists@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" - -jest-matcher-utils@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" - dependencies: - chalk "^1.1.3" - pretty-format "^19.0.0" - -jest-message-util@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-19.0.0.tgz#721796b89c0e4d761606f9ba8cb828a3b6246416" - dependencies: - chalk "^1.1.1" - micromatch "^2.3.11" - -jest-mock@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-19.0.0.tgz#67038641e9607ab2ce08ec4a8cb83aabbc899d01" - -jest-snapshot@19.0.2: - version "19.0.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-19.0.2.tgz#9c1b216214f7187c38bfd5c70b1efab16b0ff50b" - dependencies: - chalk "^1.1.3" - jest-diff "^19.0.0" - jest-file-exists "^19.0.0" - jest-matcher-utils "^19.0.0" - jest-util "^19.0.2" - natural-compare "^1.4.0" - pretty-format "^19.0.0" - -jest-util@^19.0.2: - version "19.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-19.0.2.tgz#e0a0232a2ab9e6b2b53668bdb3534c2b5977ed41" - dependencies: - chalk "^1.1.1" - graceful-fs "^4.1.6" - jest-file-exists "^19.0.0" - jest-message-util "^19.0.0" - jest-mock "^19.0.0" - jest-validate "^19.0.2" - leven "^2.0.0" - mkdirp "^0.5.1" - -jest-validate@^19.0.2: - version "19.0.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.2.tgz#dc534df5f1278d5b63df32b14241d4dbf7244c0c" - dependencies: - chalk "^1.1.1" - jest-matcher-utils "^19.0.0" - leven "^2.0.0" - pretty-format "^19.0.0" - -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" - js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" @@ -3587,16 +3651,20 @@ js-beautify@^1.6.3: mkdirp "~0.5.0" nopt "~3.0.1" -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" +js-string-escape@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" -js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.8.2: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" +js-tokens@^3.0.0: + 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.2, js-yaml@^3.8.4: + 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" @@ -3610,12 +3678,12 @@ 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" -jsdom@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.0.0.tgz#1ee507cb2c0b16c875002476b1a8557d951353e5" +jsdom@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.1.0.tgz#6c48d7a48ffc5c300283c312904d15da8360509b" dependencies: abab "^1.0.3" acorn "^4.0.4" @@ -3626,7 +3694,7 @@ jsdom@^11.0.0: cssstyle ">= 0.2.37 < 0.3.0" escodegen "^1.6.1" html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" + nwmatcher "^1.4.1" parse5 "^3.0.2" pn "^1.0.0" request "^2.79.0" @@ -3636,7 +3704,7 @@ jsdom@^11.0.0: tough-cookie "^2.3.2" webidl-conversions "^4.0.0" whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" + whatwg-url "^6.1.0" xml-name-validator "^2.0.1" jsesc@^1.3.0: @@ -3651,11 +3719,15 @@ 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-traverse@^0.3.0: + 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" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +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: @@ -3676,8 +3748,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" @@ -3704,6 +3776,12 @@ kind-of@^3.0.2: dependencies: is-buffer "^1.1.5" +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" @@ -3726,20 +3804,12 @@ lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" -lazy-req@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-2.0.0.tgz#c9450a363ecdda2e6f0c70132ad4f37f8f06f2b4" - 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" -leven@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -3846,6 +3916,10 @@ lodash.merge@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + lodash.template@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -3898,17 +3972,29 @@ lru-cache@^3.2.0: dependencies: pseudomap "^1.0.1" -lru-cache@^4.0.0, lru-cache@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" + pseudomap "^1.0.2" + yallist "^2.1.2" macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" +magic-string@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.15.2.tgz#0681d7388741bbc3addaa65060992624c6c09e9c" + dependencies: + vlq "^0.2.1" + +magic-string@^0.19.0: + version "0.19.1" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.1.tgz#14d768013caf2ec8fdea16a49af82fc377e75201" + dependencies: + vlq "^0.2.1" + make-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" @@ -3919,9 +4005,9 @@ map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" -matcher@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/matcher/-/matcher-0.1.2.tgz#ef20cbde64c24c50cc61af5b83ee0b1b8ff00101" +matcher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/matcher/-/matcher-1.0.0.tgz#aaf0c4816eb69b92094674175625f3466b0e3e19" dependencies: escape-string-regexp "^1.0.4" @@ -3949,6 +4035,12 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -3976,10 +4068,10 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" merge-source-map@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.3.tgz#da1415f2722a5119db07b14c4f973410863a2abf" + version "1.0.4" + resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.4.tgz#a5de46538dae84d4114cc5ea02b4772a6346701f" dependencies: - source-map "^0.5.3" + source-map "^0.5.6" methods@~1.1.2: version "1.1.2" @@ -4011,8 +4103,8 @@ miller-rabin@^4.0.0: brorand "^1.0.1" "mime-db@>= 1.27.0 < 2": - version "1.28.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.28.0.tgz#fedd349be06d2865b7fc57d837c6de4f17d7ac3c" + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" mime-db@~1.27.0: version "1.27.0" @@ -4050,7 +4142,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -4058,17 +4150,17 @@ minimist@1.2.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, 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, ms@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -ms@2.0.0: +ms@2.0.0, ms@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4081,10 +4173,6 @@ multimatch@^2.1.0: arrify "^1.0.0" minimatch "^3.0.0" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -4154,9 +4242,9 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" -node-pre-gyp@^0.6.29: - version "0.6.34" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" +node-pre-gyp@^0.6.36: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" dependencies: mkdirp "^0.5.1" nopt "^4.0.1" @@ -4182,8 +4270,8 @@ nopt@~3.0.1: abbrev "1" normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - 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" @@ -4209,12 +4297,6 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" -npm-run-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f" - dependencies: - path-key "^1.0.0" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -4222,8 +4304,8 @@ npm-run-path@^2.0.0: path-key "^2.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" @@ -4244,13 +4326,13 @@ 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" -"nwmatcher@>= 1.3.9 < 2.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" +nwmatcher@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" -nyc@^10.3.2: - version "10.3.2" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.3.2.tgz#f27f4d91f2a9db36c24f574ff5c6efff0233de46" +nyc@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.1.0.tgz#d6b3c5e16892a25af63138ba484676aa8a22eda7" dependencies: archy "^1.0.0" arrify "^1.0.1" @@ -4259,15 +4341,15 @@ nyc@^10.3.2: debug-log "^1.0.1" default-require-extensions "^1.0.0" find-cache-dir "^0.1.1" - find-up "^1.1.2" + find-up "^2.1.0" foreground-child "^1.5.3" glob "^7.0.6" - istanbul-lib-coverage "^1.1.0" - istanbul-lib-hook "^1.0.6" - istanbul-lib-instrument "^1.7.1" - istanbul-lib-report "^1.1.0" - istanbul-lib-source-maps "^1.2.0" - istanbul-reports "^1.1.0" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.4" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" md5-hex "^1.2.0" merge-source-map "^1.0.2" micromatch "^2.3.11" @@ -4275,9 +4357,9 @@ nyc@^10.3.2: resolve-from "^2.0.0" rimraf "^2.5.4" signal-exit "^3.0.1" - spawn-wrap "1.2.4" - test-exclude "^4.1.0" - yargs "^7.1.0" + spawn-wrap "^1.3.8" + test-exclude "^4.1.1" + yargs "^8.0.1" yargs-parser "^5.0.0" oauth-sign@~0.8.1: @@ -4314,9 +4396,9 @@ observable-to-promise@^0.5.0: is-observable "^0.2.0" symbol-observable "^1.0.4" -offline-plugin@^4.8.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/offline-plugin/-/offline-plugin-4.8.1.tgz#1d73457081185777179c29d9d416f71077a0197a" +offline-plugin@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/offline-plugin/-/offline-plugin-4.8.3.tgz#9e95bd342ea2ac836b001b81f204c40638694d6c" dependencies: deep-extend "^0.4.0" ejs "^2.3.4" @@ -4340,10 +4422,6 @@ once@^1.3.0, once@^1.3.3: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" @@ -4379,11 +4457,9 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -option-chain@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/option-chain/-/option-chain-0.1.1.tgz#e9b811e006f1c0f54802f28295bfc8970f8dcfbd" - dependencies: - object-assign "^4.0.1" +option-chain@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/option-chain/-/option-chain-1.0.0.tgz#938d73bd4e1783f948d34023644ada23669e30f2" optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" @@ -4410,6 +4486,14 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4" + dependencies: + execa "^0.5.0" + lcid "^1.0.0" + mem "^1.1.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4530,14 +4614,10 @@ 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-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" -path-key@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-1.0.0.tgz#5d53d578019646c0d68800db4e146e6bdc2ac7af" - path-key@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -4619,6 +4699,12 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + plur@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/plur/-/plur-1.0.0.tgz#db85c6814f5e5e5a3b49efc28d604fec62975156" @@ -4629,18 +4715,14 @@ plur@^2.0.0: dependencies: irregular-plurals "^1.0.0" -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +pluralize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" pn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.0.0.tgz#1cf5a30b0d806cd18f88fc41a6b5d4ad615b3ba9" -post-compile-webpack-plugin@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/post-compile-webpack-plugin/-/post-compile-webpack-plugin-0.1.1.tgz#1b1a0eea890ce748556ca49e066a48c900e0b370" - postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" @@ -4893,7 +4975,7 @@ postcss-zindex@^2.0.1: postcss "^5.0.4" uniqs "^2.0.0" -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.21, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: version "5.2.17" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" dependencies: @@ -4902,13 +4984,13 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" +postcss@^6.0.1, postcss@^6.0.6: + version "6.0.7" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.7.tgz#6a097477c46d13d0560a817d69abc0bae549d0a0" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" source-map "^0.5.6" - supports-color "^3.2.3" + supports-color "^4.2.0" preload-webpack-plugin@^1.2.2: version "1.2.2" @@ -4929,18 +5011,12 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 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" -pretty-format@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" - dependencies: - ansi-styles "^3.0.0" - pretty-ms@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-0.2.2.tgz#da879a682ff33a37011046f13d627f67c73b84f6" @@ -4967,9 +5043,9 @@ process@^0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" -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" +progress-bar-webpack-plugin@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/progress-bar-webpack-plugin/-/progress-bar-webpack-plugin-1.10.0.tgz#e0b1063aa03c79e298a9340598590bb61efef9a4" dependencies: chalk "^1.1.1" object.assign "^4.0.1" @@ -4979,6 +5055,10 @@ progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -4994,7 +5074,7 @@ prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" -pseudomap@^1.0.1: +pseudomap@^1.0.1, pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -5044,15 +5124,17 @@ querystring@0.2.0, querystring@^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" + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" + is-number "^3.0.0" + kind-of "^4.0.0" randombytes@^2.0.0, randombytes@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" + version "2.0.5" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" + dependencies: + safe-buffer "^5.1.0" range-parser@^1.0.3, range-parser@~1.2.0: version "1.2.0" @@ -5107,15 +5189,15 @@ readable-stream@1.0: string_decoder "~0.10.x" 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: - version "2.2.9" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: - buffer-shims "~1.0.0" core-util-is "~1.0.0" - inherits "~2.0.1" + inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~1.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" util-deprecate "~1.0.1" readdirp@^2.0.0: @@ -5127,20 +5209,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -5235,8 +5303,8 @@ release-zalgo@^1.0.0: es6-error "^4.0.1" remove-trailing-separator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + version "1.0.2" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" renderkid@^2.0.1: version "2.0.1" @@ -5344,18 +5412,22 @@ require-precompiled@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/require-precompiled/-/require-precompiled-0.1.0.tgz#5a1b52eb70ebed43eb982e974c85ab59571e56fa" -require-uncached@^1.0.2: +require-relative@0.8.7, require-relative@^0.8.7: + version "0.8.7" + resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" + +require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: caller-path "^0.1.0" resolve-from "^1.0.0" -resolve-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-1.0.0.tgz#4eaeea41ed040d1702457df64a42b2b07d246f9f" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" dependencies: - resolve-from "^2.0.0" + resolve-from "^3.0.0" resolve-from@^1.0.0: version "1.0.1" @@ -5365,19 +5437,20 @@ resolve-from@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: path-parse "^1.0.5" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -5404,11 +5477,75 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^2.0.0" inherits "^2.0.1" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" +rollup-plugin-alias@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-alias/-/rollup-plugin-alias-1.3.1.tgz#a9152fec4b6a6510dae93989517ca7853c32a6fa" dependencies: - once "^1.3.0" + slash "^1.0.0" + +rollup-plugin-babel@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" + dependencies: + babel-core "6" + babel-plugin-transform-es2015-classes "^6.9.0" + object-assign "^4.1.0" + rollup-pluginutils "^1.5.0" + +rollup-plugin-commonjs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.0.2.tgz#98b1589bfe32a6c0f67790b60c0b499972afed89" + dependencies: + acorn "^4.0.1" + estree-walker "^0.3.0" + magic-string "^0.19.0" + resolve "^1.1.7" + rollup-pluginutils "^2.0.1" + +rollup-plugin-node-resolve@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0" + dependencies: + browser-resolve "^1.11.0" + builtin-modules "^1.1.0" + is-module "^1.0.0" + resolve "^1.1.6" + +rollup-plugin-replace@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-1.1.1.tgz#396315ded050a6ce43b9518a886a3f60efb1ea33" + dependencies: + magic-string "^0.15.2" + minimatch "^3.0.2" + rollup-pluginutils "^1.5.0" + +rollup-pluginutils@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup-pluginutils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" + dependencies: + estree-walker "^0.3.0" + micromatch "^2.3.11" + +rollup-watch@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/rollup-watch/-/rollup-watch-4.3.1.tgz#5aa1eaeab787addf368905d102b39d6fc5ce4a8b" + dependencies: + chokidar "^1.7.0" + require-relative "0.8.7" + rollup-pluginutils "^2.0.1" + +rollup@^0.45.2: + version "0.45.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.45.2.tgz#63a284c2b31234656f24e9e9717fabb6a7f0fa43" + dependencies: + source-map-support "^0.4.0" run-async@^2.2.0: version "2.3.0" @@ -5416,27 +5553,43 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" 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: +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, 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" + +safe-buffer@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" sax@^1.2.1, 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" -script-ext-html-webpack-plugin@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-1.8.1.tgz#36bba726c38bcdebc1e69333e3fd7d718a9b3195" +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" dependencies: - debug "^2.6.3" + ajv "^5.0.0" + +script-ext-html-webpack-plugin@^1.8.3: + version "1.8.5" + resolved "https://registry.yarnpkg.com/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-1.8.5.tgz#7a408383d7f3329da8f59d503be25cc39a53f3f3" + dependencies: + debug "^2.6.8" semver-diff@^2.0.0: version "2.1.0" @@ -5467,8 +5620,8 @@ send@0.15.3: statuses "~1.3.1" serialize-javascript@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.3.0.tgz#86a4f3752f5c7e47295449b0bbb63d64ba533f05" + version "1.4.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" serve-static@1.12.3, serve-static@^1.12.3: version "1.12.3" @@ -5479,6 +5632,10 @@ serve-static@1.12.3, serve-static@^1.12.3: parseurl "~1.3.1" send "0.15.3" +server-destroy@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" + 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" @@ -5501,22 +5658,20 @@ sha.js@^2.4.0, sha.js@^2.4.8: dependencies: inherits "^2.0.1" -shelljs@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" sigmund@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" -signal-exit@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564" - signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -5539,21 +5694,27 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -sort-keys@^1.0.0, sort-keys@^1.1.1, sort-keys@^1.1.2: +sort-keys@^1.0.0, sort-keys@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" dependencies: is-plain-obj "^1.0.0" -source-list-map@^0.1.7, source-list-map@~0.1.7: +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + dependencies: + is-plain-obj "^1.0.0" + +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-list-map@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1" +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" -source-map-support@^0.4.0, source-map-support@^0.4.2: +source-map-support@^0.4.0, source-map-support@^0.4.15, source-map-support@^0.4.2: version "0.4.15" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" dependencies: @@ -5575,15 +5736,15 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -spawn-wrap@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40" +spawn-wrap@^1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.3.8.tgz#fa2a79b990cbb0bb0018dca6748d88367b19ec31" dependencies: - foreground-child "^1.3.3" + foreground-child "^1.5.6" mkdirp "^0.5.0" os-homedir "^1.0.1" rimraf "^2.3.3" - signal-exit "^2.0.0" + signal-exit "^3.0.2" which "^1.2.4" spdx-correct@~1.0.0: @@ -5605,8 +5766,8 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -5615,7 +5776,6 @@ sshpk@^1.7.0: optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" jsbn "~0.1.0" tweetnacl "~0.14.0" @@ -5649,8 +5809,8 @@ stream-browserify@^2.0.1: readable-stream "^2.0.2" stream-http@^2.3.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.1.tgz#546a51741ad5a6b07e9e31b0b10441a917df528a" + version "2.7.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" @@ -5676,22 +5836,22 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" 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" +string-width@^2.0.0, string-width@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0" 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.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" +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" @@ -5703,6 +5863,12 @@ 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-ansi@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" @@ -5747,6 +5913,12 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.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: + has-flag "^2.0.0" + svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -5771,9 +5943,9 @@ symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +table@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" dependencies: ajv "^4.7.0" ajv-keywords "^1.0.0" @@ -5782,10 +5954,17 @@ table@^3.7.8: slice-ansi "0.0.4" string-width "^2.0.0" -tapable@^0.2.5, tapable@~0.2.5: +tapable@^0.2.5, tapable@^0.2.6, tapable@~0.2.5: version "0.2.6" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d" +tappable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tappable/-/tappable-1.1.0.tgz#521770dea7dc4715d48ddb4c471071afee012025" + dependencies: + pify "^3.0.0" + tapable "^0.2.6" + tar-pack@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" @@ -5807,13 +5986,13 @@ tar@^2.2.1: fstream "^1.0.2" inherits "2" -term-size@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-0.1.1.tgz#87360b96396cab5760963714cda0d0cbeecad9ca" +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" dependencies: - execa "^0.4.0" + execa "^0.7.0" -test-exclude@^4.1.0: +test-exclude@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" dependencies: @@ -5847,6 +6026,10 @@ time-require@^0.1.2: pretty-ms "^0.2.1" text-table "^0.2.0" +time-zone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d" + timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -5889,6 +6072,10 @@ trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-off-newlines@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" @@ -5932,16 +6119,16 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -uglify-js@3.0.x: - version "3.0.13" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.13.tgz#1871d736aa1e550c728d7e5a6556579e70925d68" +uglify-js@3.0.x, uglify-js@^3.0.23: + 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" -uglify-js@^2.6, uglify-js@^2.8.27: - version "2.8.27" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" +uglify-js@^2.6, uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: source-map "~0.5.1" yargs "~3.10.0" @@ -5952,6 +6139,14 @@ 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" +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" @@ -6005,15 +6200,15 @@ unzip-response@^2.0.1: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" update-notifier@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.1.0.tgz#ec0c1e53536b76647a24b77cb83966d9315123d9" + version "2.2.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.2.0.tgz#1b5837cf90c0736d88627732b661c138f86de72f" dependencies: boxen "^1.0.0" chalk "^1.0.0" configstore "^3.0.0" + import-lazy "^2.1.0" is-npm "^1.0.0" latest-version "^3.0.0" - lazy-req "^2.0.0" semver-diff "^2.0.0" xdg-basedir "^3.0.0" @@ -6021,9 +6216,9 @@ upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" -url-loader@^0.5.8: - version "0.5.8" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.8.tgz#b9183b1801e0f847718673673040bc9dc1c715c5" +url-loader@^0.5.9: + version "0.5.9" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.9.tgz#cc8fea82c7b906e7777019250869e569e995c295" dependencies: loader-utils "^1.0.2" mime "1.3.x" @@ -6045,12 +6240,6 @@ urlgrey@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6074,8 +6263,8 @@ utils-merge@1.0.0: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" 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" validate-npm-package-license@^3.0.1: version "3.0.1" @@ -6084,7 +6273,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" @@ -6098,6 +6287,10 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" +vlq@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1" + vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" @@ -6108,23 +6301,23 @@ vue-hot-reload-api@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.1.0.tgz#9ca58a6e0df9078554ce1708688b6578754d86de" -vue-loader@^12.2.1: - version "12.2.1" - resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-12.2.1.tgz#53f27c0973d386768f5a75156f4129b5efc6ba55" +vue-loader@^13.0.1: + version "13.0.2" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-13.0.2.tgz#78c3e80f69c0520f99a092854dd7d63e3921a28d" dependencies: consolidate "^0.14.0" hash-sum "^1.0.2" js-beautify "^1.6.3" loader-utils "^1.1.0" lru-cache "^4.0.1" - postcss "^5.0.21" + postcss "^6.0.1" postcss-load-config "^1.1.0" postcss-selector-parser "^2.0.0" resolve "^1.3.3" source-map "^0.5.6" vue-hot-reload-api "^2.1.0" vue-style-loader "^3.0.0" - vue-template-es2015-compiler "^1.2.2" + vue-template-es2015-compiler "^1.5.3" vue-meta@^1.0.4: version "1.0.4" @@ -6134,13 +6327,13 @@ vue-meta@^1.0.4: lodash.isplainobject "^4.0.6" object-assign "^4.1.1" -vue-router@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-2.5.3.tgz#073783f564b6aece6c8a59c63e298dc2aabfb51b" +vue-router@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-2.7.0.tgz#16d424493aa51c3c8cce8b7c7210ea4c3a89aff1" -vue-server-renderer@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.3.3.tgz#1f450f8a4541b9dd3b084d6470939f82781c3e0a" +vue-server-renderer@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.4.1.tgz#9a1986c459387eaa319c16ca5c0d0f2ebb2c66c5" dependencies: chalk "^1.1.3" hash-sum "^1.0.2" @@ -6164,46 +6357,42 @@ vue-style-loader@^3.0.0: hash-sum "^1.0.2" loader-utils "^1.0.2" -vue-template-compiler@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.3.3.tgz#b5bab9ec57309c906b82a78c81a02179dbc2f470" +vue-template-compiler@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.4.1.tgz#20115cf8714f222f9be4111ec75b079a1c9b8197" dependencies: de-indent "^1.0.2" he "^1.1.0" -vue-template-es2015-compiler@^1.2.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.5.2.tgz#a0a6c50c941d2a4abda963f2f42c337ac450ee95" +vue-template-es2015-compiler@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.5.3.tgz#22787de4e37ebd9339b74223bc467d1adee30545" -vue@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.3.3.tgz#d1eaa8fde5240735a4563e74f2c7fead9cbb064c" +vue@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.4.1.tgz#76e0b8eee614613532216b7bfe784e0b5695b160" vuex@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/vuex/-/vuex-2.3.1.tgz#cde8e997c1f9957719bc7dea154f9aa691d981a6" -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" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - -webidl-conversions@^4.0.0: +webidl-conversions@^4.0.0, webidl-conversions@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" webpack-bundle-analyzer@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.8.2.tgz#8b6240c29a9d63bc72f09d920fb050adbcce9fe8" + version "2.8.3" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.8.3.tgz#8e7b3deb3832698c24b09c84dfe5b43902a83991" dependencies: - acorn "^5.0.3" + acorn "^5.1.1" chalk "^1.1.3" commander "^2.9.0" ejs "^2.5.6" @@ -6215,18 +6404,18 @@ webpack-bundle-analyzer@^2.8.2: opener "^1.4.3" ws "^2.3.1" -webpack-dev-middleware@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.10.2.tgz#2e252ce1dfb020dbda1ccb37df26f30ab014dbd1" +webpack-dev-middleware@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.11.0.tgz#09691d0973a30ad1f82ac73a12e2087f0a4754f9" dependencies: memory-fs "~0.4.1" mime "^1.3.4" path-is-absolute "^1.0.0" range-parser "^1.0.3" -webpack-hot-middleware@^2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.18.0.tgz#a16bb535b83a6ac94a78ac5ebce4f3059e8274d3" +webpack-hot-middleware@^2.18.1: + version "2.18.2" + resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.18.2.tgz#84dee643f037c3d59c9de142548430371aa8d3b2" dependencies: ansi-html "0.0.7" html-entities "^1.2.0" @@ -6237,58 +6426,57 @@ webpack-node-externals@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.6.0.tgz#232c62ec6092b100635a3d29d83c1747128df9bd" -webpack-sources@^0.1.0: - version "0.1.5" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750" +webpack-sources@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" dependencies: - source-list-map "~0.1.7" + source-list-map "^2.0.0" source-map "~0.5.3" -webpack-sources@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" - dependencies: - source-list-map "^1.1.1" - source-map "~0.5.3" - -webpack@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.6.1.tgz#2e0457f0abb1ac5df3ab106c69c672f236785f07" +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" - ajv "^4.7.0" - ajv-keywords "^1.1.1" + ajv "^5.1.5" + ajv-keywords "^2.0.0" async "^2.1.2" - enhanced-resolve "^3.0.0" + enhanced-resolve "^3.3.0" + escope "^3.6.0" interpret "^1.0.0" json-loader "^0.5.4" json5 "^0.5.1" loader-runner "^2.3.0" - loader-utils "^0.2.16" + loader-utils "^1.1.0" 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.8.27" - watchpack "^1.3.1" - webpack-sources "^0.2.3" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" yargs "^6.0.0" +well-known-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-1.0.0.tgz#73c78ae81a7726a8fa598e2880801c8b16225518" + whatwg-encoding@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" dependencies: iconv-lite "0.4.13" -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" +whatwg-url@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.1.0.tgz#5fc8279b93d75483b9ced8b26239854847a18578" dependencies: + lodash.sortby "^4.7.0" tr46 "~0.0.3" - webidl-conversions "^3.0.0" + webidl-conversions "^4.0.1" whet.extend@~0.9.9: version "0.9.9" @@ -6298,7 +6486,11 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.2.4, which@^1.2.8, which@^1.2.9: +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.4, which@^1.2.9: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: @@ -6320,10 +6512,14 @@ 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, wordwrap@~0.0.2: +wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -6355,7 +6551,7 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" slide "^1.1.5" -write-json-file@^2.0.0: +write-json-file@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876" dependencies: @@ -6366,12 +6562,12 @@ write-json-file@^2.0.0: sort-keys "^1.1.1" write-file-atomic "^2.0.0" -write-pkg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-2.1.0.tgz#353aa44c39c48c21440f5c08ce6abd46141c9c08" +write-pkg@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" dependencies: - sort-keys "^1.1.2" - write-json-file "^2.0.0" + sort-keys "^2.0.0" + write-json-file "^2.2.0" write@^0.2.1: version "0.2.1" @@ -6406,7 +6602,7 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yallist@^2.0.0: +yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -6422,6 +6618,12 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + yargs@^6.0.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" @@ -6440,23 +6642,23 @@ yargs@^6.0.0: y18n "^3.2.1" yargs-parser "^4.2.0" -yargs@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" +yargs@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: - camelcase "^3.0.0" + camelcase "^4.1.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" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" 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" + string-width "^2.0.0" + which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^5.0.0" + yargs-parser "^7.0.0" yargs@~3.10.0: version "3.10.0"