From 640999ab617f2918abe32d324944fabb64b99bf0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 31 Mar 2020 17:24:05 +1100 Subject: [PATCH 1/7] Password whitespace trim on set --- .../session/SessionPasswordModal.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 3c415df5a..9a991d2e7 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -20,6 +20,9 @@ interface State { } export class SessionPasswordModal extends React.Component { + private readonly passwordInput: React.RefObject; + private readonly passwordInputConfirm: React.RefObject; + constructor(props: any) { super(props); @@ -34,10 +37,13 @@ export class SessionPasswordModal extends React.Component { this.onKeyUp = this.onKeyUp.bind(this); this.onPaste = this.onPaste.bind(this); + + this.passwordInput = React.createRef(); + this.passwordInputConfirm = React.createRef(); } public componentDidMount() { - setTimeout(() => $('#password-modal-input').focus(), 100); + setTimeout(() => this.passwordInput.current?.focus(), 100); } public render() { @@ -64,6 +70,7 @@ export class SessionPasswordModal extends React.Component { { { } private async setPassword(onSuccess: any) { - const enteredPassword = String($('#password-modal-input').val()); - const enteredPasswordConfirm = String( - $('#password-modal-input-confirm').val() - ); + if (!this.passwordInput.current || !this.passwordInputConfirm.current) { + return; + } + + // Trim leading / trailing whitespace for UX + const enteredPassword = String(this.passwordInput.current.value).trim(); + const enteredPasswordConfirm = String(this.passwordInputConfirm.current.value).trim(); if (enteredPassword.length === 0 || enteredPasswordConfirm.length === 0) { return; } - // Check passwords enntered + // Check passwords entered if ( enteredPassword.length === 0 || (this.props.action === PasswordAction.Change && From b4cb6e1087807336b2e2b17a4eff6709b3780939 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 31 Mar 2020 17:32:50 +1100 Subject: [PATCH 2/7] Typescript 3.7 --- package.json | 2 +- ts/components/session/SessionPasswordModal.tsx | 8 ++------ yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ee6822cbc..b24f224e5 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "tslint": "5.13.0", "tslint-microsoft-contrib": "6.0.0", "tslint-react": "3.6.0", - "typescript": "3.3.3333", + "typescript": "3.7", "webpack": "4.4.1" }, "engines": { diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 9a991d2e7..ea418f521 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -134,13 +134,9 @@ export class SessionPasswordModal extends React.Component { } private async setPassword(onSuccess: any) { - if (!this.passwordInput.current || !this.passwordInputConfirm.current) { - return; - } - // Trim leading / trailing whitespace for UX - const enteredPassword = String(this.passwordInput.current.value).trim(); - const enteredPasswordConfirm = String(this.passwordInputConfirm.current.value).trim(); + const enteredPassword = String(this.passwordInput.current?.value).trim(); + const enteredPasswordConfirm = String(this.passwordInputConfirm.current?.value).trim(); if (enteredPassword.length === 0 || enteredPasswordConfirm.length === 0) { return; diff --git a/yarn.lock b/yarn.lock index ff06052c3..49c7af3ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10553,10 +10553,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.3.3333: - version "3.3.3333" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" - integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== +typescript@3.7: + version "3.7.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" + integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== uc.micro@^1.0.1: version "1.0.6" From 33967ccc50d2bcb87b7835aeb0b854df857f9462 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 31 Mar 2020 17:44:05 +1100 Subject: [PATCH 3/7] Typescript 3.8 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b24f224e5..47591de31 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "tslint": "5.13.0", "tslint-microsoft-contrib": "6.0.0", "tslint-react": "3.6.0", - "typescript": "3.7", + "typescript": "^3.8.3", "webpack": "4.4.1" }, "engines": { diff --git a/yarn.lock b/yarn.lock index 49c7af3ab..c9ec2710e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10553,10 +10553,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.7: - version "3.7.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" - integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== +typescript@^3.8.3: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== uc.micro@^1.0.1: version "1.0.6" From 3793c0fecad3bf3f4885d8777bf72f862af19f9d Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 31 Mar 2020 17:52:32 +1100 Subject: [PATCH 4/7] upgrade tslint --- package.json | 6 +- .../session/SessionPasswordModal.tsx | 18 +++- yarn.lock | 87 +++++++++++++------ 3 files changed, 78 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 47591de31..71dc38744 100644 --- a/package.json +++ b/package.json @@ -189,9 +189,9 @@ "sinon": "4.4.2", "spectron": "^10.0.0", "ts-loader": "4.1.0", - "tslint": "5.13.0", - "tslint-microsoft-contrib": "6.0.0", - "tslint-react": "3.6.0", + "tslint": "^6.1.0", + "tslint-microsoft-contrib": "^6.2.0", + "tslint-react": "^4.2.0", "typescript": "^3.8.3", "webpack": "4.4.1" }, diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index ea418f521..4d7091057 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -43,7 +43,13 @@ export class SessionPasswordModal extends React.Component { } public componentDidMount() { - setTimeout(() => this.passwordInput.current?.focus(), 100); + setTimeout(() => { + if (!this.passwordInput.current) { + return; + } + + this.passwordInput.current.focus(); + }, 100); } public render() { @@ -134,9 +140,15 @@ export class SessionPasswordModal extends React.Component { } private async setPassword(onSuccess: any) { + if (!this.passwordInput.current || !this.passwordInputConfirm.current) { + return; + } + // Trim leading / trailing whitespace for UX - const enteredPassword = String(this.passwordInput.current?.value).trim(); - const enteredPasswordConfirm = String(this.passwordInputConfirm.current?.value).trim(); + const enteredPassword = String(this.passwordInput.current.value).trim(); + const enteredPasswordConfirm = String( + this.passwordInputConfirm.current.value + ).trim(); if (enteredPassword.length === 0 || enteredPasswordConfirm.length === 0) { return; diff --git a/yarn.lock b/yarn.lock index c9ec2710e..d7a95989b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,6 +7,27 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.0.3.tgz#bc5b5532ecafd923a61f2fb097e3b108c0106a3f" integrity sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA== +"@babel/code-frame@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" + integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.3": version "7.8.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" @@ -2811,11 +2832,16 @@ diff@3.3.1: resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" integrity sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww== -diff@^3.1.0, diff@^3.2.0: +diff@^3.1.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -5662,7 +5688,7 @@ js-sha512@0.8.0: resolved "https://registry.yarnpkg.com/js-sha512/-/js-sha512-0.8.0.tgz#dd22db8d02756faccf19f218e3ed61ec8249f7d4" integrity sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ== -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -5680,7 +5706,7 @@ js-yaml@3.13.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.13.1, js-yaml@^3.2.7, js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@^3.13.1, js-yaml@^3.2.7, js-yaml@^3.9.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -10442,55 +10468,62 @@ ts-loader@4.1.0: micromatch "^3.1.4" semver "^5.0.1" -tslib@^1.8.0, tslib@^1.8.1: +tslib@^1.10.0, tslib@^1.8.1: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== -tslint-microsoft-contrib@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-6.0.0.tgz#7bff73c9ad7a0b7eb5cdb04906de58f42a2bf7a2" - integrity sha512-R//efwn+34IUjTJeYgNDAJdzG0jyLWIehygPt/PHuZAieTolFVS56FgeFW7DOLap9ghXzMiFPTmDgm54qaL7QA== +tslint-microsoft-contrib@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-6.2.0.tgz#8aa0f40584d066d05e6a5e7988da5163b85f2ad4" + integrity sha512-6tfi/2tHqV/3CL77pULBcK+foty11Rr0idRDxKnteTaKm6gWF9qmaCNU17HVssOuwlYNyOmd9Jsmjd+1t3a3qw== dependencies: tsutils "^2.27.2 <2.29.0" -tslint-react@3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1" - integrity sha512-AIv1QcsSnj7e9pFir6cJ6vIncTqxfqeFF3Lzh8SuuBljueYzEAtByuB6zMaD27BL0xhMEqsZ9s5eHuCONydjBw== +tslint-react@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-4.2.0.tgz#41b16e0438365f8d3ed4120501f02cabff9fd1e4" + integrity sha512-lO22+FKr9ZZGueGiuALzvZE/8ANoDoCHGCknX1Ge3ALrfcLQHQ1VGdyb1scZXQFdEQEfwBTIU40r5BUlJpn0JA== dependencies: - tsutils "^2.13.1" + tsutils "^3.9.1" -tslint@5.13.0: - version "5.13.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.13.0.tgz#239a2357c36b620d72d86744754b6fc088a25359" - integrity sha512-ECOOQRxXCYnUUePG5h/+Z1Zouobk3KFpIHA9aKBB/nnMxs97S1JJPDGt5J4cGm1y9U9VmVlfboOxA8n1kSNzGw== +tslint@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.0.tgz#c6c611b8ba0eed1549bf5a59ba05a7732133d851" + integrity sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ== dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" - diff "^3.2.0" + diff "^4.0.1" glob "^7.1.1" - js-yaml "^3.7.0" + js-yaml "^3.13.1" minimatch "^3.0.4" mkdirp "^0.5.1" resolve "^1.3.2" semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.27.2" + tslib "^1.10.0" + tsutils "^2.29.0" -tsutils@^2.13.1, tsutils@^2.27.2: +"tsutils@^2.27.2 <2.29.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.28.0.tgz#6bd71e160828f9d019b6f4e844742228f85169a1" + integrity sha512-bh5nAtW0tuhvOJnx1GLRn5ScraRLICGyJV5wJhtRWOLsxW70Kk5tZtpK3O/hW6LDnqKS9mlUMPZj9fEMJ0gxqA== + dependencies: + tslib "^1.8.1" + +tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" -"tsutils@^2.27.2 <2.29.0": - version "2.28.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.28.0.tgz#6bd71e160828f9d019b6f4e844742228f85169a1" - integrity sha512-bh5nAtW0tuhvOJnx1GLRn5ScraRLICGyJV5wJhtRWOLsxW70Kk5tZtpK3O/hW6LDnqKS9mlUMPZj9fEMJ0gxqA== +tsutils@^3.9.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== dependencies: tslib "^1.8.1" From 9349ebd37ab70e3d8f7f619f7ae793de8703a498 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 31 Mar 2020 17:56:23 +1100 Subject: [PATCH 5/7] fancy syntax --- ts/components/session/SessionPasswordModal.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 4d7091057..441196314 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -44,11 +44,7 @@ export class SessionPasswordModal extends React.Component { public componentDidMount() { setTimeout(() => { - if (!this.passwordInput.current) { - return; - } - - this.passwordInput.current.focus(); + this.passwordInput.current?.focus(); }, 100); } @@ -140,14 +136,10 @@ export class SessionPasswordModal extends React.Component { } private async setPassword(onSuccess: any) { - if (!this.passwordInput.current || !this.passwordInputConfirm.current) { - return; - } - // Trim leading / trailing whitespace for UX - const enteredPassword = String(this.passwordInput.current.value).trim(); + const enteredPassword = String(this.passwordInput.current?.value).trim(); const enteredPasswordConfirm = String( - this.passwordInputConfirm.current.value + this.passwordInputConfirm.current?.value ).trim(); if (enteredPassword.length === 0 || enteredPasswordConfirm.length === 0) { From 5eec031803fad27fee622b9eda6aee7d28a582b6 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 1 Apr 2020 14:13:51 +1100 Subject: [PATCH 6/7] Revert fancy code --- ts/components/session/SessionPasswordModal.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 441196314..4dcfa6adf 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -44,7 +44,11 @@ export class SessionPasswordModal extends React.Component { public componentDidMount() { setTimeout(() => { - this.passwordInput.current?.focus(); + if (!this.passwordInput.current) { + return; + } + + this.passwordInput.current.focus(); }, 100); } @@ -136,10 +140,14 @@ export class SessionPasswordModal extends React.Component { } private async setPassword(onSuccess: any) { + if (!this.passwordInput.current || !this.passwordInputConfirm.current){ + return; + } + // Trim leading / trailing whitespace for UX - const enteredPassword = String(this.passwordInput.current?.value).trim(); + const enteredPassword = String(this.passwordInput.current.value).trim(); const enteredPasswordConfirm = String( - this.passwordInputConfirm.current?.value + this.passwordInputConfirm.current.value ).trim(); if (enteredPassword.length === 0 || enteredPasswordConfirm.length === 0) { From f76b12b8143d09e04eed772c53c71432045c95ca Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 1 Apr 2020 14:34:36 +1100 Subject: [PATCH 7/7] Split typescript upgrade to new pr --- package.json | 8 +- .../session/SessionPasswordModal.tsx | 2 +- yarn.lock | 95 ++++++------------- 3 files changed, 36 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 71dc38744..ee6822cbc 100644 --- a/package.json +++ b/package.json @@ -189,10 +189,10 @@ "sinon": "4.4.2", "spectron": "^10.0.0", "ts-loader": "4.1.0", - "tslint": "^6.1.0", - "tslint-microsoft-contrib": "^6.2.0", - "tslint-react": "^4.2.0", - "typescript": "^3.8.3", + "tslint": "5.13.0", + "tslint-microsoft-contrib": "6.0.0", + "tslint-react": "3.6.0", + "typescript": "3.3.3333", "webpack": "4.4.1" }, "engines": { diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 4dcfa6adf..4d7091057 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -140,7 +140,7 @@ export class SessionPasswordModal extends React.Component { } private async setPassword(onSuccess: any) { - if (!this.passwordInput.current || !this.passwordInputConfirm.current){ + if (!this.passwordInput.current || !this.passwordInputConfirm.current) { return; } diff --git a/yarn.lock b/yarn.lock index d7a95989b..ff06052c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,27 +7,6 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.0.3.tgz#bc5b5532ecafd923a61f2fb097e3b108c0106a3f" integrity sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA== -"@babel/code-frame@^7.0.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" - -"@babel/helper-validator-identifier@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" - integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== - -"@babel/highlight@^7.8.3": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" - integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== - dependencies: - "@babel/helper-validator-identifier" "^7.9.0" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@babel/parser@^7.1.3": version "7.8.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" @@ -2832,16 +2811,11 @@ diff@3.3.1: resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" integrity sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww== -diff@^3.1.0: +diff@^3.1.0, diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -5688,7 +5662,7 @@ js-sha512@0.8.0: resolved "https://registry.yarnpkg.com/js-sha512/-/js-sha512-0.8.0.tgz#dd22db8d02756faccf19f218e3ed61ec8249f7d4" integrity sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ== -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -5706,7 +5680,7 @@ js-yaml@3.13.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.13.1, js-yaml@^3.2.7, js-yaml@^3.9.1: +js-yaml@^3.13.1, js-yaml@^3.2.7, js-yaml@^3.7.0, js-yaml@^3.9.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -10468,62 +10442,55 @@ ts-loader@4.1.0: micromatch "^3.1.4" semver "^5.0.1" -tslib@^1.10.0, tslib@^1.8.1: +tslib@^1.8.0, tslib@^1.8.1: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== -tslint-microsoft-contrib@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-6.2.0.tgz#8aa0f40584d066d05e6a5e7988da5163b85f2ad4" - integrity sha512-6tfi/2tHqV/3CL77pULBcK+foty11Rr0idRDxKnteTaKm6gWF9qmaCNU17HVssOuwlYNyOmd9Jsmjd+1t3a3qw== +tslint-microsoft-contrib@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-6.0.0.tgz#7bff73c9ad7a0b7eb5cdb04906de58f42a2bf7a2" + integrity sha512-R//efwn+34IUjTJeYgNDAJdzG0jyLWIehygPt/PHuZAieTolFVS56FgeFW7DOLap9ghXzMiFPTmDgm54qaL7QA== dependencies: tsutils "^2.27.2 <2.29.0" -tslint-react@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-4.2.0.tgz#41b16e0438365f8d3ed4120501f02cabff9fd1e4" - integrity sha512-lO22+FKr9ZZGueGiuALzvZE/8ANoDoCHGCknX1Ge3ALrfcLQHQ1VGdyb1scZXQFdEQEfwBTIU40r5BUlJpn0JA== +tslint-react@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1" + integrity sha512-AIv1QcsSnj7e9pFir6cJ6vIncTqxfqeFF3Lzh8SuuBljueYzEAtByuB6zMaD27BL0xhMEqsZ9s5eHuCONydjBw== dependencies: - tsutils "^3.9.1" + tsutils "^2.13.1" -tslint@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.0.tgz#c6c611b8ba0eed1549bf5a59ba05a7732133d851" - integrity sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ== +tslint@5.13.0: + version "5.13.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.13.0.tgz#239a2357c36b620d72d86744754b6fc088a25359" + integrity sha512-ECOOQRxXCYnUUePG5h/+Z1Zouobk3KFpIHA9aKBB/nnMxs97S1JJPDGt5J4cGm1y9U9VmVlfboOxA8n1kSNzGw== dependencies: - "@babel/code-frame" "^7.0.0" + babel-code-frame "^6.22.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" - diff "^4.0.1" + diff "^3.2.0" glob "^7.1.1" - js-yaml "^3.13.1" + js-yaml "^3.7.0" minimatch "^3.0.4" mkdirp "^0.5.1" resolve "^1.3.2" semver "^5.3.0" - tslib "^1.10.0" - tsutils "^2.29.0" + tslib "^1.8.0" + tsutils "^2.27.2" -"tsutils@^2.27.2 <2.29.0": - version "2.28.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.28.0.tgz#6bd71e160828f9d019b6f4e844742228f85169a1" - integrity sha512-bh5nAtW0tuhvOJnx1GLRn5ScraRLICGyJV5wJhtRWOLsxW70Kk5tZtpK3O/hW6LDnqKS9mlUMPZj9fEMJ0gxqA== - dependencies: - tslib "^1.8.1" - -tsutils@^2.29.0: +tsutils@^2.13.1, tsutils@^2.27.2: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" -tsutils@^3.9.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== +"tsutils@^2.27.2 <2.29.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.28.0.tgz#6bd71e160828f9d019b6f4e844742228f85169a1" + integrity sha512-bh5nAtW0tuhvOJnx1GLRn5ScraRLICGyJV5wJhtRWOLsxW70Kk5tZtpK3O/hW6LDnqKS9mlUMPZj9fEMJ0gxqA== dependencies: tslib "^1.8.1" @@ -10586,10 +10553,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@3.3.3333: + version "3.3.3333" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" + integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== uc.micro@^1.0.1: version "1.0.6"