diff --git a/.nowignore b/.nowignore index 2c56614cd..b409507bc 100644 --- a/.nowignore +++ b/.nowignore @@ -13,7 +13,6 @@ packages/components/dist packages/components/node_modules packages/components/package.json packages/components/src -packages/core packages/desktop packages/mobile packages/web/build @@ -21,7 +20,4 @@ packages/web/dist/**.map packages/web/node_modules packages/web/package.json packages/web/src -patches -subdomains -tsconfig.json -tslint.json \ No newline at end of file +subdomains \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 4622ac421..d1642cc98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,9 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "yarn --pure-lockfile && yarn clean && yarn workspace @devhub/web build && yarn workspace @devhub/desktop build:skipweb --linux --win" + /bin/bash -c "yarn --pure-lockfile && yarn workspace @devhub/web build && yarn workspace @devhub/desktop build:skipweb --linux --win" else - yarn --pure-lockfile && yarn clean && yarn workspace @devhub/web build && yarn workspace @devhub/desktop build:skipweb --mac && now --target production --token $NOW_TOKEN && now alias beta.devhubapp.com --token $NOW_TOKEN + yarn --pure-lockfile && yarn workspace @devhub/web build && yarn workspace @devhub/desktop build:skipweb --mac && yarn now --local-config ./now.app.json --target production --token $NOW_TOKEN && yarn now --local-config ./now.landing.json --target production --token $NOW_TOKEN fi before_cache: diff --git a/next.config.js b/next.config.js index d6cad42f1..6e68b3225 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ const withCSS = require('@zeit/next-css') module.exports = withCSS({ + target: 'serverless', env: { STRIPE_PUBLIC_KEY: process.env.NODE_ENV === 'production' diff --git a/now.app.json b/now.app.json new file mode 100644 index 000000000..1dec766aa --- /dev/null +++ b/now.app.json @@ -0,0 +1,28 @@ +{ + "public": true, + "name": "devhub-app", + "alias": "app.devhubapp.com", + "version": 2, + "builds": [ + { "src": "packages/web/dist/**", "use": "@now/static" } + ], + "routes": [ + { + "src": "/(.*)\\.(.*)", + "dest": "/packages/web/dist/$1.$2" + }, + { + "src": "/", + "dest": "/packages/web/dist/index.html" + }, + { + "src": "/(.*)", + "status": 301, "headers": { "Location": "/" } + } + ], + "regions": ["all"], + "github": { + "enabled": false, + "autoAlias": false + } +} \ No newline at end of file diff --git a/now.json b/now.json deleted file mode 100644 index 16f4c73f5..000000000 --- a/now.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "public": true, - "name": "devhub", - "alias": "devhubapp.com", - "version": 2, - "builds": [ - { "src": "packages/web/dist/**", "use": "@now/static" }, - { "src": "next.config.js", "use": "@now/next" } - ], - "routes": [ - { - "src": "/_next/(.*)", - "dest": "/_next/$1" - }, - { - "src": "/static/(.*)", - "dest": "/static/$1" - }, - { - "src": "/(.*)\\.(.*)", - "dest": "/packages/web/dist/$1.$2" - } - ], - "regions": ["all"], - "github": { - "enabled": false, - "autoAlias": false - } -} diff --git a/now.landing.json b/now.landing.json new file mode 100644 index 000000000..a7ec53bfe --- /dev/null +++ b/now.landing.json @@ -0,0 +1,14 @@ +{ + "public": true, + "name": "devhub-landing", + "alias": "devhubapp.com", + "version": 2, + "builds": [ + { "src": "next.config.js", "use": "@now/next" } + ], + "regions": ["all"], + "github": { + "enabled": false, + "autoAlias": false + } +} diff --git a/package.json b/package.json index 174344b9f..65ec671bf 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "yarn workspaces run clean", "dev": "yarn workspace @devhub/desktop compile && concurrently --kill-others \"yarn workspace @devhub/desktop compile -w\" \"yarn workspace @devhub/web start\" \"yarn workspace @devhub/mobile start\" \"wait-on http://localhost:3000 && yarn workspace @devhub/desktop start\"", "dev:desktop": "cross-env BROWSER=none concurrently \"yarn dev:web\" \"yarn workspace @devhub/desktop compile -w\" \"wait-on http://localhost:3000 && yarn workspace @devhub/desktop start\"", - "dev:landing": "yarn workspace @devhub/core compile && concurrently \"yarn workspace @devhub/core compile -w\" \"PORT=4000 now dev\"", + "dev:landing": "yarn workspace @devhub/core compile && concurrently \"yarn workspace @devhub/core compile -w\" \"next\"", "dev:mobile": "yarn workspace @devhub/mobile compile && concurrently --kill-others \"yarn workspace @devhub/mobile compile -w\" \"yarn workspace @devhub/mobile start\"", "dev:web": "yarn workspace @devhub/web compile && concurrently --kill-others \"yarn workspace @devhub/web compile -w\" \"yarn workspace @devhub/web start\"", "format": "yarn workspaces run format", @@ -40,7 +40,7 @@ "dependencies": { "@devhub/core": "0.93.0", "@devhub/landing": "0.93.0", - "next": "9.0.2", + "next": "9.0.3", "opencollective-postinstall": "2.0.2" }, "devDependencies": { @@ -48,7 +48,7 @@ "cross-env": "5.2.0", "husky": "1.3.1", "lint-staged": "8.1.5", - "now": "15.8.5", + "now": "16.1.1", "patch-package": "6.0.5", "postinstall-prepare": "1.0.1", "prettier": "1.16.4", diff --git a/packages/landing/src/components/sections/UsedByCompaniesBlock.tsx b/packages/landing/src/components/sections/UsedByCompaniesBlock.tsx index f6df63ef4..cd1b2bffb 100644 --- a/packages/landing/src/components/sections/UsedByCompaniesBlock.tsx +++ b/packages/landing/src/components/sections/UsedByCompaniesBlock.tsx @@ -98,7 +98,7 @@ export default function UsedByCompaniesBlock( -
+
Not affiliated with these companies. Used by some of their individuals.
diff --git a/packages/web/package.json b/packages/web/package.json index d39790915..45da290b8 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -7,8 +7,8 @@ "build": "yarn compile && react-app-rewired build && shx rm -rf dist && mv build dist", "clean": "shx rm -rf dist/*", "compile": "tsc -b", - "deploy": "yarn build && cd ../../ && now --target production && cd -", - "deploy:beta": "yarn build && cd ../../ && now --target staging && now alias beta.devhubapp.com && cd -", + "deploy": "yarn build && cd ../../ && now --local-config ./now.app.json --target production && cd -", + "deploy:beta": "yarn build && cd ../../ && now --local-config ./now.app.json --target staging && now alias beta.devhubapp.com && cd -", "eject": "react-app-rewired eject", "format": "prettier --write '{.,src/**}/*.{js,jsx,ts,tsx}'", "lint": "tslint -p .", @@ -34,7 +34,7 @@ "@types/react": "16.8.24", "@types/react-dom": "16.8.5", "babel-plugin-react-native-web": "0.11.5", - "now": "15.8.5", + "now": "16.1.1", "postinstall-prepare": "1.0.1", "prettier": "1.16.4", "react-app-rewired": "2.1.1", diff --git a/subdomains/slack/package.json b/subdomains/slack/package.json index cdfd9037d..2386ed22f 100644 --- a/subdomains/slack/package.json +++ b/subdomains/slack/package.json @@ -16,6 +16,6 @@ "dependencies": {}, "devDependencies": { "eslint": "5.9.0", - "now": "15.8.5" + "now": "16.1.1" } } diff --git a/subdomains/www/package.json b/subdomains/www/package.json index 1d1f7043b..f9065e84c 100644 --- a/subdomains/www/package.json +++ b/subdomains/www/package.json @@ -16,6 +16,6 @@ "dependencies": {}, "devDependencies": { "eslint": "5.9.0", - "now": "15.8.5" + "now": "16.1.1" } } diff --git a/yarn.lock b/yarn.lock index aa4aef936..97ca6cfc6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4299,9 +4299,9 @@ compression@1.7.3: safe-buffer "5.1.2" vary "~1.1.2" -compression@^1.5.2, compression@^1.7.1: +compression@1.7.4, compression@^1.5.2, compression@^1.7.1: version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + resolved "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== dependencies: accepts "~1.3.5" @@ -10534,6 +10534,25 @@ next-server@9.0.2: styled-jsx "3.2.1" url "0.11.0" +next-server@9.0.3: + version "9.0.3" + resolved "https://registry.npmjs.org/next-server/-/next-server-9.0.3.tgz#b1372df158646ec40118c6e845d9a51764a21d89" + integrity sha512-fBTiph8k3GklHikeBcxkPZMTler7Q4oKSCUU7hJa0qDa8Sx+Tm4F1cn8FU0pM8C8Q1A+FVBZPEz5iJLJwhtZqA== + dependencies: + amp-toolbox-optimizer "1.2.0-alpha.1" + content-type "1.0.4" + cookie "0.4.0" + etag "1.8.1" + find-up "4.0.0" + fresh "0.5.2" + path-to-regexp "2.1.0" + prop-types "15.7.2" + raw-body "2.4.0" + react-is "16.8.6" + send "0.16.1" + styled-jsx "3.2.1" + url "0.11.0" + next@9.0.2: version "9.0.2" resolved "https://registry.npmjs.org/next/-/next-9.0.2.tgz#4de9da7ca64d89dd1759ad2b5d9d23a9dc3ca63b" @@ -10586,6 +10605,59 @@ next@9.0.2: webpack-sources "1.3.0" worker-farm "1.7.0" +next@9.0.3: + version "9.0.3" + resolved "https://registry.npmjs.org/next/-/next-9.0.3.tgz#5c7b6f8dd142de907456a7c1df41e839ad16804a" + integrity sha512-Du0bGMdQDFq0itPm+OyaN/cKW20p9h6ZoEXnwIcop28L06pB45KcLEDdZgDZ75rk36UHiuwpRnjLMVzcbEqhRg== + dependencies: + "@babel/core" "7.4.5" + "@babel/plugin-proposal-class-properties" "7.4.4" + "@babel/plugin-proposal-object-rest-spread" "7.4.4" + "@babel/plugin-syntax-dynamic-import" "7.2.0" + "@babel/plugin-transform-modules-commonjs" "7.4.4" + "@babel/plugin-transform-runtime" "7.4.4" + "@babel/preset-env" "7.4.5" + "@babel/preset-react" "7.0.0" + "@babel/preset-typescript" "7.3.3" + "@babel/runtime" "7.4.5" + "@babel/runtime-corejs2" "7.4.5" + amphtml-validator "1.0.23" + async-sema "3.0.0" + autodll-webpack-plugin "0.4.2" + babel-core "7.0.0-bridge.0" + babel-loader "8.0.6" + babel-plugin-react-require "3.0.0" + babel-plugin-transform-async-to-promises "0.8.10" + babel-plugin-transform-react-remove-prop-types "0.4.24" + chalk "2.4.2" + compression "1.7.4" + find-up "4.0.0" + fork-ts-checker-webpack-plugin "1.3.4" + fresh "0.5.2" + launch-editor "2.2.1" + loader-utils "1.2.3" + mkdirp "0.5.1" + next-server "9.0.3" + prop-types "15.7.2" + prop-types-exact "1.2.0" + react-error-overlay "5.1.6" + react-is "16.8.6" + serialize-javascript "1.7.0" + source-map "0.6.1" + string-hash "1.1.3" + strip-ansi "5.2.0" + styled-jsx "3.2.1" + terser "4.0.0" + tty-aware-progress "1.0.4" + unfetch "4.1.0" + url "0.11.0" + watchpack "2.0.0-beta.5" + webpack "4.38.0" + webpack-dev-middleware "3.7.0" + webpack-hot-middleware "2.25.0" + webpack-sources "1.3.0" + worker-farm "1.7.0" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -10786,10 +10858,10 @@ normalize.css@^8.0.1: resolved "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== -now@15.8.5: - version "15.8.5" - resolved "https://registry.npmjs.org/now/-/now-15.8.5.tgz#1201ad17d8f21f41455e5aeaf879def711beb3c5" - integrity sha512-YjkbEzxANkqDrQG5FAMkK4asZnU5NYvVUCgeACZlASNs+SXZgDObDlIOW2OCs1TF5zBZStD9BMkE8l16imddQA== +now@16.1.1: + version "16.1.1" + resolved "https://registry.npmjs.org/now/-/now-16.1.1.tgz#692c406158c21bb0371de137b5f9957c861a4810" + integrity sha512-SXro0fOBTVBn+A2wEYV63It706egm7swgo6qb8zp6g07pOK0PQ1smeO0wmdYbx2Kuk5+Deh5t92KnZQi8wZjzA== npm-bundled@^1.0.1: version "1.0.6" @@ -16018,6 +16090,35 @@ webpack@4.35.3: watchpack "^1.5.0" webpack-sources "^1.3.0" +webpack@4.38.0: + version "4.38.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-4.38.0.tgz#6d77108404b08883c78f4e7e45a43c4e5c47c931" + integrity sha512-lbuFsVOq8PZY+1Ytz/mYOvYOo+d4IJ31hHk/7iyoeWtwN33V+5HYotSH+UIb9tq914ey0Hot7z6HugD+je3sWw== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.2.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^1.0.0" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" + json-parse-better-errors "^1.0.2" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^1.0.0" + tapable "^1.1.0" + terser-webpack-plugin "^1.1.0" + watchpack "^1.5.0" + webpack-sources "^1.3.0" + websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"