From dc7b1c7c296d6035de00214b57536a0178d19228 Mon Sep 17 00:00:00 2001 From: Will Lopez Date: Mon, 1 Oct 2018 11:58:41 -0700 Subject: [PATCH 1/6] fix: enable webpack tree shaking --- .babelrc | 1 - src/config.js | 7 +- src/lib/logger/index.js | 8 +- src/server.js | 26 +-- yarn.lock | 366 ++++++++++++++-------------------------- 5 files changed, 147 insertions(+), 261 deletions(-) diff --git a/.babelrc b/.babelrc index 609268e1ea..4a4af3c822 100644 --- a/.babelrc +++ b/.babelrc @@ -2,7 +2,6 @@ "presets": [ [ "next/babel", { "preset-env": { - "modules": "commonjs", "targets": { "node": "current", "browsers": [ diff --git a/src/config.js b/src/config.js index 1628f26729..9d934d48e0 100644 --- a/src/config.js +++ b/src/config.js @@ -1,2 +1,5 @@ -export const dev = process.env.NODE_ENV !== "production"; -export const appPath = process.env.NODE_ENV === "production" ? "./build/app" : "./src"; +module.exports = { + dev: process.env.NODE_ENV !== "production", + appPath : process.env.NODE_ENV === "production" ? "./build/app" : "./src" +}; + diff --git a/src/lib/logger/index.js b/src/lib/logger/index.js index 29d1a4ef0d..714ea17593 100644 --- a/src/lib/logger/index.js +++ b/src/lib/logger/index.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import chalk from "chalk"; +const chalk = require("chalk"); /** * Logger middleware @@ -15,10 +15,10 @@ const logger = { console.log(`Server started ! ${chalk.green("✓")}`); console.log(` -${chalk.magenta(`http://${host}:${port}`)} -${chalk.blue(`Press ${chalk.italic("CTRL-C")} to stop`)} + ${chalk.magenta(`http://${host}:${port}`)} + ${chalk.blue(`Press ${chalk.italic("CTRL-C")} to stop`)} `); } }; -export default logger; +module.exports = logger; diff --git a/src/server.js b/src/server.js index 2fcc70d089..3f6126daff 100644 --- a/src/server.js +++ b/src/server.js @@ -1,15 +1,15 @@ -import cookieParser from "cookie-parser"; -import express from "express"; -import session from "express-session"; -import nextApp from "next"; -import request from "request"; -import { useStaticRendering } from "mobx-react"; -import logger from "lib/logger"; -import passport from "passport"; -import OAuth2Strategy from "passport-oauth2"; -import refresh from "passport-oauth2-refresh"; -import { appPath, dev } from "./config"; -import router from "./routes"; +const cookieParser = require("cookie-parser"); +const express = require("express"); +const session = require("express-session"); +const nextApp = require("next"); +const request = require("request"); +const { useStaticRendering } = require("mobx-react"); +const logger = require("lib/logger"); +const passport = require("passport"); +const OAuth2Strategy = require("passport-oauth2"); +const refresh = require("passport-oauth2-refresh"); +const { appPath, dev } = require("./config"); +const router = require("./routes"); const app = nextApp({ dir: appPath, dev }); const routeHandler = router.getRequestHandler(app); @@ -98,4 +98,4 @@ app process.exit(1); }); -export default app; +module.exports = app; diff --git a/yarn.lock b/yarn.lock index 9446f20d22..728f1b8956 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1081,133 +1081,129 @@ version "0.5.3" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.5.3.tgz#91b728599544efbb7386d8b6633693a3c2e7ade5" -"@webassemblyjs/ast@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.6.tgz#3ef8c45b3e5e943a153a05281317474fef63e21e" +"@webassemblyjs/ast@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.8.tgz#f31f480debeef957f01b623f27eabc695fa4fe8f" dependencies: - "@webassemblyjs/helper-module-context" "1.7.6" - "@webassemblyjs/helper-wasm-bytecode" "1.7.6" - "@webassemblyjs/wast-parser" "1.7.6" - mamacro "^0.0.3" + "@webassemblyjs/helper-module-context" "1.7.8" + "@webassemblyjs/helper-wasm-bytecode" "1.7.8" + "@webassemblyjs/wast-parser" "1.7.8" -"@webassemblyjs/floating-point-hex-parser@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.6.tgz#7cb37d51a05c3fe09b464ae7e711d1ab3837801f" +"@webassemblyjs/floating-point-hex-parser@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.8.tgz#1b3ed0e27e384032254e9322fc646dd3e70ef1b9" -"@webassemblyjs/helper-api-error@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.6.tgz#99b7e30e66f550a2638299a109dda84a622070ef" +"@webassemblyjs/helper-api-error@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.8.tgz#a2b49c11f615e736f815ec927f035dcfa690d572" -"@webassemblyjs/helper-buffer@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.6.tgz#ba0648be12bbe560c25c997e175c2018df39ca3e" +"@webassemblyjs/helper-buffer@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.8.tgz#3fc66bfa09c1c60e824cf3d5887826fac062877d" -"@webassemblyjs/helper-code-frame@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.6.tgz#5a94d21b0057b69a7403fca0c253c3aaca95b1a5" +"@webassemblyjs/helper-code-frame@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.8.tgz#cc5a7e9522b70e7580df056dfd34020cf29645b0" dependencies: - "@webassemblyjs/wast-printer" "1.7.6" + "@webassemblyjs/wast-printer" "1.7.8" -"@webassemblyjs/helper-fsm@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.6.tgz#ae1741c6f6121213c7a0b587fb964fac492d3e49" +"@webassemblyjs/helper-fsm@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.8.tgz#fe4607430af466912797c21acafd3046080182ea" -"@webassemblyjs/helper-module-context@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.6.tgz#116d19a51a6cebc8900ad53ca34ff8269c668c23" - dependencies: - mamacro "^0.0.3" +"@webassemblyjs/helper-module-context@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.8.tgz#3c2e7ee93d14ff4768ba66fb1be42fdc9dc7160a" -"@webassemblyjs/helper-wasm-bytecode@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.6.tgz#98e515eaee611aa6834eb5f6a7f8f5b29fefb6f1" +"@webassemblyjs/helper-wasm-bytecode@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.8.tgz#89bdb78cd6dd5209ae2ed2925de78d0f0e00b6f0" -"@webassemblyjs/helper-wasm-section@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.6.tgz#783835867bdd686df7a95377ab64f51a275e8333" +"@webassemblyjs/helper-wasm-section@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.8.tgz#c68ef7d26a6fc12421b2e6e56f9bc810dfb33e87" dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-buffer" "1.7.6" - "@webassemblyjs/helper-wasm-bytecode" "1.7.6" - "@webassemblyjs/wasm-gen" "1.7.6" + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-buffer" "1.7.8" + "@webassemblyjs/helper-wasm-bytecode" "1.7.8" + "@webassemblyjs/wasm-gen" "1.7.8" -"@webassemblyjs/ieee754@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz#c34fc058f2f831fae0632a8bb9803cf2d3462eb1" +"@webassemblyjs/ieee754@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.8.tgz#1f37974b13cb486a9237e73ce04cac7a2f1265ed" dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.6.tgz#197f75376a29f6ed6ace15898a310d871d92f03b" +"@webassemblyjs/leb128@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.8.tgz#1bee83426819192db2ea1a234b84c7ebc6d34c1f" dependencies: "@xtuc/long" "4.2.1" -"@webassemblyjs/utf8@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.6.tgz#eb62c66f906af2be70de0302e29055d25188797d" - -"@webassemblyjs/wasm-edit@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.6.tgz#fa41929160cd7d676d4c28ecef420eed5b3733c5" - dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-buffer" "1.7.6" - "@webassemblyjs/helper-wasm-bytecode" "1.7.6" - "@webassemblyjs/helper-wasm-section" "1.7.6" - "@webassemblyjs/wasm-gen" "1.7.6" - "@webassemblyjs/wasm-opt" "1.7.6" - "@webassemblyjs/wasm-parser" "1.7.6" - "@webassemblyjs/wast-printer" "1.7.6" - -"@webassemblyjs/wasm-gen@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.6.tgz#695ac38861ab3d72bf763c8c75e5f087ffabc322" - dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-wasm-bytecode" "1.7.6" - "@webassemblyjs/ieee754" "1.7.6" - "@webassemblyjs/leb128" "1.7.6" - "@webassemblyjs/utf8" "1.7.6" - -"@webassemblyjs/wasm-opt@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.6.tgz#fbafa78e27e1a75ab759a4b658ff3d50b4636c21" - dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-buffer" "1.7.6" - "@webassemblyjs/wasm-gen" "1.7.6" - "@webassemblyjs/wasm-parser" "1.7.6" - -"@webassemblyjs/wasm-parser@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.6.tgz#84eafeeff405ad6f4c4b5777d6a28ae54eed51fe" - dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-api-error" "1.7.6" - "@webassemblyjs/helper-wasm-bytecode" "1.7.6" - "@webassemblyjs/ieee754" "1.7.6" - "@webassemblyjs/leb128" "1.7.6" - "@webassemblyjs/utf8" "1.7.6" - -"@webassemblyjs/wast-parser@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.6.tgz#ca4d20b1516e017c91981773bd7e819d6bd9c6a7" - dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/floating-point-hex-parser" "1.7.6" - "@webassemblyjs/helper-api-error" "1.7.6" - "@webassemblyjs/helper-code-frame" "1.7.6" - "@webassemblyjs/helper-fsm" "1.7.6" +"@webassemblyjs/utf8@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.8.tgz#2b489d5cf43e0aebb93d8e2d792aff9879c61f05" + +"@webassemblyjs/wasm-edit@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.8.tgz#f8bdbe7088718eca27b1c349bb7c06b8a457950c" + dependencies: + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-buffer" "1.7.8" + "@webassemblyjs/helper-wasm-bytecode" "1.7.8" + "@webassemblyjs/helper-wasm-section" "1.7.8" + "@webassemblyjs/wasm-gen" "1.7.8" + "@webassemblyjs/wasm-opt" "1.7.8" + "@webassemblyjs/wasm-parser" "1.7.8" + "@webassemblyjs/wast-printer" "1.7.8" + +"@webassemblyjs/wasm-gen@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.8.tgz#7e8abf1545eae74ac6781d545c034af3cfd0c7d5" + dependencies: + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-wasm-bytecode" "1.7.8" + "@webassemblyjs/ieee754" "1.7.8" + "@webassemblyjs/leb128" "1.7.8" + "@webassemblyjs/utf8" "1.7.8" + +"@webassemblyjs/wasm-opt@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.8.tgz#7ada6e211914728fce02ff0ff9c344edc6d41f26" + dependencies: + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-buffer" "1.7.8" + "@webassemblyjs/wasm-gen" "1.7.8" + "@webassemblyjs/wasm-parser" "1.7.8" + +"@webassemblyjs/wasm-parser@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.8.tgz#dac47c291fb6a3e63529aecd647592cd34afbf94" + dependencies: + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-api-error" "1.7.8" + "@webassemblyjs/helper-wasm-bytecode" "1.7.8" + "@webassemblyjs/ieee754" "1.7.8" + "@webassemblyjs/leb128" "1.7.8" + "@webassemblyjs/utf8" "1.7.8" + +"@webassemblyjs/wast-parser@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.8.tgz#f8aab9a450c048c1f9537695c89faeb92fabfba5" + dependencies: + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/floating-point-hex-parser" "1.7.8" + "@webassemblyjs/helper-api-error" "1.7.8" + "@webassemblyjs/helper-code-frame" "1.7.8" + "@webassemblyjs/helper-fsm" "1.7.8" "@xtuc/long" "4.2.1" - mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.6.tgz#a6002c526ac5fa230fe2c6d2f1bdbf4aead43a5e" +"@webassemblyjs/wast-printer@1.7.8": + version "1.7.8" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.8.tgz#e7e965782c1912f6a965f14a53ff43d8ad0403a5" dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/wast-parser" "1.7.6" + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/wast-parser" "1.7.8" "@xtuc/long" "4.2.1" "@xtuc/ieee754@^1.2.0": @@ -1218,10 +1214,6 @@ version "4.2.1" resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.1.tgz#5c85d662f76fa1d34575766c5dcd6615abcd30d8" -JSV@^4.0.x: - version "4.0.2" - resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57" - abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -1362,10 +1354,6 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" - ansicolors@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" @@ -1516,10 +1504,6 @@ array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -2360,14 +2344,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@~0.4.0: - version "0.4.0" - resolved "http://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - dependencies: - ansi-styles "~1.0.0" - has-color "~0.1.0" - strip-ansi "~0.1.0" - chalk@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174" @@ -2863,12 +2839,6 @@ csstype@^2.5.2: version "2.5.5" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.5.tgz#4125484a3d42189a863943f23b9e4b80fedfa106" -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - dependencies: - array-find-index "^1.0.1" - cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -3047,10 +3017,6 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4195,22 +4161,6 @@ har-validator@~5.1.0: ajv "^5.3.0" har-schema "^2.0.0" -hard-source-webpack-plugin@0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hard-source-webpack-plugin/-/hard-source-webpack-plugin-0.12.0.tgz#ea21f0407538fcb62f6995371541baab0a5f679e" - dependencies: - chalk "^2.4.1" - find-cache-dir "^2.0.0" - jsonlint "^1.6.3" - lodash "^4.15.0" - mkdirp "^0.5.1" - node-object-hash "^1.2.0" - pkg-dir "^3.0.0" - rimraf "^2.6.2" - tapable "^1.0.0-beta.5" - webpack-sources "^1.0.1" - write-json-file "^2.3.0" - has-ansi@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e" @@ -4223,10 +4173,6 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-color@~0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" - has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -4766,7 +4712,7 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: +is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5371,13 +5317,6 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" -jsonlint@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/jsonlint/-/jsonlint-1.6.3.tgz#cb5e31efc0b78291d0d862fbef05900adf212988" - dependencies: - JSV "^4.0.x" - nomnom "^1.5.x" - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -5700,13 +5639,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" -loud-rejection@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - lru-cache@4.1.x, lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" @@ -5730,10 +5662,6 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -mamacro@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6109,9 +6037,9 @@ next-routes@^1.4.2: dependencies: path-to-regexp "^2.1.0" -next@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/next/-/next-7.0.0.tgz#c919b325fbce21b6a1d6cd1cc0be148540e77bfd" +next@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/next/-/next-7.0.1.tgz#58630126325dbeccf1926f32a8d9bd06ee43546c" dependencies: "@babel/core" "7.0.0" "@babel/plugin-proposal-class-properties" "7.0.0" @@ -6138,7 +6066,6 @@ next@^7.0.0: fresh "0.5.2" friendly-errors-webpack-plugin "1.7.0" glob "7.1.2" - hard-source-webpack-plugin "0.12.0" hoist-non-react-statics "2.5.5" htmlescape "1.1.1" http-errors "1.6.2" @@ -6157,12 +6084,12 @@ next@^7.0.0: send "0.16.1" source-map "0.5.7" strip-ansi "3.0.1" - styled-jsx "3.0.3-canary.0" + styled-jsx "3.1.0" terser-webpack-plugin "1.0.2" unfetch "3.0.0" url "0.11.0" - webpack "4.19.0" - webpack-dev-middleware "3.2.0" + webpack "4.20.2" + webpack-dev-middleware "3.4.0" webpack-hot-middleware "2.22.3" webpack-sources "1.2.0" webpackbar "2.6.3" @@ -6220,10 +6147,6 @@ node-notifier@^5.2.1: shellwords "^0.1.1" which "^1.3.0" -node-object-hash@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/node-object-hash/-/node-object-hash-1.4.1.tgz#de968492e20c493b8bbc25ad2ee828265fd60934" - node-pre-gyp@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" @@ -6245,13 +6168,6 @@ node-releases@^1.0.0-alpha.11: dependencies: semver "^5.3.0" -nomnom@^1.5.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" - dependencies: - chalk "~0.4.0" - underscore "~1.6.0" - nomnom@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" @@ -8105,12 +8021,6 @@ socks@^1.1.10: ip "^1.1.4" smart-buffer "^1.0.13" -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - dependencies: - is-plain-obj "^1.0.0" - source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" @@ -8372,10 +8282,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" - strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -8408,9 +8314,9 @@ styled-components@^3.4.9: stylis-rule-sheet "^0.0.10" supports-color "^3.2.3" -styled-jsx@3.0.3-canary.0: - version "3.0.3-canary.0" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.0.3-canary.0.tgz#91b5e2cabf5a66dc2d205ff1e806eae3126e08d6" +styled-jsx@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.1.0.tgz#c295e4170298b5bb858f848c4b73e423a73a68f3" dependencies: babel-plugin-syntax-jsx "6.18.0" babel-types "6.26.0" @@ -8483,7 +8389,7 @@ table@^4.0.3: slice-ansi "1.0.0" string-width "^2.1.1" -tapable@^1.0.0, tapable@^1.0.0-beta.5, tapable@^1.1.0: +tapable@^1.0.0, tapable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.0.tgz#0d076a172e3d9ba088fd2272b2668fb8d194b78c" @@ -8783,10 +8689,6 @@ underscore@~1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" -underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" - unfetch@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-3.0.0.tgz#8d1e0513a4ecd0e5ff2d41a6ba77771aae8b6482" @@ -8887,10 +8789,6 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" -url-join@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" - url@0.11.0, url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -9032,16 +8930,13 @@ webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-dev-middleware@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.2.0.tgz#a20ceef194873710052da678f3c6ee0aeed92552" +webpack-dev-middleware@3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz#1132fecc9026fd90f0ecedac5cbff75d1fb45890" dependencies: - loud-rejection "^1.6.0" memory-fs "~0.4.1" mime "^2.3.1" - path-is-absolute "^1.0.0" range-parser "^1.0.3" - url-join "^4.0.0" webpack-log "^2.0.0" webpack-hot-middleware@2.22.3: @@ -9080,21 +8975,21 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-sources@^1.2.0: +webpack-sources@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" dependencies: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.19.0: - version "4.19.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.19.0.tgz#252296c8af2d21c0994911007defdb3913a7bc66" +webpack@4.20.2: + version "4.20.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.20.2.tgz#89f6486b6bb276a91b0823453d377501fc625b5a" dependencies: - "@webassemblyjs/ast" "1.7.6" - "@webassemblyjs/helper-module-context" "1.7.6" - "@webassemblyjs/wasm-edit" "1.7.6" - "@webassemblyjs/wasm-parser" "1.7.6" + "@webassemblyjs/ast" "1.7.8" + "@webassemblyjs/helper-module-context" "1.7.8" + "@webassemblyjs/wasm-edit" "1.7.8" + "@webassemblyjs/wasm-parser" "1.7.8" acorn "^5.6.2" acorn-dynamic-import "^3.0.0" ajv "^6.1.0" @@ -9114,7 +9009,7 @@ webpack@4.19.0: tapable "^1.1.0" uglifyjs-webpack-plugin "^1.2.4" watchpack "^1.5.0" - webpack-sources "^1.2.0" + webpack-sources "^1.3.0" webpackbar@2.6.3: version "2.6.3" @@ -9238,17 +9133,6 @@ write-file-webpack-plugin@4.3.2: mkdirp "^0.5.1" moment "^2.22.1" -write-json-file@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - pify "^3.0.0" - sort-keys "^2.0.0" - write-file-atomic "^2.0.0" - write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" From d75c627ca33c53d89be7b118c351697d5bfad22e Mon Sep 17 00:00:00 2001 From: Will Lopez Date: Mon, 1 Oct 2018 11:58:58 -0700 Subject: [PATCH 2/6] chore: upgrade nextjs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 036d76b562..afbd985117 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "mdi-material-ui": "^5.4.0", "mobx": "^4.1.1", "mobx-react": "^5.0.0", - "next": "^7.0.0", + "next": "^7.0.1", "next-routes": "^1.4.2", "passport": "^0.4.0", "passport-oauth2": "^1.4.0", From 664565c2ac1ca46e926bb720831b50e4cbcb01e8 Mon Sep 17 00:00:00 2001 From: Will Lopez Date: Mon, 1 Oct 2018 11:59:07 -0700 Subject: [PATCH 3/6] chore: clean up --- src/pages/_document.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pages/_document.js b/src/pages/_document.js index d9ac6a7a9e..aec7878b76 100644 --- a/src/pages/_document.js +++ b/src/pages/_document.js @@ -5,7 +5,6 @@ import flush from "styled-jsx/server"; import Helmet from "react-helmet"; import analyticsProviders from "analytics"; import { ServerStyleSheet } from "styled-components"; -// import getConfig from "next/config"; import favicons from "../lib/utils/favicons"; /** @@ -58,8 +57,6 @@ class HTMLDocument extends Document { render() { const { helmet, pageContext, styledComponentsStyleTags } = this.props; const htmlAttrs = helmet.htmlAttributes.toComponent(); - // const { publicRuntimeConfig } = getConfig(); - // const { keycloakConfig } = publicRuntimeConfig; const links = [ { rel: "canonical", href: process.env.CANONICAL_URL }, { rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,700" }, @@ -85,10 +82,6 @@ class HTMLDocument extends Document { type: "text/javascript", innerHTML: provider.renderScript() })), - // { - // type: "text/javascript", - // src: `${keycloakConfig.url}/js/keycloak.js` - // }, { type: "text/javascript", src: "https://js.stripe.com/v3/" From 6bc81aced79a9afa5d7c5a76c0a52697a02ea9df Mon Sep 17 00:00:00 2001 From: Will Lopez Date: Mon, 1 Oct 2018 12:10:38 -0700 Subject: [PATCH 4/6] fix: lint errors --- src/components/AccountDropdown/AccountDropdown.js | 4 ++-- src/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AccountDropdown/AccountDropdown.js b/src/components/AccountDropdown/AccountDropdown.js index 64db45ac7a..24cb690fda 100644 --- a/src/components/AccountDropdown/AccountDropdown.js +++ b/src/components/AccountDropdown/AccountDropdown.js @@ -26,8 +26,8 @@ const styles = (theme) => ({ class AccountDropdown extends Component { static propTypes = { authStore: PropTypes.object.isRequired, - viewer: PropTypes.object, - classes: PropTypes.object + classes: PropTypes.object, + viewer: PropTypes.object }; static defaultProps = { diff --git a/src/config.js b/src/config.js index 9d934d48e0..aa9330f817 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,5 @@ module.exports = { dev: process.env.NODE_ENV !== "production", - appPath : process.env.NODE_ENV === "production" ? "./build/app" : "./src" + appPath: process.env.NODE_ENV === "production" ? "./build/app" : "./src" }; From 988fe3193c286f1d928be8345f58cd89cc5fd52c Mon Sep 17 00:00:00 2001 From: Ross Hadden Date: Mon, 1 Oct 2018 21:50:38 -0400 Subject: [PATCH 5/6] Fixed a missed merge conflict difference. --- src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 9654e39d61..73ecdfccc8 100644 --- a/src/server.js +++ b/src/server.js @@ -1,6 +1,6 @@ const cookieParser = require("cookie-parser"); +const cookieSession = require("cookie-session"); const express = require("express"); -const session = require("express-session"); const nextApp = require("next"); const request = require("request"); const { useStaticRendering } = require("mobx-react"); From 5f67194e50a347584ad8648246e5d03cab354db4 Mon Sep 17 00:00:00 2001 From: Will Lopez Date: Tue, 2 Oct 2018 11:51:47 -0700 Subject: [PATCH 6/6] fix: update snyk ignores --- .snyk | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.snyk b/.snyk index 85197ad4a0..d72b2da740 100644 --- a/.snyk +++ b/.snyk @@ -2,16 +2,8 @@ version: v1.12.0 # ignores vulnerabilities until expiry date; change duration by modifying expiry date ignore: - 'npm:braces:20180219': - - '*': - reason: Waiting for Next.js 6 to update to Babel 7 beta.47 (https://github.com/babel/babel/issues/8034) - expires: 2018-09-30T00:00:00.000Z 'npm:chownr:20180731': - '*': reason: Waiting on next-routes(https://github.com/fridays/next-routes) to fix this vulnerability - expires: 2018-09-30T00:00:00.000Z - 'npm:mem:20180117': - - '*': - reason: Waiting on next-routes(https://github.com/fridays/next-routes) to fix this vulnerability - expires: 2018-09-30T00:00:00.000Z + expires: 2018-12-30T00:00:00.000Z patch: {}