diff --git a/.github/ISSUE_TEMPLATE/refactor_tickets.md b/.github/ISSUE_TEMPLATE/refactor_tickets.md new file mode 100644 index 000000000..b6c799f67 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor_tickets.md @@ -0,0 +1,20 @@ +--- +name: 🔧 Refactor ticket +about: Help us improve our code by refactoring it. +labels: refactor +title: 🔧 [Refactor] +--- + +## :zap: Refactor ticket + + +### Motive + +### Related issues + + +### Implementation + + +### Additional context + diff --git a/.travis.yml b/.travis.yml index f598594cb..621453bc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,3 @@ deploy: script: bash scripts/deploy.sh on: branch: master - - provider: script - script: bash scripts/github_release.sh - on: - branch: master diff --git a/CHANGELOG.md b/CHANGELOG.md index a67694579..842838f83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,90 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v0.2.2](https://github.com/Human-Connection/Human-Connection/compare/v0.2.1...v0.2.2) +#### [v0.3.0](https://github.com/Human-Connection/Human-Connection/compare/v0.2.1...v0.3.0) -> 20 January 2020 +> 31 January 2020 +- feat: 🍰 Direct Reply On Comment [`#2608`](https://github.com/Human-Connection/Human-Connection/pull/2608) +- build(deps-dev): bump @babel/core from 7.8.3 to 7.8.4 in /backend [`#2938`](https://github.com/Human-Connection/Human-Connection/pull/2938) +- fix: deploy script with new naming convention [`#2930`](https://github.com/Human-Connection/Human-Connection/pull/2930) +- build(deps-dev): bump @babel/preset-env from 7.8.3 to 7.8.4 in /backend [`#2940`](https://github.com/Human-Connection/Human-Connection/pull/2940) +- build(deps-dev): bump @babel/cli from 7.8.3 to 7.8.4 in /backend [`#2934`](https://github.com/Human-Connection/Human-Connection/pull/2934) +- build(deps-dev): bump @babel/core from 7.8.3 to 7.8.4 [`#2935`](https://github.com/Human-Connection/Human-Connection/pull/2935) +- build(deps-dev): bump @babel/preset-env from 7.8.3 to 7.8.4 in /webapp [`#2932`](https://github.com/Human-Connection/Human-Connection/pull/2932) +- build(deps): bump @nuxtjs/axios from 5.9.3 to 5.9.4 in /webapp [`#2937`](https://github.com/Human-Connection/Human-Connection/pull/2937) +- build(deps-dev): bump @babel/node from 7.8.3 to 7.8.4 in /backend [`#2936`](https://github.com/Human-Connection/Human-Connection/pull/2936) +- build(deps-dev): bump @babel/preset-env from 7.8.3 to 7.8.4 [`#2933`](https://github.com/Human-Connection/Human-Connection/pull/2933) +- feat: Blocked users cannot comment on posts [`#2714`](https://github.com/Human-Connection/Human-Connection/pull/2714) +- build(deps): bump @sentry/node from 5.11.1 to 5.11.2 in /backend [`#2927`](https://github.com/Human-Connection/Human-Connection/pull/2927) +- build(deps): bump cookie-universal-nuxt from 2.1.0 to 2.1.1 in /webapp [`#2925`](https://github.com/Human-Connection/Human-Connection/pull/2925) +- build(deps): bump @nuxtjs/sentry from 3.0.1 to 3.1.0 in /webapp [`#2928`](https://github.com/Human-Connection/Human-Connection/pull/2928) +- docs(CONTRIBUTING): Add open-source bounty program [`#2899`](https://github.com/Human-Connection/Human-Connection/pull/2899) +- build(deps-dev): bump eslint-config-prettier from 6.9.0 to 6.10.0 in /webapp [`#2926`](https://github.com/Human-Connection/Human-Connection/pull/2926) +- build(deps): bump graphql-shield from 7.0.8 to 7.0.9 in /backend [`#2924`](https://github.com/Human-Connection/Human-Connection/pull/2924) +- build(deps-dev): bump eslint-config-prettier from 6.9.0 to 6.10.0 in /backend [`#2923`](https://github.com/Human-Connection/Human-Connection/pull/2923) +- feat(editor): Underline markup for posts+comments [`#2898`](https://github.com/Human-Connection/Human-Connection/pull/2898) +- fix(backend): Add migration for muted relationship [`#2919`](https://github.com/Human-Connection/Human-Connection/pull/2919) +- build(deps-dev): bump @storybook/addon-a11y from 5.3.8 to 5.3.9 in /webapp [`#2914`](https://github.com/Human-Connection/Human-Connection/pull/2914) +- fix(webapp): 🐛 Adjust Avatar Sizes and 'z-index' [`#2871`](https://github.com/Human-Connection/Human-Connection/pull/2871) +- build(deps-dev): bump @storybook/vue from 5.3.8 to 5.3.9 in /webapp [`#2913`](https://github.com/Human-Connection/Human-Connection/pull/2913) +- build(deps): bump validator from 12.1.0 to 12.2.0 in /backend [`#2907`](https://github.com/Human-Connection/Human-Connection/pull/2907) +- build(deps): bump graphql from 14.5.8 to 14.6.0 in /webapp [`#2905`](https://github.com/Human-Connection/Human-Connection/pull/2905) +- build(deps): bump cross-env from 6.0.3 to 7.0.0 in /backend [`#2911`](https://github.com/Human-Connection/Human-Connection/pull/2911) +- build(deps-dev): bump @storybook/addon-notes from 5.3.8 to 5.3.9 in /webapp [`#2910`](https://github.com/Human-Connection/Human-Connection/pull/2910) +- build(deps): bump slug from 2.1.0 to 2.1.1 in /backend [`#2906`](https://github.com/Human-Connection/Human-Connection/pull/2906) +- build(deps): bump cross-env from 6.0.3 to 7.0.0 in /webapp [`#2916`](https://github.com/Human-Connection/Human-Connection/pull/2916) +- build(deps): bump graphql from 14.5.8 to 14.6.0 in /backend [`#2909`](https://github.com/Human-Connection/Human-Connection/pull/2909) +- build(deps-dev): bump storybook-design-token from 0.5.0 to 0.5.1 in /webapp [`#2915`](https://github.com/Human-Connection/Human-Connection/pull/2915) +- build(deps): bump validator from 12.1.0 to 12.2.0 in /webapp [`#2912`](https://github.com/Human-Connection/Human-Connection/pull/2912) +- build(deps-dev): bump @storybook/addon-actions from 5.3.8 to 5.3.9 in /webapp [`#2908`](https://github.com/Human-Connection/Human-Connection/pull/2908) +- build(deps-dev): bump slug from 2.1.0 to 2.1.1 [`#2904`](https://github.com/Human-Connection/Human-Connection/pull/2904) +- build(deps): bump graphql-shield from 7.0.7 to 7.0.8 in /backend [`#2903`](https://github.com/Human-Connection/Human-Connection/pull/2903) +- build(deps-dev): bump cypress from 3.8.2 to 3.8.3 [`#2902`](https://github.com/Human-Connection/Human-Connection/pull/2902) +- build(deps): bump metascraper-logo from 5.10.5 to 5.10.6 in /backend [`#2893`](https://github.com/Human-Connection/Human-Connection/pull/2893) +- build(deps): bump metascraper-video from 5.10.5 to 5.10.6 in /backend [`#2892`](https://github.com/Human-Connection/Human-Connection/pull/2892) +- build(deps): bump metascraper-image from 5.10.5 to 5.10.6 in /backend [`#2891`](https://github.com/Human-Connection/Human-Connection/pull/2891) +- build(deps): bump metascraper-publisher from 5.10.5 to 5.10.6 in /backend [`#2890`](https://github.com/Human-Connection/Human-Connection/pull/2890) +- build(deps-dev): bump codecov from 3.6.1 to 3.6.2 [`#2889`](https://github.com/Human-Connection/Human-Connection/pull/2889) +- feat(db): Setup neo4j data migrations [`#2828`](https://github.com/Human-Connection/Human-Connection/pull/2828) +- build(deps): bump metascraper from 5.10.5 to 5.10.6 in /backend [`#2877`](https://github.com/Human-Connection/Human-Connection/pull/2877) +- build(deps): bump metascraper-url from 5.10.5 to 5.10.6 in /backend [`#2879`](https://github.com/Human-Connection/Human-Connection/pull/2879) +- build(deps): bump metascraper-lang from 5.10.5 to 5.10.6 in /backend [`#2882`](https://github.com/Human-Connection/Human-Connection/pull/2882) +- build(deps): bump metascraper-audio from 5.10.5 to 5.10.6 in /backend [`#2883`](https://github.com/Human-Connection/Human-Connection/pull/2883) +- build(deps): bump metascraper-date from 5.10.5 to 5.10.6 in /backend [`#2878`](https://github.com/Human-Connection/Human-Connection/pull/2878) +- build(deps): bump metascraper-title from 5.10.5 to 5.10.6 in /backend [`#2880`](https://github.com/Human-Connection/Human-Connection/pull/2880) +- build(deps): bump metascraper-youtube from 5.10.5 to 5.10.6 in /backend [`#2881`](https://github.com/Human-Connection/Human-Connection/pull/2881) +- build(deps): bump metascraper-author from 5.10.5 to 5.10.6 in /backend [`#2876`](https://github.com/Human-Connection/Human-Connection/pull/2876) +- build(deps): bump metascraper-description from 5.10.5 to 5.10.6 in /backend [`#2875`](https://github.com/Human-Connection/Human-Connection/pull/2875) +- build(deps): bump metascraper-soundcloud from 5.10.5 to 5.10.6 in /backend [`#2874`](https://github.com/Human-Connection/Human-Connection/pull/2874) +- build(deps-dev): bump jest from 24.9.0 to 25.1.0 in /webapp [`#2868`](https://github.com/Human-Connection/Human-Connection/pull/2868) +- build(deps-dev): bump @storybook/vue from 5.3.7 to 5.3.8 in /webapp [`#2867`](https://github.com/Human-Connection/Human-Connection/pull/2867) +- build(deps-dev): bump babel-jest from 24.9.0 to 25.1.0 in /webapp [`#2869`](https://github.com/Human-Connection/Human-Connection/pull/2869) +- build(deps-dev): bump @storybook/addon-actions from 5.3.7 to 5.3.8 in /webapp [`#2865`](https://github.com/Human-Connection/Human-Connection/pull/2865) +- build(deps-dev): bump babel-jest from 24.9.0 to 25.1.0 in /backend [`#2863`](https://github.com/Human-Connection/Human-Connection/pull/2863) +- build(deps-dev): bump expect from 24.9.0 to 25.1.0 [`#2861`](https://github.com/Human-Connection/Human-Connection/pull/2861) +- build(deps-dev): bump @storybook/addon-a11y from 5.3.7 to 5.3.8 in /webapp [`#2866`](https://github.com/Human-Connection/Human-Connection/pull/2866) +- build(deps-dev): bump @storybook/addon-notes from 5.3.7 to 5.3.8 in /webapp [`#2864`](https://github.com/Human-Connection/Human-Connection/pull/2864) +- build(deps-dev): bump jest from 24.9.0 to 25.1.0 in /backend [`#2862`](https://github.com/Human-Connection/Human-Connection/pull/2862) +- docs(deployment): Explain how to setup metrics [`#2825`](https://github.com/Human-Connection/Human-Connection/pull/2825) +- refactor(styleguide): Migrate Avatar component to monorepo [`#2700`](https://github.com/Human-Connection/Human-Connection/pull/2700) +- feat: Convert block/unblock to mute/unmute [`#2686`](https://github.com/Human-Connection/Human-Connection/pull/2686) +- removed obsolete German keys [`#2845`](https://github.com/Human-Connection/Human-Connection/pull/2845) +- build(deps-dev): bump @vue/server-test-utils in /webapp [`#2852`](https://github.com/Human-Connection/Human-Connection/pull/2852) +- build(deps-dev): bump @storybook/vue from 5.3.6 to 5.3.7 in /webapp [`#2857`](https://github.com/Human-Connection/Human-Connection/pull/2857) +- build(deps-dev): bump @storybook/addon-a11y in /webapp [`#2858`](https://github.com/Human-Connection/Human-Connection/pull/2858) +- build(deps): bump metascraper-image from 5.10.3 to 5.10.5 in /backend [`#2849`](https://github.com/Human-Connection/Human-Connection/pull/2849) +- build(deps): bump wait-on from 3.3.0 to 4.0.0 in /backend [`#2848`](https://github.com/Human-Connection/Human-Connection/pull/2848) +- build(deps): bump v-tooltip from 2.0.2 to 2.0.3 in /webapp [`#2856`](https://github.com/Human-Connection/Human-Connection/pull/2856) +- build(deps-dev): bump @storybook/addon-notes from 5.3.6 to 5.3.7 in /webapp [`#2855`](https://github.com/Human-Connection/Human-Connection/pull/2855) +- build(deps): bump sanitize-html from 1.20.1 to 1.21.1 in /backend [`#2854`](https://github.com/Human-Connection/Human-Connection/pull/2854) +- build(deps): bump metascraper-video from 5.10.3 to 5.10.5 in /backend [`#2853`](https://github.com/Human-Connection/Human-Connection/pull/2853) +- build(deps): bump metascraper-date from 5.10.3 to 5.10.5 in /backend [`#2851`](https://github.com/Human-Connection/Human-Connection/pull/2851) +- build(deps-dev): bump @vue/test-utils from 1.0.0-beta.30 to 1.0.0-beta.31 in /webapp [`#2850`](https://github.com/Human-Connection/Human-Connection/pull/2850) +- build(deps): bump metascraper-logo from 5.10.3 to 5.10.5 in /backend [`#2847`](https://github.com/Human-Connection/Human-Connection/pull/2847) +- build(deps): bump @hapi/joi from 17.0.2 to 17.1.0 in /backend [`#2846`](https://github.com/Human-Connection/Human-Connection/pull/2846) +- Release 0.2.2 [`#2844`](https://github.com/Human-Connection/Human-Connection/pull/2844) +- build(deps-dev): bump @storybook/addon-actions in /webapp [`#2842`](https://github.com/Human-Connection/Human-Connection/pull/2842) - build(deps): bump metascraper-title from 5.10.3 to 5.10.5 in /backend [`#2835`](https://github.com/Human-Connection/Human-Connection/pull/2835) - build(deps): bump metascraper-publisher in /backend [`#2836`](https://github.com/Human-Connection/Human-Connection/pull/2836) - build(deps): bump metascraper-audio from 5.10.3 to 5.10.5 in /backend [`#2840`](https://github.com/Human-Connection/Human-Connection/pull/2840) @@ -97,12 +177,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Update yarn.lock after dependabot update [`#2724`](https://github.com/Human-Connection/Human-Connection/pull/2724) - build(deps): bump @nuxtjs/axios from 5.8.0 to 5.9.2 in /webapp [`#2657`](https://github.com/Human-Connection/Human-Connection/pull/2657) - Update to version 0.2.1 [`#2722`](https://github.com/Human-Connection/Human-Connection/pull/2722) +- docs(deployment): Explain how to setup metrics (#2825) [`#2411`](https://github.com/Human-Connection/Human-Connection/issues/2411) [`#2777`](https://github.com/Human-Connection/Human-Connection/issues/2777) - refactor(modules): Various import fixes [`#2773`](https://github.com/Human-Connection/Human-Connection/issues/2773) [`#2774`](https://github.com/Human-Connection/Human-Connection/issues/2774) - feat(webapp): Display deployed version in footer [`#1831`](https://github.com/Human-Connection/Human-Connection/issues/1831) - fix #2229 [`#2229`](https://github.com/Human-Connection/Human-Connection/issues/2229) -- build(deps-dev): bump @storybook/addon-actions in /webapp [`d0124bf`](https://github.com/Human-Connection/Human-Connection/commit/d0124bf2b4b4a641c9af76d6d2f7b5aa075ade90) -- refactor and use base-button in SearchableInput [`fcbe612`](https://github.com/Human-Connection/Human-Connection/commit/fcbe6125f35c0dd23e2ba1ae63f539f5ef5990ea) -- Update `vue-test-utils` and follow updated docs [`8c29ad9`](https://github.com/Human-Connection/Human-Connection/commit/8c29ad947b72fbaa173d070221cdf35b7ab6aaa5) +- refactor: Make `db:setup` init stage of `migrate` [`b063847`](https://github.com/Human-Connection/Human-Connection/commit/b063847849a84db885337dc8e84e75ddaf87011f) +- Improve styling per @alina-beck review [`bcc1ab1`](https://github.com/Human-Connection/Human-Connection/commit/bcc1ab167e8b1dfdac1ec0a05a0c14e8234bcabc) +- test(cypress): Cover "Pinned post" feature [`d49afc2`](https://github.com/Human-Connection/Human-Connection/commit/d49afc25cfa1c1f98ed04f78dd3ff826cd85ae25) #### [v0.2.1](https://github.com/Human-Connection/Human-Connection/compare/v0.2.0...v0.2.1) @@ -207,16 +288,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build(deps): bump metascraper-publisher from 5.8.7 to 5.8.12 in /backend [`#2592`](https://github.com/Human-Connection/Human-Connection/pull/2592) - build(deps-dev): bump @babel/preset-env from 7.7.6 to 7.7.7 in /backend [`#2568`](https://github.com/Human-Connection/Human-Connection/pull/2568) - Fix imageAspectRatio set to null UpdatePost [`#2588`](https://github.com/Human-Connection/Human-Connection/pull/2588) +- Update to version 0.2.0 [`#2584`](https://github.com/Human-Connection/Human-Connection/pull/2584) - fixes #2659 [`#2659`](https://github.com/Human-Connection/Human-Connection/issues/2659) +- Convert block/unblock to blacklist/whitelist [`c297b83`](https://github.com/Human-Connection/Human-Connection/commit/c297b83f873edc61ddec370633b9b65896c56591) +- Rename blacklist/whitelist to mute/unmute [`ba3e9e1`](https://github.com/Human-Connection/Human-Connection/commit/ba3e9e1025bf432151c9bf1002045179b338ff7f) - build(deps-dev): bump storybook-design-token in /webapp [`88d39c4`](https://github.com/Human-Connection/Human-Connection/commit/88d39c4a427cb86527b06201f3f5e96d53ac09a0) -- manage button states and color schemes with mixin [`1b9249c`](https://github.com/Human-Connection/Human-Connection/commit/1b9249c685e34eb2e94b31ee0ec22421c6aa6a73) -- Specs for Searches [`bc3aa51`](https://github.com/Human-Connection/Human-Connection/commit/bc3aa519d0e7a6e0242ecd37d611fd1a3df385d0) #### [v0.2.0](https://github.com/Human-Connection/Human-Connection/compare/v0.1.13...v0.2.0) > 19 December 2019 -- Update to version 0.2.0 [`#2584`](https://github.com/Human-Connection/Human-Connection/pull/2584) - build(deps): bump metascraper-image from 5.8.10 to 5.8.12 in /backend [`#2556`](https://github.com/Human-Connection/Human-Connection/pull/2556) - build(deps-dev): bump @babel/core from 7.7.5 to 7.7.7 [`#2569`](https://github.com/Human-Connection/Human-Connection/pull/2569) - build(deps-dev): bump @babel/cli from 7.7.5 to 7.7.7 in /backend [`#2576`](https://github.com/Human-Connection/Human-Connection/pull/2576) @@ -303,7 +384,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Fix search by adding result id [`ebc5cf3`](https://github.com/Human-Connection/Human-Connection/commit/ebc5cf392d92acf3a9e22c8967d02ea2cf6fd7fb) - Write test/refactor tests/resolvers/middleware [`d375ebe`](https://github.com/Human-Connection/Human-Connection/commit/d375ebe7d90e3251b17f59ffba8fb1470923ebe8) -#### [v0.1.12](https://github.com/Human-Connection/Human-Connection/compare/v0.1.11...v0.1.12) +#### [v0.1.12](https://github.com/Human-Connection/Human-Connection/compare/v0.1.10...v0.1.12) > 10 December 2019 @@ -413,16 +494,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - 2329 normalize emails in login form [`#2330`](https://github.com/Human-Connection/Human-Connection/pull/2330) - Lokalise: Translations update [`#2327`](https://github.com/Human-Connection/Human-Connection/pull/2327) - Changed translation must change test :( [`#2310`](https://github.com/Human-Connection/Human-Connection/pull/2310) -- Merge pull request #2443 from Human-Connection/2237-longer-comments [`#2237`](https://github.com/Human-Connection/Human-Connection/issues/2237) -- fix #2329: Normalize email on login in the backend [`#2329`](https://github.com/Human-Connection/Human-Connection/issues/2329) -- Lokalise: update of webapp/locales/ru.json [`3e52ee0`](https://github.com/Human-Connection/Human-Connection/commit/3e52ee090c88c357b796895370d126f8bb5529f0) -- Lokalise: update of webapp/locales/de.json [`d2b3396`](https://github.com/Human-Connection/Human-Connection/commit/d2b3396e9b44bac0e767ee970e083d1847426b26) -- Lokalise: update of webapp/locales/pt.json [`bcd9f0e`](https://github.com/Human-Connection/Human-Connection/commit/bcd9f0ec93cfab2661589d72a3b3f38455ec4d51) - -#### [v0.1.11](https://github.com/Human-Connection/Human-Connection/compare/v0.1.10...v0.1.11) - -> 22 November 2019 - - build(deps-dev): bump apollo-server-testing from 2.9.9 to 2.9.12 in /backend [`#2318`](https://github.com/Human-Connection/Human-Connection/pull/2318) - build(deps-dev): bump fuse.js from 3.4.5 to 3.4.6 in /webapp [`#2314`](https://github.com/Human-Connection/Human-Connection/pull/2314) - build(deps-dev): bump eslint-config-prettier from 6.6.0 to 6.7.0 in /webapp [`#2302`](https://github.com/Human-Connection/Human-Connection/pull/2302) @@ -472,11 +543,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build(deps-dev): bump eslint from 5.16.0 to 6.6.0 in /webapp [`#2205`](https://github.com/Human-Connection/Human-Connection/pull/2205) - Add locale to undefined to null [`#2233`](https://github.com/Human-Connection/Human-Connection/pull/2233) - Update to version 0.1.10 [`#2231`](https://github.com/Human-Connection/Human-Connection/pull/2231) +- Merge pull request #2443 from Human-Connection/2237-longer-comments [`#2237`](https://github.com/Human-Connection/Human-Connection/issues/2237) +- fix #2329: Normalize email on login in the backend [`#2329`](https://github.com/Human-Connection/Human-Connection/issues/2329) - Fix #2294 [`#2294`](https://github.com/Human-Connection/Human-Connection/issues/2294) - Merge pull request #2078 from Human-Connection/fix-2042-back-link [`#2042`](https://github.com/Human-Connection/Human-Connection/issues/2042) -- Tell github-linguists to ignore snapshots [`978347b`](https://github.com/Human-Connection/Human-Connection/commit/978347ba7b5a6aa1bc915ada972ffffa2816d37c) -- Lokalise: update of webapp/locales/ru.json [`906e851`](https://github.com/Human-Connection/Human-Connection/commit/906e8518bf060134150187fb1574ac50ffd502f6) -- set up global localVue [`77f4810`](https://github.com/Human-Connection/Human-Connection/commit/77f4810ddc963386bc68d3e8a5e078ef4cf270b2) +- Move components to components/features [`2357028`](https://github.com/Human-Connection/Human-Connection/commit/235702867d97b44dac37f8059f9194e23ba7f47d) +- Basic Search Is Working For Users And Posts [`72e4d0a`](https://github.com/Human-Connection/Human-Connection/commit/72e4d0abbcb9abab07f3fd12876453eb1de5da4c) +- Add missing unit tests/refactor code [`b364065`](https://github.com/Human-Connection/Human-Connection/commit/b3640659bb608cc34edc6f2aca350f07dd2b9ce6) #### [v0.1.10](https://github.com/Human-Connection/Human-Connection/compare/v0.1.9...v0.1.10) @@ -536,8 +609,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Update feature template [`#2116`](https://github.com/Human-Connection/Human-Connection/pull/2116) - Update to version 0.1.9 [`#2114`](https://github.com/Human-Connection/Human-Connection/pull/2114) - remove package-lock.json [`3cf3c31`](https://github.com/Human-Connection/Human-Connection/commit/3cf3c31808dc6ae59fb9c6ec33e9e178c5556438) -- add current file [`26c0d4d`](https://github.com/Human-Connection/Human-Connection/commit/26c0d4d83e4418a2378e05b66b6b47461f82735f) -- Finish portuguese translations [`15c671c`](https://github.com/Human-Connection/Human-Connection/commit/15c671c4a8aae86317896ca30601389504bce9e1) +- Extract AvatarMenu into its own component [`994a0b0`](https://github.com/Human-Connection/Human-Connection/commit/994a0b049d1803784d9c06383872f1c9e33095a0) +- Add notifications page with Notifications in table [`7cdc12f`](https://github.com/Human-Connection/Human-Connection/commit/7cdc12f4b9943062e15a874dd39f8a50142b6c61) #### [v0.1.9](https://github.com/Human-Connection/Human-Connection/compare/v0.1.8...v0.1.9) @@ -607,7 +680,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### [v0.1.8](https://github.com/Human-Connection/Human-Connection/compare/v0.1.7...v0.1.8) -> 24 October 2019 +> 25 October 2019 - add FAQ _blank-href in Footer [`#2028`](https://github.com/Human-Connection/Human-Connection/pull/2028) - fix: Don't attempt to save locale if not authenticated [`#2025`](https://github.com/Human-Connection/Human-Connection/pull/2025) @@ -623,9 +696,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build(deps-dev): bump @storybook/addon-a11y from 5.2.4 to 5.2.5 in /webapp [`#1989`](https://github.com/Human-Connection/Human-Connection/pull/1989) - build(deps-dev): bump @vue/cli-shared-utils from 4.0.4 to 4.0.5 in /webapp [`#2002`](https://github.com/Human-Connection/Human-Connection/pull/2002) - Update to version 0.1.7 [`#2015`](https://github.com/Human-Connection/Human-Connection/pull/2015) +- Update to version 0.1.8 [`d45264b`](https://github.com/Human-Connection/Human-Connection/commit/d45264b3afa1557c2205e7ca1b77c778ee37ab5a) - build(deps): bump @nuxtjs/apollo in /webapp [`26c21b5`](https://github.com/Human-Connection/Human-Connection/commit/26c21b5b76c96206d98ff6bbfdbd1ca973ffcd4f) - Finish redesign of moderators report list [`15d28aa`](https://github.com/Human-Connection/Human-Connection/commit/15d28aa8ef84788aa640aac67838380bfacf63b7) -- build(deps-dev): bump @storybook/addon-actions in /webapp [`7e95d37`](https://github.com/Human-Connection/Human-Connection/commit/7e95d376a311a5ede6351d577d30e25aea9cb65d) #### [v0.1.7](https://github.com/Human-Connection/Human-Connection/compare/v0.1.6...v0.1.7) @@ -2064,5 +2137,5 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Merge pull request #93 from Gerald1614/500_error_on_login [`#49`](https://github.com/Human-Connection/Human-Connection/issues/49) - Update schema.graphql [`#7`](https://github.com/Human-Connection/Human-Connection/issues/7) - Refactore the import and hashtags to all unicode characters [`0bc4c55`](https://github.com/Human-Connection/Human-Connection/commit/0bc4c558ae8f01d6d975b8ee1ea7f0f42b056d91) -- Remove package-lock.json [`25bd96e`](https://github.com/Human-Connection/Human-Connection/commit/25bd96eedf6be5b7ea6e94c8433d044e13d62e70) -- Remove Styleguide [`53ea934`](https://github.com/Human-Connection/Human-Connection/commit/53ea93492dcc7f861743cd50a4ddf7728c9d659b) +- Change strategy, only build docker image [`d6b7374`](https://github.com/Human-Connection/Human-Connection/commit/d6b7374ddbf497bdb5cbc935b88ae085c38b3237) +- Copy package.json from webapp/ [`f3a9996`](https://github.com/Human-Connection/Human-Connection/commit/f3a9996962e5dd8b2e365a032c1a5766fe666103) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0926678b..ae1150aa6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,7 +64,7 @@ Regular pair programming sessions * we team up and work on an issue together (often using Visual Studio live sharing sessions) Open-Source Community Meeting -* every Thursday 13:00 +* bi-weekly on Mondays 13:00 (when there is no sprint retrospective) * the link will be posted in the [discord chat](https://discord.gg/6ub73U3) and on the [Agile Ventures website](https://www.agileventures.org/events?utf8=%E2%9C%93&project_id=220&commit=Filter+by+Project) * all contributors welcome! @@ -99,3 +99,34 @@ We believe in open source contributions as a learning experience – everyone is We use pair programming sessions as a tool for knowledge sharing. We can learn a lot from each other and only by sharing what we know and overcoming challenges together can we grow as a team and truly own this project collectively. As a volunteeer you have no commitment except your own self development and your awesomeness by contributing to this free and open-source software project. Cheers to you! + + +## Open-Source Bounties + +There are so many good reasons to contribute to Human Connection +* You learn state-of-the-art technologies +* You build your portfolio +* You contribute to a good cause + +Now there is one more good reason: You can receive a small fincancial +compensation for your contribution! :tada: + +### How it works + +Before you can benefit from the Open-Source bounty program you **must get one +pull request approved and merged for free**. You can choose something really +quick and easy. What's important is starting a working relationship with the +team, learning the workflow, and understanding this contribution guide. You can +filter issues by 'good first issue', to get an idea where to start. Please join +our our [community chat](https://human-connection.org/discord), too. + +You can filter Github issues with label [bounty](https://github.com/Human-Connection/Human-Connection/issues?q=is%3Aopen+is%3Aissue+label%3Abounty). These issues should have a second label `€` +which indicate their respective financial compensation in Euros. + +You can bill us after your pull request got approved and merged into `master`. +Payment methods are up to you: Bank transfer or PayPal is fine for us. Just send +us your invoice as .pdf file attached to an E-Mail once you are done. + +Our Open-Source bounty program is a work-in-progress. Based on our future +experience we will make changes and improvements. So keep an eye on this +contribution guide. diff --git a/README.md b/README.md index eaf71acb8..998f722f0 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,10 @@ Check out the [contribution guideline](./CONTRIBUTING.md), too! [![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/0)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/0)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/1)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/1)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/2)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/2)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/3)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/3)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/4)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/4)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/5)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/5)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/6)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/6)[![](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/images/7)](https://sourcerer.io/fame/roschaefer/Human-Connection/Human-Connection/links/7) +## Open-Source Bounties + +You can get a small financial compensation for your contribution :moneybag: See +details in our [Contribution Guidelines](./CONTRIBUTING.md#open-source-bounties). ## Attributions diff --git a/backend/package.json b/backend/package.json index d33f9e14a..b7d74c102 100644 --- a/backend/package.json +++ b/backend/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@hapi/joi": "^17.1.0", - "@sentry/node": "^5.11.1", + "@sentry/node": "^5.12.3", "apollo-cache-inmemory": "~1.6.5", "apollo-client": "~2.6.8", "apollo-link-context": "~1.0.19", @@ -49,40 +49,40 @@ "bcryptjs": "~2.4.3", "cheerio": "~1.0.0-rc.3", "cors": "~2.8.5", - "cross-env": "~6.0.3", + "cross-env": "~7.0.0", "date-fns": "2.9.0", "debug": "~4.1.1", "dotenv": "~8.2.0", "express": "^4.17.1", "faker": "Marak/faker.js#master", - "graphql": "^14.5.8", + "graphql": "^14.6.0", "graphql-custom-directives": "~0.2.14", "graphql-iso-date": "~3.6.1", "graphql-middleware": "~4.0.2", "graphql-middleware-sentry": "^3.2.1", - "graphql-shield": "~7.0.7", - "graphql-tag": "~2.10.1", + "graphql-shield": "~7.0.9", + "graphql-tag": "~2.10.2", "helmet": "~3.21.2", "jsonwebtoken": "~8.5.1", "linkifyjs": "~2.1.8", "lodash": "~4.17.14", "merge-graphql-schemas": "^1.7.6", - "metascraper": "^5.10.6", - "metascraper-audio": "^5.10.6", - "metascraper-author": "^5.10.6", + "metascraper": "^5.11.0", + "metascraper-audio": "^5.10.7", + "metascraper-author": "^5.10.7", "metascraper-clearbit-logo": "^5.3.0", - "metascraper-date": "^5.10.6", - "metascraper-description": "^5.10.6", - "metascraper-image": "^5.10.6", - "metascraper-lang": "^5.10.6", + "metascraper-date": "^5.10.7", + "metascraper-description": "^5.11.0", + "metascraper-image": "^5.10.7", + "metascraper-lang": "^5.10.7", "metascraper-lang-detector": "^4.10.2", - "metascraper-logo": "^5.10.6", - "metascraper-publisher": "^5.10.6", - "metascraper-soundcloud": "^5.10.6", - "metascraper-title": "^5.10.6", - "metascraper-url": "^5.10.6", - "metascraper-video": "^5.10.6", - "metascraper-youtube": "^5.10.6", + "metascraper-logo": "^5.10.7", + "metascraper-publisher": "^5.10.7", + "metascraper-soundcloud": "^5.10.7", + "metascraper-title": "^5.10.7", + "metascraper-url": "^5.10.7", + "metascraper-video": "^5.10.7", + "metascraper-youtube": "^5.10.7", "migrate": "^1.6.2", "minimatch": "^3.0.4", "mustache": "^4.0.0", @@ -95,20 +95,20 @@ "npm-run-all": "~4.1.5", "request": "~2.88.0", "sanitize-html": "~1.21.1", - "slug": "~2.1.0", + "slug": "~2.1.1", "subscriptions-transport-ws": "^0.9.16", "trunc-html": "~1.1.2", "uuid": "~3.4.0", - "validator": "^12.1.0", + "validator": "^12.2.0", "wait-on": "~4.0.0", "xregexp": "^4.2.4" }, "devDependencies": { - "@babel/cli": "~7.8.3", - "@babel/core": "~7.8.3", - "@babel/node": "~7.8.3", + "@babel/cli": "~7.8.4", + "@babel/core": "~7.8.4", + "@babel/node": "~7.8.4", "@babel/plugin-proposal-throw-expressions": "^7.8.3", - "@babel/preset-env": "~7.8.3", + "@babel/preset-env": "~7.8.4", "@babel/register": "^7.8.3", "apollo-server-testing": "~2.9.16", "babel-core": "~7.0.0-0", @@ -117,9 +117,9 @@ "chai": "~4.2.0", "cucumber": "~6.0.5", "eslint": "~6.8.0", - "eslint-config-prettier": "~6.9.0", + "eslint-config-prettier": "~6.10.0", "eslint-config-standard": "~14.1.0", - "eslint-plugin-import": "~2.20.0", + "eslint-plugin-import": "~2.20.1", "eslint-plugin-jest": "~23.6.0", "eslint-plugin-node": "~11.0.0", "eslint-plugin-prettier": "~3.1.2", diff --git a/backend/src/db/migrate/template.js b/backend/src/db/migrate/template.js index b8511e9bb..1d63673b4 100644 --- a/backend/src/db/migrate/template.js +++ b/backend/src/db/migrate/template.js @@ -2,30 +2,44 @@ import { getDriver } from '../../db/neo4j' export const description = '' -export function up(next) { +export async function up(next) { const driver = getDriver() const session = driver.session() + const transaction = session.beginTransaction() + try { // Implement your migration here. + await transaction.run(``) + await transaction.commit() next() - } catch (err) { - next(err) + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + await transaction.rollback() + // eslint-disable-next-line no-console + console.log('rolled back') } finally { session.close() - driver.close() } } -export function down(next) { +export async function down(next) { const driver = getDriver() const session = driver.session() + const transaction = session.beginTransaction() + try { - // Rollback your migration here. + // Implement your migration here. + await transaction.run(``) + await transaction.commit() next() - } catch (err) { - next(err) + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + await transaction.rollback() + // eslint-disable-next-line no-console + console.log('rolled back') } finally { session.close() - driver.close() } } diff --git a/backend/src/db/migrations/20200123150105-merge_duplicate_user_accounts.js b/backend/src/db/migrations/20200123150105-merge_duplicate_user_accounts.js index ec38befc5..377f971e9 100644 --- a/backend/src/db/migrations/20200123150105-merge_duplicate_user_accounts.js +++ b/backend/src/db/migrations/20200123150105-merge_duplicate_user_accounts.js @@ -34,12 +34,11 @@ export function up(next) { return txc .run( ` - MATCH (oldUser:User)-[:PRIMARY_EMAIL]->(oldEmail:EmailAddress {email: $email}), (oldUser)-[previousRelationship]-(oldEmail) + MATCH (oldUser:User)-[:PRIMARY_EMAIL]->(oldEmail:EmailAddress {email: $email}) MATCH (user:User)-[:PRIMARY_EMAIL]->(email:EmailAddress {email: $normalizedEmail}) - DELETE previousRelationship WITH oldUser, oldEmail, user, email - CALL apoc.refactor.mergeNodes([user, oldUser], { properties: 'discard', mergeRels: true }) YIELD node as mergedUser - CALL apoc.refactor.mergeNodes([email, oldEmail], { properties: 'discard', mergeRels: true }) YIELD node as mergedEmail + CALL apoc.refactor.mergeNodes([user, oldUser], { properties: { createdAt: 'overwrite', \`.*\`: 'discard' }, mergeRels: true }) YIELD node as mergedUser + CALL apoc.refactor.mergeNodes([email, oldEmail], { properties: { createdAt: 'overwrite', verifiedAt: 'overwrite', \`.*\`: 'discard' }, mergeRels: true }) YIELD node as mergedEmail RETURN user {.*}, email {.*} `, { email, normalizedEmail }, diff --git a/backend/src/db/migrations/20200127110135-create_muted_relationship_between_existing_blocked_relationships.js b/backend/src/db/migrations/20200127110135-create_muted_relationship_between_existing_blocked_relationships.js new file mode 100644 index 000000000..ce46be9d6 --- /dev/null +++ b/backend/src/db/migrations/20200127110135-create_muted_relationship_between_existing_blocked_relationships.js @@ -0,0 +1,46 @@ +import { getDriver } from '../../db/neo4j' + +export const description = ` + This migration creates a MUTED relationship between two edges(:User) that have a pre-existing BLOCKED relationship. + It also sets the createdAt date for the BLOCKED relationship to the datetime the migration was run. This became + necessary after we redefined what it means to block someone, and what it means to mute them. Muting is about filtering + another user's content, whereas blocking means preventing that user from interacting with you/your contributions. + A blocked user will still be able to see your contributions, but will not be able to interact with them and vice versa. +` + +export async function up(next) { + const driver = getDriver() + const session = driver.session() + const transaction = session.beginTransaction() + try { + await transaction.run( + ` + MATCH (blocker:User)-[blocked:BLOCKED]->(blockee:User) + MERGE (blocker)-[muted:MUTED]->(blockee) + SET muted.createdAt = toString(datetime()), blocked.createdAt = toString(datetime()) + `, + ) + await transaction.commit() + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + await transaction.rollback() + // eslint-disable-next-line no-console + console.log('rolled back') + } finally { + session.close() + } +} + +export function down(next) { + const driver = getDriver() + const session = driver.session() + try { + // Rollback your migration here. + next() + } catch (err) { + next(err) + } finally { + session.close() + } +} diff --git a/backend/src/factories/posts.js b/backend/src/factories/posts.js index 3295665b7..d997b738f 100644 --- a/backend/src/factories/posts.js +++ b/backend/src/factories/posts.js @@ -55,7 +55,19 @@ export default function create() { if (authorId) author = await neodeInstance.find('User', authorId) author = author || (await factoryInstance.create('User')) const post = await neodeInstance.create('Post', args) + + const { commentContent } = args + let comment + delete args.commentContent + if (commentContent) + comment = await factoryInstance.create('Comment', { + contentExcerpt: commentContent, + post, + author, + }) + await post.relateTo(author, 'author') + if (comment) await post.relateTo(comment, 'comments') if (args.pinned) { args.pinnedAt = args.pinnedAt || new Date().toISOString() diff --git a/backend/src/middleware/notifications/notificationsMiddleware.js b/backend/src/middleware/notifications/notificationsMiddleware.js index ca59be780..d20873ceb 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.js @@ -54,7 +54,7 @@ const notifyUsersOfMention = async (label, id, idsOfUsers, reason, context) => { MATCH (post: Post { id: $id })<-[:WROTE]-(author: User) MATCH (user: User) WHERE user.id in $idsOfUsers - AND NOT (user)<-[:BLOCKED]-(author) + AND NOT (user)-[:BLOCKED]-(author) MERGE (post)-[notification:NOTIFIED {reason: $reason}]->(user) ` break @@ -64,8 +64,8 @@ const notifyUsersOfMention = async (label, id, idsOfUsers, reason, context) => { MATCH (postAuthor: User)-[:WROTE]->(post: Post)<-[:COMMENTS]-(comment: Comment { id: $id })<-[:WROTE]-(author: User) MATCH (user: User) WHERE user.id in $idsOfUsers - AND NOT (user)<-[:BLOCKED]-(author) - AND NOT (user)<-[:BLOCKED]-(postAuthor) + AND NOT (user)-[:BLOCKED]-(author) + AND NOT (user)-[:BLOCKED]-(postAuthor) MERGE (comment)-[notification:NOTIFIED {reason: $reason}]->(user) ` break diff --git a/backend/src/middleware/permissionsMiddleware.js b/backend/src/middleware/permissionsMiddleware.js index 50ec5aa75..755ddabf8 100644 --- a/backend/src/middleware/permissionsMiddleware.js +++ b/backend/src/middleware/permissionsMiddleware.js @@ -102,6 +102,7 @@ export default shield( PostsEmotionsCountByEmotion: allow, PostsEmotionsByCurrentUser: isAuthenticated, mutedUsers: isAuthenticated, + blockedUsers: isAuthenticated, notifications: isAuthenticated, Donations: isAuthenticated, }, @@ -139,6 +140,8 @@ export default shield( RemovePostEmotions: isAuthenticated, muteUser: isAuthenticated, unmuteUser: isAuthenticated, + blockUser: isAuthenticated, + unblockUser: isAuthenticated, markAsRead: isAuthenticated, AddEmailAddress: isAuthenticated, VerifyEmailAddress: isAuthenticated, diff --git a/backend/src/middleware/xssMiddleware.js b/backend/src/middleware/xssMiddleware.js index 9b4e3e759..1292abb67 100644 --- a/backend/src/middleware/xssMiddleware.js +++ b/backend/src/middleware/xssMiddleware.js @@ -20,6 +20,7 @@ function clean(dirty) { 'hr', 'b', 'i', + 'u', 'em', 'strong', 'a', diff --git a/backend/src/models/Post.js b/backend/src/models/Post.js index 2b553232e..154456cf1 100644 --- a/backend/src/models/Post.js +++ b/backend/src/models/Post.js @@ -41,6 +41,16 @@ export default { language: { type: 'string', allow: [null] }, imageBlurred: { type: 'boolean', default: false }, imageAspectRatio: { type: 'float', default: 1.0 }, + comments: { + type: 'relationship', + relationship: 'COMMENTS', + target: 'Comment', + direction: 'in', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + updatedAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + }, + }, pinned: { type: 'boolean', default: null, valid: [null, true] }, pinnedAt: { type: 'string', isoDate: true }, } diff --git a/backend/src/models/User.js b/backend/src/models/User.js index c3ac434ec..055cbfc83 100644 --- a/backend/src/models/User.js +++ b/backend/src/models/User.js @@ -77,12 +77,18 @@ export default { relationship: 'BLOCKED', target: 'User', direction: 'out', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + }, }, muted: { type: 'relationship', relationship: 'MUTED', target: 'User', direction: 'out', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + }, }, notifications: { type: 'relationship', diff --git a/backend/src/schema/resolvers/searches.js b/backend/src/schema/resolvers/searches.js index 5316ccd9a..994d19fa2 100644 --- a/backend/src/schema/resolvers/searches.js +++ b/backend/src/schema/resolvers/searches.js @@ -20,7 +20,7 @@ export default { AND NOT ( author.deleted = true OR author.disabled = true OR resource.deleted = true OR resource.disabled = true - OR (:User { id: $thisUserId })-[:BLOCKED]-(author) + OR (:User {id: $thisUserId})-[:MUTED]->(author) ) WITH resource, author, [(resource)<-[:COMMENTS]-(comment:Comment) | comment] as comments, @@ -40,8 +40,7 @@ export default { YIELD node as resource, score MATCH (resource) WHERE score >= 0.5 - AND NOT (resource.deleted = true OR resource.disabled = true - OR (:User { id: $thisUserId })-[:BLOCKED]-(resource)) + AND NOT (resource.deleted = true OR resource.disabled = true) RETURN resource {.*, __typename: labels(resource)[0]} LIMIT $limit ` diff --git a/backend/src/schema/resolvers/users.js b/backend/src/schema/resolvers/users.js index 4af60f014..d1d9111b6 100644 --- a/backend/src/schema/resolvers/users.js +++ b/backend/src/schema/resolvers/users.js @@ -23,6 +23,21 @@ export const getMutedUsers = async context => { return mutedUsers } +export const getBlockedUsers = async context => { + const { neode } = context + const userModel = neode.model('User') + let blockedUsers = neode + .query() + .match('user', userModel) + .where('user.id', context.user.id) + .relationship(userModel.relationships().get('blocked')) + .to('blocked', userModel) + .return('blocked') + blockedUsers = await blockedUsers.execute() + blockedUsers = blockedUsers.records.map(r => r.get('blocked').properties) + return blockedUsers +} + export default { Query: { mutedUsers: async (object, args, context, resolveInfo) => { @@ -32,6 +47,13 @@ export default { throw new UserInputError(e.message) } }, + blockedUsers: async (object, args, context, resolveInfo) => { + try { + return getBlockedUsers(context) + } catch (e) { + throw new UserInputError(e.message) + } + }, User: async (object, args, context, resolveInfo) => { const { email } = args if (email) { @@ -86,7 +108,7 @@ export default { const unmutedUser = await neode.find('User', params.id) return unmutedUser.toJson() }, - block: async (object, args, context, resolveInfo) => { + blockUser: async (object, args, context, resolveInfo) => { const { user: currentUser } = context if (currentUser.id === args.id) return null await neode.cypher( @@ -103,7 +125,7 @@ export default { await user.relateTo(blockedUser, 'blocked') return blockedUser.toJson() }, - unblock: async (object, args, context, resolveInfo) => { + unblockUser: async (object, args, context, resolveInfo) => { const { user: currentUser } = context if (currentUser.id === args.id) return null await neode.cypher( @@ -229,7 +251,7 @@ export default { boolean: { followedByCurrentUser: 'MATCH (this)<-[:FOLLOWS]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', - isBlocked: + blocked: 'MATCH (this)<-[:BLOCKED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', isMuted: 'MATCH (this)<-[:MUTED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', diff --git a/backend/src/schema/types/type/User.gql b/backend/src/schema/types/type/User.gql index 4eb04a638..71cc1edb0 100644 --- a/backend/src/schema/types/type/User.gql +++ b/backend/src/schema/types/type/User.gql @@ -68,10 +68,11 @@ type User { RETURN COUNT(u) >= 1 """ ) - isBlocked: Boolean! @cypher( + + blocked: Boolean! @cypher( statement: """ - MATCH (this)<-[: BLOCKED]-(u: User { id: $cypherParams.currentUserId}) - RETURN COUNT(u) >= 1 + MATCH (this)-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId}) + RETURN COUNT(user) >= 1 """ ) @@ -207,6 +208,6 @@ type Mutation { muteUser(id: ID!): User unmuteUser(id: ID!): User - block(id: ID!): User - unblock(id: ID!): User + blockUser(id: ID!): User + unblockUser(id: ID!): User } diff --git a/backend/yarn.lock b/backend/yarn.lock index 9d3e0e571..68e70fea6 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -33,10 +33,10 @@ resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.24.tgz#3ce939cb127fb8aaa3ffc1e90dff9b8af9f2e3dc" integrity sha512-8GqG48m1XqyXh4mIZrtB5xOhUwSsh1WsrrsaZQOEYYql3YN9DEu9OOSg0ILzXHZo/h2Q74777YE4YzlArQzQEQ== -"@babel/cli@~7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.3.tgz#121beb7c273e0521eb2feeb3883a2b7435d12328" - integrity sha512-K2UXPZCKMv7KwWy9Bl4sa6+jTNP7JyDiHKzoOiUUygaEDbC60vaargZDnO9oFMvlq8pIKOOyUUgeMYrsaN9djA== +"@babel/cli@~7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.4.tgz#505fb053721a98777b2b175323ea4f090b7d3c1c" + integrity sha512-XXLgAm6LBbaNxaGhMAznXXaxtCWfuv6PIDJ9Alsy9JYTOh+j2jJz+L/162kkfU1j/pTSxK1xGmlwI4pdIMkoag== dependencies: commander "^4.0.1" convert-source-map "^1.1.0" @@ -56,26 +56,26 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.0", "@babel/compat-data@^7.8.1": - version "7.8.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.1.tgz#fc0bbbb7991e4fb2b47e168e60f2cc2c41680be9" - integrity sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw== +"@babel/compat-data@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.4.tgz#bbe65d05a291667a8394fe8a0e0e277ef22b0d2a" + integrity sha512-lHLhlsvFjJAqNU71b7k6Vv9ewjmTXKvqaMv7n0G1etdCabWLw3nEYE8mmgoVOxMIFE07xOvo7H7XBASirX6Rrg== dependencies: - browserslist "^4.8.2" + browserslist "^4.8.5" invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@~7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" - integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== +"@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@~7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" + integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" - "@babel/helpers" "^7.8.3" - "@babel/parser" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.4" "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" + "@babel/traverse" "^7.8.4" "@babel/types" "^7.8.3" convert-source-map "^1.7.0" debug "^4.1.0" @@ -86,10 +86,10 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03" - integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug== +"@babel/generator@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" + integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== dependencies: "@babel/types" "^7.8.3" jsesc "^2.5.1" @@ -120,15 +120,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-compilation-targets@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz#2deedc816fd41dca7355ef39fd40c9ea69f0719a" - integrity sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw== +"@babel/helper-compilation-targets@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz#03d7ecd454b7ebe19a254f76617e61770aed2c88" + integrity sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg== dependencies: - "@babel/compat-data" "^7.8.1" - browserslist "^4.8.2" + "@babel/compat-data" "^7.8.4" + browserslist "^4.8.5" invariant "^2.2.4" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" "@babel/helper-create-regexp-features-plugin@^7.8.3": @@ -270,13 +270,13 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.3.tgz#382fbb0382ce7c4ce905945ab9641d688336ce85" - integrity sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ== +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" + "@babel/traverse" "^7.8.4" "@babel/types" "^7.8.3" "@babel/highlight@^7.8.3": @@ -288,10 +288,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/node@~7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.8.3.tgz#29784d445e135ca7214a9ac40535f2b8d2f980aa" - integrity sha512-GZpHg1gPnZTk1PvHRc4g/M5c50nHERkk3ojb5AuUTZFAjEKzDhBJcqvwWa7NrNT3W3Nf8t8Sj8JjA6rtXJ1z/g== +"@babel/node@~7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.8.4.tgz#59b2ed7e5a9df2224592f83292d77d616fbf1ab8" + integrity sha512-MlczXI/VYRnoaWHjicqrzq2z4DhRPaWQIC+C3ISEQs5z+mEccBsn7IAI5Q97ZDTnFYw6ts5IUTzqArilC/g7nw== dependencies: "@babel/register" "^7.8.3" commander "^4.0.1" @@ -302,10 +302,10 @@ resolve "^1.13.1" v8flags "^3.1.1" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" - integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" + integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -532,10 +532,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-for-of@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz#15f17bce2fc95c7d59a24b299e83e81cedc22e18" - integrity sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA== +"@babel/plugin-transform-for-of@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d" + integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -620,10 +620,10 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz#7890576a13b17325d8b7d44cb37f21dc3bbdda59" - integrity sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q== +"@babel/plugin-transform-parameters@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz#1d5155de0b65db0ccf9971165745d3bb990d77d3" + integrity sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA== dependencies: "@babel/helper-call-delegate" "^7.8.3" "@babel/helper-get-function-arity" "^7.8.3" @@ -680,10 +680,10 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-typeof-symbol@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz#5cffb216fb25c8c64ba6bf5f76ce49d3ab079f4d" - integrity sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g== +"@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" + integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -695,13 +695,13 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@~7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.3.tgz#dc0fb2938f52bbddd79b3c861a4b3427dd3a6c54" - integrity sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg== +"@babel/preset-env@~7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.4.tgz#9dac6df5f423015d3d49b6e9e5fa3413e4a72c4e" + integrity sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w== dependencies: - "@babel/compat-data" "^7.8.0" - "@babel/helper-compilation-targets" "^7.8.3" + "@babel/compat-data" "^7.8.4" + "@babel/helper-compilation-targets" "^7.8.4" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -730,7 +730,7 @@ "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.8.4" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" @@ -741,7 +741,7 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.4" "@babel/plugin-transform-property-literals" "^7.8.3" "@babel/plugin-transform-regenerator" "^7.8.3" "@babel/plugin-transform-reserved-words" "^7.8.3" @@ -749,13 +749,13 @@ "@babel/plugin-transform-spread" "^7.8.3" "@babel/plugin-transform-sticky-regex" "^7.8.3" "@babel/plugin-transform-template-literals" "^7.8.3" - "@babel/plugin-transform-typeof-symbol" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/types" "^7.8.3" - browserslist "^4.8.2" + browserslist "^4.8.5" core-js-compat "^3.6.2" invariant "^2.2.2" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" "@babel/register@^7.8.3": @@ -793,16 +793,16 @@ "@babel/parser" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" - integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" + integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" + "@babel/generator" "^7.8.4" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.3" + "@babel/parser" "^7.8.4" "@babel/types" "^7.8.3" debug "^4.1.0" globals "^11.1.0" @@ -1175,10 +1175,10 @@ url-regex "~4.1.1" video-extensions "~1.1.0" -"@metascraper/helpers@^5.10.6": - version "5.10.6" - resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.10.6.tgz#0b786607212925a577926fd0cd0313a49de3499c" - integrity sha512-/jvhlM3RKGYMoUK8D8S1r3tN03/EYizCqWF7zDx0aBMC8Ihp33DRGs9oNdsgkgwzVF7O/YpDm55l9K+qVJlsyQ== +"@metascraper/helpers@^5.10.7": + version "5.10.7" + resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.10.7.tgz#4d330204372ce5c1afedfc3ac891fb373f72c085" + integrity sha512-YkL4vTF4grgNTFhe9t4qsD0c5aEjxWoC0cpvMICs6JriRtedwjVfiwWhaGiTbU3pGFhmLgE9fV42wXOXGUGjMQ== dependencies: audio-extensions "0.0.0" chrono-node "~1.4.2" @@ -1194,7 +1194,7 @@ lodash "~4.17.15" memoize-one "~5.1.1" mime-types "~2.1.26" - normalize-url "~4.5.0" + normalize-url "~5.0.0" smartquotes "~2.3.1" title "~3.4.1" truncate "~2.1.0" @@ -1275,83 +1275,83 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@sentry/apm@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.11.1.tgz#cc89fa4150056fbf009f92eca94fccc3980db34e" - integrity sha512-4iZH11p/7w9IMLT9hqNY1+EqLESltiIoF6/YsbpK93sXWGEs8VQ83IuvGuKWxajvHgDmj4ND0TxIliTsYqTqFw== +"@sentry/apm@5.12.3": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.12.3.tgz#23a5e9c771a8748f59426a1d0f8b1fbb9b72a717" + integrity sha512-OSGEeo4b1Gsu/TUcWMx9vmgSnQvR+zM+1Iwq5xFQAK2ET3Y4gBFqZ1iRt2hxlzr8KCQmQTQc1mao1X0tmidFQg== dependencies: - "@sentry/browser" "5.11.1" - "@sentry/hub" "5.11.1" - "@sentry/minimal" "5.11.1" - "@sentry/types" "5.11.0" - "@sentry/utils" "5.11.1" + "@sentry/browser" "5.12.1" + "@sentry/hub" "5.12.0" + "@sentry/minimal" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" tslib "^1.9.3" -"@sentry/browser@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.11.1.tgz#337ffcb52711b23064c847a07629e966f54a5ebb" - integrity sha512-oqOX/otmuP92DEGRyZeBuQokXdeT9HQRxH73oqIURXXNLMP3PWJALSb4HtT4AftEt/2ROGobZLuA4TaID6My/Q== +"@sentry/browser@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.12.1.tgz#dc1f268595269fb7277f55eb625c7e92d76dc01b" + integrity sha512-Zl7VdppUxctyaoqMSEhnDJp2rrupx8n8N2n3PSooH74yhB2Z91nt84mouczprBsw3JU1iggGyUw9seRFzDI1hw== dependencies: - "@sentry/core" "5.11.1" - "@sentry/types" "5.11.0" - "@sentry/utils" "5.11.1" + "@sentry/core" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" tslib "^1.9.3" -"@sentry/core@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.11.1.tgz#9e2da485e196ae32971545c1c49ee6fe719930e2" - integrity sha512-BpvPosVNT20Xso4gAV54Lu3KqDmD20vO63HYwbNdST5LUi8oYV4JhvOkoBraPEM2cbBwQvwVcFdeEYKk4tin9A== +"@sentry/core@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.12.0.tgz#d6380c4ef7beee5f418ac1d0e5be86a2de2af449" + integrity sha512-wY4rsoX71QsGpcs9tF+OxKgDPKzIFMRvFiSRcJoPMfhFsTilQ/CBMn/c3bDtWQd9Bnr/ReQIL6NbnIjUsPHA4Q== dependencies: - "@sentry/hub" "5.11.1" - "@sentry/minimal" "5.11.1" - "@sentry/types" "5.11.0" - "@sentry/utils" "5.11.1" + "@sentry/hub" "5.12.0" + "@sentry/minimal" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" tslib "^1.9.3" -"@sentry/hub@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.11.1.tgz#ddcb865563fae53852d405885c46b4c6de68a91b" - integrity sha512-ucKprYCbGGLLjVz4hWUqHN9KH0WKUkGf5ZYfD8LUhksuobRkYVyig0ZGbshECZxW5jcDTzip4Q9Qimq/PkkXBg== +"@sentry/hub@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.12.0.tgz#5e8c8f249f5bdbeb8cc4ec02c2ccc53a67f2cc02" + integrity sha512-3k7yE8BEVJsKx8mR4LcI4IN0O8pngmq44OcJ/fRUUBAPqsT38jsJdP2CaWhdlM1jiNUzUDB1ktBv6/lY+VgcoQ== dependencies: - "@sentry/types" "5.11.0" - "@sentry/utils" "5.11.1" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" tslib "^1.9.3" -"@sentry/minimal@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.11.1.tgz#0e705d01a567282d8fbbda2aed848b4974cc3cec" - integrity sha512-HK8zs7Pgdq7DsbZQTThrhQPrJsVWzz7MaluAbQA0rTIAJ3TvHKQpsVRu17xDpjZXypqWcKCRsthDrC4LxDM1Bg== +"@sentry/minimal@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.12.0.tgz#2611e2aa520c1edb7999e6de51bd65ec66341757" + integrity sha512-fk73meyz4k4jCg9yzbma+WkggsfEIQWI2e2TWfYsRGcrV3RnlSrXyM4D91/A8Bjx10SNezHPUFHjasjlHXOkyA== dependencies: - "@sentry/hub" "5.11.1" - "@sentry/types" "5.11.0" + "@sentry/hub" "5.12.0" + "@sentry/types" "5.12.0" tslib "^1.9.3" -"@sentry/node@^5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.11.1.tgz#2a9c18cd1209cfdf7a69b9d91303413149d2c910" - integrity sha512-FbJs0blJ36gEzE0rc2yBfA/KE+kXOLl8MUfFTcyJCBdCGF8XMETDCmgINnJ4TyBUJviwKoPw2TCk9TL2pa/A1w== +"@sentry/node@^5.12.3": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.12.3.tgz#4a4934b04c5163fc340312eaf0d152990aa7140f" + integrity sha512-QwqN+i6IC3/YrNq7kqxH7YiXtZYY8tBuJqFi84WbiMHF7MAqxMSPNQJGfX2GJuMHKHwn6IZdgSE8+FkfN9zGLQ== dependencies: - "@sentry/apm" "5.11.1" - "@sentry/core" "5.11.1" - "@sentry/hub" "5.11.1" - "@sentry/types" "5.11.0" - "@sentry/utils" "5.11.1" + "@sentry/apm" "5.12.3" + "@sentry/core" "5.12.0" + "@sentry/hub" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" cookie "^0.3.1" https-proxy-agent "^4.0.0" lru_map "^0.3.3" tslib "^1.9.3" -"@sentry/types@5.11.0": - version "5.11.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.11.0.tgz#40f0f3174362928e033ddd9725d55e7c5cb7c5b6" - integrity sha512-1Uhycpmeo1ZK2GLvrtwZhTwIodJHcyIS6bn+t4IMkN9MFoo6ktbAfhvexBDW/IDtdLlCGJbfm8nIZerxy0QUpg== +"@sentry/types@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.12.0.tgz#5367e53c74261beea01502e3f7b6f3d822682a31" + integrity sha512-aZbBouBLrKB8wXlztriIagZNmsB+wegk1Jkl6eprqRW/w24Sl/47tiwH8c5S4jYTxdAiJk+SAR10AAuYmIN3zg== -"@sentry/utils@5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.11.1.tgz#aa19fcc234cf632257b2281261651d2fac967607" - integrity sha512-O0Zl4R2JJh8cTkQ8ZL2cDqGCmQdpA5VeXpuBbEl1v78LQPkBDISi35wH4mKmLwMsLBtTVpx2UeUHBj0KO5aLlA== +"@sentry/utils@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.12.0.tgz#62967f934a3ee6d21472eac0219084e37225933e" + integrity sha512-fYUadGLbfTCbs4OG5hKCOtv2jrNE4/8LHNABy9DwNJ/t5DVtGqWAZBnxsC+FG6a3nVqCpxjFI9AHlYsJ2wsf7Q== dependencies: - "@sentry/types" "5.11.0" + "@sentry/types" "5.12.0" tslib "^1.9.3" "@sindresorhus/is@^0.14.0": @@ -1607,10 +1607,10 @@ dependencies: "@types/yargs-parser" "*" -"@types/yup@0.26.27": - version "0.26.27" - resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.26.27.tgz#b928b1d644ffe98766e1440131222aefd3ca8f89" - integrity sha512-Rlsq3DExOHfWur75nQUAa5I0fXA2vSrw0u0qK3SI4PAkyOWjNzZsTaK+U9/sofWm3ttwWYn+C92pSq0s4rob4w== +"@types/yup@0.26.29": + version "0.26.29" + resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.26.29.tgz#5a533ad6f74e442436698e20b1441c68a7a1c931" + integrity sha512-M81oZOgLap0b0I/BySnpLwHjOj1BFxUKV1ytG2Kqj3jmkh8F3H11PEnk658UniftpjTXdueloOL+KZYn+SMQ9w== "@types/zen-observable@^0.8.0": version "0.8.0" @@ -2461,14 +2461,14 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserslist@^4.8.2, browserslist@^4.8.3: - version "4.8.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" - integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== +browserslist@^4.8.3, browserslist@^4.8.5: + version "4.8.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.6.tgz#96406f3f5f0755d272e27a66f4163ca821590a7e" + integrity sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg== dependencies: - caniuse-lite "^1.0.30001017" - electron-to-chromium "^1.3.322" - node-releases "^1.1.44" + caniuse-lite "^1.0.30001023" + electron-to-chromium "^1.3.341" + node-releases "^1.1.47" bser@^2.0.0: version "2.1.0" @@ -2547,10 +2547,10 @@ camelize@1.0.0: resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30001017: - version "1.0.30001020" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001020.tgz#3f04c1737500ffda78be9beb0b5c1e2070e15926" - integrity sha512-yWIvwA68wRHKanAVS1GjN8vajAv7MBFshullKCeq/eKpK7pJBVDgFFEqvgWTkcP2+wIDeQGYFRXECjKZnLkUjA== +caniuse-lite@^1.0.30001023: + version "1.0.30001023" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz#b82155827f3f5009077bdd2df3d8968bcbcc6fc4" + integrity sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA== capture-exit@^2.0.0: version "2.0.0" @@ -2987,12 +2987,12 @@ create-error-class@^3.0.0: dependencies: capture-stack-trace "^1.0.0" -cross-env@~6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941" - integrity sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag== +cross-env@~7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.0.tgz#5a3b2ddce51ec713ea58f2fb79ce22e65b4f5479" + integrity sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ== dependencies: - cross-spawn "^7.0.0" + cross-spawn "^7.0.1" cross-spawn@^5.0.1: version "5.1.0" @@ -3014,14 +3014,14 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.0.tgz#21ef9470443262f33dba80b2705a91db959b2e03" - integrity sha512-6U/8SMK2FBNnB21oQ4+6Nsodxanw1gTkntYA2zBdkFYFu3ZDx65P2ONEXGSvob/QS6REjVHQ9zxzdOafwFdstw== +cross-spawn@^7.0.0, cross-spawn@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" + integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== dependencies: path-key "^3.1.0" - shebang-command "^1.2.0" - which "^1.2.9" + shebang-command "^2.0.0" + which "^2.0.1" crypto-random-string@^1.0.0: version "1.0.0" @@ -3439,10 +3439,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.322: - version "1.3.322" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz#a6f7e1c79025c2b05838e8e344f6e89eb83213a8" - integrity sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA== +electron-to-chromium@^1.3.341: + version "1.3.344" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz#f1397a633c35e726730c24be1084cd25c3ee8148" + integrity sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw== emoji-regex@^7.0.1: version "7.0.3" @@ -3589,10 +3589,10 @@ escodegen@^1.11.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@~6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz#430d24822e82f7deb1e22a435bfa3999fae4ad64" - integrity sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA== +eslint-config-prettier@~6.10.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" + integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== dependencies: get-stdin "^6.0.0" @@ -3625,10 +3625,10 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@~2.20.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz#d749a7263fb6c29980def8e960d380a6aa6aecaa" - integrity sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ== +eslint-plugin-import@~2.20.1: + version "2.20.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3" + integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw== dependencies: array-includes "^3.0.3" array.prototype.flat "^1.2.1" @@ -4476,12 +4476,12 @@ graphql-middleware@~4.0.2: dependencies: graphql-tools "^4.0.5" -graphql-shield@~7.0.7: - version "7.0.7" - resolved "https://registry.yarnpkg.com/graphql-shield/-/graphql-shield-7.0.7.tgz#6b1e029a291924482949e108569fd7f95ea18d61" - integrity sha512-T7Ds9ailm9dFQ/u7E4pmyE/nu6I7RbG4L2Bice6zqz3ajuV4AvMGB57mCg9xB5RFZ3wpVHd+s9aFLPB0FpWtjg== +graphql-shield@~7.0.9: + version "7.0.9" + resolved "https://registry.yarnpkg.com/graphql-shield/-/graphql-shield-7.0.9.tgz#8248916e9636a7e3c05719a52fd13f2d37ccaeb2" + integrity sha512-2Dfddd2hcObCSqAj64c/Aaxvs7gaoD2QU14crj7H486QjS8jIAtEPUyLVyv8SmJ1ZD7jT6wqx6wrB15Npn5Sgw== dependencies: - "@types/yup" "0.26.27" + "@types/yup" "0.26.29" object-hash "^2.0.0" yup "^0.28.0" @@ -4492,10 +4492,10 @@ graphql-subscriptions@^1.0.0: dependencies: iterall "^1.2.1" -graphql-tag@^2.9.2, graphql-tag@~2.10.1: - version "2.10.1" - resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02" - integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg== +graphql-tag@^2.9.2, graphql-tag@~2.10.2: + version "2.10.2" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.2.tgz#e42214d0dde29e8db5d55b0107efdb2d461ed270" + integrity sha512-7rUuJkVGyedBiVJ/hPaxndDnzxANUZ+QhTu0KUzgTGtP3ibY/hSUl9em21aVh5BNMJsmMc4nVuOTBoiAUJ2xBQ== graphql-tools@^4.0.0, graphql-tools@^4.0.4, graphql-tools@^4.0.5: version "4.0.5" @@ -4518,10 +4518,10 @@ graphql-upload@^8.0.2: http-errors "^1.7.2" object-path "^0.11.4" -graphql@^14.2.1, graphql@^14.5.8: - version "14.5.8" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.8.tgz#504f3d3114cb9a0a3f359bbbcf38d9e5bf6a6b3c" - integrity sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg== +graphql@^14.2.1, graphql@^14.6.0: + version "14.6.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.6.0.tgz#57822297111e874ea12f5cd4419616930cd83e49" + integrity sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg== dependencies: iterall "^1.2.2" @@ -5880,10 +5880,10 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levenary@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.0.tgz#fc146fe75f32dc483a0a2c64aef720f602cd6210" - integrity sha512-VHcwhO0UTpUW7rLPN2/OiWJdgA1e9BqEDALhrgCe/F+uUJnep6CoUsTzMeP8Rh0NGr9uKquXxqe7lwLZo509nQ== +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== dependencies: leven "^3.1.0" @@ -6154,19 +6154,19 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== -metascraper-audio@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-audio/-/metascraper-audio-5.10.6.tgz#095892445b90d40bc54e54f69536a80e36fd9e4c" - integrity sha512-wTVtYK8Ico82caIi6HlkyGgUaBC21X/vhT2aQ4LKcg+gHoOhJcmWNd5me9VhaRJ7gTV/7yKkL5A54fBcjcn8Kg== +metascraper-audio@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-audio/-/metascraper-audio-5.10.7.tgz#ba9f8333a7b71d388a0bf88dff64fc4f06595566" + integrity sha512-VHZlT21bh/TWnHOQMGret3UcMdJOsyWvagK7MG8rLczYmrPEtvxnJjwPhyrEj1oJC+fz2P//bfQ6gyrD4HrmEQ== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-author@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-author/-/metascraper-author-5.10.6.tgz#1ceaacec776d46629300db25e17657fe35a14a20" - integrity sha512-L2P/Fp0npaQcowbwi1vHKJbSYc99cio58/yYRm205xGfgMCRMpYOrYB+ecizXgeSSRiv8G8SXLrLXOLJ5K+SdA== +metascraper-author@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-author/-/metascraper-author-5.10.7.tgz#99b3a2b982b7a63feea41554659be3db7bf7035c" + integrity sha512-AdNkcqy+eqs2Eeh+6odhIWArR4pWVlrCx3jMaho0BDY6ZnKgJP44HtlPNkghQpBaueoKX6CycGKraITzwjGj1w== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" lodash "~4.17.15" metascraper-clearbit-logo@^5.3.0: @@ -6176,26 +6176,26 @@ metascraper-clearbit-logo@^5.3.0: dependencies: got "~9.6.0" -metascraper-date@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-date/-/metascraper-date-5.10.6.tgz#dbdc0ddb4f4220ad1ea412b4a686900c1b138cf6" - integrity sha512-WfZw7WhkMKrrq96ZcAxS01/YjiDBpAPt5e3ggnCfLi2ZzC370w9J0INUo7gAtujaNZvgTTSEcrDD7AbTVMSYKA== +metascraper-date@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-date/-/metascraper-date-5.10.7.tgz#580891d98f14438658610d951e5454a0658eb5f3" + integrity sha512-S1ZsvYrOccS6EGvlAJT7Ph08uRgIE+aYlTRSCR8wG8P0j0Ta/srUKbPySxv+xXqDXuRIChtErSIsBgORg8uNjg== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-description@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-description/-/metascraper-description-5.10.6.tgz#ebb4459a4e1acdc473534d1b898b7958b1769eb6" - integrity sha512-d3d6UMsNnD8Dy7gxA05iTOj5QmJrFQTw1+IrW9CiOfdNsYq0H+m265a9lRaXcyJdqkzmGnv/d52C0BtUDOrkRw== +metascraper-description@^5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/metascraper-description/-/metascraper-description-5.11.0.tgz#1f7edfae7ffc353512975cafaa5b862fc5141709" + integrity sha512-or62L9EbIwBxjsu6gShTKi1z1XQ4Hvml8MrdydL4tiSUJpwf+lXc6gVOP8+nlKPPRkiAhXt2M9k4mfkGoX0erQ== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-image@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-image/-/metascraper-image-5.10.6.tgz#b23ec4bfab0467342b294f3d049c7b7e9a1dd071" - integrity sha512-/+m0VaaqnBgNREun/8jcq+clc4s9Z0FAuMO/TQf/mrz9SbcmpHeTD0WpiGJgEa9zYSbuEQYHdBkxhpw+SdJPCA== +metascraper-image@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-image/-/metascraper-image-5.10.7.tgz#9b1da02f2e748fd388dea6394d29b6e43c367924" + integrity sha512-xrR4Rl8UNwwyzMfrKH3RtaC775aHDXVT0TQEzn5p5uYfd4evLI2O+jr1CIBIl1d3CXqVxWCQWBY3gA7RtcjgWQ== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" metascraper-lang-detector@^4.10.2: version "4.10.2" @@ -6206,74 +6206,74 @@ metascraper-lang-detector@^4.10.2: franc "~4.0.0" iso-639-3 "~1.1.0" -metascraper-lang@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-lang/-/metascraper-lang-5.10.6.tgz#d4130257f6604095e9af8d796a6bde5815f6c667" - integrity sha512-JDhNbP1iSnPV7d6PklIIdBSzlwqbtvH+n810Isa5/PGuvUkJzNkTAUN+eTM1i6YcTlMp1N2gYsQG9uwfpMwFog== +metascraper-lang@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-lang/-/metascraper-lang-5.10.7.tgz#fe07c359b757ef3c5ba0a330da97173945196fde" + integrity sha512-ulLq7g+X4F9XzoScNflkhwWUuoSycbOqJ8j7vT6E/sHYPid+BdUnw2yaxAqXOdsrsbUEWzkiDwrJiq37XWCpDA== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-logo@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-logo/-/metascraper-logo-5.10.6.tgz#22223ce79e4017f159b2a9ddc311d2eb636043b5" - integrity sha512-/uGW+X43T6Oj5DxWqAhANII9BdhQuM+e7O6/Vu116uLqW6cOJ/RDp5qp7ngKF41L0zCLd8Q2Xw2nduHi6tC4Uw== +metascraper-logo@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-logo/-/metascraper-logo-5.10.7.tgz#335812b9aae5d814b22294cdd402d62fa14a46f1" + integrity sha512-Ic9WgvRqm3pUlsMfSirzCK9+qmQ9pbv/u9APn8PM5y66zNJoSCOVWbEIoEA0bVPHbGKGKFvsgrOm3VkMoVUF0Q== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-publisher@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-publisher/-/metascraper-publisher-5.10.6.tgz#95dde6ecef3c7b890ac625893ab374096bebe1f4" - integrity sha512-4jTOpbIwXBADl6z39UzQ4DZLeVoj4Q+5dcHbEgGn9MQ9878FgxiJKyrHzYvqfe9fRNd0PcaFMuuwLyhz58haoA== +metascraper-publisher@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-publisher/-/metascraper-publisher-5.10.7.tgz#7add40be1625a4215e2ec36dedaaaf213c1870e2" + integrity sha512-aRws5ksH+gzb49nc41oJdoJS2jG/2vC3GCi68n4Evy/TL7TYCnbZXqcgT5U0ne1kFxCZlHB6rl0DcXkx/JlT5Q== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-soundcloud@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-soundcloud/-/metascraper-soundcloud-5.10.6.tgz#7aff2e17214b6939719ea726a0f5a5fe2a48c5a5" - integrity sha512-WO+B81e04Hng4/YOtq4dpNv9CrGWVemrNuZk3iIJU+B+gF3YpzdERxS4aIpM7KHcY/c8xu3xDM3LrSUWXWjM3g== +metascraper-soundcloud@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-soundcloud/-/metascraper-soundcloud-5.10.7.tgz#64a5518324ea69576ab9c206f29a60160fb89e91" + integrity sha512-KPM/g+l1m0tp4YOu8qF1RUT7yondaY1S/0aieUUFck/iE3VA1i3MJTLLygIc+67fcbHqcz60qfPTOvYbl6sIPw== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" tldts "~5.6.3" -metascraper-title@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-title/-/metascraper-title-5.10.6.tgz#0fd9a9bed7a0b990663086cdab45d11cd8cd3c7d" - integrity sha512-x4P8zr0x6Gh3gt26tf2xfjikG9xNS9MC3z4N2VP+OrYNuCc7Vz6TU+DR/DLAeZphsb1flgTd3P4iUfPUcWVTEQ== +metascraper-title@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-title/-/metascraper-title-5.10.7.tgz#037aaa8cbdc79d1dde186887eb2bba542281315e" + integrity sha512-iQYaMdGpBPj6dyk7rbP+zYo7EroC/1yY27jocAqUnMRTfrHXTR7kGucR0vi4y14BiFRLBTLSNbZbM4KAUQsFjg== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" lodash "~4.17.15" -metascraper-url@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-url/-/metascraper-url-5.10.6.tgz#45f0ea173fecfe56d60b3cddd3c018f9f4fd9b92" - integrity sha512-7F6uAsI27iVXxUMwwzXH0ret81CX1jgtoGCMz+TvZkyS0z4aUs0r8QpYRYEQuXrW+JawRVik0up54F/ScslObQ== +metascraper-url@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-url/-/metascraper-url-5.10.7.tgz#42b71c8540c13baafb7757972ea672721d63e019" + integrity sha512-z1LBPTupU5cF36/i/iGe0rzLbO7iGBSdbgEOztLcnIhnMC8Nl9xjvIrlvNciKTMxDyr3JGrvFFWugFzwMzVoQg== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" -metascraper-video@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-video/-/metascraper-video-5.10.6.tgz#8425d2dfc378b20612e8ef9324989a33bc0341b3" - integrity sha512-DzWBCe/z86QFv6mN9ZDmvk32FMWv+nPDSkyMEL7RCU6VeQOFFAOjwhDglp2qBMs8Xif358bQ4H/0akLZpDUfvw== +metascraper-video@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-video/-/metascraper-video-5.10.7.tgz#2892819a3613ddac115ada7fb1b28d74a646f974" + integrity sha512-+fjiL/Vq0DGd7dMvBTdFKrOK2YH2myHssSChRZVZLl3gzyo4YEWpnOWBhfuoky0caOcs9+RVAxF9pE1TdTFmbA== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" lodash "~4.17.15" -metascraper-youtube@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper-youtube/-/metascraper-youtube-5.10.6.tgz#6cacabb1791b06ed98a7da69aa00c1c6c50a2dfe" - integrity sha512-Yl5kEFawqpSGmVSG2yTVZj7mGfRSFGQ2A4cxpqSbaPIUCGJwG9BUJkMzyUG0m6jGrg0zI5CmeZGNBAXzgKGz4g== +metascraper-youtube@^5.10.7: + version "5.10.7" + resolved "https://registry.yarnpkg.com/metascraper-youtube/-/metascraper-youtube-5.10.7.tgz#6c3313563ee57cb71c496fa99c129ad41fe22291" + integrity sha512-T4ZawYpW/2lyoVUY9RM92YCxkuyhNDXFxg8XAG9u2hoNZ5elrHLOv67ao5zMHa7IXZY3A7IGDOBd1NfoShnToA== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" get-video-id "~3.1.4" is-reachable "~4.0.0" p-locate "~4.1.0" -metascraper@^5.10.6: - version "5.10.6" - resolved "https://registry.yarnpkg.com/metascraper/-/metascraper-5.10.6.tgz#d1249577a768566b86bd099cc2256df45cf05181" - integrity sha512-mPEDvoyHLWb0AlTE05W43vfKGgBJ99s5AYAhB4IiRgGR9uq8j7/ktTZaS/+pyFopYrEoe71L/k4KbYgNPQRASA== +metascraper@^5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/metascraper/-/metascraper-5.11.0.tgz#bbb25eb055c0ec03992df99c10c48057751ee56b" + integrity sha512-IocQqdSQnOpbai0X9Cu37w/AKeSfU513MCfaFzzcvWgI8s6mGQ1DWRFPvkx0ahtixpP0/ifE4t7ycODrtepRxQ== dependencies: - "@metascraper/helpers" "^5.10.6" + "@metascraper/helpers" "^5.10.7" cheerio "~1.0.0-rc.3" cheerio-advanced-selectors "~2.0.1" lodash "~4.17.15" @@ -6620,10 +6620,10 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.44: - version "1.1.45" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.45.tgz#4cf7e9175d71b1317f15ffd68ce63bce1d53e9f2" - integrity sha512-cXvGSfhITKI8qsV116u2FTzH5EWZJfgG7d4cpqwF8I8+1tWpD6AsvvGRKq2onR0DNj1jfqsjkXZsm14JMS7Cyg== +node-releases@^1.1.47: + version "1.1.47" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.47.tgz#c59ef739a1fd7ecbd9f0b7cf5b7871e8a8b591e4" + integrity sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA== dependencies: semver "^6.3.0" @@ -6702,10 +6702,10 @@ normalize-url@~4.2.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.2.0.tgz#e747f16b58e6d7f391495fd86415fa04ec7c9897" integrity sha512-n69+KXI+kZApR+sPwSkoAXpGlNkaiYyoHHqKOFPjJWvwZpew/EjKvuPE4+tStNgb42z5yLtdakgZCQI+LalSPg== -normalize-url@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== +normalize-url@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-5.0.0.tgz#f46c9dc20670495e4e18fbd1b4396e41d199f63c" + integrity sha512-bAEm2fx8Dq/a35Z6PIRkkBBJvR56BbEJvhpNtvCZ4W9FyORSna77fn+xtYFjqk5JpBS+fMnAOG/wFgkQBmB7hw== npm-bundled@^1.0.1: version "1.0.6" @@ -7918,11 +7918,6 @@ serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -7959,11 +7954,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shell-quote@^1.6.1: version "1.7.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.1.tgz#3161d969886fb14f9140c65245a5dd19b6f0b06b" @@ -8010,10 +8017,10 @@ slug@^0.9.2: dependencies: unicode ">= 0.3.1" -slug@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slug/-/slug-2.1.0.tgz#293f8d53de7e55c15871846fd1bc36114841a8c7" - integrity sha512-Q4foEgcE7E8UB/BFg4kEzFUICoppzsbbfRjrdKiOM4Z4EFZF5tdn6amkgeaGur3kI4lMWP2BoMv7XJcKZvLg9Q== +slug@~2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/slug/-/slug-2.1.1.tgz#08df390d4b4d51bafb41ac0067c0c2dd70734ef2" + integrity sha512-yNGhDdS0DR0JyxnPC84qIx/Vd01RHVY4guJeBqBNdBoOLNWnzw5zkWJvxVSmsuUb92bikdnQFnw3PfGY8uZ82g== dependencies: unicode ">= 0.3.1" @@ -9024,10 +9031,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validator@^12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-12.1.0.tgz#a3a7315d5238cbc15e46ad8d5e479aafa7119925" - integrity sha512-gIC2RBuFRi574Rb9vewGCJ7TCLxHXNx6EKthEgs+Iz0pYa9a9Te1VLG/bGLsAyGWrqR5FfR7tbFUI7FEF2LiGA== +validator@^12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-12.2.0.tgz#660d47e96267033fd070096c3b1a6f2db4380a0a" + integrity sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ== vary@^1, vary@~1.1.2: version "1.1.2" @@ -9121,6 +9128,13 @@ which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + whoops@~4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/whoops/-/whoops-4.1.0.tgz#f42e51514c7af19a9491a44cabf2712292c6a8e1" diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index c4da93c7d..39407ef4f 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -17,8 +17,13 @@ Then("I click on the {string} button", text => { .click(); }); +Then("I click on the reply button", () => { + cy.get(".reply-button") + .click(); +}); + Then("my comment should be successfully created", () => { - cy.get(".iziToast-message").contains("Comment Submitted"); + cy.get(".iziToast-message").contains("Comment submitted!"); }); Then("I should see my comment", () => { @@ -45,6 +50,12 @@ Then("the editor should be cleared", () => { cy.get(".ProseMirror p").should("have.class", "is-empty"); }); +Then("it should create a mention in the CommentForm", () => { + cy.get(".ProseMirror a") + .should('have.class', 'mention') + .should('contain', '@peter-pan') +}) + When("I open the content menu of post {string}", (title)=> { cy.contains('.post-card', title) .find('.content-menu .base-button') diff --git a/cypress/integration/common/search.js b/cypress/integration/common/search.js index f6589763b..c42ec3ff0 100644 --- a/cypress/integration/common/search.js +++ b/cypress/integration/common/search.js @@ -11,15 +11,24 @@ Then("I should have one item in the select dropdown", () => { }); }); -Then("the search has no results", () => { +Then("the search should not contain posts by the annoying user", () => { cy.get(".searchable-input .ds-select-dropdown").should($li => { expect($li).to.have.length(1); - }); - cy.get(".ds-select-dropdown").should("contain", 'Nothing found'); + }) + cy.get(".ds-select-dropdown") + .should("not.have.class", '.search-post') + .should("not.contain", 'Spam') +}); + +Then("the search should contain the annoying user", () => { + cy.get(".searchable-input .ds-select-dropdown").should($li => { + expect($li).to.have.length(1); + }) + cy.get(".ds-select-dropdown .user-teaser .slug").should("contain", '@spammy-spammer'); cy.get(".searchable-input .ds-select-search") .focus() .type("{esc}"); -}); +}) Then("I should see the following posts in the select dropdown:", table => { table.hashes().forEach(({ title }) => { diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 9a5c02d08..5185c09f9 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -31,6 +31,7 @@ const narratorParams = { const annoyingParams = { email: "spammy-spammer@example.org", + slug: 'spammy-spammer', password: "1234", ...termsAndConditionsAgreedVersion }; @@ -39,8 +40,12 @@ Given("I am logged in", () => { cy.login(loginCredentials); }); -Given("I am logged in as the muted user", () => { - cy.login({ email: annoyingParams.email, password: '1234' }); +Given("the {string} user searches for {string}", (_, postTitle) => { + cy.logout() + .login({ email: annoyingParams.email, password: '1234' }) + .get(".searchable-input .ds-select-search") + .focus() + .type(postTitle); }); Given("we have a selection of categories", () => { @@ -123,6 +128,12 @@ When("I visit the {string} page", page => { cy.openPage(page); }); +When("a blocked user visits the post page of one of my authored posts", () => { + cy.logout() + .login({ email: annoyingParams.email, password: annoyingParams.password }) + .openPage('/post/previously-created-post') +}) + Given("I am on the {string} page", page => { cy.openPage(page); }); @@ -486,7 +497,7 @@ Given("I follow the user {string}", name => { }); }); -Given('"Spammy Spammer" wrote a post {string}', title => { +Given('{string} wrote a post {string}', (_, title) => { cy.createCategories("cat21") .factory() .create("Post", { @@ -501,7 +512,7 @@ Then("the list of posts of this user is empty", () => { cy.get(".main-container").find(".ds-space.hc-empty"); }); -Then("nobody is following the user profile anymore", () => { +Then("I get removed from his follower collection", () => { cy.get(".ds-card-content").not(".post-link"); cy.get(".main-container").contains( ".ds-card-content", @@ -533,6 +544,20 @@ When("I mute the user {string}", name => { }); }); +When("I block the user {string}", name => { + cy.neode() + .first("User", { + name + }) + .then(blockedUser => { + cy.neode() + .first("User", { + name: narratorParams.name + }) + .relateTo(blockedUser, "blocked"); + }); +}); + When("I log in with:", table => { const [firstRow] = table.hashes(); const { @@ -551,3 +576,11 @@ Then("I see only one post with the title {string}", title => { .should("have.length", 1); cy.get(".main-container").contains(".post-link", title); }); + +Then("they should not see the comment from", () => { + cy.get(".ds-card-footer").children().should('not.have.class', 'comment-form') +}) + +Then("they should see a text explaining commenting is not possible", () => { + cy.get('.ds-placeholder').should('contain', "Commenting is not possible at this time on this post.") +}) \ No newline at end of file diff --git a/cypress/integration/post/Comment.feature b/cypress/integration/post/Comment.feature index 50284d6f5..66cf7a6d7 100644 --- a/cypress/integration/post/Comment.feature +++ b/cypress/integration/post/Comment.feature @@ -4,10 +4,10 @@ Feature: Post Comment To be able to express my thoughts and emotions about these, discuss, and add give further information. Background: - Given we have the following posts in our database: - | id | title | slug | - | bWBjpkTKZp | 101 Essays that will change the way you think | 101-essays | - And I have a user account + Given I have a user account + And we have the following posts in our database: + | id | title | slug | authorId | commentContent | + | bWBjpkTKZp | 101 Essays that will change the way you think | 101-essays | id-of-peter-pan | @peter-pan reply to me | And I am logged in Scenario: Comment creation @@ -36,3 +36,8 @@ Feature: Post Comment Then my comment should be successfully created And I should see an abreviated version of my comment And the editor should be cleared + + Scenario: Direct reply to Comment + Given I visit "post/bWBjpkTKZp/101-essays" + And I click on the reply button + Then it should create a mention in the CommentForm diff --git a/cypress/integration/user_profile/BlockUser.feature b/cypress/integration/user_profile/BlockUser.feature new file mode 100644 index 000000000..43efe7807 --- /dev/null +++ b/cypress/integration/user_profile/BlockUser.feature @@ -0,0 +1,46 @@ +Feature: Block a User + As a user + I'd like to have a button to block another user + To prevent him from seeing and interacting with my contributions + + Background: + Given I have a user account + And there is an annoying user called "Harassing User" + And I am logged in + + Scenario: Block a user + Given I am on the profile page of the annoying user + When I click on "Block user" from the content menu in the user info box + And I navigate to my "Blocked users" settings page + Then I can see the following table: + | Avatar | Name | + | | Harassing User | + + Scenario: Blocked user cannot interact with my contributions + Given I block the user "Harassing User" + And I previously created a post + And a blocked user visits the post page of one of my authored posts + Then they should not see the comment from + And they should see a text explaining commenting is not possible + + Scenario: Block a previously followed user + Given I follow the user "Harassing User" + When I visit the profile page of the annoying user + And I click on "Block user" from the content menu in the user info box + And I get removed from his follower collection + + Scenario: Posts of blocked users are not filtered from search results + Given "Harassing User" wrote a post "You can still see my posts" + And I block the user "Harassing User" + When I search for "see" + Then I should see the following posts in the select dropdown: + | title | + | You can still see my posts | + + Scenario: Blocked users can still see my posts + Given I previously created a post + And I block the user "Harassing User" + And the "blocked" user searches for "previously created" + Then I should see the following posts in the select dropdown: + | title | + | previously created post | diff --git a/cypress/integration/user_profile/mute-users/Mute.feature b/cypress/integration/user_profile/mute-users/Mute.feature index b52faeeaa..03ac4370b 100644 --- a/cypress/integration/user_profile/mute-users/Mute.feature +++ b/cypress/integration/user_profile/mute-users/Mute.feature @@ -1,8 +1,7 @@ Feature: Mute a User As a user I'd like to have a button to mute another user - To prevent him from seeing and interacting with my contributions and also to avoid seeing his/her posts - + To prevent him from seeing and interacting with my contributions Background: Given I have a user account And there is an annoying user called "Spammy Spammer" @@ -22,9 +21,9 @@ Feature: Mute a User When I visit the profile page of the annoying user And I click on "Mute user" from the content menu in the user info box Then the list of posts of this user is empty - And nobody is following the user profile anymore + And I get removed from his follower collection - Scenario: Posts of muted users are filtered from search results + Scenario: Posts of muted users are filtered from search results, users are not Given we have the following posts in our database: | id | title | content | | im-not-muted | Post that should be seen | cause I'm not muted | @@ -36,18 +35,17 @@ Feature: Mute a User When I mute the user "Spammy Spammer" And I refresh the page And I search for "Spam" - Then the search has no results + Then the search should not contain posts by the annoying user + But the search should contain the annoying user But I search for "not muted" Then I should see the following posts in the select dropdown: | title | | Post that should be seen | - + Scenario: Muted users can still see my posts Given I previously created a post And I mute the user "Spammy Spammer" - Given I log out - And I am logged in as the muted user - When I search for "previously created" + And the "muted" user searches for "previously created" Then I should see the following posts in the select dropdown: | title | | previously created post | diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c9a2e213a..16ac43a19 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -15,7 +15,6 @@ /* globals Cypress cy */ import "cypress-file-upload"; import helpers from "./helpers"; -import users from "../fixtures/users.json"; import { GraphQLClient, request } from 'graphql-request' import { gql } from '../../backend/src/helpers/jest' import config from '../../backend/src/config' diff --git a/package.json b/package.json index 4731f2fa0..caed8a5b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "human-connection", - "version": "0.2.2", + "version": "0.3.0", "description": "Fullstack and API tests with cypress and cucumber for Human Connection", "author": "Human Connection gGmbh", "license": "MIT", @@ -22,18 +22,19 @@ "cypress:open": "cross-env cypress open", "cucumber:setup": "cd backend && yarn run dev", "cucumber": "wait-on tcp:4000 && cucumber-js --require-module @babel/register --exit", - "release": "standard-version" + "release": "standard-version", + "generate:changelog": "yarn version && auto-changelog" }, "devDependencies": { - "@babel/core": "^7.8.3", - "@babel/preset-env": "^7.8.3", + "@babel/core": "^7.8.4", + "@babel/preset-env": "^7.8.4", "@babel/register": "^7.8.3", "auto-changelog": "^1.16.2", "bcryptjs": "^2.4.3", - "codecov": "^3.6.2", + "codecov": "^3.6.4", "cross-env": "^6.0.3", "cucumber": "^6.0.5", - "cypress": "^3.8.2", + "cypress": "^3.8.3", "cypress-cucumber-preprocessor": "^2.0.1", "cypress-file-upload": "^3.5.3", "cypress-plugin-retries": "^1.5.2", @@ -45,7 +46,7 @@ "neo4j-driver": "^4.0.1", "neode": "^0.3.7", "npm-run-all": "^4.1.5", - "slug": "^2.1.0", + "slug": "^2.1.1", "standard-version": "^7.1.0" }, "resolutions": { diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 146d342c9..f52e053f1 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash sed -i "s//${TRAVIS_COMMIT}/g" $TRAVIS_BUILD_DIR/scripts/patches/patch-deployment.yaml sed -i "s//${TRAVIS_COMMIT}/g" $TRAVIS_BUILD_DIR/scripts/patches/patch-configmap.yaml -kubectl --namespace=human-connection patch configmap configmap -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-configmap.yaml)" -kubectl --namespace=human-connection patch deployment backend -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-deployment.yaml)" -kubectl --namespace=human-connection patch deployment web -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-deployment.yaml)" +kubectl --namespace=human-connection patch configmap develop-configmap -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-configmap.yaml)" +kubectl --namespace=human-connection patch deployment develop-backend -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-deployment.yaml)" +kubectl --namespace=human-connection patch deployment develop-webapp -p "$(cat $TRAVIS_BUILD_DIR/scripts/patches/patch-deployment.yaml)" diff --git a/scripts/github_release.sh b/scripts/github_release.sh deleted file mode 100755 index 93f50289d..000000000 --- a/scripts/github_release.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -ROOT_DIR=$(dirname "$0")/.. -RELEASE_DIR="${ROOT_DIR}/release" - -VERSION=$(jq -r ".version" $ROOT_DIR/package.json) - -# mkdir -p $RELEASE_DIR - -# The following command part produces 854M on my machine -# apps=(nitro-web nitro-backend neo4j maintenance-worker maintenance) -# for app in "${apps[@]}" -# do -# docker image save "humanconnection/${app}:latest" | gzip > "${RELEASE_DIR}/${app}.${VERSION}.tar.gz" -# done - -ghr -c "${VERSION}" "${VERSION}" diff --git a/webapp/assets/_new/icons/svgs/level-down.svg b/webapp/assets/_new/icons/svgs/level-down.svg new file mode 100755 index 000000000..e6455391e --- /dev/null +++ b/webapp/assets/_new/icons/svgs/level-down.svg @@ -0,0 +1,5 @@ + + +level-down + + diff --git a/webapp/assets/_new/icons/svgs/microphone-slash.svg b/webapp/assets/_new/icons/svgs/microphone-slash.svg new file mode 100644 index 000000000..9802dbd5f --- /dev/null +++ b/webapp/assets/_new/icons/svgs/microphone-slash.svg @@ -0,0 +1,5 @@ + + +microphone-slash + + diff --git a/webapp/assets/_new/icons/svgs/microphone.svg b/webapp/assets/_new/icons/svgs/microphone.svg new file mode 100644 index 000000000..121342b70 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/microphone.svg @@ -0,0 +1,6 @@ + + + +microphone + + diff --git a/webapp/assets/_new/icons/svgs/underline.svg b/webapp/assets/_new/icons/svgs/underline.svg new file mode 100755 index 000000000..f4c6e698c --- /dev/null +++ b/webapp/assets/_new/icons/svgs/underline.svg @@ -0,0 +1,5 @@ + + +underline + + diff --git a/webapp/components/AvatarMenu/AvatarMenu.vue b/webapp/components/AvatarMenu/AvatarMenu.vue index 97b937a88..f65c6f6cf 100644 --- a/webapp/components/AvatarMenu/AvatarMenu.vue +++ b/webapp/components/AvatarMenu/AvatarMenu.vue @@ -11,7 +11,7 @@ " @click.prevent="toggleMenu" > - + @@ -127,6 +127,10 @@ export default { display: flex; align-items: center; padding-left: $space-xx-small; + + > .user-avatar { + margin-right: $space-xx-small; + } } .avatar-menu-popover { padding-top: $space-x-small; diff --git a/webapp/components/Comment/Comment.spec.js b/webapp/components/Comment/Comment.spec.js index b307700d9..1ba238bf5 100644 --- a/webapp/components/Comment/Comment.spec.js +++ b/webapp/components/Comment/Comment.spec.js @@ -1,17 +1,15 @@ -import { config, shallowMount } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import Comment from './Comment.vue' import Vuex from 'vuex' const localVue = global.localVue +localVue.directive('scrollTo', jest.fn()) config.stubs['client-only'] = '' +config.stubs['nuxt-link'] = '' describe('Comment.vue', () => { - let propsData - let mocks - let getters - let wrapper - let Wrapper + let propsData, mocks, stubs, getters, wrapper, Wrapper beforeEach(() => { propsData = {} @@ -39,6 +37,9 @@ describe('Comment.vue', () => { }), }, } + stubs = { + ContentViewer: true, + } getters = { 'auth/user': () => { return {} @@ -47,18 +48,19 @@ describe('Comment.vue', () => { } }) - describe('shallowMount', () => { + describe('mount', () => { beforeEach(jest.useFakeTimers) Wrapper = () => { const store = new Vuex.Store({ getters, }) - return shallowMount(Comment, { + return mount(Comment, { store, propsData, mocks, localVue, + stubs, }) } @@ -68,6 +70,7 @@ describe('Comment.vue', () => { id: '2', contentExcerpt: 'Hello I am a comment content', content: 'Hello I am comment content', + author: { id: 'commentAuthorId', slug: 'ogerly' }, } }) @@ -199,6 +202,24 @@ describe('Comment.vue', () => { }) }) }) + + describe('click reply button', () => { + beforeEach(async () => { + wrapper = Wrapper() + await wrapper.find('.reply-button').trigger('click') + }) + + it('emits "reply"', () => { + expect(wrapper.emitted('reply')).toEqual([ + [ + { + id: 'commentAuthorId', + slug: 'ogerly', + }, + ], + ]) + }) + }) }) }) }) diff --git a/webapp/components/Comment/Comment.vue b/webapp/components/Comment/Comment.vue index b413e03f6..5c47a3656 100644 --- a/webapp/components/Comment/Comment.vue +++ b/webapp/components/Comment/Comment.vue @@ -33,7 +33,7 @@
-
+ @@ -64,9 +73,10 @@ import { COMMENT_MAX_UNTRUNCATED_LENGTH, COMMENT_TRUNCATE_TO_LENGTH } from '~/co import UserTeaser from '~/components/UserTeaser/UserTeaser' import ContentMenu from '~/components/ContentMenu/ContentMenu' import ContentViewer from '~/components/Editor/ContentViewer' -import HcCommentForm from '~/components/CommentForm/CommentForm' +import CommentForm from '~/components/CommentForm/CommentForm' import CommentMutations from '~/graphql/CommentMutations' import scrollToAnchor from '~/mixins/scrollToAnchor.js' +import BaseButton from '~/components/_new/generic/BaseButton/BaseButton' export default { mixins: [scrollToAnchor], @@ -85,7 +95,8 @@ export default { UserTeaser, ContentMenu, ContentViewer, - HcCommentForm, + CommentForm, + BaseButton, }, props: { routeHash: { type: String, default: () => '' }, @@ -105,7 +116,6 @@ export default { if (this.isLongComment && this.isCollapsed) { return this.$filters.truncate(this.comment.content, COMMENT_TRUNCATE_TO_LENGTH) } - return this.comment.content }, displaysComment() { @@ -141,6 +151,10 @@ export default { }, }, methods: { + reply() { + const message = { slug: this.comment.author.slug, id: this.comment.author.id } + this.$emit('reply', message) + }, checkAnchor(anchor) { return `#${this.anchor}` === anchor }, @@ -193,6 +207,14 @@ export default { float: right; } +.reply-button { + float: right; + top: 0px; +} +.reply-button:after { + clear: both; +} + @keyframes highlight { 0% { border: 1px solid $color-primary; diff --git a/webapp/components/CommentForm/CommentForm.vue b/webapp/components/CommentForm/CommentForm.vue index 063a3d599..9e4158876 100644 --- a/webapp/components/CommentForm/CommentForm.vue +++ b/webapp/components/CommentForm/CommentForm.vue @@ -51,6 +51,9 @@ export default { } }, methods: { + reply(message) { + this.$refs.editor.insertReply(message) + }, updateEditorContent(value) { const sanitizedContent = this.$filters.removeHtml(value, false) if (!this.update) { @@ -133,8 +136,8 @@ export default { query() { return minimisedUserQuery() }, - result(result) { - this.users = result.data.User + update({ User }) { + this.users = User }, }, }, diff --git a/webapp/components/CommentList/CommentList.spec.js b/webapp/components/CommentList/CommentList.spec.js index 064b8f136..ac7b88c0e 100644 --- a/webapp/components/CommentList/CommentList.spec.js +++ b/webapp/components/CommentList/CommentList.spec.js @@ -1,10 +1,13 @@ import { config, mount } from '@vue/test-utils' import CommentList from './CommentList' +import Comment from '~/components/Comment/Comment' import Vuex from 'vuex' +import Vue from 'vue' const localVue = global.localVue localVue.filter('truncate', string => string) +localVue.directive('scrollTo', jest.fn()) config.stubs['v-popover'] = '' config.stubs['nuxt-link'] = '' @@ -97,5 +100,27 @@ describe('CommentList.vue', () => { }) }) }) + + describe('Comment', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('Comment emitted reply()', () => { + wrapper.find(Comment).vm.$emit('reply', { + id: 'commentAuthorId', + slug: 'ogerly', + }) + Vue.nextTick() + expect(wrapper.emitted('reply')).toEqual([ + [ + { + id: 'commentAuthorId', + slug: 'ogerly', + }, + ], + ]) + }) + }) }) }) diff --git a/webapp/components/CommentList/CommentList.vue b/webapp/components/CommentList/CommentList.vue index 96edf9bc3..ef6e3b096 100644 --- a/webapp/components/CommentList/CommentList.vue +++ b/webapp/components/CommentList/CommentList.vue @@ -12,9 +12,11 @@ :comment="comment" :post="post" :routeHash="routeHash" + class="comment-tag" @deleteComment="updateCommentList" @updateComment="updateCommentList" @toggleNewCommentForm="toggleNewCommentForm" + @reply="reply" /> @@ -35,6 +37,9 @@ export default { post: { type: Object, default: () => {} }, }, methods: { + reply(message) { + this.$emit('reply', message) + }, checkAnchor(anchor) { return anchor === '#comments' }, diff --git a/webapp/components/ContentMenu/ContentMenu.vue b/webapp/components/ContentMenu/ContentMenu.vue index a22bc3267..ee2bd4a62 100644 --- a/webapp/components/ContentMenu/ContentMenu.vue +++ b/webapp/components/ContentMenu/ContentMenu.vue @@ -161,7 +161,7 @@ export default { callback: () => { this.$emit('unmute', this.resource) }, - icon: 'user-plus', + icon: 'microphone', }) } else { routes.push({ @@ -169,6 +169,23 @@ export default { callback: () => { this.$emit('mute', this.resource) }, + icon: 'microphone-slash', + }) + } + if (this.resource.blocked) { + routes.push({ + label: this.$t(`settings.blocked-users.unblock`), + callback: () => { + this.$emit('unblock', this.resource) + }, + icon: 'user-plus', + }) + } else { + routes.push({ + label: this.$t(`settings.blocked-users.block`), + callback: () => { + this.$emit('block', this.resource) + }, icon: 'user-times', }) } diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index 235437c32..44ed0d15e 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -141,7 +141,6 @@ export default { methods: { openSuggestionList({ items, query, range, command, virtualNode }, suggestionType) { this.suggestionType = suggestionType - this.query = this.sanitizeQuery(query) this.filteredItems = items this.suggestionRange = range @@ -237,6 +236,9 @@ export default { const content = e.getHTML() this.$emit('input', content) }, + insertReply(message) { + this.editor.commands.mention({ id: message.id, label: message.slug }) + }, toggleLinkInput(attrs, element) { if (!this.isLinkInputActive && attrs && element) { this.$refs.linkInput.linkUrl = attrs.href diff --git a/webapp/components/Editor/MenuBar.vue b/webapp/components/Editor/MenuBar.vue index 4e43050e9..d1e084f2d 100644 --- a/webapp/components/Editor/MenuBar.vue +++ b/webapp/components/Editor/MenuBar.vue @@ -5,6 +5,12 @@ + +
- + {{ $t('profile.userAnonym') }}
.user-avatar { flex-shrink: 0; diff --git a/webapp/components/_new/generic/UserAvatar/UserAvatar.vue b/webapp/components/_new/generic/UserAvatar/UserAvatar.vue index c29f8e402..b9007b919 100644 --- a/webapp/components/_new/generic/UserAvatar/UserAvatar.vue +++ b/webapp/components/_new/generic/UserAvatar/UserAvatar.vue @@ -6,7 +6,7 @@ v-else :src="user.avatar | proxyApiUrl" class="image" - @error="event.target.style.display = 'none'" + @error="$event.target.style.display = 'none'" /> @@ -75,7 +75,6 @@ export default { > .image { position: relative; - z-index: 5; width: 100%; object-fit: cover; object-position: center; diff --git a/webapp/components/generic/SearchableInput/SearchableInput.vue b/webapp/components/generic/SearchableInput/SearchableInput.vue index 448c154e0..3260ff082 100644 --- a/webapp/components/generic/SearchableInput/SearchableInput.vue +++ b/webapp/components/generic/SearchableInput/SearchableInput.vue @@ -71,7 +71,7 @@ export default { }, computed: { emptyText() { - return this.isActive && !this.pending ? this.$t('search.failed') : this.$t('search.hint') + return this.isActive && !this.loading ? this.$t('search.failed') : this.$t('search.hint') }, isActive() { return !isEmpty(this.previousSearchTerm) @@ -104,7 +104,7 @@ export default { */ onEnter(event) { clearTimeout(this.searchProcess) - if (!this.pending) { + if (!this.loading) { this.previousSearchTerm = this.unprocessedSearchInput this.$emit('query', this.unprocessedSearchInput) } diff --git a/webapp/graphql/PostQuery.js b/webapp/graphql/PostQuery.js index c59c894a5..5ddac9c1f 100644 --- a/webapp/graphql/PostQuery.js +++ b/webapp/graphql/PostQuery.js @@ -29,6 +29,7 @@ export default i18n => { ...user ...userCounts ...locationAndBadges + blocked } comments(orderBy: createdAt_asc) { ...comment diff --git a/webapp/graphql/User.js b/webapp/graphql/User.js index d2bbae895..dfc6ca097 100644 --- a/webapp/graphql/User.js +++ b/webapp/graphql/User.js @@ -24,6 +24,7 @@ export default i18n => { createdAt followedByCurrentUser isMuted + blocked following(first: 7) { ...user ...userCounts diff --git a/webapp/graphql/settings/BlockedUsers.js b/webapp/graphql/settings/BlockedUsers.js new file mode 100644 index 000000000..94f2121b1 --- /dev/null +++ b/webapp/graphql/settings/BlockedUsers.js @@ -0,0 +1,43 @@ +import gql from 'graphql-tag' + +export const blockedUsers = () => { + return gql` + { + blockedUsers { + id + name + slug + avatar + about + disabled + deleted + } + } + ` +} + +export const blockUser = () => { + return gql` + mutation($id: ID!) { + blockUser(id: $id) { + id + name + blocked + followedByCurrentUser + } + } + ` +} + +export const unblockUser = () => { + return gql` + mutation($id: ID!) { + unblockUser(id: $id) { + id + name + blocked + followedByCurrentUser + } + } + ` +} diff --git a/webapp/locales/de.json b/webapp/locales/de.json index d52a9817c..d552d51ba 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -70,6 +70,11 @@ "passwordStrength4": "Sehr sicheres Passwort" } }, + "privacy": { + "name": "Privatsphäre", + "make-shouts-public": "Teile von mir empfohlene Artikel öffentlich auf meinem Profil", + "success-update": "Privatsphäre-Einstellungen gespeichert" + }, "invites": { "name": "Einladungen" }, @@ -143,27 +148,44 @@ "successDelete": "Social-Media gelöscht. Profil aktualisiert!" }, "muted-users": { - "name": "Stummgeschaltete Benutzer", - "explanation": { - "intro": "Wenn ein anderer Benutzer von dir stummgeschaltet wurde, dann passiert folgendes:", - "your-perspective": "In deiner Beitragsübersicht tauchen keine Beiträge der stummgeschalteten Person mehr auf.", - "search": "Die Beiträge von stummgeschalteten Personen verschwinden aus deinen Suchergebnissen." - }, - "columns": { - "name": "Name", - "slug": "Alias", - "unmute": "Entsperren" - }, - "empty": "Bislang hast du niemanden stummgeschaltet.", - "how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü stummschalten.", - "mute": "Stumm schalten", - "unmute": "Stummschaltung aufheben", - "unmuted": "{name} ist nicht mehr stummgeschaltet" + "name": "Stummgeschaltete Benutzer", + "explanation": { + "intro": "Wenn ein anderer Benutzer von dir stummgeschaltet wurde, dann passiert folgendes:", + "your-perspective": "In deiner Beitragsübersicht tauchen keine Beiträge der stummgeschalteten Person mehr auf.", + "search": "Die Beiträge von stummgeschalteten Personen verschwinden aus deinen Suchergebnissen." + }, + "columns": { + "name": "Name", + "slug": "Alias", + "unmute": "Entsperren" + }, + "empty": "Bislang hast du niemanden stummgeschaltet.", + "how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü stummschalten.", + "mute": "Stumm schalten", + "unmute": "Stummschaltung aufheben", + "unmuted": "{name} ist nicht mehr stummgeschaltet" }, - "privacy": { - "name": "Privatsphäre", - "make-shouts-public": "Teile von mir empfohlene Artikel öffentlich auf meinem Profil", - "success-update": "Privatsphäre-Einstellungen gespeichert" + "blocked-users": { + "name": "Blocked users", + "explanation": { + "intro": "Wenn ein anderer Benutzer von dir blockiert wurde, dann passiert folgendes:", + "your-perspective": "Du kannst keine Beiträge der blockierten Person mehr kommentieren.", + "their-perspective": "Die blockierte Person kann deine Beiträge nicht mehr kommentieren", + "notifications": "Von dir blockierte Personen erhalten keine Benachrichtigungen mehr, wenn sie in deinen Beiträgen erwähnt werden.", + "closing": "Das sollte fürs Erste genügen, damit blockierte Benutzer dich nicht mehr länger belästigen können.", + "commenting-disabled": "Du kannst den Beitrag derzeit nicht kommentieren.", + "commenting-explanation": "Dafür kann es mehrere Gründe geben, bitte schau in unsere " + }, + "columns": { + "name": "Name", + "slug": "Alias", + "unblock": "Entsperren" + }, + "empty": "Bislang hast du niemanden blockiert.", + "how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü blockieren.", + "block": "Nutzer blockieren", + "unblock": "Nutzer entsperren", + "unblocked": "{name} ist wieder entsperrt" } }, "admin": { @@ -257,8 +279,9 @@ }, "comment": { "submit": "Kommentiere", - "submitted": "Kommentar gesendet", - "updated": "Änderungen gespeichert" + "submitted": "Kommentar gesendet!", + "updated": "Änderungen gespeichert", + "reply": "Antworten" }, "edited": "bearbeitet" }, diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 1906a5f6f..d15614ecc 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -329,6 +329,28 @@ "mute": "Mute user", "unmute": "Unmute user", "unmuted": "{name} is unmuted again" + }, + "blocked-users": { + "name": "Blocked users", + "explanation": { + "intro": "If another user has been blocked by you, this is what happens:", + "your-perspective": "You will no longer be able to interact with their contributions.", + "their-perspective": "Vice versa: The blocked person will also no longer be able to interact with your contributions.", + "notifications": "Blocked users will no longer receive notifications if they mention each other.", + "closing": "This should be sufficient for now so that blocked users can no longer bother you.", + "commenting-disabled": "Commenting is not possible at this time on this post.", + "commenting-explanation": "This can happen for several reasons, please see our " + }, + "columns": { + "name": "Name", + "slug": "Slug", + "unblock": "Unblock" + }, + "empty": "So far, you have not blocked anybody.", + "how-to": "You can block other users on their profile page via the content menu.", + "block": "Block user", + "unblock": "Unblock user", + "unblocked": "{name} is unblocked again" } }, "admin": { @@ -422,8 +444,9 @@ }, "comment": { "submit": "Comment", - "submitted": "Comment Submitted", - "updated": "Changes Saved" + "submitted": "Comment submitted!", + "updated": "Changes saved!", + "reply": "Reply" }, "edited": "edited" }, diff --git a/webapp/package.json b/webapp/package.json index 25928a9f1..4ef753134 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -59,20 +59,20 @@ "dependencies": { "@human-connection/styleguide": "0.5.22", "@nuxtjs/apollo": "^4.0.0-rc19", - "@nuxtjs/axios": "~5.9.3", + "@nuxtjs/axios": "~5.9.5", "@nuxtjs/dotenv": "~1.4.1", - "@nuxtjs/pwa": "^3.0.0-beta.19", - "@nuxtjs/sentry": "^3.0.1", + "@nuxtjs/pwa": "^3.0.0-beta.20", + "@nuxtjs/sentry": "^3.2.2", "@nuxtjs/style-resources": "~1.0.0", "accounting": "~0.4.1", "apollo-cache-inmemory": "~1.6.5", "apollo-client": "~2.6.8", - "cookie-universal-nuxt": "~2.1.0", + "cookie-universal-nuxt": "~2.1.1", "cropperjs": "^1.5.5", - "cross-env": "~6.0.3", + "cross-env": "~7.0.0", "date-fns": "2.9.0", "express": "~4.17.1", - "graphql": "~14.5.8", + "graphql": "~14.6.0", "jsonwebtoken": "~8.5.1", "linkify-it": "~2.2.0", "node-fetch": "^2.6.0", @@ -85,7 +85,7 @@ "tiptap-extensions": "~1.28.6", "trunc-html": "^1.1.2", "v-tooltip": "~2.0.3", - "validator": "^12.1.0", + "validator": "^12.2.0", "vue-count-to": "~1.0.13", "vue-infinite-loading": "^2.4.4", "vue-izitoast": "^1.2.1", @@ -96,13 +96,13 @@ "zxcvbn": "^4.4.2" }, "devDependencies": { - "@babel/core": "~7.8.3", + "@babel/core": "~7.8.4", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/preset-env": "~7.8.3", - "@storybook/addon-a11y": "^5.3.8", - "@storybook/addon-actions": "^5.3.8", - "@storybook/addon-notes": "^5.3.8", - "@storybook/vue": "~5.3.8", + "@babel/preset-env": "~7.8.4", + "@storybook/addon-a11y": "^5.3.12", + "@storybook/addon-actions": "^5.3.10", + "@storybook/addon-notes": "^5.3.12", + "@storybook/vue": "~5.3.12", "@vue/cli-shared-utils": "~4.1.2", "@vue/eslint-config-prettier": "~6.0.0", "@vue/server-test-utils": "~1.0.0-beta.31", @@ -117,10 +117,10 @@ "core-js": "~2.6.10", "css-loader": "~3.4.2", "eslint": "~6.8.0", - "eslint-config-prettier": "~6.9.0", + "eslint-config-prettier": "~6.10.0", "eslint-config-standard": "~14.1.0", "eslint-loader": "~3.0.3", - "eslint-plugin-import": "~2.20.0", + "eslint-plugin-import": "~2.20.1", "eslint-plugin-jest": "~23.6.0", "eslint-plugin-node": "~11.0.0", "eslint-plugin-prettier": "~3.1.2", @@ -136,7 +136,7 @@ "node-sass": "~4.13.1", "prettier": "~1.19.1", "sass-loader": "~8.0.2", - "storybook-design-token": "^0.5.0", + "storybook-design-token": "^0.5.1", "storybook-vue-router": "^1.0.7", "style-loader": "~0.23.1", "style-resources-loader": "~1.3.3", diff --git a/webapp/pages/post/_id/_slug/index.spec.js b/webapp/pages/post/_id/_slug/index.spec.js index db960bb67..6c5cb5259 100644 --- a/webapp/pages/post/_id/_slug/index.spec.js +++ b/webapp/pages/post/_id/_slug/index.spec.js @@ -1,29 +1,33 @@ -import { config, shallowMount } from '@vue/test-utils' -import PostSlug from './index.vue' +import { config, mount } from '@vue/test-utils' import Vuex from 'vuex' - -const localVue = global.localVue +import PostSlug from './index.vue' +import CommentList from '~/components/CommentList/CommentList' config.stubs['client-only'] = '' +config.stubs['nuxt-link'] = '' +config.stubs['router-link'] = '' + +const localVue = global.localVue +localVue.directive('scrollTo', jest.fn()) describe('PostSlug', () => { - let wrapper - let Wrapper - let store - let mocks + let store, propsData, mocks, stubs, wrapper, Wrapper beforeEach(() => { store = new Vuex.Store({ getters: { 'auth/user': () => { - return {} + return { id: '1stUser' } }, + 'auth/isModerator': () => false, }, }) + propsData = {} mocks = { $t: jest.fn(), $filters: { truncate: a => a, + removeHtml: a => a, }, $route: { hash: '', @@ -40,38 +44,53 @@ describe('PostSlug', () => { }, $apollo: { mutate: jest.fn().mockResolvedValue(), + query: jest.fn().mockResolvedValue({ data: { PostEmotionsCountByEmotion: {} } }), }, + $scrollTo: jest.fn(), } + stubs = { + HcEditor: { render: () => {}, methods: { insertReply: jest.fn(() => null) } }, + ContentViewer: true, + } + jest.useFakeTimers() + wrapper = Wrapper() + wrapper.setData({ + post: { + id: '1', + author: { + id: '1stUser', + }, + comments: [ + { + id: 'comment134', + contentExcerpt: 'this is a comment', + content: 'this is a comment', + author: { + id: '1stUser', + slug: '1st-user', + }, + }, + ], + }, + ready: true, + }) }) - describe('shallowMount', () => { + describe('mount', () => { Wrapper = () => { - return shallowMount(PostSlug, { + return mount(PostSlug, { store, mocks, localVue, + propsData, + stubs, }) } - beforeEach(jest.useFakeTimers) - describe('test Post callbacks', () => { - beforeEach(() => { - wrapper = Wrapper() - wrapper.setData({ - post: { - id: 'p23', - name: 'It is a post', - author: { - id: 'u1', - }, - }, - }) - }) - describe('deletion of Post from Page by invoking "deletePostCallback()"', () => { - beforeEach(() => { - wrapper.vm.deletePostCallback() + beforeEach(async () => { + await wrapper.vm.deletePostCallback() }) describe('after timeout', () => { @@ -91,5 +110,18 @@ describe('PostSlug', () => { }) }) }) + + describe('reply method called when emitted reply received', () => { + it('CommentList', async () => { + wrapper.find(CommentList).vm.$emit('reply', { + id: 'commentAuthorId', + slug: 'ogerly', + }) + expect(stubs.HcEditor.methods.insertReply).toHaveBeenCalledWith({ + id: 'commentAuthorId', + slug: 'ogerly', + }) + }) + }) }) }) diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index 7c524973c..1d107941a 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -84,13 +84,25 @@
- - + + + {{ $t('settings.blocked-users.explanation.commenting-disabled') }} +
+ {{ $t('settings.blocked-users.explanation.commenting-explanation') }} + FAQ +
@@ -103,8 +115,8 @@ import HcHashtag from '~/components/Hashtag/Hashtag' import ContentMenu from '~/components/ContentMenu/ContentMenu' import UserTeaser from '~/components/UserTeaser/UserTeaser' import HcShoutButton from '~/components/ShoutButton.vue' -import HcCommentForm from '~/components/CommentForm/CommentForm' -import HcCommentList from '~/components/CommentList/CommentList' +import CommentForm from '~/components/CommentForm/CommentForm' +import CommentList from '~/components/CommentList/CommentList' import { postMenuModalsData, deletePostMutation } from '~/components/utils/PostHelpers' import PostQuery from '~/graphql/PostQuery' import HcEmotions from '~/components/Emotions/Emotions' @@ -122,8 +134,8 @@ export default { UserTeaser, HcShoutButton, ContentMenu, - HcCommentForm, - HcCommentList, + CommentForm, + CommentList, HcEmotions, ContentViewer, }, @@ -139,15 +151,10 @@ export default { title: 'loading', showNewCommentForm: true, blurred: false, + blocked: null, + postAuthor: null, } }, - watch: { - Post(post) { - this.post = post[0] || {} - this.title = this.post.title - this.blurred = this.post.imageBlurred - }, - }, mounted() { setTimeout(() => { // NOTE: quick fix for jumping flexbox implementation @@ -165,6 +172,9 @@ export default { }, }, methods: { + reply(message) { + this.$refs.commentForm && this.$refs.commentForm.reply(message) + }, isAuthor(id) { return this.$store.getters['auth/user'].id === id }, @@ -216,6 +226,12 @@ export default { id: this.$route.params.id, } }, + update({ Post }) { + this.post = Post[0] || {} + this.title = this.post.title + this.blurred = this.post.imageBlurred + this.postAuthor = this.post.author + }, fetchPolicy: 'cache-and-network', }, }, diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index ce220b66b..80471fff4 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -24,6 +24,8 @@ class="user-content-menu" @mute="muteUser" @unmute="unmuteUser" + @block="blockUser" + @unblock="unblockUser" /> @@ -64,20 +66,21 @@ - - - +
+ + {{ $t('settings.blocked-users.unblock') }} + + + {{ $t('settings.muted-users.unmute') }} + + +