From f9212446614f52ab402d8b6030ce0e58f99c54e3 Mon Sep 17 00:00:00 2001 From: Marco Bomfim Date: Wed, 6 Nov 2019 16:24:48 -0300 Subject: [PATCH 01/29] fix(editor): Fix hashtags not working after embeded content Up to this point, once you've inserted a given URL to the editor, and it renders a new embeded content, if you hit Return, and try using a tag, or mention, it would not work since the paragraph was never closed, causing a sintatic error that rendered the mentions unable to be used unless you explicitly hit return again, to escape the given text block you were in. See the PR/Issue for further info. --- .../Editor/defaultExtensions.spec.js | 28 ++++++++----------- webapp/components/Editor/nodes/Embed.js | 4 +-- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/webapp/components/Editor/defaultExtensions.spec.js b/webapp/components/Editor/defaultExtensions.spec.js index 78924db55..55cb861d8 100644 --- a/webapp/components/Editor/defaultExtensions.spec.js +++ b/webapp/components/Editor/defaultExtensions.spec.js @@ -63,30 +63,26 @@ describe('defaultExtensions', () => { it('recognizes embed code', () => { const editor = createEditor() const expected = { + type: 'doc', content: [ { + type: 'paragraph', content: [ { text: 'Baby loves cat:', - type: 'text', - }, - ], - type: 'paragraph', + type: 'text' + } + ] }, { - content: [ - { - attrs: { - dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo', - }, - type: 'embed', - }, - ], - type: 'paragraph', - }, - ], - type: 'doc', + type: 'embed', + attrs: { + dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo' + } + } + ] } + expect(editor.getJSON()).toEqual(expected) }) }) diff --git a/webapp/components/Editor/nodes/Embed.js b/webapp/components/Editor/nodes/Embed.js index 0d7a82a18..e84b717e2 100644 --- a/webapp/components/Editor/nodes/Embed.js +++ b/webapp/components/Editor/nodes/Embed.js @@ -38,8 +38,8 @@ export default class Embed extends Node { default: null, }, }, - group: 'inline', - inline: true, + group: 'block', + inline: false, parseDOM: [ { tag: 'a[href].embed', From 96801bb54fdd45caa344db62adee8d951d3545a3 Mon Sep 17 00:00:00 2001 From: Marco Bomfim Date: Wed, 6 Nov 2019 16:49:34 -0300 Subject: [PATCH 02/29] fix(editor): Fix embed thumbnail height --- webapp/components/Editor/Editor.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index fa37c64dc..234d94d2d 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -377,6 +377,7 @@ li > p { .embed-preview-image { width: 100%; height: auto; + max-height: 450px; } .embed-preview-image--clickable { From 2b2aaa04e1dd1c436ef79bf128ba5f869b2bad8d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2019 13:06:14 +0000 Subject: [PATCH 03/29] build(deps-dev): bump eslint from 5.16.0 to 6.6.0 in /webapp Bumps [eslint](https://github.com/eslint/eslint) from 5.16.0 to 6.6.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v5.16.0...v6.6.0) Signed-off-by: dependabot-preview[bot] --- webapp/package.json | 2 +- webapp/yarn.lock | 150 ++++++++++++++++++++++++++------------------ 2 files changed, 91 insertions(+), 61 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index a75d80095..517d03fb5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -111,7 +111,7 @@ "babel-preset-vue": "~2.0.2", "core-js": "~2.6.10", "css-loader": "~3.2.0", - "eslint": "~5.16.0", + "eslint": "~6.6.0", "eslint-config-prettier": "~6.5.0", "eslint-config-standard": "~12.0.0", "eslint-loader": "~3.0.2", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 72a6dd55b..3aaccce46 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -3255,6 +3255,11 @@ acorn-jsx@^5.0.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== +acorn-jsx@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" + integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== + acorn-walk@^6.0.1, acorn-walk@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" @@ -3275,6 +3280,11 @@ acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + address@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" @@ -3338,17 +3348,7 @@ ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: - version "6.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" - integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.10.2: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -5465,6 +5465,13 @@ cli-cursor@^2.0.0, cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-spinners@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" @@ -7168,66 +7175,67 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1, eslint-utils@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== +eslint-utils@^1.4.2, eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: - eslint-visitor-keys "^1.0.0" + eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@~5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== +eslint@~6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.6.0.tgz#4a01a2fb48d32aacef5530ee9c5a78f11a8afd04" + integrity sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" + ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^5.0.1" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob "^7.1.2" + glob-parent "^5.0.0" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" - js-yaml "^3.13.0" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.2" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" esm@^3.2.25: version "3.2.25" resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== -espree@^5.0.0, espree@^5.0.1: +espree@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== @@ -7236,6 +7244,15 @@ espree@^5.0.0, espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" +espree@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d" + integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA== + dependencies: + acorn "^7.1.0" + acorn-jsx "^5.1.0" + eslint-visitor-keys "^1.1.0" + esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -8121,7 +8138,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== @@ -8981,7 +8998,7 @@ inquirer@6.2.2: strip-ansi "^5.0.0" through "^2.3.6" -inquirer@^6.2.0: +inquirer@^6.2.0, inquirer@^6.2.2: version "6.5.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== @@ -9000,22 +9017,22 @@ inquirer@^6.2.0: strip-ansi "^5.1.0" through "^2.3.6" -inquirer@^6.2.2: - version "6.3.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" - integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== +inquirer@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" + integrity sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== dependencies: - ansi-escapes "^3.2.0" + ansi-escapes "^4.2.1" chalk "^2.4.2" - cli-cursor "^2.1.0" + cli-cursor "^3.1.0" cli-width "^2.0.0" external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.11" - mute-stream "0.0.7" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" run-async "^2.2.0" rxjs "^6.4.0" - string-width "^2.1.0" + string-width "^4.1.0" strip-ansi "^5.1.0" through "^2.3.6" @@ -11088,6 +11105,11 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + nan@^2.12.1, nan@^2.13.2: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" @@ -12016,7 +12038,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1, path-is-inside@^1.0.2: +path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -13970,6 +13992,14 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -15154,11 +15184,16 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-json-comments@^2.0.0, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + style-loader@^0.23.1, style-loader@~0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" @@ -15300,7 +15335,7 @@ symbol.prototype.description@^1.0.0: dependencies: has-symbols "^1.0.0" -table@5.4.6: +table@5.4.6, table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== @@ -15310,16 +15345,6 @@ table@5.4.6: slice-ansi "^2.1.0" string-width "^3.0.0" -table@^5.2.3: - version "5.2.3" - resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2" - integrity sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ== - dependencies: - ajv "^6.9.1" - lodash "^4.17.11" - slice-ansi "^2.1.0" - string-width "^3.0.0" - tapable@^1.0.0, tapable@^1.0.0-beta.5, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -16159,6 +16184,11 @@ v-tooltip@~2.0.2: popper.js "^1.15.0" vue-resize "^0.4.5" +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" From 45d60b233d4b762297cd0d90e5481784afc80079 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2019 04:21:13 +0000 Subject: [PATCH 04/29] build(deps-dev): bump eslint-plugin-vue from 6.0.0 to 6.0.1 in /webapp Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases) - [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v6.0.0...v6.0.1) Signed-off-by: dependabot-preview[bot] --- webapp/package.json | 2 +- webapp/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index a75d80095..df145b661 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -121,7 +121,7 @@ "eslint-plugin-prettier": "~3.1.1", "eslint-plugin-promise": "~4.2.1", "eslint-plugin-standard": "~4.0.1", - "eslint-plugin-vue": "~6.0.0", + "eslint-plugin-vue": "~6.0.1", "faker": "^4.1.0", "flush-promises": "^1.0.2", "fuse.js": "^3.4.5", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 72a6dd55b..b52a6cc56 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -7145,12 +7145,12 @@ eslint-plugin-standard@~4.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ== -eslint-plugin-vue@~6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.0.0.tgz#fc7a4116dff614a27be8639fb47973703dd332fa" - integrity sha512-+LxTJCd6nDt+AKQ1X+ySD48xJHft8OkeQmAhiq6UoAMxRFTiEKIDusiGgEUJLwKyiwGUGWbbqEbbWvupH5TSjg== +eslint-plugin-vue@~6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.0.1.tgz#166d3eb24cf290f3ff24d44fe9fca496f3924fc2" + integrity sha512-5tgFPcxGDKjfVB/6Yi56bKiWxygUibfZmzSh26Np3kuwAk/lfaGbVld+Yt+MPgD84ppvcachtiL4/winsXLjXA== dependencies: - vue-eslint-parser "^6.0.4" + vue-eslint-parser "^6.0.5" eslint-scope@^4.0.0, eslint-scope@^4.0.3: version "4.0.3" @@ -16284,10 +16284,10 @@ vue-count-to@~1.0.13: resolved "https://registry.yarnpkg.com/vue-count-to/-/vue-count-to-1.0.13.tgz#3e7573ea6e64c2b2972f64e0a2ab2e23c7590ff3" integrity sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ== -vue-eslint-parser@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-6.0.4.tgz#56ff47e2c2644bff39951d5a284982c7ecd6f7fa" - integrity sha512-GYsDsDWwKaGtnkW4nGUxr01wqIO2FB9/QHQTW1Gl5SUr5OyQvpnR90/D+Gq2cIxURX7aJ7+VyD+37Yx9eFwTgw== +vue-eslint-parser@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-6.0.5.tgz#c1c067c2755748e28f3872cd42e8c1c4c1a8059f" + integrity sha512-Bvjlx7rH1Ulvus56KHeLXOjEi3JMOYTa1GAqZr9lBQhd8weK8mV7U7V2l85yokBZEWHJQjLn6X3nosY8TzkOKg== dependencies: debug "^4.1.1" eslint-scope "^4.0.0" From 8ec91f46e7ad979a38aab0bc40ed117e7ff2648b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2019 09:55:41 +0000 Subject: [PATCH 05/29] build(deps-dev): bump prettier from 1.18.2 to 1.19.1 in /webapp Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.18.2...1.19.1) Signed-off-by: dependabot-preview[bot] --- webapp/package.json | 2 +- webapp/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 322e88817..2485695d0 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -129,7 +129,7 @@ "jest": "~24.9.0", "mutation-observer": "^1.0.3", "node-sass": "~4.13.0", - "prettier": "~1.18.2", + "prettier": "~1.19.1", "sass-loader": "~8.0.0", "storybook-design-token": "^0.4.1", "storybook-vue-router": "^1.0.7", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 31a6085fe..8310dcd39 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -12901,10 +12901,10 @@ prettier@1.16.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d" integrity sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw== -prettier@~1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" - integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== +prettier@~1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== pretty-bytes@^5.3.0: version "5.3.0" From c6e4c38de837120e54961b8069b726411c7637b0 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 12 Nov 2019 19:17:52 +0100 Subject: [PATCH 06/29] build(deps): remove deprecated debug flags I deprecated the debug flags myself here: https://github.com/neo4j-graphql/neo4j-graphql-js/pull/288 You can now debug the queries run by `neo4j-graphql-js` by starting the backend like this: ```bash DEBUG=neo4j-graphql-js yarn run backend ``` --- backend/package.json | 2 +- backend/src/schema/resolvers/badges.js | 2 +- backend/src/schema/resolvers/posts.js | 6 +++--- backend/src/schema/resolvers/users.js | 2 +- backend/yarn.lock | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/package.json b/backend/package.json index 699dc9972..a313bdc00 100644 --- a/backend/package.json +++ b/backend/package.json @@ -83,7 +83,7 @@ "minimatch": "^3.0.4", "mustache": "^3.1.0", "neo4j-driver": "~1.7.6", - "neo4j-graphql-js": "^2.8.0", + "neo4j-graphql-js": "^2.9.0", "neode": "^0.3.3", "node-fetch": "~2.6.0", "nodemailer": "^6.3.1", diff --git a/backend/src/schema/resolvers/badges.js b/backend/src/schema/resolvers/badges.js index 19bc24fd6..d10d6b482 100644 --- a/backend/src/schema/resolvers/badges.js +++ b/backend/src/schema/resolvers/badges.js @@ -3,7 +3,7 @@ import { neo4jgraphql } from 'neo4j-graphql-js' export default { Query: { Badge: async (object, args, context, resolveInfo) => { - return neo4jgraphql(object, args, context, resolveInfo, false) + return neo4jgraphql(object, args, context, resolveInfo) }, }, } diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index c6b36fe9d..0f2fd8e78 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -43,15 +43,15 @@ export default { Post: async (object, params, context, resolveInfo) => { params = await filterForBlockedUsers(params, context) params = await maintainPinnedPosts(params) - return neo4jgraphql(object, params, context, resolveInfo, false) + return neo4jgraphql(object, params, context, resolveInfo) }, findPosts: async (object, params, context, resolveInfo) => { params = await filterForBlockedUsers(params, context) - return neo4jgraphql(object, params, context, resolveInfo, false) + return neo4jgraphql(object, params, context, resolveInfo) }, profilePagePosts: async (object, params, context, resolveInfo) => { params = await filterForBlockedUsers(params, context) - return neo4jgraphql(object, params, context, resolveInfo, false) + return neo4jgraphql(object, params, context, resolveInfo) }, PostsEmotionsCountByEmotion: async (object, params, context, resolveInfo) => { const session = context.driver.session() diff --git a/backend/src/schema/resolvers/users.js b/backend/src/schema/resolvers/users.js index b86e134be..e93c983c0 100644 --- a/backend/src/schema/resolvers/users.js +++ b/backend/src/schema/resolvers/users.js @@ -54,7 +54,7 @@ export default { user = await user.toJson() return [user.node] } - return neo4jgraphql(object, args, context, resolveInfo, false) + return neo4jgraphql(object, args, context, resolveInfo) }, }, Mutation: { diff --git a/backend/yarn.lock b/backend/yarn.lock index 7dc7c6503..b0510c7d9 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -6070,10 +6070,10 @@ neo4j-driver@^1.7.3, neo4j-driver@^1.7.5, neo4j-driver@~1.7.6: text-encoding-utf-8 "^1.0.2" uri-js "^4.2.2" -neo4j-graphql-js@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.8.0.tgz#58035b9213656e17b6ed4c6cbf4dfe1c56a8a219" - integrity sha512-nDuzmi6W/YGIIVm+GAXCr/8CLABsU/RfeLebLH32vqeKViFATMfm4eT66aOq/GwHJ0838+o20yCbIFdx5rTP/A== +neo4j-graphql-js@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.9.0.tgz#b214a0546479565cb5b812fb7e602f2136d36a0d" + integrity sha512-vpOUPwx7Xwn2EZoe0i9z+AMJ4uwZeUjWDGiR4ZAR6ebNd5BaYpiC9SihYOZlS3hVXHZxADQfpGhz9dx++lZwlg== dependencies: "@babel/runtime" "^7.5.5" "@babel/runtime-corejs2" "^7.5.5" From aad6234be4bba81bdab13aa1426c85eda1ee420d Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Tue, 12 Nov 2019 21:12:57 +0100 Subject: [PATCH 07/29] Add script to debug neo4j-graphl-js @roschaefer, I needed to push a commit to trigger the build again, do you like this? --- backend/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/package.json b/backend/package.json index a313bdc00..3ea346fc3 100644 --- a/backend/package.json +++ b/backend/package.json @@ -7,6 +7,7 @@ "build": "babel src/ -d dist/ --copy-files", "start": "node dist/", "dev": "nodemon --exec babel-node src/ -e js,gql", + "debug": "DEBUG=neo4j-graphql-js yarn dev", "dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/index.js -e js,gql", "lint": "eslint src --config .eslintrc.js", "test": "jest --forceExit --detectOpenHandles --runInBand", From 985e23c5b480a22878f033f0558805ff1d313a81 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Thu, 14 Nov 2019 13:12:29 +0100 Subject: [PATCH 08/29] Remove obsolete script in package.json @mattwr18 nope, I would not create a script to debug neo4j-graphql-js. If you use environment variables, please also use `cross-env`. --- backend/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 3ea346fc3..a313bdc00 100644 --- a/backend/package.json +++ b/backend/package.json @@ -7,7 +7,6 @@ "build": "babel src/ -d dist/ --copy-files", "start": "node dist/", "dev": "nodemon --exec babel-node src/ -e js,gql", - "debug": "DEBUG=neo4j-graphql-js yarn dev", "dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/index.js -e js,gql", "lint": "eslint src --config .eslintrc.js", "test": "jest --forceExit --detectOpenHandles --runInBand", From 28e1ff9f551d69dc94b4eeeb1b46231d45a2c703 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Thu, 14 Nov 2019 23:08:33 +0100 Subject: [PATCH 09/29] Write documentation for neo4j-graphql-js --- SUMMARY.md | 1 + backend/neo4j-graphql-js.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 backend/neo4j-graphql-js.md diff --git a/SUMMARY.md b/SUMMARY.md index 11c4b0293..f3ed9d515 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -6,6 +6,7 @@ * [Neo4J](neo4j/README.md) * [Backend](backend/README.md) * [GraphQL](backend/graphql.md) + * [neo4j-graphql-js](backend/neo4j-graphql-js.md) * [Webapp](webapp/README.md) * [Components](webapp/components.md) * [HTML](webapp/html.md) diff --git a/backend/neo4j-graphql-js.md b/backend/neo4j-graphql-js.md new file mode 100644 index 000000000..8e1305ee5 --- /dev/null +++ b/backend/neo4j-graphql-js.md @@ -0,0 +1,16 @@ +# neo4j-graphql.js + +We use an npm package called `neo4j-graphql-js` as a cypher query builder. This +library also generates resolvers for graphql queries, unless we implement it +ourselves. + + +## Debugging + +As you can see in their [documentation](https://github.com/neo4j-graphql/neo4j-graphql-js) +it is possible to log out the generated cypher statements. To do so, run the +backend like this: + +```sh +DEBUG=neo4j-graphql-js yarn run dev +``` From 58f48781a22238523348d493d1abce209f34fde4 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Thu, 14 Nov 2019 23:53:31 +0100 Subject: [PATCH 10/29] Fix incorrect pronoun in docs --- backend/neo4j-graphql-js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/neo4j-graphql-js.md b/backend/neo4j-graphql-js.md index 8e1305ee5..280942acd 100644 --- a/backend/neo4j-graphql-js.md +++ b/backend/neo4j-graphql-js.md @@ -1,7 +1,7 @@ # neo4j-graphql.js We use an npm package called `neo4j-graphql-js` as a cypher query builder. This -library also generates resolvers for graphql queries, unless we implement it +library also generates resolvers for graphql queries, unless we implement them ourselves. From 9b9b72d528b4e2595280ac17fcec3b7fd1b66276 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Fri, 15 Nov 2019 00:22:00 +0100 Subject: [PATCH 11/29] Fix lint --- webapp/components/Editor/defaultExtensions.spec.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webapp/components/Editor/defaultExtensions.spec.js b/webapp/components/Editor/defaultExtensions.spec.js index 55cb861d8..13f8cb0f3 100644 --- a/webapp/components/Editor/defaultExtensions.spec.js +++ b/webapp/components/Editor/defaultExtensions.spec.js @@ -70,17 +70,17 @@ describe('defaultExtensions', () => { content: [ { text: 'Baby loves cat:', - type: 'text' - } - ] + type: 'text', + }, + ], }, { type: 'embed', attrs: { - dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo' - } - } - ] + dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo', + }, + }, + ], } expect(editor.getJSON()).toEqual(expected) From c31238087d867e1094e8a5b2d2a85268e9b7b35e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 04:21:57 +0000 Subject: [PATCH 12/29] build(deps-dev): bump eslint-plugin-jest in /webapp Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.0.2 to 23.0.4. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.0.2...v23.0.4) Signed-off-by: dependabot-preview[bot] --- webapp/package.json | 2 +- webapp/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 322e88817..015b7ec40 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -116,7 +116,7 @@ "eslint-config-standard": "~12.0.0", "eslint-loader": "~3.0.2", "eslint-plugin-import": "~2.18.2", - "eslint-plugin-jest": "~23.0.2", + "eslint-plugin-jest": "~23.0.4", "eslint-plugin-node": "~10.0.0", "eslint-plugin-prettier": "~3.1.1", "eslint-plugin-promise": "~4.2.1", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 31a6085fe..164505bc4 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -7116,10 +7116,10 @@ eslint-plugin-import@~2.18.2: read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@~23.0.2: - version "23.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.0.2.tgz#54a59bfe77245186afe13711a297067aefefff0a" - integrity sha512-fkxcvOJm0hC/jbJqYJjtuC9mvpTJqXd0Nixx7joVQvJoBQuXk/ws3+MtRYzD/4TcKSgvr21uuSLdwSxKJKC2cg== +eslint-plugin-jest@~23.0.4: + version "23.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.0.4.tgz#1ab81ffe3b16c5168efa72cbd4db14d335092aa0" + integrity sha512-OaP8hhT8chJNodUPvLJ6vl8gnalcsU/Ww1t9oR3HnGdEWjm/DdCCUXLOral+IPGAeWu/EwgVQCK/QtxALpH1Yw== dependencies: "@typescript-eslint/experimental-utils" "^2.5.0" From db2540342983db35539291fc9f8f691fffd37659 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Fri, 15 Nov 2019 11:20:50 +0100 Subject: [PATCH 13/29] Fix lint --- webapp/components/Editor/Editor.story.js | 6 +++++- webapp/pages/admin/hashtags.vue | 4 +--- webapp/pages/admin/users.vue | 4 +--- webapp/plugins/vue-filters.js | 6 +++++- webapp/store/auth.test.js | 10 ++++++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/webapp/components/Editor/Editor.story.js b/webapp/components/Editor/Editor.story.js index 7a69b347f..8efcf3f4c 100644 --- a/webapp/components/Editor/Editor.story.js +++ b/webapp/components/Editor/Editor.story.js @@ -27,7 +27,11 @@ const plugins = [ ] helpers.init({ plugins }) -const users = [{ id: 1, slug: 'peter' }, { id: 2, slug: 'sandra' }, { id: 3, slug: 'jane' }] +const users = [ + { id: 1, slug: 'peter' }, + { id: 2, slug: 'sandra' }, + { id: 3, slug: 'jane' }, +] storiesOf('Editor', module) .addDecorator(withA11y) diff --git a/webapp/pages/admin/hashtags.vue b/webapp/pages/admin/hashtags.vue index 76306873a..521d3110a 100644 --- a/webapp/pages/admin/hashtags.vue +++ b/webapp/pages/admin/hashtags.vue @@ -1,9 +1,7 @@ - -