From fc2b584a34ddec2f6194a9a9297b3a5cb4ac3b1d Mon Sep 17 00:00:00 2001 From: uberbryn Date: Wed, 14 Mar 2018 13:02:00 -0700 Subject: [PATCH 01/14] Removes sharing buttons on threads in private channels. --- src/views/thread/components/actionBar.js | 87 +++++++++++++----------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/src/views/thread/components/actionBar.js b/src/views/thread/components/actionBar.js index 68ef63bd57..8bc744f336 100644 --- a/src/views/thread/components/actionBar.js +++ b/src/views/thread/components/actionBar.js @@ -164,52 +164,57 @@ class ActionBar extends React.Component { )} - - - - + - - - + + + + + + + + + + - - + this.props.dispatch( + addToastWithTimeout('success', 'Copied to clipboard') + ) + } > - - - - - - this.props.dispatch( - addToastWithTimeout('success', 'Copied to clipboard') - ) - } - > - - - - - - - + + + + + + + + )}
From c5c19a6415006fc52f73ef38a21f0caf203c657f Mon Sep 17 00:00:00 2001 From: uberbryn Date: Wed, 14 Mar 2018 13:17:01 -0700 Subject: [PATCH 02/14] first pass on hiding sidebar on screens below 1280 and resizing center column appropriately --- src/views/dashboard/style.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index 73634c6685..f950e50ba8 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -25,8 +25,8 @@ export const Wrapper = styled.div` export const InboxWrapper = styled.div` display: flex; - width: 100%; - max-width: 400px; + width: 40%; + max-width: 560px; min-width: 400px; overflow-y: hidden; position: relative; @@ -60,7 +60,7 @@ export const Sidebar = styled.div` flex-direction: column; border-right: 1px solid ${props => props.theme.bg.border}; - @media (max-width: 956px) { + @media (max-width: 1280px) { display: none; } `; @@ -321,7 +321,7 @@ export const HeaderWrapper = styled.div` grid-area: right; } - @media (max-width: 956px) { + @media (max-width: 1280px) { padding-left: 0; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr; @@ -849,7 +849,7 @@ export const Hint = styled.span` export const NarrowOnly = styled.div` display: none; - @media (max-width: 956px) { + @media (max-width: 1280px) { display: flex; flex: none; grid-area: left; From 6bf23499196975b1ae36137d6c3cc23092cd36ed Mon Sep 17 00:00:00 2001 From: uberbryn Date: Wed, 14 Mar 2018 13:29:14 -0700 Subject: [PATCH 03/14] optimizing for apple's terrible decision to make 1.5x scaling the default on retina displays. why would they do that to people? --- src/views/dashboard/style.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index f950e50ba8..08d123c56c 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -26,8 +26,8 @@ export const Wrapper = styled.div` export const InboxWrapper = styled.div` display: flex; width: 40%; - max-width: 560px; - min-width: 400px; + max-width: 480px; + min-width: 360px; overflow-y: hidden; position: relative; align-self: stretch; From 5dd878876dd47543fb58b44c70d2b34f34ff514e Mon Sep 17 00:00:00 2001 From: uberbryn Date: Wed, 14 Mar 2018 13:34:53 -0700 Subject: [PATCH 04/14] fixes inboxwrapper width on scaled resolutions. --- src/views/dashboard/style.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index 08d123c56c..035b5003ca 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -35,6 +35,11 @@ export const InboxWrapper = styled.div` background: ${props => props.theme.bg.default}; border-right: 1px solid ${props => props.theme.bg.border}; + @media (min-resolution: 125dpi) and (max-resolution: 190dpi) { + max-width: 400px; + min-width: 400px; + } + @media (max-width: 768px) { max-width: 100%; min-width: 100%; From 5ca5c40ba0608abb8b52de3aa8a878adc926d244 Mon Sep 17 00:00:00 2001 From: uberbryn Date: Wed, 14 Mar 2018 13:41:32 -0700 Subject: [PATCH 05/14] just set it for high-dpi screens generally. --- src/views/dashboard/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index 035b5003ca..b65f0b8dab 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -35,7 +35,7 @@ export const InboxWrapper = styled.div` background: ${props => props.theme.bg.default}; border-right: 1px solid ${props => props.theme.bg.border}; - @media (min-resolution: 125dpi) and (max-resolution: 190dpi) { + @media (min-resolution: 120dpi) { max-width: 400px; min-width: 400px; } From 7f88eb058418a61ed241b36bf6050c1b40fa610f Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 07:37:03 +0100 Subject: [PATCH 06/14] Fail build on unflowed new files This still warns when developers touch files that are unflowed, but the main change here is that it fails the build when developers create new files and don't flow type them. --- dangerfile.js | 7 ++++--- package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 7180717b4b..d6dbb518e0 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -70,13 +70,14 @@ noTestShortcuts({ testFilePredicate: filePath => filePath.endsWith('.test.js'), }); - schedule(noConsole({ whitelist: ['error'] })); schedule( flow({ - // Don't fail the build, only warn the submitter - warn: true, + // Fail on newly created untyped files + created: 'fail', + // Warn on modified untyped files + modified: 'warn', blacklist: ['flow-typed/**/*.js', 'public/**/*.js'], }) ); diff --git a/package.json b/package.json index e514badc73..ddab9d4600 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "cookie-session": "^2.0.0-beta.3", "cors": "^2.8.3", "css.escape": "^1.5.1", - "danger-plugin-flow": "^1.2.1", + "danger-plugin-flow": "^1.3.0", "danger-plugin-no-test-shortcuts": "^2.0.0", "dataloader": "^1.3.0", "debounce": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index ed153f34e7..5cbd013544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2793,9 +2793,9 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -danger-plugin-flow@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/danger-plugin-flow/-/danger-plugin-flow-1.2.1.tgz#0f1e77aaf82887cc60adca4bb512c6efa0c4e1bc" +danger-plugin-flow@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/danger-plugin-flow/-/danger-plugin-flow-1.3.0.tgz#aa341192e9f7db7b39f964f5c19a72053fe8a896" dependencies: micromatch "^3.1.9" optionalDependencies: From d049c3a34ff377f60ac9ee3ccf05e50e83b62bec Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 07:39:10 +0100 Subject: [PATCH 07/14] Add unflowed file, touch existing unflowed file --- src/store/index.js | 2 ++ src/unflowed.js | 1 + 2 files changed, 3 insertions(+) create mode 100644 src/unflowed.js diff --git a/src/store/index.js b/src/store/index.js index 5c412d1388..68363404a8 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,6 +11,8 @@ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose; +console.log('touch an unflowed, existing file'); + // init the store with the thunkMiddleware which allows us to make async actions play nicely with the store // Allow dependency injection of extra reducers and middleware, we need this for SSR export const initStore = ( diff --git a/src/unflowed.js b/src/unflowed.js new file mode 100644 index 0000000000..28b16990e2 --- /dev/null +++ b/src/unflowed.js @@ -0,0 +1 @@ +console.log("new file that's not flow typed"); From 44e6ffe9ad3a696d298c58a8c19c78a999b1dd08 Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 07:56:22 +0100 Subject: [PATCH 08/14] Update danger-plugin-flow --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ddab9d4600..f083628d5a 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "cookie-session": "^2.0.0-beta.3", "cors": "^2.8.3", "css.escape": "^1.5.1", - "danger-plugin-flow": "^1.3.0", + "danger-plugin-flow": "^1.3.1", "danger-plugin-no-test-shortcuts": "^2.0.0", "dataloader": "^1.3.0", "debounce": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index 5cbd013544..ff83f69e0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2793,9 +2793,9 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -danger-plugin-flow@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/danger-plugin-flow/-/danger-plugin-flow-1.3.0.tgz#aa341192e9f7db7b39f964f5c19a72053fe8a896" +danger-plugin-flow@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/danger-plugin-flow/-/danger-plugin-flow-1.3.1.tgz#1e1fa941ba39010d4ef46b26bc4e37352c16b780" dependencies: micromatch "^3.1.9" optionalDependencies: From 9f4f729fd72302477ea13838fdf2aa85d8b95441 Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 07:58:29 +0100 Subject: [PATCH 09/14] Maybe fix auto labelling --- dangerfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index d6dbb518e0..af2c15dd8d 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -43,9 +43,11 @@ schedule(async () => { .filter(Boolean) .map(res => res[1]); - const matchingLabels = matches.filter( - match => Object.keys(possibleAutoLabels).indexOf(match.toLowerCase()) > -1 - ); + const matchingLabels = matches + .filter( + match => Object.keys(possibleAutoLabels).indexOf(match.toLowerCase()) > -1 + ) + .map(key => possibleAutoLabels[key.toLowerCase()]); if (!matchingLabels || matchingLabels.length === 0) return; From 42a4a4878afd9400104a227faa67d3f7612807de Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 08:13:19 +0100 Subject: [PATCH 10/14] Revert "Add unflowed file, touch existing unflowed file" This reverts commit d049c3a34ff377f60ac9ee3ccf05e50e83b62bec. --- src/store/index.js | 2 -- src/unflowed.js | 1 - 2 files changed, 3 deletions(-) delete mode 100644 src/unflowed.js diff --git a/src/store/index.js b/src/store/index.js index 68363404a8..5c412d1388 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,8 +11,6 @@ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose; -console.log('touch an unflowed, existing file'); - // init the store with the thunkMiddleware which allows us to make async actions play nicely with the store // Allow dependency injection of extra reducers and middleware, we need this for SSR export const initStore = ( diff --git a/src/unflowed.js b/src/unflowed.js deleted file mode 100644 index 28b16990e2..0000000000 --- a/src/unflowed.js +++ /dev/null @@ -1 +0,0 @@ -console.log("new file that's not flow typed"); From 69a9c016a89f2d4a57f6f0693c856e435b95a3f1 Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 13:46:04 +0100 Subject: [PATCH 11/14] Properly set up ESLint and enforce it in CI We've always had ESLint configured, but we never really enforced it in CI. (create-react-app kinda enforces it by not building the app if we do some crap) This makes it so we have a proper ESLint setup that works 100%, and I'm also adding ESLint to the CI to catch our dumb mistakes early. --- .eslintignore | 33 +++++++++++++++++++++++++++++++++ .eslintrc.js | 12 ++++++++++++ .eslintrc.json | 47 ----------------------------------------------- package.json | 13 +++++++++---- yarn.lock | 46 +++++++++++++++++++++++++--------------------- 5 files changed, 79 insertions(+), 72 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js delete mode 100644 .eslintrc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..8767dbd6f9 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,33 @@ +# Note: This is a copy of the .gitignore, +# with flow-typed added +flow-typed +node_modules +.sass-cache +npm-debug.log +build +.DS_Store +src/config/FirebaseConfig.js +npm-debug.log +rethinkdb_data +debug +now-secrets.json +build-iris +build-athena +build-hermes +build-chronos +build-mercury +build-vulcan +build-hyperion +build-pluto +package-lock.json +.vscode +dump.rdb +*.swp +queries-by-response-size.js +queries-by-time.js +test-extend.js +stats.json +iris/.env +.expo +mobile/.expo +test-results.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..1383a7ba4f --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + extends: 'react-app', + env: { + node: false, + }, + rules: { + 'no-unused-vars': 0, + 'no-undef': 0, + radix: 0, + 'import/first': 0, + }, +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 0fd755fcc9..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "env": { - "browser": true, - "commonjs": true, - "es6": true, - "node": true - }, - "parser": "babel-eslint", - "extends": ["eslint:recommended", "plugin:promise/recommended", "plugin:flowtype/recommended", "plugin:react/recommended" ,"plugin:jest/recommended"], - "parserOptions": { - "ecmaVersion": 2017, - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - }, - "sourceType": "module" - }, - "plugins": [ - "react", - "flowtype", - "promise" - ], - "rules": { - "no-console": 0, - "require-await": [ - "error" - ], - "indent": 0, - "linebreak-style": [ - 0, - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - }, - "settings": { - "flowtype": { - "onlyFilesWithFlowAnnotation": false - } - } -} diff --git a/package.json b/package.json index e514badc73..c177a237d9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "devDependencies": { "babel-cli": "^6.24.1", - "babel-eslint": "^8.0.1", + "babel-eslint": "^7.2.3", "babel-plugin-import-inspector": "^2.0.0", "babel-plugin-inline-import-graphql-ast": "^2.0.4", "babel-plugin-styled-components": "^1.1.7", @@ -22,11 +22,14 @@ "danger-plugin-jest": "^1.1.0", "danger-plugin-no-console": "^1.0.0", "danger-plugin-yarn": "^1.2.1", - "eslint": "^4.15.0", - "eslint-plugin-flowtype": "^2.39.1", + "eslint": "^4.1.1", + "eslint-config-react-app": "^2.1.0", + "eslint-plugin-flowtype": "^2.34.1", + "eslint-plugin-import": "^2.6.0", "eslint-plugin-jest": "^21.6.1", + "eslint-plugin-jsx-a11y": "^5.1.1", "eslint-plugin-promise": "^3.6.0", - "eslint-plugin-react": "^7.4.0", + "eslint-plugin-react": "^7.1.0", "flow-bin": "0.66", "is-html": "^1.1.0", "lint-staged": "^3.3.0", @@ -221,6 +224,7 @@ "jest": "cross-env NODE_PATH=./ jest", "test": "npm run jest -- --runInBand --watch", "test:ci": "npm run jest -- --forceExit --outputFile test-results.json --json", + "lint": "eslint .", "flow": "flow", "db:migrate": "npm run rethinkdb:migrate -- up", "db:drop": "npm run rethinkdb:migrate -- down", @@ -233,6 +237,7 @@ "lint-staged": { "*.js": [ "prettier --write --single-quote --trailing-comma es5", + "eslint --fix", "git add" ] }, diff --git a/yarn.lock b/yarn.lock index ed153f34e7..c7530facfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.35", "@babel/code-frame@^7.0.0-beta.40": +"@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" dependencies: @@ -96,7 +96,7 @@ babylon "7.0.0-beta.40" lodash "^4.2.0" -"@babel/traverse@7.0.0-beta.40", "@babel/traverse@^7.0.0-beta.40": +"@babel/traverse@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e" dependencies: @@ -110,7 +110,7 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0-beta.40", "@babel/types@^7.0.0-beta.40": +"@babel/types@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14" dependencies: @@ -815,7 +815,7 @@ babel-core@6.26.0, babel-core@^6.0.0, babel-core@^6.25.0, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-eslint@7.2.3: +babel-eslint@7.2.3, babel-eslint@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" dependencies: @@ -824,17 +824,6 @@ babel-eslint@7.2.3: babel-types "^6.23.0" babylon "^6.17.0" -babel-eslint@^8.0.1: - version "8.2.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b" - dependencies: - "@babel/code-frame" "^7.0.0-beta.40" - "@babel/traverse" "^7.0.0-beta.40" - "@babel/types" "^7.0.0-beta.40" - babylon "^7.0.0-beta.40" - eslint-scope "~3.7.1" - eslint-visitor-keys "^1.0.0" - babel-generator@6.11.4: version "6.11.4" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.11.4.tgz#14f6933abb20c62666d27e3b7b9f5b9dc0712a9a" @@ -1550,7 +1539,7 @@ babylon@6.14.1: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" -babylon@7.0.0-beta.40, babylon@^7.0.0-beta.40: +babylon@7.0.0-beta.40: version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a" @@ -3652,7 +3641,7 @@ eslint-plugin-flowtype@2.39.1: dependencies: lodash "^4.15.0" -eslint-plugin-flowtype@^2.39.1: +eslint-plugin-flowtype@^2.34.1: version "2.46.1" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.1.tgz#c4f81d580cd89c82bc3a85a1ccf4ae3a915143a4" dependencies: @@ -3673,11 +3662,26 @@ eslint-plugin-import@2.8.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" +eslint-plugin-import@^2.6.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz#26002efbfca5989b7288ac047508bd24f217b169" + 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 "^4.17.4" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + eslint-plugin-jest@^21.6.1: version "21.13.0" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.13.0.tgz#9fc903158d79e953aefd861a55e8a8c9f6ab3d36" -eslint-plugin-jsx-a11y@5.1.1: +eslint-plugin-jsx-a11y@5.1.1, eslint-plugin-jsx-a11y@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1" dependencies: @@ -3702,7 +3706,7 @@ eslint-plugin-react@7.4.0: jsx-ast-utils "^2.0.0" prop-types "^15.5.10" -eslint-plugin-react@^7.4.0: +eslint-plugin-react@^7.1.0: version "7.7.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160" dependencies: @@ -3711,7 +3715,7 @@ eslint-plugin-react@^7.4.0: jsx-ast-utils "^2.0.1" prop-types "^15.6.0" -eslint-scope@^3.7.1, eslint-scope@~3.7.1: +eslint-scope@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: @@ -3764,7 +3768,7 @@ eslint@4.10.0: table "^4.0.1" text-table "~0.2.0" -eslint@^4.15.0: +eslint@^4.1.1: version "4.18.2" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45" dependencies: From c34663e0621814ea6a13a00d4b9a5bd7f4550b6b Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 13:46:53 +0100 Subject: [PATCH 12/14] Fix ESLint errors --- public/push-sw.js | 175 ++++++++++++++++++++------------------- public/service-worker.js | 1 + 2 files changed, 92 insertions(+), 84 deletions(-) diff --git a/public/push-sw.js b/public/push-sw.js index 21782e62fc..b38410e0c9 100644 --- a/public/push-sw.js +++ b/public/push-sw.js @@ -1,84 +1,91 @@ -/* - * Push notificiations ServiceWorker - * - * NOTE(@mxstbr): This only gets updated if you change the filename, not if you - * update the contents. Make sure to change the version number in the filename - * after updating the code! - */ - -// A new notification is coming in, yay! -self.addEventListener('push', function(event) { - var notificationData = {}; - - try { - notificationData = event.data.json(); - } catch (e) { - console.log('event.data.json() failed', e); - // 🚨 We either got no data or it's malformatted, ABORT ABORT ABORT - return; - } - - // Check if the user is looking at Spectrum right now and don't show a notification - event.waitUntil( - clients - .matchAll({ - type: 'window', - includeUncontrolled: true, - }) - .then(windowClients => { - for (let i = 0; i < windowClients.length; i++) { - const windowClient = windowClients[i]; - // The user is looking at Spectrum right now abort showing the notification! - // (except for if we're on localhost, i.e. in development) - if ( - windowClient.focused && - !(self.registration.scope.indexOf('http://localhost:3000') === 0) - ) { - return; - } - } - return self.registration.showNotification(notificationData.title, { - vibrate: [200], - icon: '/img/apple-icon-144x144-precomposed.png', - badge: '/img/badge.png', - body: notificationData.body, - title: notificationData.title, - timestamp: notificationData.timestamp, - image: notificationData.image, - tag: notificationData.tag, - data: notificationData.data, - // If we don't set a tag and set renotify to true this'll throw an error - // renotify: notificationData.renotify || !!notificationData.tag, - }); - }) - ); -}); - -// On notification click -self.addEventListener('notificationclick', function(event) { - event.notification.close(); - - const urlToOpen = - event.notification.data && event.notification.data.href - ? new URL(event.notification.data.href, self.location.origin).href - : '/'; - - // see if the current is open and if it is focus it - event.waitUntil( - self.clients - .matchAll({ - type: 'window', - includeUncontrolled: true, - }) - .then(function(clientList) { - // If there is an open Spectrum.chat window navigate to the notification href - if (clientList.length > 0) { - return clientList[0] - .focus() - .then(client => client.navigate(urlToOpen)); - } - // If there's no open Spectrum.chat window open a new one - return self.clients.openWindow(urlToOpen); - }) - ); -}); +/* + * Push notificiations ServiceWorker + * + * NOTE(@mxstbr): This only gets updated if you change the filename, not if you + * update the contents. Make sure to change the version number in the filename + * after updating the code! + */ + +// A new notification is coming in, yay! +// eslint-disable-next-line +self.addEventListener('push', function(event) { + var notificationData = {}; + + try { + notificationData = event.data.json(); + } catch (e) { + console.log('event.data.json() failed', e); + // 🚨 We either got no data or it's malformatted, ABORT ABORT ABORT + return; + } + + // Check if the user is looking at Spectrum right now and don't show a notification + event.waitUntil( + clients + .matchAll({ + type: 'window', + includeUncontrolled: true, + }) + .then(windowClients => { + for (let i = 0; i < windowClients.length; i++) { + const windowClient = windowClients[i]; + // The user is looking at Spectrum right now abort showing the notification! + // (except for if we're on localhost, i.e. in development) + if ( + windowClient.focused && + // eslint-disable-next-line + !(self.registration.scope.indexOf('http://localhost:3000') === 0) + ) { + return; + } + } + // eslint-disable-next-line + return self.registration.showNotification(notificationData.title, { + vibrate: [200], + icon: '/img/apple-icon-144x144-precomposed.png', + badge: '/img/badge.png', + body: notificationData.body, + title: notificationData.title, + timestamp: notificationData.timestamp, + image: notificationData.image, + tag: notificationData.tag, + data: notificationData.data, + // If we don't set a tag and set renotify to true this'll throw an error + // renotify: notificationData.renotify || !!notificationData.tag, + }); + }) + ); +}); + +// On notification click +// eslint-disable-next-line +self.addEventListener('notificationclick', function(event) { + event.notification.close(); + + const urlToOpen = + event.notification.data && event.notification.data.href + ? // eslint-disable-next-line + new URL(event.notification.data.href, self.location.origin).href + : '/'; + + // see if the current is open and if it is focus it + event.waitUntil( + // eslint-disable-next-line + self.clients + .matchAll({ + type: 'window', + includeUncontrolled: true, + }) + .then(function(clientList) { + // If there is an open Spectrum.chat window navigate to the notification href + if (clientList.length > 0) { + return clientList[0] + .focus() + .then(client => client.navigate(urlToOpen)); + } + // If there's no open Spectrum.chat window open a new one + // eslint-disable-next-line + return self.clients.openWindow(urlToOpen); + }) + ); +}); diff --git a/public/service-worker.js b/public/service-worker.js index ea854b776c..da97ae3e3f 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,3 +1,4 @@ +/* eslint-disable */ // A simple, no-op service worker that takes immediate control. // from: https://stackoverflow.com/a/38980776 From 62addbe4231472dfaf398a98c721469b2978441b Mon Sep 17 00:00:00 2001 From: Maximilian Stoiber Date: Thu, 15 Mar 2018 13:55:37 +0100 Subject: [PATCH 13/14] Run eslint --fix to fix some warnings --- athena/utils/actors.js | 2 +- .../migrations/20170410074258-initial-data.js | 288 +++++++++++------- .../20170613200350-notifications.js | 47 +-- ...616113103-compound-indexes-for-ordering.js | 7 +- .../20170701173337-linkify-messages.js | 1 - iris/migrations/20170702194221-fix-images.js | 1 - .../20170706114239-providerfield-indexes.js | 17 +- .../migrations/20170706205658-slack-import.js | 18 +- .../20170714171920-web-push-subscription.js | 23 +- ...184557-notifications-entity-added-index.js | 2 - ...20170829233734-userid-index-on-invoices.js | 2 - .../20170926102527-speedy-gonzales.js | 2 - ...-communityid-index-on-reputation-events.js | 2 - .../20170928143435-slate-to-draftjs.js.js | 1 - ...445-remove-markdown-links-from-messages.js | 1 - .../20171008101118-last-slate-to-draft.js | 1 - .../20171013195530-core-metrics-table.js | 26 +- ...235659-add-direst-message-user-settings.js | 2 - .../20171029090619-users-channels-index.js | 2 - .../20171029094352-users-threads-index.js | 2 - ...0171129215512-index-communities-by-slug.js | 2 - ...29221050-curated-content-table-creation.js | 2 - ...20180209015734-github-provider-id-index.js | 2 - .../20180214111357-expo-push-subscriptions.js | 2 - ...9144845-create-community-settings-table.js | 2 - 25 files changed, 266 insertions(+), 191 deletions(-) diff --git a/athena/utils/actors.js b/athena/utils/actors.js index ed2a4c99d6..a1685dff7c 100644 --- a/athena/utils/actors.js +++ b/athena/utils/actors.js @@ -4,7 +4,7 @@ export const getDistinctActors = (array: Array): Array => { let unique = {}; let distinct = []; for (let actor of array) { - if (typeof unique[actor.id] == 'undefined') { + if (typeof unique[actor.id] === 'undefined') { distinct.push(actor); } unique[actor.id] = 0; diff --git a/iris/migrations/20170410074258-initial-data.js b/iris/migrations/20170410074258-initial-data.js index 36fa10848d..89f7c11198 100644 --- a/iris/migrations/20170410074258-initial-data.js +++ b/iris/migrations/20170410074258-initial-data.js @@ -1,60 +1,97 @@ -'use strict'; - exports.up = function(r, conn) { return ( Promise.all([ - r.tableCreate('threads').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('channels').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('communities').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('messages').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('sessions').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('reactions').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('directMessageThreads').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('users').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('recurringPayments').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('invoices').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('usersCommunities').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('usersChannels').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('usersDirectMessageThreads').run(conn).catch(err => { - console.log(err); - throw err; - }), + r + .tableCreate('threads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('channels') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('communities') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('messages') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('sessions') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('reactions') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('directMessageThreads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('users') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('recurringPayments') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('invoices') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('usersCommunities') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('usersChannels') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('usersDirectMessageThreads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), ]) // Create secondary indexes .then(() => @@ -220,58 +257,97 @@ exports.up = function(r, conn) { exports.down = function(r, conn) { return Promise.all([ - r.tableDrop('threads').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('channels').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('communities').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('messages').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('sessions').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('users').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('directMessageThreads').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('reactions').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('recurringPayments').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('invoices').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('usersCommunities').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('usersChannels').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableDrop('usersDirectMessageThreads').run(conn).catch(err => { - console.log(err); - throw err; - }), + r + .tableDrop('threads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('channels') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('communities') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('messages') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('sessions') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('users') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('directMessageThreads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('reactions') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('recurringPayments') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('invoices') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('usersCommunities') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('usersChannels') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableDrop('usersDirectMessageThreads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), ]).catch(err => { console.log(err); throw err; diff --git a/iris/migrations/20170613200350-notifications.js b/iris/migrations/20170613200350-notifications.js index 99f5d023f2..0352aeaec3 100644 --- a/iris/migrations/20170613200350-notifications.js +++ b/iris/migrations/20170613200350-notifications.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return ( // Create new tables, update old ones with receiveNotifications @@ -22,18 +20,27 @@ exports.up = function(r, conn) { console.log(err); throw err; }), - r.tableCreate('notifications').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('usersThreads').run(conn).catch(err => { - console.log(err); - throw err; - }), - r.tableCreate('usersNotifications').run(conn).catch(err => { - console.log(err); - throw err; - }), + r + .tableCreate('notifications') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('usersThreads') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), + r + .tableCreate('usersNotifications') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), ]) // Add secondary indexes to new tables .then(() => @@ -46,10 +53,14 @@ exports.up = function(r, conn) { console.log(err); throw err; }), - r.table('usersThreads').indexCreate('userId').run(conn).catch(err => { - console.log(err); - throw err; - }), + r + .table('usersThreads') + .indexCreate('userId') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), r .table('usersThreads') .indexCreate('threadId') diff --git a/iris/migrations/20170616113103-compound-indexes-for-ordering.js b/iris/migrations/20170616113103-compound-indexes-for-ordering.js index 373743b871..d058431616 100644 --- a/iris/migrations/20170616113103-compound-indexes-for-ordering.js +++ b/iris/migrations/20170616113103-compound-indexes-for-ordering.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ // messages#threadIdAndTimestamp @@ -27,7 +25,10 @@ exports.up = function(r, conn) { ]) .run(conn), // community#createdAt - r.table('communities').indexCreate('createdAt').run(conn), + r + .table('communities') + .indexCreate('createdAt') + .run(conn), ]).catch(err => { console.log(err); throw err; diff --git a/iris/migrations/20170701173337-linkify-messages.js b/iris/migrations/20170701173337-linkify-messages.js index ab0ef2522f..94f1394cca 100644 --- a/iris/migrations/20170701173337-linkify-messages.js +++ b/iris/migrations/20170701173337-linkify-messages.js @@ -1,4 +1,3 @@ -'use strict'; const markdownLinkify = require('../utils/markdown-linkify'); exports.up = function(r, conn) { diff --git a/iris/migrations/20170702194221-fix-images.js b/iris/migrations/20170702194221-fix-images.js index be024aa2d2..68450fa273 100644 --- a/iris/migrations/20170702194221-fix-images.js +++ b/iris/migrations/20170702194221-fix-images.js @@ -1,4 +1,3 @@ -'use strict'; const MARKDOWN_LINK = /(?:\[(.*?)\]\((.*?)\))/g; exports.up = function(r, conn) { diff --git a/iris/migrations/20170706114239-providerfield-indexes.js b/iris/migrations/20170706114239-providerfield-indexes.js index b0bb980e15..a514566617 100644 --- a/iris/migrations/20170706114239-providerfield-indexes.js +++ b/iris/migrations/20170706114239-providerfield-indexes.js @@ -1,10 +1,17 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ - r.table('users').indexCreate('providerId').run(conn), - r.table('users').indexCreate('fbProviderId').run(conn), - r.table('users').indexCreate('googleProviderId').run(conn), + r + .table('users') + .indexCreate('providerId') + .run(conn), + r + .table('users') + .indexCreate('fbProviderId') + .run(conn), + r + .table('users') + .indexCreate('googleProviderId') + .run(conn), ]).catch(err => { console.log(err); throw err; diff --git a/iris/migrations/20170706205658-slack-import.js b/iris/migrations/20170706205658-slack-import.js index b5bff20732..60deda8dac 100644 --- a/iris/migrations/20170706205658-slack-import.js +++ b/iris/migrations/20170706205658-slack-import.js @@ -1,11 +1,12 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ - r.tableCreate('slackImports').run(conn).catch(err => { - console.log(err); - throw err; - }), + r + .tableCreate('slackImports') + .run(conn) + .catch(err => { + console.log(err); + throw err; + }), ]) .then(() => Promise.all([ @@ -17,7 +18,10 @@ exports.up = function(r, conn) { console.log(err); throw err; }), - r.table('users').indexCreate('email', r.row('email')).run(conn), + r + .table('users') + .indexCreate('email', r.row('email')) + .run(conn), ]) ) .catch(err => { diff --git a/iris/migrations/20170714171920-web-push-subscription.js b/iris/migrations/20170714171920-web-push-subscription.js index bcc47aede8..39bd998f4d 100644 --- a/iris/migrations/20170714171920-web-push-subscription.js +++ b/iris/migrations/20170714171920-web-push-subscription.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return r .tableCreate('webPushSubscriptions') @@ -7,14 +5,25 @@ exports.up = function(r, conn) { .catch(err => { throw new Error(err); }) - .then(() => r.table('webPushSubscriptions').indexCreate('userId').run(conn)) .then(() => - r.table('webPushSubscriptions').indexCreate('endpoint').run(conn) + r + .table('webPushSubscriptions') + .indexCreate('userId') + .run(conn) + ) + .then(() => + r + .table('webPushSubscriptions') + .indexCreate('endpoint') + .run(conn) ); }; exports.down = function(r, conn) { - return r.tableDrop('webPushSubscriptions').run(conn).catch(err => { - throw new Error(err); - }); + return r + .tableDrop('webPushSubscriptions') + .run(conn) + .catch(err => { + throw new Error(err); + }); }; diff --git a/iris/migrations/20170724184557-notifications-entity-added-index.js b/iris/migrations/20170724184557-notifications-entity-added-index.js index 2a35f40a83..c3475934dd 100644 --- a/iris/migrations/20170724184557-notifications-entity-added-index.js +++ b/iris/migrations/20170724184557-notifications-entity-added-index.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20170829233734-userid-index-on-invoices.js b/iris/migrations/20170829233734-userid-index-on-invoices.js index 71d2f97202..1ed0b73435 100644 --- a/iris/migrations/20170829233734-userid-index-on-invoices.js +++ b/iris/migrations/20170829233734-userid-index-on-invoices.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20170926102527-speedy-gonzales.js b/iris/migrations/20170926102527-speedy-gonzales.js index ad4ce2f92d..1b70c438a7 100644 --- a/iris/migrations/20170926102527-speedy-gonzales.js +++ b/iris/migrations/20170926102527-speedy-gonzales.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20170927002438-communityid-index-on-reputation-events.js b/iris/migrations/20170927002438-communityid-index-on-reputation-events.js index 3bea0d94f3..2b311c0c27 100644 --- a/iris/migrations/20170927002438-communityid-index-on-reputation-events.js +++ b/iris/migrations/20170927002438-communityid-index-on-reputation-events.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20170928143435-slate-to-draftjs.js.js b/iris/migrations/20170928143435-slate-to-draftjs.js.js index 66060e3b46..c149c5d447 100644 --- a/iris/migrations/20170928143435-slate-to-draftjs.js.js +++ b/iris/migrations/20170928143435-slate-to-draftjs.js.js @@ -1,4 +1,3 @@ -'use strict'; const compose = require('redux/lib/compose').default; const { convertToRaw, genKey } = require('draft-js'); const { stateFromMarkdown } = require('draft-js-import-markdown'); diff --git a/iris/migrations/20171005075445-remove-markdown-links-from-messages.js b/iris/migrations/20171005075445-remove-markdown-links-from-messages.js index 23d2f00464..1aab8f1dce 100644 --- a/iris/migrations/20171005075445-remove-markdown-links-from-messages.js +++ b/iris/migrations/20171005075445-remove-markdown-links-from-messages.js @@ -1,4 +1,3 @@ -'use strict'; const replace = require('string-replace-to-array'); const MARKDOWN_LINK = /(?:\[(.*?)\]\((.*?)\))/g; diff --git a/iris/migrations/20171008101118-last-slate-to-draft.js b/iris/migrations/20171008101118-last-slate-to-draft.js index a58fd1b416..cd42514139 100644 --- a/iris/migrations/20171008101118-last-slate-to-draft.js +++ b/iris/migrations/20171008101118-last-slate-to-draft.js @@ -1,4 +1,3 @@ -'use strict'; const compose = require('redux/lib/compose').default; const { convertToRaw, genKey } = require('draft-js'); const { stateFromMarkdown } = require('draft-js-import-markdown'); diff --git a/iris/migrations/20171013195530-core-metrics-table.js b/iris/migrations/20171013195530-core-metrics-table.js index 3864e26f99..d76c73e315 100644 --- a/iris/migrations/20171013195530-core-metrics-table.js +++ b/iris/migrations/20171013195530-core-metrics-table.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r @@ -131,19 +129,17 @@ exports.up = function(r, conn) { threadMessages, dmMessages, ]).then( - ( - [ - cpu, - mpu, - tpu, - users, - communities, - threads, - dmThreads, - threadMessages, - dmMessages, - ] - ) => { + ([ + cpu, + mpu, + tpu, + users, + communities, + threads, + dmThreads, + threadMessages, + dmMessages, + ]) => { const coreMetrics = { cpu: cpu || 0, mpu: mpu || 0, diff --git a/iris/migrations/20171018235659-add-direst-message-user-settings.js b/iris/migrations/20171018235659-add-direst-message-user-settings.js index 4c21abb2b3..729528b2af 100644 --- a/iris/migrations/20171018235659-add-direst-message-user-settings.js +++ b/iris/migrations/20171018235659-add-direst-message-user-settings.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20171029090619-users-channels-index.js b/iris/migrations/20171029090619-users-channels-index.js index a10524aa67..1148f7b6f1 100644 --- a/iris/migrations/20171029090619-users-channels-index.js +++ b/iris/migrations/20171029090619-users-channels-index.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return r .table('usersChannels') diff --git a/iris/migrations/20171029094352-users-threads-index.js b/iris/migrations/20171029094352-users-threads-index.js index daab3fa4cf..8b3a6dfa6b 100644 --- a/iris/migrations/20171029094352-users-threads-index.js +++ b/iris/migrations/20171029094352-users-threads-index.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return r .table('usersThreads') diff --git a/iris/migrations/20171129215512-index-communities-by-slug.js b/iris/migrations/20171129215512-index-communities-by-slug.js index 2a73a97482..d91f5e672f 100644 --- a/iris/migrations/20171129215512-index-communities-by-slug.js +++ b/iris/migrations/20171129215512-index-communities-by-slug.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20171129221050-curated-content-table-creation.js b/iris/migrations/20171129221050-curated-content-table-creation.js index a43f088d82..d66786b7f0 100644 --- a/iris/migrations/20171129221050-curated-content-table-creation.js +++ b/iris/migrations/20171129221050-curated-content-table-creation.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20180209015734-github-provider-id-index.js b/iris/migrations/20180209015734-github-provider-id-index.js index ea1564a0c9..afc1d59ddb 100644 --- a/iris/migrations/20180209015734-github-provider-id-index.js +++ b/iris/migrations/20180209015734-github-provider-id-index.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return Promise.all([ r diff --git a/iris/migrations/20180214111357-expo-push-subscriptions.js b/iris/migrations/20180214111357-expo-push-subscriptions.js index f067e9a871..598ffbc454 100644 --- a/iris/migrations/20180214111357-expo-push-subscriptions.js +++ b/iris/migrations/20180214111357-expo-push-subscriptions.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return r .tableCreate('expoPushSubscriptions') diff --git a/iris/migrations/20180309144845-create-community-settings-table.js b/iris/migrations/20180309144845-create-community-settings-table.js index c57ab7a013..e1beb49337 100644 --- a/iris/migrations/20180309144845-create-community-settings-table.js +++ b/iris/migrations/20180309144845-create-community-settings-table.js @@ -1,5 +1,3 @@ -'use strict'; - exports.up = function(r, conn) { return r .tableCreate('communitySettings') From 07b38f0bb4eb68898dc78b20938676d02f9c72cf Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Thu, 15 Mar 2018 10:57:19 -0700 Subject: [PATCH 14/14] Version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb355dea49..b08176297e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Spectrum", - "version": "2.1.7", + "version": "2.1.8", "private": true, "devDependencies": { "babel-cli": "^6.24.1",