From 9580cc05083b7c29b70e7f99b7ad548fd3af4227 Mon Sep 17 00:00:00 2001 From: Giancarlo Anemone Date: Thu, 4 Jan 2018 14:39:14 -0800 Subject: [PATCH 1/4] Fixed some tests --- commands/start.js | 10 ++- package.json | 5 +- test/cli/build.js | 109 ++++++++++++++++++++----------- test/cli/dev.js | 56 ++++------------ test/cli/test.js | 18 ++--- test/compiler/api.js | 10 ++- test/fixtures/assets/src/main.js | 9 ++- test/fixtures/noop/src/main.js | 7 +- test/index.js | 1 + test/run-command.js | 83 +++++++++++++++++++---- 10 files changed, 185 insertions(+), 123 deletions(-) diff --git a/commands/start.js b/commands/start.js index db04eba2..d0582242 100644 --- a/commands/start.js +++ b/commands/start.js @@ -11,6 +11,11 @@ exports.builder = { // default: false, // describe: 'Debug application', // }, + port: { + type: 'number', + describe: + 'Port to start the server on. Defaults to process.env.PORT_HTTP || 3000', + }, dir: { type: 'string', default: '.', @@ -23,7 +28,7 @@ exports.builder = { }, }; -exports.run = async function({dir = '.', environment}) { +exports.run = async function({dir = '.', environment, port}) { const getEntry = env => { const entryPath = `.fusion/dist/${env}/server/server-main.js`; return path.resolve(dir, entryPath); @@ -36,8 +41,7 @@ exports.run = async function({dir = '.', environment}) { if (env) { const entry = getEntry(env); const {start} = require(entry); - - return start({port: process.env.PORT_HTTP || 3000}); // handle server bootstrap errors (e.g. port already in use) + return start({port: port || process.env.PORT_HTTP || 3000}); // handle server bootstrap errors (e.g. port already in use) } else { throw new Error(`App can't start. JS isn't compiled`); // handle compilation errors } diff --git a/package.json b/package.json index 3ff1cc58..7b4ae557 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,8 @@ }, "scripts": { "lint": "eslint .", - "test": "node test/index.js && node test/cli/test.js", - "TODO(#102)": "Something weird is going on with nyc and unitest. This is a hack to fix it", - "cover": "node test/cli/test.js && nyc node test/index.js" + "test": "node test/index.js", + "cover": "nyc node test/index.js" }, "dependencies": { "@nadiia/file-loader": "^1.0.0-beta.5", diff --git a/test/cli/build.js b/test/cli/build.js index 1c25c69c..cb09e56e 100644 --- a/test/cli/build.js +++ b/test/cli/build.js @@ -2,8 +2,7 @@ const fs = require('fs'); const path = require('path'); const test = require('tape'); - -const {run} = require('../../bin/cli-runner'); +const {cmd, start} = require('../run-command'); test('`fusion build` works', async t => { const dir = path.resolve(__dirname, '../fixtures/noop'); @@ -27,12 +26,11 @@ test('`fusion build` works', async t => { dir, `.fusion/dist/development/client/client-vendor.js` ); - // TODO(#112): Enable failing test - // const clientMainVendorMap = path.resolve( - // dir, - // `.fusion/dist/development/client/client-vendor.js.map` - // ); - await run(`build --dir=${dir}`); + const clientMainVendorMap = path.resolve( + dir, + `.fusion/dist/development/client/client-vendor.js.map` + ); + await cmd(`build --dir=${dir}`); t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); t.ok( fs.existsSync(serverMapPath), @@ -44,15 +42,14 @@ test('`fusion build` works', async t => { 'Client Entry file sourcemap gets compiled' ); t.ok(fs.existsSync(clientMainVendor), 'Client vendor file gets compiled'); - // TODO(#112): Enable failing test - // t.ok( - // fs.existsSync(clientMainVendorMap), - // 'Client vendor file sourcemap gets compiled' - // ); + t.ok( + fs.existsSync(clientMainVendorMap), + 'Client vendor file sourcemap gets compiled' + ); t.end(); }); -test('`fusion build` works in production', async t => { +test('`fusion build` works in production with a CDN_URL', async t => { const dir = path.resolve(__dirname, '../fixtures/noop'); const serverEntryPath = path.resolve( dir, @@ -62,40 +59,74 @@ test('`fusion build` works in production', async t => { dir, `.fusion/dist/production/server/server-main.js.map` ); - const clientMain = path.resolve( + await cmd(`build --dir=${dir} --production`); + const clientFiles = fs.readdirSync( + path.resolve(dir, '.fusion/dist/production/client') + ); + t.ok( + clientFiles.some(f => /client-main-(.*?).js$/.test(f)), + 'includes a versioned client-main.js file' + ); + t.ok( + clientFiles.some(f => /client-vendor-(.*?).js$/.test(f)), + 'includes a versioned client-vendor.js file' + ); + t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); + t.ok( + fs.existsSync(serverMapPath), + 'Server Entry file sourcemap gets compiled' + ); + const {res, proc} = await start(`--dir=${dir}`, { + env: Object.assign({}, process.env, {CDN_URL: 'https://cdn.com/test'}), + }); + t.ok( + res.includes('src="https://cdn.com/test/client-main'), + 'includes a script reference to client-main' + ); + t.ok( + res.includes('src="https://cdn.com/test/client-vendor'), + 'includes a script reference to client-vendor' + ); + proc.kill(); + t.end(); +}); + +test('`fusion build` works in production', async t => { + const dir = path.resolve(__dirname, '../fixtures/noop'); + const serverEntryPath = path.resolve( dir, - `.fusion/dist/production/client/client-main-b146db6e5d21f0eee531.js` + `.fusion/dist/production/server/server-main.js` ); - const clientMainMap = path.resolve( + const serverMapPath = path.resolve( dir, - `.fusion/dist/production/client/client-main-b146db6e5d21f0eee531.js.map` - ); - // TODO(#112): Enable failing test - // const clientMainVendor = path.resolve( - // dir, - // `.fusion/dist/production/client/client-vendor-75c3b5ea4d2e744ae2ad.js` - // ); - // const clientMainVendorMap = path.resolve( - // dir, - // `.fusion/dist/production/client/client-vendor-75c3b5ea4d2e744ae2ad.js.map` - // ); - // const port = await getPort(); - await run(`build --dir=${dir} --production`); + `.fusion/dist/production/server/server-main.js.map` + ); + await cmd(`build --dir=${dir} --production`); + const clientFiles = fs.readdirSync( + path.resolve(dir, '.fusion/dist/production/client') + ); + t.ok( + clientFiles.some(f => /client-main-(.*?).js$/.test(f)), + 'includes a versioned client-main.js file' + ); + t.ok( + clientFiles.some(f => /client-vendor-(.*?).js$/.test(f)), + 'includes a versioned client-vendor.js file' + ); t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); t.ok( fs.existsSync(serverMapPath), 'Server Entry file sourcemap gets compiled' ); - t.ok(fs.existsSync(clientMain), 'Client Entry file gets compiled'); + const {res, proc} = await start(`--dir=${dir}`); t.ok( - fs.existsSync(clientMainMap), - 'Client Entry file sourcemap gets compiled' + res.includes('src="/_static/client-main'), + 'includes a script reference to client-main' + ); + t.ok( + res.includes('src="/_static/client-vendor'), + 'includes a script reference to client-vendor' ); - // TODO(#112): Enable failing test - // t.ok(fs.existsSync(clientMainVendor), 'Client vendor file gets compiled'); - // t.ok( - // fs.existsSync(clientMainVendorMap), - // 'Client vendor file sourcemap gets compiled' - // ); + proc.kill(); t.end(); }); diff --git a/test/cli/dev.js b/test/cli/dev.js index 8f9e1bf9..1a42850a 100644 --- a/test/cli/dev.js +++ b/test/cli/dev.js @@ -1,24 +1,18 @@ /* eslint-env node */ -const child_process = require('child_process'); const fs = require('fs'); const path = require('path'); const test = require('tape'); -const getPort = require('get-port'); - -const {run} = require('../../bin/cli-runner'); -const runnerPath = require.resolve('../../bin/cli-runner'); +const {dev} = require('../run-command'); test('`fusion dev` works', async t => { const dir = path.resolve(__dirname, '../fixtures/noop'); const entryPath = `.fusion/dist/development/server/server-main.js`; const entry = path.resolve(dir, entryPath); - const {stop} = await run( - `dev --dir=${dir} --no-open --port=${await getPort()}` - ); - stop(); + const {proc} = await dev(`--dir=${dir}`); t.ok(fs.existsSync(entry), 'Entry file gets compiled'); + proc.kill(); t.end(); }); @@ -30,9 +24,7 @@ test('`fusion dev` works with assets', async t => { ); const testFilePath = path.resolve(dir, '.fusion/test-asset'); - const {stop} = await run( - `dev --dir=${dir} --no-open --port=${await getPort()}` - ); + const {proc} = await dev(`--dir=${dir}`); t.ok(fs.existsSync(testFilePath), 'Generates test file'); t.ok(fs.existsSync(entryPath), 'Entry file gets compiled'); const assetPath = fs.readFileSync(testFilePath); @@ -41,7 +33,7 @@ test('`fusion dev` works with assets', async t => { '/_static/d41d8cd98f00b204e9800998ecf8427e.js', 'sets correct asset path' ); - stop(); + proc.kill(); t.end(); }); @@ -52,10 +44,9 @@ test('`fusion dev` works with assets with cdnUrl', async t => { '.fusion/dist/development/server/server-main.js' ); const testFilePath = path.resolve(dir, '.fusion/test-asset'); - process.env.CDN_URL = 'https://cdn.com'; - const {stop} = await run( - `dev --dir=${dir} --no-open --port=${await getPort()}` - ); + const {proc} = await dev(`--dir=${dir}`, { + env: Object.assign({}, process.env, {CDN_URL: 'https://cdn.com'}), + }); t.ok(fs.existsSync(testFilePath), 'Generates test file'); t.ok(fs.existsSync(entryPath), 'Entry file gets compiled'); const assetPath = fs.readFileSync(testFilePath); @@ -64,8 +55,7 @@ test('`fusion dev` works with assets with cdnUrl', async t => { 'https://cdn.com/d41d8cd98f00b204e9800998ecf8427e.js', 'sets correct asset path' ); - stop(); - process.env.CDN_URL = ''; + proc.kill(); t.end(); }); @@ -74,30 +64,8 @@ test('`fusion dev` top-level error', async t => { __dirname, '../fixtures/server-error-route-component' ); - const port = await getPort(); - const command = `require('${runnerPath}').run('dev --dir=${dir} --no-open --port=${port}')`; - const childServer = child_process.spawn('node', ['-e', command]); - - function checkContentForError() { - try { - const cmd = `curl -s -H 'Accept: text/html' http://localhost:${port}`; - const result = child_process.execSync(cmd); - return String(result).includes('top-level-route-error'); - } catch (e) { - return false; - } - } - - function pause(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - let hasError = false; - while (!hasError) { - await pause(200); - hasError = checkContentForError(); - } - - childServer.kill(); + const {res, proc} = await dev(`--dir=${dir}`); + t.ok(res.includes('top-level-route-error')); + proc.kill(); t.end(); }); diff --git a/test/cli/test.js b/test/cli/test.js index 2bb99339..23f2f819 100644 --- a/test/cli/test.js +++ b/test/cli/test.js @@ -2,24 +2,19 @@ const path = require('path'); const test = require('tape'); - -const run = require('../run-command'); - -const runnerPath = require.resolve('../../bin/cli-runner'); +const {cmd} = require('../run-command'); test('"fusion test" exits w/ unhandled promise rejection in server tests', async t => { const dir = path.resolve( __dirname, '../fixtures/unhandled-promise-rejection-server' ); - const args = `test --dir=${dir}`; - - const cmd = `require('${runnerPath}').run('${args}')`; try { - await run(cmd, { + await cmd(`test --dir=${dir}`, { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.fail('should not succeed'); } catch (e) { @@ -35,11 +30,10 @@ test('`fusion test` exits w/ unhandled promise rejection in browser tests', asyn __dirname, '../fixtures/unhandled-promise-rejection-browser' ); - const args = `test --dir=${dir}`; - - const cmd = `require('${runnerPath}').run('${args}')`; try { - await run(cmd); + await cmd(`test --dir=${dir}`, { + stdio: 'pipe', + }); t.fail('should not succeed'); } catch (e) { t.notEqual(e.code, 0, 'exits with non-zero status code'); diff --git a/test/compiler/api.js b/test/compiler/api.js index e2d0d4be..a7a5a8bd 100644 --- a/test/compiler/api.js +++ b/test/compiler/api.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); const test = require('tape'); -const run = require('../run-command'); +const {run} = require('../run-command'); const getPort = require('get-port'); const {Compiler} = require('../../build/compiler'); @@ -83,7 +83,7 @@ test('development/production env globals', async t => { }); }); `; - const {stdout} = await run(command); + const {stdout} = await run(command, {stdio: 'pipe'}); t.ok( stdout.includes('main __BROWSER__ is false'), 'the global, __BROWSER__, is false' @@ -136,6 +136,7 @@ test('test env globals', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.ok( stdout.includes('universal __BROWSER__ is false'), @@ -158,6 +159,7 @@ test('test env globals', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.ok( browserStdout.includes('browser __BROWSER__ is true'), @@ -264,6 +266,7 @@ test('dev works', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'development', }), + stdio: 'pipe', }); t.end(); }); @@ -365,6 +368,7 @@ test('production works', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.end(); }); @@ -407,6 +411,7 @@ test('test works', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.ok( stdout.includes('server test runs'), @@ -429,6 +434,7 @@ test('test works', async t => { env: Object.assign({}, process.env, { NODE_ENV: 'production', }), + stdio: 'pipe', }); t.ok( !browserStdout.includes('server test runs'), diff --git a/test/fixtures/assets/src/main.js b/test/fixtures/assets/src/main.js index 9a4bf7ae..9fbc3035 100644 --- a/test/fixtures/assets/src/main.js +++ b/test/fixtures/assets/src/main.js @@ -1,11 +1,10 @@ +import App from 'fusion-core'; import {assetUrl} from 'fusion-core'; export default async function() { if (__NODE__) { const fs = require('fs'); fs.writeFileSync('.fusion/test-asset', assetUrl('./static/test.js')); } - return { - plugins: [], - callback() {}, - }; -} + const app = new App('element', el => el); + return app; +} \ No newline at end of file diff --git a/test/fixtures/noop/src/main.js b/test/fixtures/noop/src/main.js index 10e87229..5c037199 100644 --- a/test/fixtures/noop/src/main.js +++ b/test/fixtures/noop/src/main.js @@ -1,6 +1,5 @@ +import App from 'fusion-core'; export default async function() { - return { - plugins: [], - callback() {}, - }; + const app = new App('element', el => el); + return app; } diff --git a/test/index.js b/test/index.js index afe29181..0ca4861f 100644 --- a/test/index.js +++ b/test/index.js @@ -3,6 +3,7 @@ require('./compiler/api'); require('./compiler/errors'); require('./cli/dev'); require('./cli/test-app'); +require('./cli/test'); require('./cli/build'); /* diff --git a/test/run-command.js b/test/run-command.js index df688e12..472792d5 100644 --- a/test/run-command.js +++ b/test/run-command.js @@ -1,20 +1,29 @@ /* eslint-env node */ +const binPath = require.resolve('../bin/cli-runner.js'); const {spawn} = require('child_process'); -module.exports = function run(command, options) { - const child = spawn('node', ['-e', command], options); +const getPort = require('get-port'); +const request = require('request-promise'); +function run(command, options) { + const opts = { + stdio: 'inherit', + ...options, + }; + const child = spawn('node', ['-e', command], opts); const stdoutLines = []; const stderrLines = []; - return new Promise((resolve, reject) => { - child.stdout.on('data', data => { - stdoutLines.push(data.toString()); - }); - child.stderr.on('data', data => { - stderrLines.push(data.toString()); - }); + const promise = new Promise((resolve, reject) => { + child.stdout && + child.stdout.on('data', data => { + stdoutLines.push(data.toString()); + }); + child.stderr && + child.stderr.on('data', data => { + stderrLines.push(data.toString()); + }); child.on('close', code => { const stdout = stdoutLines.join('\n'); const stderr = stderrLines.join('\n'); - if (code === 0) { + if (code === 0 || code === null) { resolve({stdout, stderr}); } else { reject({stdout, stderr, code}); @@ -24,4 +33,56 @@ module.exports = function run(command, options) { reject(e); }); }); -}; + promise.proc = child; + return promise; +} + +function withRunner(args) { + return `require('${binPath}').run('${args}')`; +} + +function cmd(args, options) { + return run(withRunner(args), options); +} + +async function start(args, options) { + const port = await getPort(); + const {proc} = cmd(`start --port=${port} ${args}`, options); + const res = await waitForServer(port); + return {proc, res}; +} + +async function dev(args, options) { + const port = await getPort(); + const {proc} = cmd(`dev --port=${port} --no-open ${args}`, options); + const res = await waitForServer(port); + return {proc, res}; +} + +async function waitForServer(port) { + let started = false; + let numTries = 0; + let res; + while (!started && numTries < 20) { + await new Promise(resolve => setTimeout(resolve, 200)); + try { + res = await request(`http://localhost:${port}/`, { + headers: { + accept: 'text/html', + }, + }); + started = true; + } catch (e) { + numTries++; + } + } + if (!started) { + throw new Error('Failed to start server'); + } + return res; +} + +module.exports.start = start; +module.exports.dev = dev; +module.exports.run = run; +module.exports.cmd = cmd; From cdb90483f98e3d24c4504e58ab595da56ec95278 Mon Sep 17 00:00:00 2001 From: Giancarlo Anemone Date: Fri, 5 Jan 2018 11:34:45 -0800 Subject: [PATCH 2/4] Bump dependencies --- package.json | 104 +++--- yarn.lock | 881 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 775 insertions(+), 210 deletions(-) diff --git a/package.json b/package.json index 7b4ae557..34ff2016 100644 --- a/package.json +++ b/package.json @@ -15,47 +15,47 @@ "@nadiia/file-loader": "^1.0.0-beta.5", "babel-core": "^6.26.0", "babel-jest": "^22.0.4", - "babel-loader": "^7.1.0", + "babel-loader": "^7.1.2", "babel-plugin-dynamic-import-node": "^1.2.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-istanbul": "^4.1.5", "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-plugin-transform-async-generator-functions": "^6.22.0", - "babel-plugin-transform-class-properties": "^6.23.0", - "babel-plugin-transform-cup-globals": "^1.0.0-rc.2", - "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-plugin-transform-react-jsx": "^6.23.0", - "babel-preset-env": "^1.1.8", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-cup-globals": "^1.0.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-plugin-transform-react-jsx": "^6.24.1", + "babel-preset-env": "^1.6.1", "babel-preset-flow": "^6.23.0", "babel-preset-jest": "^22.0.3", - "babel-preset-react": "^6.23.0", + "babel-preset-react": "^6.24.1", "browser-unhandled-rejection": "^1.0.1", - "case-sensitive-paths-webpack-plugin": "^1.1.4", - "chalk": "^1.1.3", - "compose-middleware": "3.0.0", - "compression-webpack-plugin": "^0.4.0", - "core-js": "^2.5.1", + "case-sensitive-paths-webpack-plugin": "^2.1.1", + "chalk": "^2.3.0", + "compose-middleware": "4.0.0", + "compression-webpack-plugin": "^1.1.3", + "core-js": "^2.5.3", "enzyme-adapter-react-16": "^1.1.1", "enzyme-to-json": "^3.3.0", "es6-object-assign": "^1.1.0", - "express": "^4.15.2", + "express": "^4.16.2", "fast-async": "^6.3.0", - "get-port": "^3.0.0", - "gzip-size": "^3.0.0", - "iltorb": "^1.3.1", + "get-port": "^3.2.0", + "gzip-size": "^4.1.0", + "iltorb": "^2.0.3", "imagemin": "^5.3.1", - "imagemin-svgo": "^5.2.2", + "imagemin-svgo": "^6.0.0", "jest": "^22.0.4", "jest-cli": "^22.0.4", "just-snake-case": "^1.0.0", - "koa": "^2.3.0", + "koa": "^2.4.1", "koa-mount": "^3.0.0", - "koa-static": "^4.0.1", + "koa-static": "^4.0.2", "koa-webpack-hot-middleware": "^1.0.3", - "lighthouse": "^2.1.0", + "lighthouse": "^2.7.0", "memory-fs": "^0.4.1", - "mime": "^1.3.4", - "mime-db": "^1.26.0", + "mime": "^2.2.0", + "mime-db": "^1.32.0", "multi-entry-loader": "^1.1.2", "node-zopfli": "^2.0.2", "nyc": "^11.4.1", @@ -64,54 +64,54 @@ "range-parser": "^1.2.0", "react-dev-utils": "^4.2.1", "react-error-overlay": "^3.0.0", - "react-hot-loader": "^3.0.0-beta.6", + "react-hot-loader": "^3.1.3", "redbox-react": "^1.5.0", - "request": "^2.81.0", - "resolve-from": "^3.0.0", + "request": "^2.83.0", + "resolve-from": "^4.0.0", "rimraf": "2.6.2", - "source-map-explorer": "^1.3.3", - "source-map-support": "^0.4.10", + "source-map-explorer": "^1.5.0", + "source-map-support": "^0.5.0", "ua-parser-js": "^0.7.17", - "uglifyjs-webpack-plugin": "1.0.0-beta.1", + "uglifyjs-webpack-plugin": "1.1.6", "unitest": "^2.1.1", "uuid": "^3.1.0", - "webpack": "^3.0.0", - "webpack-chunk-hash": "^0.4.0", - "webpack-dev-middleware": "^1.12.0", - "webpack-dev-server": "^2.7.1", - "webpack-hot-middleware": "^2.15.0", - "webpack-node-externals": "^1.5.4", - "webpack-sources": "^1.0.1", - "winston": "^2.3.1", - "yargs": "^8.0.2" + "webpack": "^3.10.0", + "webpack-chunk-hash": "^0.5.0", + "webpack-dev-middleware": "^2.0.3", + "webpack-dev-server": "^2.9.7", + "webpack-hot-middleware": "^2.21.0", + "webpack-node-externals": "^1.6.0", + "webpack-sources": "^1.1.0", + "winston": "^2.4.0", + "yargs": "^10.0.3" }, "devDependencies": { - "babel-eslint": "^8.0.0", + "babel-eslint": "^8.1.2", "enzyme": "^3.3.0", - "eslint": "^4.2.0", - "eslint-config-fusion": "^0.1.2", - "eslint-plugin-cup": "^1.0.0-rc.4", - "eslint-plugin-flowtype": "^2.35.0", - "eslint-plugin-prettier": "^2.1.2", - "eslint-plugin-react": "^7.1.0", - "flow-bin": "^0.59.0", - "fusion-core": "^0.1.8", + "eslint": "^4.14.0", + "eslint-config-fusion": "^0.2.1", + "eslint-plugin-cup": "^1.0.0", + "eslint-plugin-flowtype": "^2.40.1", + "eslint-plugin-prettier": "^2.4.0", + "eslint-plugin-react": "^7.5.1", + "flow-bin": "^0.62.0", + "fusion-core": "^0.2.7", "fusion-plugin-react-router": "^0.2.3", "fusion-react": "^0.1.10", "fusion-react-async": "^0.1.4", "fusion-test-utils": "0.2.4", - "globby": "^6.1.0", - "prettier": "1.4.2", + "globby": "^7.1.1", + "prettier": "1.9.2", "react": "^16.2.0", "react-dom": "^16.2.0", "react-test-renderer": "^16.2.0", - "request-promise": "^4.2.1", + "request-promise": "^4.2.2", "strip-indent": "^2.0.0", - "tape": "^4.7.0" + "tape": "^4.8.0" }, "peerDependencies": { "enzyme": "^3.3.0", - "fusion-core": "^0.1.8" + "fusion-core": "^0.2.7" }, "engines": { "node": ">= 8.9.0" diff --git a/yarn.lock b/yarn.lock index 79d50154..7342cb16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -134,8 +134,8 @@ resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.3.29.tgz#7f2ad7ec55f914482fc9b1ec4bb1ae6028d46066" "@types/node@*": - version "8.5.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.5.tgz#6f9e8164ae1a55a9beb1d2571cfb7acf9d720c61" + version "8.5.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.7.tgz#9c498c35af354dcfbca3790fb2e81129e93cf0e2" "@types/node@6.0.66": version "6.0.66" @@ -145,6 +145,24 @@ version "0.0.28" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-0.0.28.tgz#5562519bc7963caca8abf7f128cae3b594d41d06" +"@types/tapable@*": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-0.2.4.tgz#8181a228da46185439300e600c5ae3b3b3982585" + +"@types/uglify-js@*": + version "2.6.30" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-2.6.30.tgz#257d2b6dd86673d60da476680fba90f2e30c6eef" + dependencies: + source-map "^0.6.1" + +"@types/webpack@^3.0.5": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-3.8.2.tgz#489276aa101b8364fa444f358e7c220a65c2cc66" + dependencies: + "@types/node" "*" + "@types/tapable" "*" + "@types/uglify-js" "*" + abab@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -209,7 +227,7 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.3, ajv@^5.3.0: +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.3, ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -279,7 +297,7 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" -aproba@^1.0.3: +aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -413,15 +431,11 @@ async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" -async@0.2.x: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - async@^1.4.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2, async@^2.1.4: +async@^2.1.2, async@^2.1.4, async@^2.4.1: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: @@ -435,6 +449,10 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +attempt-x@^1.1.0, attempt-x@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/attempt-x/-/attempt-x-1.1.1.tgz#fba64e96ce03c3e0bd92c92622061c4df387cb76" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -489,7 +507,7 @@ babel-core@^6.0.0, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-eslint@^8.0.0: +babel-eslint@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.1.2.tgz#a39230b0c20ecbaa19a35d5633bf9b9ca2c8116f" dependencies: @@ -629,7 +647,7 @@ babel-jest@^22.0.4: babel-plugin-istanbul "^4.1.5" babel-preset-jest "^22.0.3" -babel-loader@^7.1.0: +babel-loader@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" dependencies: @@ -709,7 +727,7 @@ babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" -babel-plugin-transform-async-generator-functions@^6.22.0: +babel-plugin-transform-async-generator-functions@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" dependencies: @@ -725,7 +743,7 @@ babel-plugin-transform-async-to-generator@^6.22.0: babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-class-properties@^6.23.0: +babel-plugin-transform-class-properties@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" dependencies: @@ -734,7 +752,7 @@ babel-plugin-transform-class-properties@^6.23.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-cup-globals@^1.0.0-rc.2: +babel-plugin-transform-cup-globals@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-cup-globals/-/babel-plugin-transform-cup-globals-1.0.0.tgz#4d58c915f13365ff926a4dd9127e5c5d83d6e89e" @@ -921,7 +939,7 @@ babel-plugin-transform-flow-strip-types@^6.22.0: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" -babel-plugin-transform-object-rest-spread@^6.23.0: +babel-plugin-transform-object-rest-spread@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" dependencies: @@ -948,7 +966,7 @@ babel-plugin-transform-react-jsx-source@^6.22.0: babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-react-jsx@^6.23.0, babel-plugin-transform-react-jsx@^6.24.1: +babel-plugin-transform-react-jsx@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" dependencies: @@ -969,7 +987,7 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-preset-env@^1.1.8: +babel-preset-env@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" dependencies: @@ -1017,7 +1035,7 @@ babel-preset-jest@^22.0.3: babel-plugin-jest-hoist "^22.0.3" babel-plugin-syntax-object-rest-spread "^6.13.0" -babel-preset-react@^6.23.0: +babel-preset-react@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" dependencies: @@ -1164,7 +1182,7 @@ bonjour@^3.5.0: multicast-dns "^6.0.1" multicast-dns-service-types "^1.1.0" -boolbase@~1.0.0: +boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -1300,6 +1318,12 @@ btoa@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.1.2.tgz#3e40b81663f81d2dd6596a4cb714a8dc16cfabe0" +buffer-from@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.1.tgz#57b18b1da0a19ec06f33837a5275a242351bd75e" + dependencies: + is-array-buffer-x "^1.0.13" + buffer-indexof@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" @@ -1328,6 +1352,28 @@ bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" +cacache@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.1.tgz#3e05f6e616117d9b54665b1b20c8aeb93ea5d36f" + dependencies: + bluebird "^3.5.0" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^1.3.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.1" + ssri "^5.0.0" + unique-filename "^1.1.0" + y18n "^3.2.1" + +cached-constructors-x@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cached-constructors-x/-/cached-constructors-x-1.0.0.tgz#c421e3892a4b6f7794434bdcffd1299b330c181b" + caching-transform@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" @@ -1381,9 +1427,9 @@ capture-stack-trace@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" -case-sensitive-paths-webpack-plugin@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-1.1.4.tgz#8aaedd5699a86cac2b34cf40d9b4145758978472" +case-sensitive-paths-webpack-plugin@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" caseless@~0.12.0: version "0.12.0" @@ -1406,7 +1452,7 @@ chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -1504,12 +1550,6 @@ circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" -clap@^1.0.9: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - dependencies: - chalk "^1.1.3" - cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" @@ -1548,9 +1588,9 @@ co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" +coa@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.0.tgz#af881ebe214fc29bee4e9e76b4956b6132295546" dependencies: q "^1.1.2" @@ -1602,13 +1642,13 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" -compose-middleware@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/compose-middleware/-/compose-middleware-3.0.0.tgz#d932618fb0275c0b18c0f4415d40455c247a2064" +compose-middleware@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/compose-middleware/-/compose-middleware-4.0.0.tgz#1e7298257cd9c841485f3ca1de385d3e7da0dd0f" dependencies: "@types/debug" "0.0.29" array-flatten "^2.1.0" - debug "^2.6.8" + debug "^3.1.0" compressible@~2.0.11: version "2.0.12" @@ -1616,14 +1656,15 @@ compressible@~2.0.11: dependencies: mime-db ">= 1.30.0 < 2" -compression-webpack-plugin@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-0.4.0.tgz#811de04215f811ea6a12d4d8aed8457d758f13ac" +compression-webpack-plugin@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-1.1.3.tgz#4b936c627eda09304e3153499ece7830289ab95a" dependencies: - async "0.2.x" - webpack-sources "^0.1.0" - optionalDependencies: - node-zopfli "^2.0.0" + async "^2.4.1" + cacache "^10.0.1" + find-cache-dir "^1.0.0" + serialize-javascript "^1.4.0" + webpack-sources "^1.0.1" compression@^1.5.2: version "1.7.1" @@ -1641,7 +1682,7 @@ 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.6.0: +concat-stream@^1.5.0, concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1709,11 +1750,22 @@ cookies@~0.7.0: depd "~1.1.1" keygrip "~1.0.2" +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.1: +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.3: version "2.5.3" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" @@ -1801,6 +1853,10 @@ crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" +css-select-base-adapter@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.0.tgz#0102b3d14630df86c3eb9fa9f5456270106cf990" + css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" @@ -1810,16 +1866,35 @@ css-select@~1.2.0: domutils "1.5.1" nth-check "~1.0.1" +css-select@~1.3.0-rc0: + version "1.3.0-rc0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.3.0-rc0.tgz#6f93196aaae737666ea1036a8cb14a8fcb7a9231" + dependencies: + boolbase "^1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "^1.0.1" + +css-tree@1.0.0-alpha25: + version "1.0.0-alpha25" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha25.tgz#1bbfabfbf6eeef4f01d9108ff2edd0be2fe35597" + dependencies: + mdn-data "^1.0.0" + source-map "^0.5.3" + +css-url-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/css-url-regex/-/css-url-regex-1.1.0.tgz#83834230cc9f74c457de59eebd1543feeb83b7ec" + css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" +csso@^3.3.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/csso/-/csso-3.4.0.tgz#57b27ef553cccbf5aa964c641748641e9af113f3" dependencies: - clap "^1.0.9" - source-map "^0.5.3" + css-tree "1.0.0-alpha25" cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" @@ -1841,6 +1916,10 @@ cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -1964,11 +2043,7 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -detect-libc@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-0.2.0.tgz#47fdf567348a17ec25fcbf0b9e446348a76f9fb5" - -detect-libc@^1.0.2: +detect-libc@^1.0.2, detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -2006,6 +2081,13 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + discontinuous-range@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" @@ -2098,6 +2180,15 @@ duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" +duplexify@^3.1.2, duplexify@^3.4.2: + version "3.5.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -2210,7 +2301,7 @@ enzyme@^3.3.0: raf "^3.4.0" rst-selector-parser "^2.2.3" -errno@^0.1.3: +errno@^0.1.3, errno@^0.1.4: version "0.1.6" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.6.tgz#c386ce8a6283f14fc09563b71560908c9bf53026" dependencies: @@ -2338,11 +2429,11 @@ eslint-config-cup@^1.0.0-rc.4: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-config-cup/-/eslint-config-cup-1.0.0.tgz#0fcdb787fe254fc9458ec5258143cb0d47052896" -eslint-config-fusion@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/eslint-config-fusion/-/eslint-config-fusion-0.1.2.tgz#cf380a75090d3cee0c9c086165b86fd60619e0aa" +eslint-config-fusion@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-fusion/-/eslint-config-fusion-0.2.1.tgz#39db6979719dab00953e561b2ff0af66981397bb" dependencies: - eslint-config-uber-universal-stage-3 "^1.0.0-rc.6" + eslint-config-uber-universal-stage-3 "^1.0.0-rc.7" eslint-config-prettier@^2.0.0: version "2.9.0" @@ -2362,33 +2453,33 @@ eslint-config-uber-base@^1.0.0-rc.7: dependencies: eslint-config-prettier "^2.0.0" -eslint-config-uber-universal-stage-3@^1.0.0-rc.6: +eslint-config-uber-universal-stage-3@^1.0.0-rc.7: version "1.0.0-rc.7" resolved "https://registry.yarnpkg.com/eslint-config-uber-universal-stage-3/-/eslint-config-uber-universal-stage-3-1.0.0-rc.7.tgz#bd4de38543d3c27cf48d82925bfccb5efb5b541f" dependencies: eslint-config-cup "^1.0.0-rc.4" eslint-config-uber-base-stage-3 "^1.0.0-rc.7" -eslint-plugin-cup@^1.0.0-rc.4: +eslint-plugin-cup@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-plugin-cup/-/eslint-plugin-cup-1.0.0.tgz#6ceced9a06d29e6e7bdc76ca9e398c9bf53072be" dependencies: globals "^10.0.0" -eslint-plugin-flowtype@^2.35.0: +eslint-plugin-flowtype@^2.40.1: version "2.40.1" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.40.1.tgz#f78a8e6a4cc6da831dd541eb61e803ff0279b796" dependencies: lodash "^4.15.0" -eslint-plugin-prettier@^2.1.2: +eslint-plugin-prettier@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-plugin-react@^7.1.0: +eslint-plugin-react@^7.5.1: version "7.5.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b" dependencies: @@ -2408,7 +2499,7 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.2.0: +eslint@^4.14.0: version "4.14.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.14.0.tgz#96609768d1dd23304faba2d94b7fefe5a5447a82" dependencies: @@ -2457,10 +2548,6 @@ espree@^3.5.2: acorn "^5.2.1" acorn-jsx "^3.0.0" -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -2579,7 +2666,7 @@ expect@^22.0.3: jest-message-util "^22.0.3" jest-regex-util "^22.0.3" -express@^4.15.2, express@^4.16.2: +express@^4.16.2: version "4.16.2" resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" dependencies: @@ -2795,9 +2882,16 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.59.0.tgz#8c151ee7f09f1deed9bf0b9d1f2e8ab9d470f1bb" +flow-bin@^0.62.0: + version "0.62.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.62.0.tgz#14bca669a6e3f95c0bc0c2d1eb55ec4e98cb1d83" + +flush-write-stream@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.4" for-each@~0.3.2: version "0.3.2" @@ -2854,10 +2948,26 @@ fresh@0.5.2, fresh@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + fs-exists-sync@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2902,9 +3012,9 @@ functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" -fusion-core@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/fusion-core/-/fusion-core-0.1.8.tgz#2a71b98c6e0c59d3aba949e14e119051dc27f261" +fusion-core@^0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/fusion-core/-/fusion-core-0.2.7.tgz#5c828e4ca48f1bfb61d0654bb76bafff3ec37b72" dependencies: koa "^2.3.0" koa-compose "^4.0.0" @@ -2954,7 +3064,7 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" -get-port@^3.0.0, get-port@^3.2.0: +get-port@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" @@ -3091,6 +3201,17 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" @@ -3115,12 +3236,19 @@ growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" -gzip-size@3.0.0, gzip-size@^3.0.0: +gzip-size@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" dependencies: duplexer "^0.1.1" +gzip-size@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.1.0.tgz#8ae096257eabe7d69c45be2b67c448124ffb517c" + dependencies: + duplexer "^0.1.1" + pify "^3.0.0" + handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" @@ -3177,10 +3305,28 @@ has-glob@^0.1.1: dependencies: is-glob "^2.0.1" +has-own-property-x@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/has-own-property-x/-/has-own-property-x-3.2.0.tgz#1c4b112a577c8cb5805469556e54b6e959e4ded9" + dependencies: + cached-constructors-x "^1.0.0" + to-object-x "^1.5.0" + to-property-key-x "^2.0.2" + +has-symbol-support-x@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz#66ec2e377e0c7d7ccedb07a3a84d77510ff1bc4c" + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" +has-to-string-tag-x@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + dependencies: + has-symbol-support-x "^1.4.1" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3396,16 +3542,20 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@^3.3.3: +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + +ignore@^3.3.3, ignore@^3.3.5: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" -iltorb@^1.3.1: - version "1.3.10" - resolved "https://registry.yarnpkg.com/iltorb/-/iltorb-1.3.10.tgz#a0d9e4e7d52bf510741442236cbe0cc4230fc9f8" +iltorb@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/iltorb/-/iltorb-2.0.3.tgz#9ca96c4f02da262416dd2b538d269af8c155780e" dependencies: - detect-libc "^0.2.0" - nan "^2.6.2" + detect-libc "^1.0.3" + nan "^2.8.0" node-gyp "^3.6.2" prebuild-install "^2.3.0" @@ -3413,12 +3563,13 @@ image-ssim@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/image-ssim/-/image-ssim-0.2.0.tgz#83b42c7a2e6e4b85505477fe6917f5dbc56420e5" -imagemin-svgo@^5.2.2: - version "5.2.4" - resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-5.2.4.tgz#6cd5d342cae4bcd8b483594e5315695df02b9e9b" +imagemin-svgo@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-6.0.0.tgz#2dd8c82946be42a8e2cbcae3c5bf007bc2b8b9e8" dependencies: + buffer-from "^0.1.1" is-svg "^2.0.0" - svgo "^0.7.0" + svgo "^1.0.0" imagemin@^5.3.1: version "5.3.1" @@ -3456,6 +3607,10 @@ indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" +infinity-x@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/infinity-x/-/infinity-x-1.0.0.tgz#cea2d75181d820961b0f72d78e7c4e06fdd55a07" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3522,6 +3677,16 @@ ipaddr.js@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0" +is-array-buffer-x@^1.0.13: + version "1.7.0" + resolved "https://registry.yarnpkg.com/is-array-buffer-x/-/is-array-buffer-x-1.7.0.tgz#4b0b10427b64aa3437767adf4fc07702c59b2371" + dependencies: + attempt-x "^1.1.0" + has-to-string-tag-x "^1.4.1" + is-object-like-x "^1.5.1" + object-get-own-property-descriptor-x "^3.2.0" + to-string-tag-x "^1.4.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3586,6 +3751,19 @@ is-extglob@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" +is-falsey-x@^1.0.0, is-falsey-x@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-falsey-x/-/is-falsey-x-1.0.1.tgz#c469951adc95b8b3fdbf90929b335a7de937d17f" + dependencies: + to-boolean-x "^1.0.1" + +is-finite-x@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-finite-x/-/is-finite-x-3.0.2.tgz#a6ec683cfb2bc1a918a1ff59d178edbcea54f7a6" + dependencies: + infinity-x "^1.0.0" + is-nan-x "^1.0.1" + is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -3602,6 +3780,19 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-function-x@^3.2.0, is-function-x@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/is-function-x/-/is-function-x-3.3.0.tgz#7d16bc113853db206d5e40a8b32caf99bd4ff7c0" + dependencies: + attempt-x "^1.1.1" + has-to-string-tag-x "^1.4.1" + is-falsey-x "^1.0.1" + is-primitive "^2.0.0" + normalize-space-x "^3.0.0" + replace-comments-x "^2.0.0" + to-boolean-x "^1.0.1" + to-string-tag-x "^1.4.2" + is-function@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" @@ -3622,6 +3813,16 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" +is-index-x@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-index-x/-/is-index-x-1.1.0.tgz#43dac97b3a04f30191530833f45ac35001682ee2" + dependencies: + math-clamp-x "^1.2.0" + max-safe-integer "^1.0.1" + to-integer-x "^3.0.0" + to-number-x "^2.0.0" + to-string-symbols-supported-x "^1.0.0" + is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" @@ -3629,6 +3830,17 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-nan-x@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-nan-x/-/is-nan-x-1.0.1.tgz#de747ebcc8bddeb66f367c17caca7eba843855c0" + +is-nil-x@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/is-nil-x/-/is-nil-x-1.4.1.tgz#bd9e7b08b4cd732f9dcbde13d93291bb2ec2e248" + dependencies: + lodash.isnull "^3.0.0" + validate.io-undefined "^1.0.3" + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" @@ -3653,6 +3865,13 @@ is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" +is-object-like-x@^1.5.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/is-object-like-x/-/is-object-like-x-1.6.0.tgz#a8c4a95bd6b95db174e0e4730171a160ec73be82" + dependencies: + is-function-x "^3.3.0" + is-primitive "^2.0.0" + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -4103,20 +4322,13 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@^3.7.0, js-yaml@^3.9.1, js-yaml@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -4272,7 +4484,7 @@ koa-send@^4.1.0: mz "^2.6.0" resolve-path "^1.3.3" -koa-static@^4.0.1: +koa-static@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/koa-static/-/koa-static-4.0.2.tgz#6cda92d88d771dcaad9f0d825cd94a631c861a1a" dependencies: @@ -4357,7 +4569,7 @@ lighthouse-logger@^1.0.0: dependencies: debug "^2.6.8" -lighthouse@^2.1.0: +lighthouse@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/lighthouse/-/lighthouse-2.7.0.tgz#63129fa529371f527c68b86b7fbcd5b258c004b9" dependencies: @@ -4428,6 +4640,10 @@ lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" +lodash.isnull@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash.isnull/-/lodash.isnull-3.0.0.tgz#fafbe59ea1dca27eed786534039dd84c2e07c56e" + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -4436,10 +4652,20 @@ lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.4, version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +log-symbols@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.1.0.tgz#f35fa60e278832b538dc4dddcbb478a45d3e3be6" + dependencies: + chalk "^2.0.1" + loglevel@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.0.tgz#ae0caa561111498c5ba13723d6fb631d24003934" +loglevelnext@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.1.tgz#8b17b5a43395338a96c67911a962c44af466d1c8" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -4461,7 +4687,7 @@ lowercase-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: @@ -4502,6 +4728,23 @@ matched@^0.4.4: lazy-cache "^2.0.1" resolve-dir "^0.1.0" +math-clamp-x@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/math-clamp-x/-/math-clamp-x-1.2.0.tgz#8b537be0645bbba7ee73ee16091e7d6018c5edcf" + dependencies: + to-number-x "^2.0.0" + +math-sign-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/math-sign-x/-/math-sign-x-3.0.0.tgz#d5286022b48e150c384729a86042e0835264c3ed" + dependencies: + is-nan-x "^1.0.1" + to-number-x "^2.0.0" + +max-safe-integer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/max-safe-integer/-/max-safe-integer-1.0.1.tgz#f38060be2c563d8c02e6d48af39122fd83b6f410" + md5-hex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" @@ -4519,6 +4762,10 @@ md5.js@^1.3.4: hash-base "^3.0.0" inherits "^2.0.1" +mdn-data@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.0.0.tgz#a69d9da76847b4d5834c1465ea25c0653a1fbf66" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4608,7 +4855,7 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.30.0 < 2", mime-db@^1.26.0: +"mime-db@>= 1.30.0 < 2", mime-db@^1.32.0: version "1.32.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" @@ -4630,6 +4877,10 @@ mime@^1.3.4, mime@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" +mime@^2.1.0, mime@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.2.0.tgz#161e541965551d3b549fa1114391e3a3d55b923b" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -4672,12 +4923,38 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" +mississippi@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-1.3.0.tgz#d201583eb12327e3c5c1642a404a9cacf94e34f5" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^1.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + mkdirp@0.5.1, mkdirp@0.5.x, "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" +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4720,7 +4997,11 @@ mz@^2.6.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.0.0, nan@^2.0.5, nan@^2.3.0, nan@^2.6.2: +nan-x@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/nan-x/-/nan-x-1.0.0.tgz#0ee78e8d1cd0592d5b4260a5940154545c61c121" + +nan@^2.0.0, nan@^2.0.5, nan@^2.3.0, nan@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" @@ -4851,7 +5132,7 @@ node-pre-gyp@^0.6.39, node-pre-gyp@^0.6.4: tar "^2.2.1" tar-pack "^3.4.0" -node-zopfli@^2.0.0, node-zopfli@^2.0.2: +node-zopfli@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-zopfli/-/node-zopfli-2.0.2.tgz#a7a473ae92aaea85d4c68d45bbf2c944c46116b8" dependencies: @@ -4911,6 +5192,14 @@ normalize-path@^2.0.0, normalize-path@^2.0.1: dependencies: remove-trailing-separator "^1.0.1" +normalize-space-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-space-x/-/normalize-space-x-3.0.0.tgz#17907d6c7c724a4f9567471cbb319553bc0f8882" + dependencies: + cached-constructors-x "^1.0.0" + trim-x "^3.0.0" + white-space-x "^3.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" @@ -4926,7 +5215,7 @@ npm-run-path@^2.0.0: gauge "~2.7.3" set-blocking "~2.0.0" -nth-check@~1.0.1: +nth-check@^1.0.1, nth-check@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" dependencies: @@ -4980,6 +5269,21 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-get-own-property-descriptor-x@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/object-get-own-property-descriptor-x/-/object-get-own-property-descriptor-x-3.2.0.tgz#464585ad03e66108ed166c99325b8d2c5ba93712" + dependencies: + attempt-x "^1.1.0" + has-own-property-x "^3.1.1" + has-symbol-support-x "^1.4.1" + is-falsey-x "^1.0.0" + is-index-x "^1.0.0" + is-primitive "^2.0.0" + is-string "^1.0.4" + property-is-enumerable-x "^1.1.0" + to-object-x "^1.4.1" + to-property-key-x "^2.0.1" + object-inspect@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3" @@ -5182,6 +5486,14 @@ pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + parse-asn1@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" @@ -5205,6 +5517,15 @@ parse-glob@^3.0.4: is-extglob "^1.0.0" is-glob "^2.0.0" +parse-int-x@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-int-x/-/parse-int-x-2.0.0.tgz#9f979d4115930df2f4706a41810b9c712405552f" + dependencies: + cached-constructors-x "^1.0.0" + nan-x "^1.0.0" + to-string-x "^1.4.2" + trim-left-x "^3.0.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -5283,6 +5604,12 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + pbkdf2@^3.0.3: version "3.0.14" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" @@ -5378,9 +5705,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.4.2.tgz#bcdd95ed1eca434ac7f98ca26ea4d25a2af6a2ac" +prettier@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827" pretty-format@^22.0.3: version "22.0.3" @@ -5421,6 +5748,10 @@ progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -5435,6 +5766,13 @@ prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0: loose-envify "^1.3.1" object-assign "^4.1.1" +property-is-enumerable-x@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/property-is-enumerable-x/-/property-is-enumerable-x-1.1.0.tgz#7ca48917476cd0914b37809bfd05776a0d942f6f" + dependencies: + to-object-x "^1.4.1" + to-property-key-x "^2.0.1" + proxy-addr@~2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec" @@ -5467,6 +5805,14 @@ pump@^1.0.0, pump@^1.0.1: end-of-stream "^1.1.0" once "^1.3.1" +pumpify@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.5.tgz#1b671c619940abcaeac0ad0e3a3c164be760993b" + dependencies: + duplexify "^3.1.2" + inherits "^2.0.1" + pump "^1.0.0" + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -5616,7 +5962,7 @@ react-error-overlay@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655" -react-hot-loader@^3.0.0-beta.6: +react-hot-loader@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-3.1.3.tgz#6f92877326958c7cb0134b512474517869126082" dependencies: @@ -5711,7 +6057,7 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@^2.0.0, 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.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -5831,6 +6177,13 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +replace-comments-x@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/replace-comments-x/-/replace-comments-x-2.0.0.tgz#a5cec18efd912aad78a7c3c4b69d01768556d140" + dependencies: + require-coercible-to-string-x "^1.0.0" + to-string-x "^1.4.2" + replace-ext@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" @@ -5849,7 +6202,7 @@ request-promise-native@^1.0.3: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request-promise@^4.2.1: +request-promise@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.2.tgz#d1ea46d654a6ee4f8ee6a4fea1018c22911904b4" dependencies: @@ -5858,7 +6211,7 @@ request-promise@^4.2.1: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@2, request@^2.81.0, request@^2.83.0: +request@2, request@^2.83.0: version "2.83.0" resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" dependencies: @@ -5912,6 +6265,13 @@ request@2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" +require-coercible-to-string-x@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/require-coercible-to-string-x/-/require-coercible-to-string-x-1.0.0.tgz#367b3e9ca67e00324c411b0b498453a74cd5569e" + dependencies: + require-object-coercible-x "^1.4.1" + to-string-x "^1.4.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -5920,6 +6280,12 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-object-coercible-x@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/require-object-coercible-x/-/require-object-coercible-x-1.4.1.tgz#75b9fb5bda2d15cf705a5714f108e8b40ca3eb2e" + dependencies: + is-nil-x "^1.4.1" + require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -5963,6 +6329,10 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolve-path@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.3.3.tgz#4d83aba6468c2b8e632a575e3f52b0fa0dbe1a5c" @@ -6041,6 +6411,12 @@ run-parallel@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + dependencies: + aproba "^1.1.1" + 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" @@ -6069,10 +6445,17 @@ sane@^2.0.0: optionalDependencies: fsevents "^1.1.1" -sax@^1.2.1, sax@~1.2.1: +sax@^1.2.1, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +schema-utils@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.3.tgz#e2a594d3395834d5e15da22b48be13517859458e" + dependencies: + ajv "^5.0.0" + ajv-keywords "^2.1.0" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -6115,6 +6498,10 @@ send@0.16.1: range-parser "~1.2.0" statuses "~1.3.1" +serialize-javascript@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" + serve-index@^1.7.2: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -6256,11 +6643,7 @@ 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-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - -source-map-explorer@^1.3.3: +source-map-explorer@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/source-map-explorer/-/source-map-explorer-1.5.0.tgz#654e2ba0db158fecfc99b9cefdf891b755b767d1" dependencies: @@ -6273,7 +6656,7 @@ source-map-explorer@^1.3.3: temp "^0.8.3" underscore "^1.8.3" -source-map-support@^0.4.10, source-map-support@^0.4.15: +source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: @@ -6295,7 +6678,7 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@~0.5.6: +source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -6391,6 +6774,16 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +ssri@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.0.0.tgz#13c19390b606c821f2a10d02b351c1729b94d8cf" + dependencies: + safe-buffer "^5.1.0" + +stable@~0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.6.tgz#910f5d2aed7b520c6e777499c1f32e139fdecb10" + stack-trace@0.0.9: version "0.0.9" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" @@ -6426,6 +6819,13 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" +stream-each@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + stream-http@^2.7.2: version "2.7.2" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" @@ -6436,6 +6836,10 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -6532,17 +6936,24 @@ supports-color@^4.0.0, supports-color@^4.2.1: 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" +svgo@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.0.3.tgz#c93be52d98ffa2a7273c7a0ac5bf34f470973dad" dependencies: - coa "~1.0.1" + coa "~2.0.0" colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" + css-select "~1.3.0-rc0" + css-select-base-adapter "~0.1.0" + css-tree "1.0.0-alpha25" + css-url-regex "^1.1.0" + csso "^3.3.1" + js-yaml "~3.10.0" mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" + object.values "^1.0.4" + sax "~1.2.4" + stable "~0.1.6" + unquote "^1.1.0" + util.promisify "~1.0.0" symbol-tree@^3.2.1: version "3.2.2" @@ -6582,7 +6993,7 @@ tapable@^0.2.7: version "0.2.8" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" -tape@^4.7.0: +tape@^4.8.0: version "4.8.0" resolved "https://registry.yarnpkg.com/tape/-/tape-4.8.0.tgz#f6a9fec41cc50a1de50fa33603ab580991f6068e" dependencies: @@ -6682,6 +7093,13 @@ throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + through@1: version "1.1.2" resolved "https://registry.yarnpkg.com/through/-/through-1.1.2.tgz#344a5425a3773314ca7e0eb6512fbafaf76c0bfe" @@ -6722,6 +7140,10 @@ to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" +to-boolean-x@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-boolean-x/-/to-boolean-x-1.0.1.tgz#724128dacc5bea75a93ad471be7ee9277561b2c1" + to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -6730,12 +7152,80 @@ to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" +to-integer-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/to-integer-x/-/to-integer-x-3.0.0.tgz#9f3b80e668c7f0ae45e6926b40d95f52c1addc74" + dependencies: + is-finite-x "^3.0.2" + is-nan-x "^1.0.1" + math-sign-x "^3.0.0" + to-number-x "^2.0.0" + +to-number-x@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-number-x/-/to-number-x-2.0.0.tgz#c9099d7ded8fd327132a2987df2dcc8baf36df4d" + dependencies: + cached-constructors-x "^1.0.0" + nan-x "^1.0.0" + parse-int-x "^2.0.0" + to-primitive-x "^1.1.0" + trim-x "^3.0.0" + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" dependencies: kind-of "^3.0.2" +to-object-x@^1.4.1, to-object-x@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/to-object-x/-/to-object-x-1.5.0.tgz#bd69dd4e104d77acc0cc0d84f5ac48f630aebe3c" + dependencies: + cached-constructors-x "^1.0.0" + require-object-coercible-x "^1.4.1" + +to-primitive-x@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/to-primitive-x/-/to-primitive-x-1.1.0.tgz#41ce2c13e3e246e0e5d0a8829a0567c6015833f8" + dependencies: + has-symbol-support-x "^1.4.1" + is-date-object "^1.0.1" + is-function-x "^3.2.0" + is-nil-x "^1.4.1" + is-primitive "^2.0.0" + is-symbol "^1.0.1" + require-object-coercible-x "^1.4.1" + validate.io-undefined "^1.0.3" + +to-property-key-x@^2.0.1, to-property-key-x@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/to-property-key-x/-/to-property-key-x-2.0.2.tgz#b19aa8e22faa0ff7d1c102cfbc657af73413cfa1" + dependencies: + has-symbol-support-x "^1.4.1" + to-primitive-x "^1.1.0" + to-string-x "^1.4.2" + +to-string-symbols-supported-x@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-string-symbols-supported-x/-/to-string-symbols-supported-x-1.0.0.tgz#d435eb72312fe885b18047a96d59c75641476872" + dependencies: + cached-constructors-x "^1.0.0" + has-symbol-support-x "^1.4.1" + is-symbol "^1.0.1" + +to-string-tag-x@^1.4.1, to-string-tag-x@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/to-string-tag-x/-/to-string-tag-x-1.4.2.tgz#916a0c72d2f93dc27fccfe0ea0ce26cd78be21de" + dependencies: + lodash.isnull "^3.0.0" + validate.io-undefined "^1.0.3" + +to-string-x@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/to-string-x/-/to-string-x-1.4.2.tgz#7d9a2528e159a9214e668137c1e10a045abe6279" + dependencies: + is-symbol "^1.0.1" + tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" @@ -6748,14 +7238,37 @@ tr46@^1.0.0: dependencies: punycode "^2.1.0" +trim-left-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-left-x/-/trim-left-x-3.0.0.tgz#356cf055896726b9754425e841398842e90b4cdf" + dependencies: + cached-constructors-x "^1.0.0" + require-coercible-to-string-x "^1.0.0" + white-space-x "^3.0.0" + trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-right-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-right-x/-/trim-right-x-3.0.0.tgz#28c4cd37d5981f50ace9b52e3ce9106f4d2d22c0" + dependencies: + cached-constructors-x "^1.0.0" + require-coercible-to-string-x "^1.0.0" + white-space-x "^3.0.0" + trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +trim-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-x/-/trim-x-3.0.0.tgz#24efdcd027b748bbfc246a0139ad1749befef024" + dependencies: + trim-left-x "^3.0.0" + trim-right-x "^3.0.0" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -6791,7 +7304,7 @@ ua-parser-js@^0.7.17, ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" -uglify-es@^3.0.21: +uglify-es@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.4.tgz#2d592678791e5310456bbc95e952139e3b13167a" dependencies: @@ -6811,13 +7324,18 @@ 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@1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.0.0-beta.1.tgz#595c14d8b85bedd708ab7a6e811894fbe0e69890" +uglifyjs-webpack-plugin@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.1.6.tgz#f4ba8449edcf17835c18ba6ae99b9d610857fb19" dependencies: - source-map "^0.5.6" - uglify-es "^3.0.21" - webpack-sources "^1.0.1" + cacache "^10.0.1" + find-cache-dir "^1.0.0" + schema-utils "^0.4.2" + serialize-javascript "^1.4.0" + source-map "^0.6.1" + uglify-es "^3.3.4" + webpack-sources "^1.1.0" + worker-farm "^1.5.2" uglifyjs-webpack-plugin@^0.4.6: version "0.4.6" @@ -6843,6 +7361,18 @@ underscore@~1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -6869,6 +7399,10 @@ unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +unquote@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + unzip-response@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" @@ -6891,6 +7425,10 @@ update-notifier@^2.1.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" +url-join@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.2.tgz#c072756967ad24b8b59e5741551caac78f50b8b7" + url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -6922,7 +7460,7 @@ util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util.promisify@^1.0.0: +util.promisify@^1.0.0, util.promisify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" dependencies: @@ -6958,6 +7496,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" +validate.io-undefined@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/validate.io-undefined/-/validate.io-undefined-1.0.3.tgz#7e27fcbb315b841e78243431897671929e20b7f4" + value-equal@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" @@ -7024,11 +7566,13 @@ webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-chunk-hash@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/webpack-chunk-hash/-/webpack-chunk-hash-0.4.0.tgz#6b40c3070fbc9ff0cfe0fe781c7174af6c7c16a4" +webpack-chunk-hash@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/webpack-chunk-hash/-/webpack-chunk-hash-0.5.0.tgz#1dba38203d73c1e6ab069b6810a5a37402399dec" + dependencies: + "@types/webpack" "^3.0.5" -webpack-dev-middleware@^1.11.0, webpack-dev-middleware@^1.12.0: +webpack-dev-middleware@^1.11.0: version "1.12.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" dependencies: @@ -7038,7 +7582,19 @@ webpack-dev-middleware@^1.11.0, webpack-dev-middleware@^1.12.0: range-parser "^1.0.3" time-stamp "^2.0.0" -webpack-dev-server@^2.7.1: +webpack-dev-middleware@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-2.0.3.tgz#44e15480ec58d275417ac4d93a0126c7b72450bd" + dependencies: + loud-rejection "^1.6.0" + memory-fs "~0.4.1" + mime "^2.1.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + url-join "^2.0.2" + webpack-log "^1.0.1" + +webpack-dev-server@^2.9.7: version "2.9.7" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.7.tgz#100ad6a14775478924d417ca6dcfb9d52a98faed" dependencies: @@ -7070,7 +7626,7 @@ webpack-dev-server@^2.7.1: webpack-dev-middleware "^1.11.0" yargs "^6.6.0" -webpack-hot-middleware@2.x, webpack-hot-middleware@^2.15.0: +webpack-hot-middleware@2.x, webpack-hot-middleware@^2.21.0: version "2.21.0" resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.21.0.tgz#7b3c113a7a4b301c91e0749573c7aab28b414b52" dependencies: @@ -7079,25 +7635,27 @@ webpack-hot-middleware@2.x, webpack-hot-middleware@^2.15.0: querystring "^0.2.0" strip-ansi "^3.0.0" -webpack-node-externals@^1.5.4: +webpack-log@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.1.0.tgz#fc17ce3aba349130d09464ee31d04686e8023f6a" + dependencies: + chalk "^2.1.0" + log-symbols "^2.1.0" + loglevelnext "^1.0.1" + uuid "^3.1.0" + +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" - dependencies: - source-list-map "~0.1.7" - source-map "~0.5.3" - -webpack-sources@^1.0.1: +webpack-sources@^1.0.1, webpack-sources@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" dependencies: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^3.0.0: +webpack@^3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" dependencies: @@ -7153,10 +7711,6 @@ whatwg-url@^6.3.0: tr46 "^1.0.0" webidl-conversions "^4.0.1" -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -7171,6 +7725,10 @@ which@1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" +white-space-x@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/white-space-x/-/white-space-x-3.0.0.tgz#c8e31ed4fecf4f3feebe6532e6046008a666a3e1" + wide-align@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" @@ -7191,7 +7749,7 @@ window-size@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" -winston@^2.3.1: +winston@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.0.tgz#808050b93d52661ed9fb6c26b3f0c826708b0aee" dependencies: @@ -7214,6 +7772,13 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +worker-farm@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -7271,7 +7836,7 @@ xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -xtend@4.0.1, xtend@^4.0.0: +xtend@4.0.1, xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From feb664ccf78c133f4698f76593af2d09a00f1077 Mon Sep 17 00:00:00 2001 From: Giancarlo Anemone Date: Fri, 5 Jan 2018 11:48:42 -0800 Subject: [PATCH 3/4] Add missing dependencies and fix linting --- .eslintrc.js | 4 + bin/cli.js | 16 ++-- .../babel-plugin-asseturl/index.js | 5 +- .../test/get-expected.js | 1 + .../test/transform.js | 4 +- .../babel-plugin-i18n/test/get-expected.js | 1 + .../test/shared-expected-content.js | 1 + .../babel-plugin-i18n/test/transform.js | 4 +- .../babel-plugin-sw/test/transform.js | 4 +- .../replace-import-declaration.js | 1 + build/compiler.js | 76 ++++++++++--------- build/dev-runtime.js | 27 ++++--- build/spawn.js | 1 + entries/client-entry.js | 1 + entries/polyfills/promise.js | 7 +- entries/server-entry.js | 1 + .../lib/Shared.js | 1 + package.json | 3 + plugins/compilation-metadata-plugin.js | 4 +- test/cli/test-app.js | 1 + test/run-command.js | 1 + yarn.lock | 56 +++++++++++++- 22 files changed, 150 insertions(+), 70 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 44798d3f..4f472ea9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,7 @@ module.exports = { extends: [require.resolve('eslint-config-fusion')], + rules: { + 'import/no-dynamic-require': 0, + 'import/no-webpack-loader-syntax': 0, + } }; diff --git a/bin/cli.js b/bin/cli.js index deef54ed..6353b0ab 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,9 +1,11 @@ #!/usr/bin/env node /* eslint-env node */ -require('./cli-runner').run(process.argv.slice(2).join(' ')).catch(e => { - // eslint-disable-next-line no-console - console.error(e.message); - if (e.yargs) e.yargs.showHelp(); - // Rethrow so that there's a non-zero exit code - throw e; -}); +require('./cli-runner') + .run(process.argv.slice(2).join(' ')) + .catch(e => { + // eslint-disable-next-line no-console + console.error(e.message); + if (e.yargs) e.yargs.showHelp(); + // Rethrow so that there's a non-zero exit code + throw e; + }); diff --git a/build/babel-plugins/babel-plugin-asseturl/index.js b/build/babel-plugins/babel-plugin-asseturl/index.js index 35956be7..40f7e0c4 100644 --- a/build/babel-plugins/babel-plugin-asseturl/index.js +++ b/build/babel-plugins/babel-plugin-asseturl/index.js @@ -35,8 +35,9 @@ function refsHandler(t, context, refs = []) { args[0].replaceWith( t.callExpression(t.identifier('require'), [ t.stringLiteral( - `__SECRET_FILE_LOADER__?storeFile=true&storeFileTarget=node!${args[0] - .node.value}` + `__SECRET_FILE_LOADER__?storeFile=true&storeFileTarget=node!${ + args[0].node.value + }` ), ]) ); diff --git a/build/babel-plugins/babel-plugin-experimentation/test/get-expected.js b/build/babel-plugins/babel-plugin-experimentation/test/get-expected.js index d334fd18..8bc5deff 100644 --- a/build/babel-plugins/babel-plugin-experimentation/test/get-expected.js +++ b/build/babel-plugins/babel-plugin-experimentation/test/get-expected.js @@ -1,5 +1,6 @@ /* eslint-env node */ const stripIndent = require('strip-indent'); + const sharedExpectedContent = stripIndent( ` import { chunkId as _chunkId } from 'fusion-core'; diff --git a/build/babel-plugins/babel-plugin-experimentation/test/transform.js b/build/babel-plugins/babel-plugin-experimentation/test/transform.js index f94b7f39..8c34d3a2 100644 --- a/build/babel-plugins/babel-plugin-experimentation/test/transform.js +++ b/build/babel-plugins/babel-plugin-experimentation/test/transform.js @@ -16,8 +16,8 @@ module.exports = function doTransform(inputString) { ], babelPluginSyntaxJsx, ], - }).code - .trim() + }) + .code.trim() // Normalize quotes .replace(/"/g, "'") ); diff --git a/build/babel-plugins/babel-plugin-i18n/test/get-expected.js b/build/babel-plugins/babel-plugin-i18n/test/get-expected.js index f6016e0c..fb74512d 100644 --- a/build/babel-plugins/babel-plugin-i18n/test/get-expected.js +++ b/build/babel-plugins/babel-plugin-i18n/test/get-expected.js @@ -1,6 +1,7 @@ /* eslint-env node */ const stripIndent = require('strip-indent'); const sharedExpectedContent = require('./shared-expected-content.js'); + module.exports = function getExpected(inputString, includeShared = true) { const sharedContent = includeShared ? '\n' + sharedExpectedContent() : ''; return (stripIndent(inputString).trim() + sharedContent).replace(/"/g, "'"); diff --git a/build/babel-plugins/babel-plugin-i18n/test/shared-expected-content.js b/build/babel-plugins/babel-plugin-i18n/test/shared-expected-content.js index 5e9a8793..30302793 100644 --- a/build/babel-plugins/babel-plugin-i18n/test/shared-expected-content.js +++ b/build/babel-plugins/babel-plugin-i18n/test/shared-expected-content.js @@ -1,5 +1,6 @@ /* eslint-env node */ const stripIndent = require('strip-indent'); + module.exports = () => stripIndent( ` diff --git a/build/babel-plugins/babel-plugin-i18n/test/transform.js b/build/babel-plugins/babel-plugin-i18n/test/transform.js index f94b7f39..8c34d3a2 100644 --- a/build/babel-plugins/babel-plugin-i18n/test/transform.js +++ b/build/babel-plugins/babel-plugin-i18n/test/transform.js @@ -16,8 +16,8 @@ module.exports = function doTransform(inputString) { ], babelPluginSyntaxJsx, ], - }).code - .trim() + }) + .code.trim() // Normalize quotes .replace(/"/g, "'") ); diff --git a/build/babel-plugins/babel-plugin-sw/test/transform.js b/build/babel-plugins/babel-plugin-sw/test/transform.js index 5d6a3145..adac2580 100644 --- a/build/babel-plugins/babel-plugin-sw/test/transform.js +++ b/build/babel-plugins/babel-plugin-sw/test/transform.js @@ -5,8 +5,8 @@ module.exports = function doTransform(inputString) { return ( transform(inputString.trim(), { plugins: [[plugin]], - }).code - .trim() + }) + .code.trim() // Normalize quotes .replace(/"/g, "'") ); diff --git a/build/babel-plugins/babel-plugin-utils/replace-import-declaration.js b/build/babel-plugins/babel-plugin-utils/replace-import-declaration.js index d596dc13..23c64e9c 100644 --- a/build/babel-plugins/babel-plugin-utils/replace-import-declaration.js +++ b/build/babel-plugins/babel-plugin-utils/replace-import-declaration.js @@ -1,6 +1,7 @@ // @flow /* eslint-env node */ const snakeCase = require('just-snake-case'); + module.exports = replaceImportDeclaration; /* diff --git a/build/compiler.js b/build/compiler.js index 268c7af1..84bcb404 100644 --- a/build/compiler.js +++ b/build/compiler.js @@ -4,6 +4,7 @@ const path = require('path'); const webpack = require('webpack'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); + const progress = new ProgressBarPlugin(); const WebpackChunkHash = require('webpack-chunk-hash'); const webpackDevMiddleware = require('../lib/simple-webpack-dev-middleware'); @@ -87,12 +88,14 @@ function getConfig({target, env, dir, watch, cover}) { const destination = path.resolve(dir, `.fusion/dist/${env}/${side}`); const evergreen = false; const possibleESVersions = ['es5']; - const serverEntry = env === 'test' - ? serverTestEntry - : path.join(__dirname, `../entries/server-entry.js`); - const clientEntry = env === 'test' - ? browserTestEntry - : path.join(__dirname, `../entries/client-entry.js`); + const serverEntry = + env === 'test' + ? serverTestEntry + : path.join(__dirname, `../entries/server-entry.js`); + const clientEntry = + env === 'test' + ? browserTestEntry + : path.join(__dirname, `../entries/client-entry.js`); const entry = { node: serverEntry, web: clientEntry, @@ -155,25 +158,27 @@ function getConfig({target, env, dir, watch, cover}) { * We only use it for generating nice stack traces */ // TODO(#6): what about node v8 inspector? - devtool: target !== 'node' && env === 'production' - ? 'hidden-source-map' - : 'cheap-module-source-map', + devtool: + target !== 'node' && env === 'production' + ? 'hidden-source-map' + : 'cheap-module-source-map', output: { // For in-memory filesystem in webpack dev middleware, write files to root // Otherwise, write to appropriate location on disk - path: env === 'development' && watch && target === 'web' - ? '/' - : destination, - filename: env === 'production' && target === 'web' - ? `${name}-[name]-[chunkhash].js` - : `${name}-[name].js`, + path: + env === 'development' && watch && target === 'web' ? '/' : destination, + filename: + env === 'production' && target === 'web' + ? `${name}-[name]-[chunkhash].js` + : `${name}-[name].js`, libraryTarget: target === 'node' ? 'commonjs2' : 'var', // This is the recommended default. // See https://webpack.js.org/configuration/output/#output-sourcemapfilename sourceMapFilename: `[file].map`, - chunkFilename: env === 'production' && target === 'web' - ? '[id]-[chunkhash].js' - : evergreen ? 'evergreen-[id].js' : '[id].js', + chunkFilename: + env === 'production' && target === 'web' + ? '[id]-[chunkhash].js' + : evergreen ? 'evergreen-[id].js' : '[id].js', // We will set __webpack_public_path__ at runtime, so this should be set to undefined publicPath: void 0, // TODO(#7): Do we really need this? See lite config @@ -215,8 +220,8 @@ function getConfig({target, env, dir, watch, cover}) { // Tape also requires __dirname, remove once we don't use tape anymore __dirname: env === 'test' && target === 'web' ? true : false, /** - * Tape requires `fs` to be defined - */ + * Tape requires `fs` to be defined + */ fs: env === 'test' && target === 'web' ? 'empty' : false, }, node @@ -279,15 +284,16 @@ function getConfig({target, env, dir, watch, cover}) { [ require.resolve('./babel-preset.js'), { - targets: target === 'node' - ? { - node: 'current', - } - : { - browsers: evergreen - ? browserSupport.evergreen - : browserSupport.conservative, - }, + targets: + target === 'node' + ? { + node: 'current', + } + : { + browsers: evergreen + ? browserSupport.evergreen + : browserSupport.conservative, + }, }, ], ...(fusionConfig.babel && fusionConfig.babel.presets @@ -345,13 +351,13 @@ function getConfig({target, env, dir, watch, cover}) { __ENV__: env, }, target === 'node' && - env === 'test' && { - __NODE_TEST_ENTRY__: serverTestEntry, - }, + env === 'test' && { + __NODE_TEST_ENTRY__: serverTestEntry, + }, target === 'web' && - env === 'test' && { - __BROWSER_TEST_ENTRY__: browserTestEntry, - }, + env === 'test' && { + __BROWSER_TEST_ENTRY__: browserTestEntry, + }, alias ), }, diff --git a/build/dev-runtime.js b/build/dev-runtime.js index f486c5a1..ddf53b0e 100644 --- a/build/dev-runtime.js +++ b/build/dev-runtime.js @@ -151,18 +151,21 @@ module.exports.DevelopmentRuntime = function({ state.server = http.createServer((req, res) => { middleware(req, res, async () => { const childPort = await state.childPortP; - lifecycle.wait().then(function retry() { - const newUrl = getChildUrl(req.url, { - protocol: 'http', - hostname: 'localhost', - port: childPort, - }); - const proxyReq = request(newUrl); - proxyReq.on('error', retry); - req.pipe(proxyReq).pipe(res); - }, error => { - renderError(res, error); - }); + lifecycle.wait().then( + function retry() { + const newUrl = getChildUrl(req.url, { + protocol: 'http', + hostname: 'localhost', + port: childPort, + }); + const proxyReq = request(newUrl); + proxyReq.on('error', retry); + req.pipe(proxyReq).pipe(res); + }, + error => { + renderError(res, error); + } + ); }); }); const listen = promisify(state.server.listen.bind(state.server)); diff --git a/build/spawn.js b/build/spawn.js index 6f9da370..6bada61f 100644 --- a/build/spawn.js +++ b/build/spawn.js @@ -1,5 +1,6 @@ /* eslint-env node */ const cp = require('child_process'); + module.exports = function spawn(commandString) { const [command, ...args] = commandString.split(' '); const child = cp.spawn(command, args, {stdio: 'inherit'}); diff --git a/entries/client-entry.js b/entries/client-entry.js index be166978..7ed22581 100644 --- a/entries/client-entry.js +++ b/entries/client-entry.js @@ -4,6 +4,7 @@ import 'core-js/es6'; import 'core-js/es7'; +// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies import initialize from '__FRAMEWORK_SHARED_ENTRY__'; /* diff --git a/entries/polyfills/promise.js b/entries/polyfills/promise.js index 74a31e3b..df2745ba 100644 --- a/entries/polyfills/promise.js +++ b/entries/polyfills/promise.js @@ -4,7 +4,7 @@ /* eslint-env browser */ /* global setImmediate, setTimeout */ - +// eslint-disable-next-line import/no-mutable-exports var Promise = function(executor) { if (!(this instanceof Promise)) throw new Error('Promise must be called with `new`'); @@ -20,9 +20,8 @@ var Promise = function(executor) { resolvers: resolvers, rejectors: rejectors, }); - var callAsync = typeof setImmediate === 'function' - ? setImmediate - : setTimeout; + var callAsync = + typeof setImmediate === 'function' ? setImmediate : setTimeout; function handler(list, shouldAbsorb) { return function execute(value) { var then; diff --git a/entries/server-entry.js b/entries/server-entry.js index 2e5f10c5..ecadb5c2 100644 --- a/entries/server-entry.js +++ b/entries/server-entry.js @@ -1,5 +1,6 @@ /* eslint-env node */ import http from 'http'; +// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies import main from '__FRAMEWORK_SHARED_ENTRY__'; import CompilationMetaDataFactory from '../plugins/compilation-metadata-plugin'; import AssetsFactory from '../plugins/assets-plugin'; diff --git a/lib/simple-webpack-dev-middleware/lib/Shared.js b/lib/simple-webpack-dev-middleware/lib/Shared.js index 8226006f..46b1a6b0 100644 --- a/lib/simple-webpack-dev-middleware/lib/Shared.js +++ b/lib/simple-webpack-dev-middleware/lib/Shared.js @@ -3,6 +3,7 @@ const parseRange = require('range-parser'); const pathIsAbsolute = require('path-is-absolute'); const MemoryFileSystem = require('memory-fs'); + const HASH_REGEXP = /[0-9a-f]{10,}/; const EventEmitter = require('events'); diff --git a/package.json b/package.json index 34ff2016..f561ebbd 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-istanbul": "^4.1.5", "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-async-generator-functions": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-cup-globals": "^1.0.0", @@ -29,6 +30,7 @@ "babel-preset-flow": "^6.23.0", "babel-preset-jest": "^22.0.3", "babel-preset-react": "^6.24.1", + "babel-template": "^6.26.0", "browser-unhandled-rejection": "^1.0.1", "case-sensitive-paths-webpack-plugin": "^2.1.1", "chalk": "^2.3.0", @@ -92,6 +94,7 @@ "eslint-config-fusion": "^0.2.1", "eslint-plugin-cup": "^1.0.0", "eslint-plugin-flowtype": "^2.40.1", + "eslint-plugin-import": "^2.8.0", "eslint-plugin-prettier": "^2.4.0", "eslint-plugin-react": "^7.5.1", "flow-bin": "^0.62.0", diff --git a/plugins/compilation-metadata-plugin.js b/plugins/compilation-metadata-plugin.js index 15a844ff..f5b546f2 100644 --- a/plugins/compilation-metadata-plugin.js +++ b/plugins/compilation-metadata-plugin.js @@ -8,8 +8,10 @@ const path = require('path'); const {Plugin} = require('fusion-core'); const envVarsPlugin = require('./environment-variables-plugin'); -//custom loaders: see build/compiler.js +// custom loaders: see build/compiler.js +// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies const chunkUrlMap = require('__SECRET_BUNDLE_MAP_LOADER__!'); +// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies const syncChunks = require('__SECRET_SYNC_CHUNK_IDS_LOADER__!'); module.exports = function() { diff --git a/test/cli/test-app.js b/test/cli/test-app.js index 2363669d..b02d896d 100644 --- a/test/cli/test-app.js +++ b/test/cli/test-app.js @@ -8,6 +8,7 @@ const {promisify} = require('util'); const exec = promisify(require('child_process').exec); const countTests = require('../fixtures/test-jest-app/count-tests'); + const runnerPath = require.resolve('../../bin/cli-runner'); test('`fusion test-app` passes', async t => { diff --git a/test/run-command.js b/test/run-command.js index 472792d5..7f2c481e 100644 --- a/test/run-command.js +++ b/test/run-command.js @@ -3,6 +3,7 @@ const binPath = require.resolve('../bin/cli-runner.js'); const {spawn} = require('child_process'); const getPort = require('get-port'); const request = require('request-promise'); + function run(command, options) { const opts = { stdio: 'inherit', diff --git a/yarn.lock b/yarn.lock index 7342cb16..fd66924d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -715,7 +715,7 @@ babel-plugin-syntax-flow@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -1340,7 +1340,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1719,6 +1719,10 @@ constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + content-disposition@0.5.2, content-disposition@~0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" @@ -1946,7 +1950,7 @@ debug@*, debug@^3.0.1, debug@^3.1.0: dependencies: ms "2.0.0" -debug@2.6.9, debug@^2.2.0, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: +debug@2.6.9, debug@^2.2.0, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -2113,6 +2117,13 @@ docopt@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/docopt/-/docopt-0.6.2.tgz#b28e9e2220da5ec49f7ea5bb24a47787405eeb11" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + doctrine@^2.0.0, doctrine@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.2.tgz#68f96ce8efc56cc42651f1faadb4f175273b0075" @@ -2460,6 +2471,20 @@ eslint-config-uber-universal-stage-3@^1.0.0-rc.7: eslint-config-cup "^1.0.0-rc.4" eslint-config-uber-base-stage-3 "^1.0.0-rc.7" +eslint-import-resolver-node@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" + dependencies: + debug "^2.6.9" + resolve "^1.5.0" + +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.6.8" + pkg-dir "^1.0.0" + eslint-plugin-cup@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-plugin-cup/-/eslint-plugin-cup-1.0.0.tgz#6ceced9a06d29e6e7bdc76ca9e398c9bf53072be" @@ -2472,6 +2497,21 @@ eslint-plugin-flowtype@^2.40.1: dependencies: lodash "^4.15.0" +eslint-plugin-import@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.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-prettier@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" @@ -4636,6 +4676,10 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -6348,6 +6392,12 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" +resolve@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" + resolve@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" From 13a307922a69f2b956b7ba8bea0ec8c76936b0b4 Mon Sep 17 00:00:00 2001 From: Giancarlo Anemone Date: Fri, 5 Jan 2018 12:41:20 -0800 Subject: [PATCH 4/4] Use async apis --- package.json | 3 +-- test/cli/build.js | 28 ++++++++++++---------- test/cli/dev.js | 19 +++++++++------ test/cli/test-app.js | 10 ++++---- test/compiler/api.js | 57 +++++++++++++++++++++++++------------------- test/index.js | 4 ++-- test/run-command.js | 3 ++- 7 files changed, 71 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index f561ebbd..d6ff365e 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ }, "scripts": { "lint": "eslint .", - "test": "node test/index.js", - "cover": "nyc node test/index.js" + "test": "node test/index.js" }, "dependencies": { "@nadiia/file-loader": "^1.0.0-beta.5", diff --git a/test/cli/build.js b/test/cli/build.js index cb09e56e..069821c1 100644 --- a/test/cli/build.js +++ b/test/cli/build.js @@ -3,6 +3,10 @@ const fs = require('fs'); const path = require('path'); const test = require('tape'); const {cmd, start} = require('../run-command'); +const {promisify} = require('util'); + +const exists = promisify(fs.exists); +const readdir = promisify(fs.readdir); test('`fusion build` works', async t => { const dir = path.resolve(__dirname, '../fixtures/noop'); @@ -31,19 +35,19 @@ test('`fusion build` works', async t => { `.fusion/dist/development/client/client-vendor.js.map` ); await cmd(`build --dir=${dir}`); - t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); + t.ok(await exists(serverEntryPath), 'Server Entry file gets compiled'); t.ok( - fs.existsSync(serverMapPath), + await exists(serverMapPath), 'Server Entry file sourcemap gets compiled' ); - t.ok(fs.existsSync(clientMain), 'Client Entry file gets compiled'); + t.ok(await exists(clientMain), 'Client Entry file gets compiled'); t.ok( - fs.existsSync(clientMainMap), + await exists(clientMainMap), 'Client Entry file sourcemap gets compiled' ); - t.ok(fs.existsSync(clientMainVendor), 'Client vendor file gets compiled'); + t.ok(await exists(clientMainVendor), 'Client vendor file gets compiled'); t.ok( - fs.existsSync(clientMainVendorMap), + await exists(clientMainVendorMap), 'Client vendor file sourcemap gets compiled' ); t.end(); @@ -60,7 +64,7 @@ test('`fusion build` works in production with a CDN_URL', async t => { `.fusion/dist/production/server/server-main.js.map` ); await cmd(`build --dir=${dir} --production`); - const clientFiles = fs.readdirSync( + const clientFiles = await readdir( path.resolve(dir, '.fusion/dist/production/client') ); t.ok( @@ -71,9 +75,9 @@ test('`fusion build` works in production with a CDN_URL', async t => { clientFiles.some(f => /client-vendor-(.*?).js$/.test(f)), 'includes a versioned client-vendor.js file' ); - t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); + t.ok(await exists(serverEntryPath), 'Server Entry file gets compiled'); t.ok( - fs.existsSync(serverMapPath), + await exists(serverMapPath), 'Server Entry file sourcemap gets compiled' ); const {res, proc} = await start(`--dir=${dir}`, { @@ -102,7 +106,7 @@ test('`fusion build` works in production', async t => { `.fusion/dist/production/server/server-main.js.map` ); await cmd(`build --dir=${dir} --production`); - const clientFiles = fs.readdirSync( + const clientFiles = await readdir( path.resolve(dir, '.fusion/dist/production/client') ); t.ok( @@ -113,9 +117,9 @@ test('`fusion build` works in production', async t => { clientFiles.some(f => /client-vendor-(.*?).js$/.test(f)), 'includes a versioned client-vendor.js file' ); - t.ok(fs.existsSync(serverEntryPath), 'Server Entry file gets compiled'); + t.ok(await exists(serverEntryPath), 'Server Entry file gets compiled'); t.ok( - fs.existsSync(serverMapPath), + await exists(serverMapPath), 'Server Entry file sourcemap gets compiled' ); const {res, proc} = await start(`--dir=${dir}`); diff --git a/test/cli/dev.js b/test/cli/dev.js index 1a42850a..7d1216a7 100644 --- a/test/cli/dev.js +++ b/test/cli/dev.js @@ -4,6 +4,10 @@ const fs = require('fs'); const path = require('path'); const test = require('tape'); const {dev} = require('../run-command'); +const {promisify} = require('util'); + +const exists = promisify(fs.exists); +const readFile = promisify(fs.readFile); test('`fusion dev` works', async t => { const dir = path.resolve(__dirname, '../fixtures/noop'); @@ -11,7 +15,8 @@ test('`fusion dev` works', async t => { const entry = path.resolve(dir, entryPath); const {proc} = await dev(`--dir=${dir}`); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); + await new Promise(resolve => setTimeout(resolve, 1000)); + t.ok(await exists(entry), 'Entry file gets compiled'); proc.kill(); t.end(); }); @@ -25,9 +30,9 @@ test('`fusion dev` works with assets', async t => { const testFilePath = path.resolve(dir, '.fusion/test-asset'); const {proc} = await dev(`--dir=${dir}`); - t.ok(fs.existsSync(testFilePath), 'Generates test file'); - t.ok(fs.existsSync(entryPath), 'Entry file gets compiled'); - const assetPath = fs.readFileSync(testFilePath); + t.ok(await exists(testFilePath), 'Generates test file'); + t.ok(await exists(entryPath), 'Entry file gets compiled'); + const assetPath = await readFile(testFilePath); t.equal( assetPath.toString(), '/_static/d41d8cd98f00b204e9800998ecf8427e.js', @@ -47,9 +52,9 @@ test('`fusion dev` works with assets with cdnUrl', async t => { const {proc} = await dev(`--dir=${dir}`, { env: Object.assign({}, process.env, {CDN_URL: 'https://cdn.com'}), }); - t.ok(fs.existsSync(testFilePath), 'Generates test file'); - t.ok(fs.existsSync(entryPath), 'Entry file gets compiled'); - const assetPath = fs.readFileSync(testFilePath); + t.ok(await exists(testFilePath), 'Generates test file'); + t.ok(await exists(entryPath), 'Entry file gets compiled'); + const assetPath = await readFile(testFilePath); t.equal( assetPath.toString(), 'https://cdn.com/d41d8cd98f00b204e9800998ecf8427e.js', diff --git a/test/cli/test-app.js b/test/cli/test-app.js index b02d896d..cdef2145 100644 --- a/test/cli/test-app.js +++ b/test/cli/test-app.js @@ -7,6 +7,8 @@ const test = require('tape'); const {promisify} = require('util'); const exec = promisify(require('child_process').exec); +const readFile = promisify(fs.readFile); + const countTests = require('../fixtures/test-jest-app/count-tests'); const runnerPath = require.resolve('../../bin/cli-runner'); @@ -94,8 +96,8 @@ test('`fusion test-app` snapshotting', async t => { const updateSnapshot = `require('${runnerPath}').run('${args} --updateSnapshot')`; await exec(`node -e "${updateSnapshot}"`); - const newSnapshotCode = fs.readFileSync(snapshotFile); - const originalSnapshotCode = fs.readFileSync(backupSnapshot); + const newSnapshotCode = await readFile(snapshotFile); + const originalSnapshotCode = await readFile(backupSnapshot); t.notEqual(newSnapshotCode, originalSnapshotCode, 'snapshot is updated'); // Restore the failing snapshot @@ -126,8 +128,8 @@ test('`fusion test-app` snapshotting - enzyme serializer', async t => { const updateSnapshot = `require('${runnerPath}').run('${args} --updateSnapshot')`; await exec(`node -e "${updateSnapshot}"`); - const newSnapshotCode = fs.readFileSync(snapshotFile); - const originalSnapshotCode = fs.readFileSync(backupSnapshot); + const newSnapshotCode = await readFile(snapshotFile); + const originalSnapshotCode = await readFile(backupSnapshot); t.notEqual(newSnapshotCode, originalSnapshotCode, 'snapshot is updated'); // Restore the failing snapshot diff --git a/test/compiler/api.js b/test/compiler/api.js index a7a5a8bd..fef7a5b0 100644 --- a/test/compiler/api.js +++ b/test/compiler/api.js @@ -5,8 +5,12 @@ const path = require('path'); const test = require('tape'); const {run} = require('../run-command'); const getPort = require('get-port'); - const {Compiler} = require('../../build/compiler'); +const {promisify} = require('util'); + +const exists = promisify(fs.exists); +const readFile = promisify(fs.readFile); +const readdir = promisify(fs.readdir); test('throws if missing src/main.js', t => { const envs = ['development']; @@ -41,13 +45,13 @@ test('development/production env globals', async t => { // Validate browser globals by file content const clientDir = path.resolve(dir, `.fusion/dist/${envs[i]}/client`); - const assets = fs.readdirSync(clientDir); + const assets = await readdir(clientDir); const clientEntry = assets.find(a => a.match(/^client-main.*\.js$/)); const clientEntryPath = path.resolve( dir, `.fusion/dist/${envs[i]}/client/${clientEntry}` ); - const clientContent = fs.readFileSync(clientEntryPath, 'utf8'); + const clientContent = await readFile(clientEntryPath, 'utf8'); const expectedClientBrowser = { development: 'main __BROWSER__ is " + true', @@ -120,13 +124,13 @@ test('test env globals', async t => { }); watcher.close(); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); - t.ok(fs.existsSync(entry + '.map'), 'Source map gets compiled'); + t.ok(await exists(entry), 'Entry file gets compiled'); + t.ok(await exists(entry + '.map'), 'Source map gets compiled'); const clientDir = `.fusion/dist/${envs[0]}/client`; const clientEntry = path.resolve(dir, clientDir, 'client-main.js'); - t.ok(fs.existsSync(clientEntry), 'client .js'); - t.ok(fs.existsSync(clientEntry + '.map'), 'client .map'); + t.ok(await exists(clientEntry), 'client .js'); + t.ok(await exists(clientEntry + '.map'), 'client .map'); // server test bundle const serverCommand = ` @@ -198,7 +202,7 @@ test('generates error if missing default export', async t => { const compiler = new Compiler({envs, dir}); await compiler.clean(); - t.ok(!fs.existsSync(entry), 'Cleans'); + t.notok(await exists(entry), 'Cleans'); const watcher = await new Promise((resolve, reject) => { const watcher = compiler.start((err, stats) => { @@ -211,7 +215,7 @@ test('generates error if missing default export', async t => { }); watcher.close(); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); + t.ok(await exists(entry), 'Entry file gets compiled'); const app = require(entry); t.ok(typeof app.start === 'function', 'Entry has start function'); @@ -233,7 +237,8 @@ test('dev works', async t => { const compiler = new Compiler({envs, dir}); await compiler.clean(); - t.ok(!fs.existsSync(entry), 'Cleans'); + + t.notok(await exists(entry), 'Cleans'); const watcher = await new Promise((resolve, reject) => { const watcher = compiler.start((err, stats) => { @@ -246,8 +251,8 @@ test('dev works', async t => { }); watcher.close(); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); - t.ok(fs.existsSync(entry + '.map'), 'Source map gets compiled'); + t.ok(await exists(entry), 'Entry file gets compiled'); + t.ok(await exists(entry + '.map'), 'Source map gets compiled'); const command = ` const assert = require('assert'); @@ -297,11 +302,11 @@ test('compiles with babel plugin', async t => { }); watcher.close(); - t.ok(fs.existsSync(clientEntryPath), 'Client file gets compiled'); - t.ok(fs.existsSync(serverEntryPath), 'Server file gets compiled'); + t.ok(await exists(clientEntryPath), 'Client file gets compiled'); + t.ok(await exists(serverEntryPath), 'Server file gets compiled'); - const clientEntry = fs.readFileSync(clientEntryPath, 'utf8'); - const serverEntry = fs.readFileSync(serverEntryPath, 'utf8'); + const clientEntry = await readFile(clientEntryPath, 'utf8'); + const serverEntry = await readFile(serverEntryPath, 'utf8'); t.ok( clientEntry.includes('transformed_helloworld_custom_babel'), @@ -323,7 +328,8 @@ test('production works', async t => { const compiler = new Compiler({envs, dir}); await compiler.clean(); - t.ok(!fs.existsSync(entry), 'Cleans'); + + t.notok(await exists(entry), 'Cleans'); const watcher = await new Promise((resolve, reject) => { const watcher = compiler.start((err, stats) => { @@ -336,11 +342,11 @@ test('production works', async t => { }); watcher.close(); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); - t.ok(fs.existsSync(entry + '.map'), 'Source map gets compiled'); + t.ok(await exists(entry), 'Entry file gets compiled'); + t.ok(await exists(entry + '.map'), 'Source map gets compiled'); const clientDir = path.resolve(dir, `.fusion/dist/${envs[0]}/client`); - const assets = fs.readdirSync(clientDir); + const assets = await readdir(clientDir); t.ok(assets.find(a => a.match(/^client-main.+\.js$/)), 'main .js'); t.ok(assets.find(a => a.match(/^client-main.+\.js.map$/)), 'main .map'); //t.ok(assets.find(a => a.match(/^client-main.+\.js.gz$/)), 'main .gz'); @@ -382,7 +388,8 @@ test('test works', async t => { const compiler = new Compiler({envs, dir}); await compiler.clean(); - t.ok(!fs.existsSync(entry), 'Cleans'); + + t.notok(await exists(entry), 'Cleans'); const watcher = await new Promise((resolve, reject) => { const watcher = compiler.start((err, stats) => { @@ -395,13 +402,13 @@ test('test works', async t => { }); watcher.close(); - t.ok(fs.existsSync(entry), 'Entry file gets compiled'); - t.ok(fs.existsSync(entry + '.map'), 'Source map gets compiled'); + t.ok(await exists(entry), 'Entry file gets compiled'); + t.ok(await exists(entry + '.map'), 'Source map gets compiled'); const clientDir = `.fusion/dist/${envs[0]}/client`; const clientEntry = path.resolve(dir, clientDir, 'client-main.js'); - t.ok(fs.existsSync(clientEntry), 'client .js'); - t.ok(fs.existsSync(clientEntry + '.map'), 'client .map'); + t.ok(await exists(clientEntry), 'client .js'); + t.ok(await exists(clientEntry + '.map'), 'client .map'); // server test bundle const serverCommand = ` diff --git a/test/index.js b/test/index.js index 0ca4861f..3e07e156 100644 --- a/test/index.js +++ b/test/index.js @@ -1,10 +1,10 @@ /* eslint-env node */ -require('./compiler/api'); -require('./compiler/errors'); require('./cli/dev'); require('./cli/test-app'); require('./cli/test'); require('./cli/build'); +require('./compiler/api'); +require('./compiler/errors'); /* require('./browser-support'); diff --git a/test/run-command.js b/test/run-command.js index 7f2c481e..a7e32287 100644 --- a/test/run-command.js +++ b/test/run-command.js @@ -65,12 +65,13 @@ async function waitForServer(port) { let numTries = 0; let res; while (!started && numTries < 20) { - await new Promise(resolve => setTimeout(resolve, 200)); + await new Promise(resolve => setTimeout(resolve, 500)); try { res = await request(`http://localhost:${port}/`, { headers: { accept: 'text/html', }, + timeout: 1000, }); started = true; } catch (e) {