From e50ceeb805473289945db7ef19f7ca7e96933b41 Mon Sep 17 00:00:00 2001 From: Matthew DeLambo Date: Thu, 10 Aug 2017 10:29:43 -0400 Subject: [PATCH] Adds static asset support (#522) * adds static asset support #518 * fixes assets manifest merging; fixes server public assets in dev; fixes static starter script order alpha.2 published --- CHANGELOG.md | 10 +++ .../build-default/src/assets/file.ico | 0 .../build-default/src/client/index.js | 4 ++ .../build-default/src/public/img-server.png | 0 .../fixtures/build-default/src/public/img.jpg | 0 .../build-default/src/public/script.js | 1 + .../build-default/src/server/index.js | 2 + e2e_tests/tests/kyt-build.test.js | 16 +++++ .../cli/actions/__tests__/dev.test.js | 2 +- packages/kyt-core/cli/actions/dev.js | 16 ++++- packages/kyt-core/config/webpack.base.js | 71 ++++++++++++++++--- .../kyt-core/config/webpack.dev.client.js | 21 +++--- .../kyt-core/config/webpack.dev.server.js | 9 ++- .../kyt-core/config/webpack.prod.client.js | 15 +--- .../kyt-core/config/webpack.prod.server.js | 4 +- packages/kyt-core/package.json | 5 +- packages/kyt-core/yarn.lock | 22 ++++-- packages/kyt-starter-static/package.json | 2 +- .../starter-src/package.json | 2 +- .../kyt-starter-static/starter-src/yarn.lock | 37 +++++++--- packages/kyt-starter-universal/package.json | 2 +- .../starter-src/package.json | 2 +- .../starter-src/yarn.lock | 37 ++++++---- 23 files changed, 204 insertions(+), 76 deletions(-) create mode 100644 e2e_tests/fixtures/build-default/src/assets/file.ico create mode 100644 e2e_tests/fixtures/build-default/src/public/img-server.png create mode 100644 e2e_tests/fixtures/build-default/src/public/img.jpg create mode 100644 e2e_tests/fixtures/build-default/src/public/script.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ed2a5ce..01d9a4f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ ## Master +## 0.9.0-alpha.2 08/08/17 + +- Fixes assets manifest merging by only merging server public assets +- Fixes 404'ing server public assets in `dev` mode +- Fixes static starter script order + +## 0.9.0-alpha.1 08/03/17 + +- Adds static asset support [518](https://github.com/NYTimes/kyt/issues/518) + ## 0.8.0 08/03/17 [0.7.x-0.8.0 Migration guide](/docs/migration-guides/0.7-0.8.md). diff --git a/e2e_tests/fixtures/build-default/src/assets/file.ico b/e2e_tests/fixtures/build-default/src/assets/file.ico new file mode 100644 index 000000000..e69de29bb diff --git a/e2e_tests/fixtures/build-default/src/client/index.js b/e2e_tests/fixtures/build-default/src/client/index.js index 6bcf05fb0..c1925d4f8 100644 --- a/e2e_tests/fixtures/build-default/src/client/index.js +++ b/e2e_tests/fixtures/build-default/src/client/index.js @@ -1,2 +1,6 @@ +import '../public/img.jpg'; +import '../public/script.js'; +import '../assets/file.ico'; + module.exports = { client: true }; diff --git a/e2e_tests/fixtures/build-default/src/public/img-server.png b/e2e_tests/fixtures/build-default/src/public/img-server.png new file mode 100644 index 000000000..e69de29bb diff --git a/e2e_tests/fixtures/build-default/src/public/img.jpg b/e2e_tests/fixtures/build-default/src/public/img.jpg new file mode 100644 index 000000000..e69de29bb diff --git a/e2e_tests/fixtures/build-default/src/public/script.js b/e2e_tests/fixtures/build-default/src/public/script.js new file mode 100644 index 000000000..198b8f89e --- /dev/null +++ b/e2e_tests/fixtures/build-default/src/public/script.js @@ -0,0 +1 @@ +x = 1; diff --git a/e2e_tests/fixtures/build-default/src/server/index.js b/e2e_tests/fixtures/build-default/src/server/index.js index 2bc3c6a25..5054c3546 100644 --- a/e2e_tests/fixtures/build-default/src/server/index.js +++ b/e2e_tests/fixtures/build-default/src/server/index.js @@ -1,2 +1,4 @@ +import '../public/img-server.png'; + module.exports = { server: true }; diff --git a/e2e_tests/tests/kyt-build.test.js b/e2e_tests/tests/kyt-build.test.js index 855ad4218..ddec8af2d 100644 --- a/e2e_tests/tests/kyt-build.test.js +++ b/e2e_tests/tests/kyt-build.test.js @@ -1,5 +1,6 @@ const shell = require('shelljs'); const util = require('../fixtures/util'); +const fs = require('fs'); shell.config.silent = true; @@ -23,6 +24,21 @@ describe('kyt build', () => { expect(shell.ls('build/public/main-*.js').code).toBe(0); expect(shell.ls('build/public/vendor-*.js').code).toBe(0); + // Should fingerprint client and server assets + expect(shell.ls('build/public/img-server-*.png').code).toBe(0); + expect(shell.ls('build/public/img-*.jpg').code).toBe(0); + expect(shell.ls('build/public/script-*.js').code).toBe(0); + expect(shell.ls('build/public/file-*.ico').code).toBe(0); + + // Should produce asset manifest mappings for client and server assets and bundles + const manifest = JSON.parse(fs.readFileSync('build/publicAssets.json', 'utf8')); + expect(manifest['img-server.png']).toMatch(/img-server-.*\.png/); + expect(manifest['img.jpg']).toMatch(/img-.*\.jpg/); + expect(manifest['script.js']).toMatch(/script-.*\.js/); + expect(manifest['file.ico']).toMatch(/file-.*\.ico/); + expect(manifest['main.js']).toMatch(/main-.*\.js/); + expect(manifest['vendor.js']).toMatch(/vendor-.*\.js/); + expect(output.code).toBe(0); }); diff --git a/packages/kyt-core/cli/actions/__tests__/dev.test.js b/packages/kyt-core/cli/actions/__tests__/dev.test.js index ff57058fd..63f03e7f6 100644 --- a/packages/kyt-core/cli/actions/__tests__/dev.test.js +++ b/packages/kyt-core/cli/actions/__tests__/dev.test.js @@ -102,7 +102,7 @@ describe('dev', () => { // start client assert.ok(devMiddleware.mock.calls.length > 0, 'should call devMiddleware'); assert.ok(express.mock.calls.length > 0, 'should instantiate express'); - assert.equal(express.use.mock.calls.length, 2, 'should set up two express middlewares'); + assert.equal(express.use.mock.calls.length, 5, 'should set up two express middlewares'); assert.deepEqual( express.listen.mock.calls, [[port, hostname]], diff --git a/packages/kyt-core/cli/actions/dev.js b/packages/kyt-core/cli/actions/dev.js index f0cd3311c..ef8244ca8 100644 --- a/packages/kyt-core/cli/actions/dev.js +++ b/packages/kyt-core/cli/actions/dev.js @@ -3,6 +3,7 @@ const path = require('path'); const chokidar = require('chokidar'); const express = require('express'); +const cors = require('cors'); const shell = require('shelljs'); const devMiddleware = require('webpack-dev-middleware'); const hotMiddleware = require('webpack-hot-middleware'); @@ -13,7 +14,7 @@ const logger = require('kyt-utils/logger'); const ifPortIsFreeDo = require('../../utils/ifPortIsFreeDo'); const buildConfigs = require('../../utils/buildConfigs'); const webpackCompiler = require('../../utils/webpackCompiler'); -const { buildPath, serverSrcPath, publicSrcPath } = require('kyt-utils/paths')(); +const { buildPath, serverSrcPath, publicSrcPath, publicBuildPath } = require('kyt-utils/paths')(); module.exports = (config, flags) => { logger.start('Starting development build...'); @@ -43,12 +44,21 @@ module.exports = (config, flags) => { const webpackDevMiddleware = devMiddleware(clientCompiler, devOptions); if (!hasServer) { + // For client only apps, use history api fallback + // so all routes will be served from index.html. app.use(history()); - app.use(express.static(publicSrcPath)); + } else { + // Setup a static proxy for static assets that + // are imported by file-loader by the server. + app.use(cors()); + app.use(express.static(publicBuildPath)); } + + // Setup a static proxy for the public source directory. + app.use(express.static(publicSrcPath)); + app.use(webpackDevMiddleware); app.use(hotMiddleware(clientCompiler)); - app.listen(clientURL.port, clientURL.hostname); }; diff --git a/packages/kyt-core/config/webpack.base.js b/packages/kyt-core/config/webpack.base.js index e610a56f3..1644bd66a 100644 --- a/packages/kyt-core/config/webpack.base.js +++ b/packages/kyt-core/config/webpack.base.js @@ -3,13 +3,24 @@ // https://github.com/survivejs/webpack-merge const path = require('path'); +const fs = require('fs'); const webpack = require('webpack'); const shell = require('shelljs'); -const { buildPath, userNodeModulesPath, userBabelrcPath } = require('kyt-utils/paths')(); +const merge = require('lodash.merge'); +const WebpackAssetsManifest = require('webpack-assets-manifest'); +const { + buildPath, + userNodeModulesPath, + userBabelrcPath, + publicSrcPath, +} = require('kyt-utils/paths')(); const fileExtensions = require('./fileExtensions'); +let clientAssets; + module.exports = options => { const hasBabelrc = shell.test('-f', userBabelrcPath); + const assetsFilePath = path.join(buildPath, options.clientAssetsFile); return { node: { @@ -43,25 +54,67 @@ module.exports = options => { ), }, }), + + new WebpackAssetsManifest({ + output: assetsFilePath, + space: 2, + fileExtRegex: /\.\w{2,4}\.(?:map|gz)$|\.\w+$/i, + writeToDisk: options.type === 'client', + done: manifest => { + // This plugin's `merge` doesn't work as expected. The "done" callback + // gets called for the client and server asset builds, in that order. + if (options.type === 'client') { + // Save the client assets for merging later. + clientAssets = manifest.toJSON(); + } else { + // Merge the server assets into the client assets and write the result to disk. + const assets = merge({}, clientAssets, manifest.toJSON()); + fs.writeFile(assetsFilePath, JSON.stringify(assets, null, ' '), 'utf8'); + } + }, + customize: (key, value) => { + const prependPublicPath = asset => `${options.publicPath || ''}${asset}`; + const removePublicDir = asset => asset.replace(/(.*)?public\//, ''); + + // Server asset files have "../public" prepended to them + // (see file-loader `outputPath`). We need to remove that. + if (options.type === 'server') { + if (value.startsWith('../public')) { + key = removePublicDir(key); + value = prependPublicPath(removePublicDir(value)); + } else { + return false; + } + } else { + value = prependPublicPath(value); + } + + return { key, value }; + }, + }), ], module: { rules: [ { - test: /\.html$/, - loader: 'file-loader?name=[name].[ext]', - }, - { - test: new RegExp(fileExtensions), - loader: 'url-loader', + test: asset => { + const extensions = new RegExp(fileExtensions); + const jsCSSExtensions = new RegExp('\\.(js|css)$'); + const isFile = extensions.test(asset); + const isJSOrCSSInPublic = asset.includes('/src/public/') && jsCSSExtensions.test(asset); + return isFile || isJSOrCSSInPublic; + }, + loader: 'file-loader', options: { - limit: 20000, + name: '[name]-[hash].[ext]', + publicPath: options.publicPath, + outputPath: asset => (options.type === 'server' ? `../public/${asset}` : asset), }, }, { test: /\.(js|jsx)$/, loader: 'babel-loader', - exclude: [/node_modules/, buildPath], + exclude: [/node_modules/, buildPath, publicSrcPath], // babel configuration should come from presets defined in the user's // .babelrc, unless there's a specific reason why it has to be put in // the webpack loader options diff --git a/packages/kyt-core/config/webpack.dev.client.js b/packages/kyt-core/config/webpack.dev.client.js index 7252e5fbe..826b270ac 100644 --- a/packages/kyt-core/config/webpack.dev.client.js +++ b/packages/kyt-core/config/webpack.dev.client.js @@ -1,17 +1,19 @@ // Development webpack config for client code const webpack = require('webpack'); -const WebpackAssetsManifest = require('webpack-assets-manifest'); const clone = require('lodash.clonedeep'); -const path = require('path'); -const { clientSrcPath, buildPath, assetsBuildPath } = require('kyt-utils/paths')(); +const { clientSrcPath, assetsBuildPath, publicSrcPath } = require('kyt-utils/paths')(); const postcssLoader = require('../utils/getPostcssLoader'); const cssStyleLoaders = [ 'style-loader', { loader: 'css-loader', - options: { modules: true, sourceMap: true, localIdentName: '[name]-[local]--[hash:base64:5]' }, + options: { + modules: true, + sourceMap: true, + localIdentName: '[name]-[local]--[hash:base64:5]', + }, }, postcssLoader, ]; @@ -57,10 +59,12 @@ module.exports = options => { { test: /\.css$/, use: cssStyleLoaders, + exclude: [publicSrcPath], }, { test: /\.scss$/, use: clone(cssStyleLoaders).concat('sass-loader'), + exclude: [publicSrcPath], }, ], }, @@ -70,15 +74,6 @@ module.exports = options => { new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), - new WebpackAssetsManifest({ - output: path.join(buildPath, options.clientAssetsFile), - space: 2, - writeToDisk: true, - fileExtRegex: /\.\w{2,4}\.(?:map|gz)$|\.\w+$/i, - merge: false, - publicPath: options.publicPath, - }), - new webpack.HotModuleReplacementPlugin(), ], }; diff --git a/packages/kyt-core/config/webpack.dev.server.js b/packages/kyt-core/config/webpack.dev.server.js index ec0cd7361..35116c4b7 100644 --- a/packages/kyt-core/config/webpack.dev.server.js +++ b/packages/kyt-core/config/webpack.dev.server.js @@ -3,13 +3,16 @@ const webpack = require('webpack'); const nodeExternals = require('webpack-node-externals'); const clone = require('lodash.clonedeep'); -const { serverSrcPath, serverBuildPath } = require('kyt-utils/paths')(); +const { serverSrcPath, serverBuildPath, publicSrcPath } = require('kyt-utils/paths')(); const postcssLoader = require('../utils/getPostcssLoader'); const cssStyleLoaders = [ { loader: 'css-loader/locals', - options: { modules: true, localIdentName: '[name]-[local]--[hash:base64:5]' }, + options: { + modules: true, + localIdentName: '[name]-[local]--[hash:base64:5]', + }, }, postcssLoader, ]; @@ -41,10 +44,12 @@ module.exports = options => ({ { test: /\.css$/, use: cssStyleLoaders, + exclude: [publicSrcPath], }, { test: /\.scss$/, use: clone(cssStyleLoaders).concat('sass-loader'), + exclude: [publicSrcPath], }, ], }, diff --git a/packages/kyt-core/config/webpack.prod.client.js b/packages/kyt-core/config/webpack.prod.client.js index af06569c2..b115ec5d9 100644 --- a/packages/kyt-core/config/webpack.prod.client.js +++ b/packages/kyt-core/config/webpack.prod.client.js @@ -2,11 +2,9 @@ const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const WebpackAssetsManifest = require('webpack-assets-manifest'); const clone = require('lodash.clonedeep'); const postcssLoader = require('../utils/getPostcssLoader'); -const { clientSrcPath, assetsBuildPath, buildPath } = require('kyt-utils/paths')(); -const path = require('path'); +const { clientSrcPath, assetsBuildPath, publicSrcPath } = require('kyt-utils/paths')(); const cssStyleLoaders = [ { @@ -44,6 +42,7 @@ module.exports = options => ({ fallback: 'style-loader', use: cssStyleLoaders, }), + exclude: [publicSrcPath], }, { test: /\.scss$/, @@ -51,6 +50,7 @@ module.exports = options => ({ fallback: 'style-loader', use: clone(cssStyleLoaders).concat('sass-loader'), }), + exclude: [publicSrcPath], }, ], }, @@ -77,15 +77,6 @@ module.exports = options => ({ sourceMap: true, }), - new WebpackAssetsManifest({ - output: path.join(buildPath, options.clientAssetsFile), - space: 2, - writeToDisk: true, - fileExtRegex: /\.\w{2,4}\.(?:map|gz)$|\.\w+$/i, - merge: false, - publicPath: options.publicPath, - }), - // Modules should get deterministic ids so that they don't change between builds new webpack.HashedModuleIdsPlugin(), diff --git a/packages/kyt-core/config/webpack.prod.server.js b/packages/kyt-core/config/webpack.prod.server.js index 9d17b289a..96962c177 100644 --- a/packages/kyt-core/config/webpack.prod.server.js +++ b/packages/kyt-core/config/webpack.prod.server.js @@ -3,7 +3,7 @@ const webpack = require('webpack'); const nodeExternals = require('webpack-node-externals'); const clone = require('lodash.clonedeep'); -const { serverSrcPath, serverBuildPath } = require('kyt-utils/paths')(); +const { serverSrcPath, serverBuildPath, publicSrcPath } = require('kyt-utils/paths')(); const postcssLoader = require('../utils/getPostcssLoader'); const cssStyleLoaders = [ @@ -44,10 +44,12 @@ module.exports = options => ({ { test: /\.css$/, use: cssStyleLoaders, + exclude: [publicSrcPath], }, { test: /\.scss$/, use: clone(cssStyleLoaders).concat('sass-loader'), + exclude: [publicSrcPath], }, ], }, diff --git a/packages/kyt-core/package.json b/packages/kyt-core/package.json index ca7b16944..fcc434454 100644 --- a/packages/kyt-core/package.json +++ b/packages/kyt-core/package.json @@ -1,6 +1,6 @@ { "name": "kyt", - "version": "0.8.0", + "version": "0.9.0-alpha.2", "description": "kyt is a toolkit that encapsulates and manages the configuration for web apps.", "author": "NYTimes", "license": "Apache-2.0", @@ -25,6 +25,7 @@ "chokidar": "1.7.0", "commander": "2.9.0", "connect-history-api-fallback": "1.3.0", + "cors": "2.8.4", "css-loader": "0.28.2", "detect-port": "1.0.1", "eslint": "3.19.0", @@ -69,7 +70,7 @@ "temp": "0.8.3", "url-loader": "0.5.8", "webpack": "3.1.0", - "webpack-assets-manifest": "0.6.2", + "webpack-assets-manifest": "0.7.0", "webpack-dev-middleware": "1.11.0", "webpack-dev-server": "2.5.1", "webpack-hot-middleware": "2.18.2", diff --git a/packages/kyt-core/yarn.lock b/packages/kyt-core/yarn.lock index 45d6fd27b..84acdadda 100644 --- a/packages/kyt-core/yarn.lock +++ b/packages/kyt-core/yarn.lock @@ -1474,6 +1474,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cors@2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.4.tgz#2bd381f2eb201020105cd50ea59da63090694686" + dependencies: + object-assign "^4" + vary "^1" + cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" @@ -3975,6 +3982,10 @@ lodash.get@^4.0: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.has@^4.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -4514,7 +4525,7 @@ object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -6578,7 +6589,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.1: +vary@^1, vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" @@ -6632,13 +6643,14 @@ webidl-conversions@^4.0.0, webidl-conversions@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" -webpack-assets-manifest@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.6.2.tgz#1f8dd38a2d132474ce26e7d37dc894ba6ddf4b4f" +webpack-assets-manifest@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.7.0.tgz#810971d4e4644f15de9fbf9910da1cae7f117fc4" dependencies: chalk "^1.0" lodash.find "^4.0" lodash.get "^4.0" + lodash.has "^4.0" lodash.keys "^4.0" lodash.merge "^4.0" lodash.pick "^4.0" diff --git a/packages/kyt-starter-static/package.json b/packages/kyt-starter-static/package.json index 0c1c7d482..1b90eba75 100644 --- a/packages/kyt-starter-static/package.json +++ b/packages/kyt-starter-static/package.json @@ -1,6 +1,6 @@ { "name": "kyt-starter-static", - "version": "0.5.1", + "version": "0.6.0-alpha.2", "description": "", "repository": { "type": "git", diff --git a/packages/kyt-starter-static/starter-src/package.json b/packages/kyt-starter-static/starter-src/package.json index d2cdc950e..762208f4f 100644 --- a/packages/kyt-starter-static/starter-src/package.json +++ b/packages/kyt-starter-static/starter-src/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "enzyme": "2.4.1", - "kyt": "0.8.0", + "kyt": "0.9.0-alpha.2", "react-addons-test-utils": "15.3.0" } } diff --git a/packages/kyt-starter-static/starter-src/yarn.lock b/packages/kyt-starter-static/starter-src/yarn.lock index 081833b90..44498ec54 100644 --- a/packages/kyt-starter-static/starter-src/yarn.lock +++ b/packages/kyt-starter-static/starter-src/yarn.lock @@ -1642,6 +1642,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cors@2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.4.tgz#2bd381f2eb201020105cd50ea59da63090694686" + dependencies: + object-assign "^4" + vary "^1" + cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" @@ -2048,7 +2055,11 @@ domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" -domelementtype@1, domelementtype@~1.1.1: +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" @@ -4133,9 +4144,9 @@ kyt-utils@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/kyt-utils/-/kyt-utils-0.1.1.tgz#3a18d92ded0c4037267b571337c214e3cad58d53" -kyt@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/kyt/-/kyt-0.8.0.tgz#3159153c4607687c0ed2eb53ed33650ab31a978e" +kyt@0.9.0-alpha.2: + version "0.9.0-alpha.2" + resolved "https://registry.yarnpkg.com/kyt/-/kyt-0.9.0-alpha.2.tgz#741e51b03baba4cfddfc344aa115d0612b9f15a0" dependencies: autoprefixer "7.1.1" babel-cli "6.18.0" @@ -4148,6 +4159,7 @@ kyt@0.8.0: chokidar "1.7.0" commander "2.9.0" connect-history-api-fallback "1.3.0" + cors "2.8.4" css-loader "0.28.2" detect-port "1.0.1" eslint "3.19.0" @@ -4192,7 +4204,7 @@ kyt@0.8.0: temp "0.8.3" url-loader "0.5.8" webpack "3.1.0" - webpack-assets-manifest "0.6.2" + webpack-assets-manifest "0.7.0" webpack-dev-middleware "1.11.0" webpack-dev-server "2.5.1" webpack-hot-middleware "2.18.2" @@ -4354,6 +4366,10 @@ lodash.get@^4.0: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.has@^4.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -4921,7 +4937,7 @@ object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -7136,7 +7152,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.1: +vary@^1, vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" @@ -7206,13 +7222,14 @@ webidl-conversions@^4.0.0, webidl-conversions@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" -webpack-assets-manifest@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.6.2.tgz#1f8dd38a2d132474ce26e7d37dc894ba6ddf4b4f" +webpack-assets-manifest@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.7.0.tgz#810971d4e4644f15de9fbf9910da1cae7f117fc4" dependencies: chalk "^1.0" lodash.find "^4.0" lodash.get "^4.0" + lodash.has "^4.0" lodash.keys "^4.0" lodash.merge "^4.0" lodash.pick "^4.0" diff --git a/packages/kyt-starter-universal/package.json b/packages/kyt-starter-universal/package.json index bc0344d5b..90b21bd40 100644 --- a/packages/kyt-starter-universal/package.json +++ b/packages/kyt-starter-universal/package.json @@ -1,6 +1,6 @@ { "name": "kyt-starter-universal", - "version": "0.5.0", + "version": "0.6.0-alpha.2", "description": "", "repository": { "type": "git", diff --git a/packages/kyt-starter-universal/starter-src/package.json b/packages/kyt-starter-universal/starter-src/package.json index 14390fc30..4a9648cd1 100644 --- a/packages/kyt-starter-universal/starter-src/package.json +++ b/packages/kyt-starter-universal/starter-src/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "enzyme": "2.4.1", - "kyt": "0.8.0", + "kyt": "0.9.0-alpha.2", "react-addons-test-utils": "15.3.0" } } diff --git a/packages/kyt-starter-universal/starter-src/yarn.lock b/packages/kyt-starter-universal/starter-src/yarn.lock index 5ef865a61..31838f7c6 100644 --- a/packages/kyt-starter-universal/starter-src/yarn.lock +++ b/packages/kyt-starter-universal/starter-src/yarn.lock @@ -1589,6 +1589,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cors@2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.4.tgz#2bd381f2eb201020105cd50ea59da63090694686" + dependencies: + object-assign "^4" + vary "^1" + cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" @@ -1995,11 +2002,7 @@ domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" -domelementtype@1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - -domelementtype@~1.1.1: +domelementtype@1, domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" @@ -4011,9 +4014,9 @@ kyt-utils@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/kyt-utils/-/kyt-utils-0.1.1.tgz#3a18d92ded0c4037267b571337c214e3cad58d53" -kyt@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/kyt/-/kyt-0.8.0.tgz#3159153c4607687c0ed2eb53ed33650ab31a978e" +kyt@0.9.0-alpha.2: + version "0.9.0-alpha.2" + resolved "https://registry.yarnpkg.com/kyt/-/kyt-0.9.0-alpha.2.tgz#741e51b03baba4cfddfc344aa115d0612b9f15a0" dependencies: autoprefixer "7.1.1" babel-cli "6.18.0" @@ -4026,6 +4029,7 @@ kyt@0.8.0: chokidar "1.7.0" commander "2.9.0" connect-history-api-fallback "1.3.0" + cors "2.8.4" css-loader "0.28.2" detect-port "1.0.1" eslint "3.19.0" @@ -4070,7 +4074,7 @@ kyt@0.8.0: temp "0.8.3" url-loader "0.5.8" webpack "3.1.0" - webpack-assets-manifest "0.6.2" + webpack-assets-manifest "0.7.0" webpack-dev-middleware "1.11.0" webpack-dev-server "2.5.1" webpack-hot-middleware "2.18.2" @@ -4223,6 +4227,10 @@ lodash.get@^4.0: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.has@^4.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -4772,7 +4780,7 @@ object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -6889,7 +6897,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.0, vary@~1.1.1: +vary@^1, vary@~1.1.0, vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" @@ -6959,13 +6967,14 @@ webidl-conversions@^4.0.0, webidl-conversions@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" -webpack-assets-manifest@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.6.2.tgz#1f8dd38a2d132474ce26e7d37dc894ba6ddf4b4f" +webpack-assets-manifest@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-0.7.0.tgz#810971d4e4644f15de9fbf9910da1cae7f117fc4" dependencies: chalk "^1.0" lodash.find "^4.0" lodash.get "^4.0" + lodash.has "^4.0" lodash.keys "^4.0" lodash.merge "^4.0" lodash.pick "^4.0"