Upgrade TypeScript to the latest version, v4.1.3

This commit is contained in:
Evan Hahn 2020-12-18 11:09:31 -06:00 committed by Scott Nonnenberg
parent 38ab92da5d
commit dd0ea6b3fe
10 changed files with 94 additions and 88 deletions

View file

@ -256,7 +256,7 @@
"ts-loader": "4.1.0", "ts-loader": "4.1.0",
"ts-node": "8.3.0", "ts-node": "8.3.0",
"typed-scss-modules": "0.0.11", "typed-scss-modules": "0.0.11",
"typescript": "3.8.3", "typescript": "4.1.3",
"webpack": "4.39.2", "webpack": "4.39.2",
"webpack-cli": "3.3.7", "webpack-cli": "3.3.7",
"webpack-dev-server": "3.8.0" "webpack-dev-server": "3.8.0"

View file

@ -41,7 +41,7 @@ export type PropsData = {
lastUpdated?: number; lastUpdated?: number;
unreadCount?: number; unreadCount?: number;
markedUnread?: boolean; markedUnread?: boolean;
isSelected: boolean; isSelected?: boolean;
acceptedMessageRequest?: boolean; acceptedMessageRequest?: boolean;
draftPreview?: string; draftPreview?: string;

View file

@ -32,6 +32,7 @@ import {
} from './storageRecordOps'; } from './storageRecordOps';
import { ConversationModel } from '../models/conversations'; import { ConversationModel } from '../models/conversations';
import { storageJobQueue } from '../util/JobQueue'; import { storageJobQueue } from '../util/JobQueue';
import { sleep } from '../util/sleep';
const { const {
eraseStorageServiceStateFromConversations, eraseStorageServiceStateFromConversations,
@ -66,11 +67,7 @@ const BACKOFF: BackoffType = {
function backOff(count: number) { function backOff(count: number) {
const ms = BACKOFF[count] || BACKOFF.max; const ms = BACKOFF[count] || BACKOFF.max;
return new Promise(resolve => { return sleep(ms);
setTimeout(() => {
resolve();
}, ms);
});
} }
type UnknownRecord = { type UnknownRecord = {

View file

@ -317,7 +317,7 @@ async function _shutdown() {
} }
// Outstanding jobs; we need to wait until the last one is done // Outstanding jobs; we need to wait until the last one is done
_shutdownPromise = new Promise((resolve, reject) => { _shutdownPromise = new Promise<void>((resolve, reject) => {
_shutdownCallback = (error: Error) => { _shutdownCallback = (error: Error) => {
window.log.info('data.shutdown: process complete'); window.log.info('data.shutdown: process complete');
if (error) { if (error) {
@ -1364,7 +1364,7 @@ async function removeOtherData() {
} }
async function callChannel(name: string) { async function callChannel(name: string) {
return new Promise((resolve, reject) => { return new Promise<void>((resolve, reject) => {
ipcRenderer.send(name); ipcRenderer.send(name);
ipcRenderer.once(`${name}-done`, (_, error) => { ipcRenderer.once(`${name}-done`, (_, error) => {
if (error) { if (error) {

View file

@ -18,7 +18,7 @@ describe('LatestQueue', () => {
const spy = sinon.spy(); const spy = sinon.spy();
let openFirstTaskGate: undefined | (() => void); let openFirstTaskGate: undefined | (() => void);
const firstTaskGate = new Promise(resolve => { const firstTaskGate = new Promise<void>(resolve => {
openFirstTaskGate = resolve; openFirstTaskGate = resolve;
}); });
if (!openFirstTaskGate) { if (!openFirstTaskGate) {

View file

@ -9,7 +9,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */
import { isNumber, map, omit } from 'lodash'; import { isNumber, map, omit, noop } from 'lodash';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { v4 as getGuid } from 'uuid'; import { v4 as getGuid } from 'uuid';
@ -276,9 +276,9 @@ class MessageReceiverInner extends EventTarget {
shutdown() { shutdown() {
if (this.socket) { if (this.socket) {
delete this.socket.onclose; this.socket.onclose = noop;
delete this.socket.onerror; this.socket.onerror = noop;
delete this.socket.onopen; this.socket.onopen = noop;
this.socket = undefined; this.socket = undefined;
} }

View file

@ -108,7 +108,7 @@ export async function downloadUpdate(
const downloadStream = stream(updateFileUrl, getGotOptions()); const downloadStream = stream(updateFileUrl, getGotOptions());
const writeStream = createWriteStream(targetUpdatePath); const writeStream = createWriteStream(targetUpdatePath);
await new Promise((resolve, reject) => { await new Promise<void>((resolve, reject) => {
downloadStream.on('error', error => { downloadStream.on('error', error => {
reject(error); reject(error);
}); });

View file

@ -19,21 +19,25 @@ const loadImageData = async (input: Input): Promise<ImageData> => {
reject(processError); reject(processError);
return; return;
} }
if (canvasOrError instanceof HTMLCanvasElement) {
if (!(canvasOrError instanceof HTMLCanvasElement)) {
reject(new Error('imageToBlurHash: result is not a canvas'));
return;
}
const context = canvasOrError.getContext('2d'); const context = canvasOrError.getContext('2d');
resolve( if (!context) {
context?.getImageData( reject(
0, new Error(
0, 'imageToBlurHash: cannot get CanvasRenderingContext2D from canvas'
canvasOrError.width,
canvasOrError.height
) )
); );
return;
} }
const error = new Error(
'imageToBlurHash: Failed to place image on canvas' resolve(
context.getImageData(0, 0, canvasOrError.width, canvasOrError.height)
); );
reject(error);
}, },
// Calculating the blurhash on large images is a long-running and // Calculating the blurhash on large images is a long-running and
// synchronous operation, so here we ensure the images are a reasonable // synchronous operation, so here we ensure the images are a reasonable

View file

@ -14328,7 +14328,7 @@
"rule": "DOM-innerHTML", "rule": "DOM-innerHTML",
"path": "ts/backbone/views/Lightbox.js", "path": "ts/backbone/views/Lightbox.js",
"line": " container.innerHTML = '';", "line": " container.innerHTML = '';",
"lineNumber": 10, "lineNumber": 11,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-17T20:50:40.689Z", "updated": "2018-09-17T20:50:40.689Z",
"reasonDetail": "Hard-coded value" "reasonDetail": "Hard-coded value"
@ -14337,7 +14337,7 @@
"rule": "DOM-innerHTML", "rule": "DOM-innerHTML",
"path": "ts/backbone/views/Lightbox.js", "path": "ts/backbone/views/Lightbox.js",
"line": " container.innerHTML = '';", "line": " container.innerHTML = '';",
"lineNumber": 19, "lineNumber": 21,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-17T20:50:40.689Z", "updated": "2018-09-17T20:50:40.689Z",
"reasonDetail": "Hard-coded value" "reasonDetail": "Hard-coded value"
@ -14364,7 +14364,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/AvatarPopup.js", "path": "ts/components/AvatarPopup.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 20, "lineNumber": 33,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14373,7 +14373,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallNeedPermissionScreen.js", "path": "ts/components/CallNeedPermissionScreen.js",
"line": " const autoCloseAtRef = react_1.useRef(Date.now() + AUTO_CLOSE_MS);", "line": " const autoCloseAtRef = react_1.useRef(Date.now() + AUTO_CLOSE_MS);",
"lineNumber": 19, "lineNumber": 32,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't touch the DOM." "reasonDetail": "Doesn't touch the DOM."
@ -14382,7 +14382,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallScreen.js", "path": "ts/components/CallScreen.js",
"line": " const localVideoRef = react_1.useRef(null);", "line": " const localVideoRef = react_1.useRef(null);",
"lineNumber": 41, "lineNumber": 54,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T21:35:52.858Z", "updated": "2020-10-26T21:35:52.858Z",
"reasonDetail": "Used to get the local video element for rendering." "reasonDetail": "Used to get the local video element for rendering."
@ -14391,7 +14391,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingLobby.js", "path": "ts/components/CallingLobby.js",
"line": " const localVideoRef = react_1.default.useRef(null);", "line": " const localVideoRef = react_1.default.useRef(null);",
"lineNumber": 24, "lineNumber": 25,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Used to get the local video element for rendering." "reasonDetail": "Used to get the local video element for rendering."
@ -14400,7 +14400,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.js", "path": "ts/components/CallingPip.js",
"line": " const videoContainerRef = react_1.default.useRef(null);", "line": " const videoContainerRef = react_1.default.useRef(null);",
"lineNumber": 25, "lineNumber": 26,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Element is measured. Its HTML is not used." "reasonDetail": "Element is measured. Its HTML is not used."
@ -14409,7 +14409,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.js", "path": "ts/components/CallingPip.js",
"line": " const localVideoRef = react_1.default.useRef(null);", "line": " const localVideoRef = react_1.default.useRef(null);",
"lineNumber": 26, "lineNumber": 27,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Used to get the local video element for rendering." "reasonDetail": "Used to get the local video element for rendering."
@ -14427,7 +14427,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/CaptionEditor.js", "path": "ts/components/CaptionEditor.js",
"line": " this.inputRef = react_1.default.createRef();", "line": " this.inputRef = react_1.default.createRef();",
"lineNumber": 28, "lineNumber": 41,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-03-09T00:08:44.242Z", "updated": "2019-03-09T00:08:44.242Z",
"reasonDetail": "Used only to set focus" "reasonDetail": "Used only to set focus"
@ -14445,7 +14445,7 @@
"rule": "DOM-innerHTML", "rule": "DOM-innerHTML",
"path": "ts/components/CompositionArea.js", "path": "ts/components/CompositionArea.js",
"line": " el.innerHTML = '';", "line": " el.innerHTML = '';",
"lineNumber": 28, "lineNumber": 41,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-20T20:10:43.540Z", "updated": "2020-05-20T20:10:43.540Z",
"reasonDetail": "Our code, no user input, only clearing out the dom" "reasonDetail": "Our code, no user input, only clearing out the dom"
@ -14454,7 +14454,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionArea.js", "path": "ts/components/CompositionArea.js",
"line": " const inputApiRef = React.useRef();", "line": " const inputApiRef = React.useRef();",
"lineNumber": 46, "lineNumber": 59,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14463,7 +14463,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionArea.js", "path": "ts/components/CompositionArea.js",
"line": " const attSlotRef = React.useRef(null);", "line": " const attSlotRef = React.useRef(null);",
"lineNumber": 69, "lineNumber": 82,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Needed for the composition area." "reasonDetail": "Needed for the composition area."
@ -14472,7 +14472,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionArea.js", "path": "ts/components/CompositionArea.js",
"line": " const micCellRef = React.useRef(null);", "line": " const micCellRef = React.useRef(null);",
"lineNumber": 103, "lineNumber": 116,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Needed for the composition area." "reasonDetail": "Needed for the composition area."
@ -14490,7 +14490,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const emojiCompletionRef = React.useRef();", "line": " const emojiCompletionRef = React.useRef();",
"lineNumber": 43, "lineNumber": 56,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14499,7 +14499,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const mentionCompletionRef = React.useRef();", "line": " const mentionCompletionRef = React.useRef();",
"lineNumber": 44, "lineNumber": 57,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T23:54:34.273Z", "updated": "2020-10-26T23:54:34.273Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14508,7 +14508,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const quillRef = React.useRef();", "line": " const quillRef = React.useRef();",
"lineNumber": 45, "lineNumber": 58,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14517,7 +14517,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const scrollerRef = React.useRef(null);", "line": " const scrollerRef = React.useRef(null);",
"lineNumber": 46, "lineNumber": 59,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Used with Quill for scrolling." "reasonDetail": "Used with Quill for scrolling."
@ -14526,7 +14526,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const propsRef = React.useRef(props);", "line": " const propsRef = React.useRef(props);",
"lineNumber": 47, "lineNumber": 60,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14535,7 +14535,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CompositionInput.js", "path": "ts/components/CompositionInput.js",
"line": " const memberRepositoryRef = React.useRef(new memberRepository_1.MemberRepository());", "line": " const memberRepositoryRef = React.useRef(new memberRepository_1.MemberRepository());",
"lineNumber": 48, "lineNumber": 61,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T23:56:13.482Z", "updated": "2020-10-26T23:56:13.482Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14544,7 +14544,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/DirectCallRemoteParticipant.js", "path": "ts/components/DirectCallRemoteParticipant.js",
"line": " const remoteVideoRef = react_1.useRef(null);", "line": " const remoteVideoRef = react_1.useRef(null);",
"lineNumber": 15, "lineNumber": 28,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-11T21:56:04.179Z", "updated": "2020-11-11T21:56:04.179Z",
"reasonDetail": "Needed to render the remote video element." "reasonDetail": "Needed to render the remote video element."
@ -14553,7 +14553,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/GroupCallRemoteParticipant.js", "path": "ts/components/GroupCallRemoteParticipant.js",
"line": " const remoteVideoRef = react_1.useRef(null);", "line": " const remoteVideoRef = react_1.useRef(null);",
"lineNumber": 31, "lineNumber": 44,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-11T21:56:04.179Z", "updated": "2020-11-11T21:56:04.179Z",
"reasonDetail": "Needed to render the remote video element." "reasonDetail": "Needed to render the remote video element."
@ -14562,7 +14562,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/GroupCallRemoteParticipant.js", "path": "ts/components/GroupCallRemoteParticipant.js",
"line": " const canvasContextRef = react_1.useRef(null);", "line": " const canvasContextRef = react_1.useRef(null);",
"lineNumber": 32, "lineNumber": 45,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-17T23:29:38.698Z", "updated": "2020-11-17T23:29:38.698Z",
"reasonDetail": "Doesn't touch the DOM." "reasonDetail": "Doesn't touch the DOM."
@ -14571,7 +14571,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/GroupCallRemoteParticipant.js", "path": "ts/components/GroupCallRemoteParticipant.js",
"line": " const frameBufferRef = react_1.useRef(new ArrayBuffer(FRAME_BUFFER_SIZE));", "line": " const frameBufferRef = react_1.useRef(new ArrayBuffer(FRAME_BUFFER_SIZE));",
"lineNumber": 33, "lineNumber": 46,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-17T16:24:25.480Z", "updated": "2020-11-17T16:24:25.480Z",
"reasonDetail": "Doesn't touch the DOM." "reasonDetail": "Doesn't touch the DOM."
@ -14580,7 +14580,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "ts/components/Intl.js", "path": "ts/components/Intl.js",
"line": " const FIND_REPLACEMENTS = /\\$([^$]+)\\$/g;", "line": " const FIND_REPLACEMENTS = /\\$([^$]+)\\$/g;",
"lineNumber": 35, "lineNumber": 36,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-07-21T18:34:59.251Z" "updated": "2020-07-21T18:34:59.251Z"
}, },
@ -14596,7 +14596,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/LeftPane.js", "path": "ts/components/LeftPane.js",
"line": " this.listRef = react_1.default.createRef();", "line": " this.listRef = react_1.default.createRef();",
"lineNumber": 32, "lineNumber": 33,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-11T17:24:56.124Z", "updated": "2020-09-11T17:24:56.124Z",
"reasonDetail": "Used for scroll calculations" "reasonDetail": "Used for scroll calculations"
@ -14605,7 +14605,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/LeftPane.js", "path": "ts/components/LeftPane.js",
"line": " this.containerRef = react_1.default.createRef();", "line": " this.containerRef = react_1.default.createRef();",
"lineNumber": 33, "lineNumber": 34,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-11T17:24:56.124Z", "updated": "2020-09-11T17:24:56.124Z",
"reasonDetail": "Used for scroll calculations" "reasonDetail": "Used for scroll calculations"
@ -14614,7 +14614,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/Lightbox.js", "path": "ts/components/Lightbox.js",
"line": " this.containerRef = react_1.default.createRef();", "line": " this.containerRef = react_1.default.createRef();",
"lineNumber": 163, "lineNumber": 176,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-06T19:56:38.557Z", "updated": "2019-11-06T19:56:38.557Z",
"reasonDetail": "Used to double-check outside clicks" "reasonDetail": "Used to double-check outside clicks"
@ -14623,7 +14623,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/Lightbox.js", "path": "ts/components/Lightbox.js",
"line": " this.videoRef = react_1.default.createRef();", "line": " this.videoRef = react_1.default.createRef();",
"lineNumber": 164, "lineNumber": 177,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-14T23:03:44.863Z" "updated": "2020-09-14T23:03:44.863Z"
}, },
@ -14631,7 +14631,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/Lightbox.js", "path": "ts/components/Lightbox.js",
"line": " this.focusRef = react_1.default.createRef();", "line": " this.focusRef = react_1.default.createRef();",
"lineNumber": 165, "lineNumber": 178,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-06T19:56:38.557Z", "updated": "2019-11-06T19:56:38.557Z",
"reasonDetail": "Used to manage focus" "reasonDetail": "Used to manage focus"
@ -14640,7 +14640,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/MainHeader.js", "path": "ts/components/MainHeader.js",
"line": " this.inputRef = react_1.default.createRef();", "line": " this.inputRef = react_1.default.createRef();",
"lineNumber": 145, "lineNumber": 146,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-02-14T20:02:37.507Z", "updated": "2020-02-14T20:02:37.507Z",
"reasonDetail": "Used only to set focus" "reasonDetail": "Used only to set focus"
@ -14658,7 +14658,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/SafetyNumberChangeDialog.js", "path": "ts/components/SafetyNumberChangeDialog.js",
"line": " const cancelButtonRef = React.createRef();", "line": " const cancelButtonRef = React.createRef();",
"lineNumber": 17, "lineNumber": 30,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-23T06:48:06.829Z", "updated": "2020-06-23T06:48:06.829Z",
"reasonDetail": "Used to focus cancel button when dialog opens" "reasonDetail": "Used to focus cancel button when dialog opens"
@ -14667,7 +14667,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/SearchResults.js", "path": "ts/components/SearchResults.js",
"line": " this.listRef = react_1.default.createRef();", "line": " this.listRef = react_1.default.createRef();",
"lineNumber": 26, "lineNumber": 27,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-08-09T00:44:31.008Z", "updated": "2019-08-09T00:44:31.008Z",
"reasonDetail": "SearchResults needs to interact with its child List directly" "reasonDetail": "SearchResults needs to interact with its child List directly"
@ -14676,7 +14676,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/SearchResults.js", "path": "ts/components/SearchResults.js",
"line": " this.containerRef = react_1.default.createRef();", "line": " this.containerRef = react_1.default.createRef();",
"lineNumber": 27, "lineNumber": 28,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-08-09T00:44:31.008Z", "updated": "2019-08-09T00:44:31.008Z",
"reasonDetail": "SearchResults needs to interact with its child List directly" "reasonDetail": "SearchResults needs to interact with its child List directly"
@ -14685,7 +14685,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/ShortcutGuide.js", "path": "ts/components/ShortcutGuide.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 169, "lineNumber": 182,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14694,7 +14694,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/Tooltip.js", "path": "ts/components/Tooltip.js",
"line": " const wrapperRef = react_1.default.useRef(null);", "line": " const wrapperRef = react_1.default.useRef(null);",
"lineNumber": 18, "lineNumber": 19,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-12-04T00:11:08.128Z", "updated": "2020-12-04T00:11:08.128Z",
"reasonDetail": "Used to add (and remove) event listeners." "reasonDetail": "Used to add (and remove) event listeners."
@ -14703,7 +14703,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/CallingNotification.js", "path": "ts/components/conversation/CallingNotification.js",
"line": " const previousHeightRef = react_1.useRef(null);", "line": " const previousHeightRef = react_1.useRef(null);",
"lineNumber": 24, "lineNumber": 37,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-12-04T00:11:08.128Z", "updated": "2020-12-04T00:11:08.128Z",
"reasonDetail": "Doesn't interact with the DOM." "reasonDetail": "Doesn't interact with the DOM."
@ -14712,7 +14712,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/ContactModal.js", "path": "ts/components/conversation/ContactModal.js",
"line": " const overlayRef = react_1.default.useRef(null);", "line": " const overlayRef = react_1.default.useRef(null);",
"lineNumber": 16, "lineNumber": 17,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-09T17:48:12.173Z" "updated": "2020-11-09T17:48:12.173Z"
}, },
@ -14720,7 +14720,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/ContactModal.js", "path": "ts/components/conversation/ContactModal.js",
"line": " const closeButtonRef = react_1.default.useRef(null);", "line": " const closeButtonRef = react_1.default.useRef(null);",
"lineNumber": 17, "lineNumber": 18,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-10T21:27:04.909Z" "updated": "2020-11-10T21:27:04.909Z"
}, },
@ -14728,7 +14728,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/ConversationHeader.js", "path": "ts/components/conversation/ConversationHeader.js",
"line": " this.menuTriggerRef = react_1.default.createRef();", "line": " this.menuTriggerRef = react_1.default.createRef();",
"lineNumber": 29, "lineNumber": 30,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-28T16:12:19.904Z", "updated": "2020-08-28T16:12:19.904Z",
"reasonDetail": "Used to reference popup menu" "reasonDetail": "Used to reference popup menu"
@ -14746,7 +14746,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/ConversationHero.js", "path": "ts/components/conversation/ConversationHero.js",
"line": " const firstRenderRef = React.useRef(true);", "line": " const firstRenderRef = React.useRef(true);",
"lineNumber": 67, "lineNumber": 80,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Doesn't refer to a DOM element." "reasonDetail": "Doesn't refer to a DOM element."
@ -14764,7 +14764,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/InlineNotificationWrapper.js", "path": "ts/components/conversation/InlineNotificationWrapper.js",
"line": " this.focusRef = react_1.default.createRef();", "line": " this.focusRef = react_1.default.createRef();",
"lineNumber": 12, "lineNumber": 13,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-06T19:56:38.557Z", "updated": "2019-11-06T19:56:38.557Z",
"reasonDetail": "Used to manage focus" "reasonDetail": "Used to manage focus"
@ -14782,7 +14782,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/Message.js", "path": "ts/components/conversation/Message.js",
"line": " this.audioRef = react_1.default.createRef();", "line": " this.audioRef = react_1.default.createRef();",
"lineNumber": 61, "lineNumber": 74,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-28T16:12:19.904Z" "updated": "2020-08-28T16:12:19.904Z"
}, },
@ -14790,7 +14790,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/Message.js", "path": "ts/components/conversation/Message.js",
"line": " this.focusRef = react_1.default.createRef();", "line": " this.focusRef = react_1.default.createRef();",
"lineNumber": 62, "lineNumber": 75,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-11T17:24:56.124Z", "updated": "2020-09-11T17:24:56.124Z",
"reasonDetail": "Used for managing focus only" "reasonDetail": "Used for managing focus only"
@ -14799,7 +14799,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/Message.js", "path": "ts/components/conversation/Message.js",
"line": " this.reactionsContainerRef = react_1.default.createRef();", "line": " this.reactionsContainerRef = react_1.default.createRef();",
"lineNumber": 63, "lineNumber": 76,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-28T16:12:19.904Z", "updated": "2020-08-28T16:12:19.904Z",
"reasonDetail": "Used for detecting clicks outside reaction viewer" "reasonDetail": "Used for detecting clicks outside reaction viewer"
@ -14832,7 +14832,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/MessageDetail.js", "path": "ts/components/conversation/MessageDetail.js",
"line": " this.focusRef = react_1.default.createRef();", "line": " this.focusRef = react_1.default.createRef();",
"lineNumber": 20, "lineNumber": 21,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-01T22:46:33.013Z", "updated": "2019-11-01T22:46:33.013Z",
"reasonDetail": "Used for setting focus only" "reasonDetail": "Used for setting focus only"
@ -14841,7 +14841,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/ReactionPicker.js", "path": "ts/components/conversation/ReactionPicker.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 30, "lineNumber": 43,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14850,7 +14850,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/conversation/ReactionViewer.js", "path": "ts/components/conversation/ReactionViewer.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 75, "lineNumber": 88,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14859,7 +14859,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/Timeline.js", "path": "ts/components/conversation/Timeline.js",
"line": " this.listRef = react_1.default.createRef();", "line": " this.listRef = react_1.default.createRef();",
"lineNumber": 30, "lineNumber": 31,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-07-31T00:19:18.696Z", "updated": "2019-07-31T00:19:18.696Z",
"reasonDetail": "Timeline needs to interact with its child List directly" "reasonDetail": "Timeline needs to interact with its child List directly"
@ -14868,7 +14868,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/conversation/media-gallery/MediaGallery.js", "path": "ts/components/conversation/media-gallery/MediaGallery.js",
"line": " this.focusRef = react_1.default.createRef();", "line": " this.focusRef = react_1.default.createRef();",
"lineNumber": 30, "lineNumber": 31,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-01T22:46:33.013Z", "updated": "2019-11-01T22:46:33.013Z",
"reasonDetail": "Used for setting focus only" "reasonDetail": "Used for setting focus only"
@ -14886,7 +14886,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/emoji/EmojiPicker.js", "path": "ts/components/emoji/EmojiPicker.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 40, "lineNumber": 53,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14895,7 +14895,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/components/stickers/StickerManager.js", "path": "ts/components/stickers/StickerManager.js",
"line": " const focusRef = React.createRef();", "line": " const focusRef = React.createRef();",
"lineNumber": 20, "lineNumber": 33,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-21T06:13:49.384Z", "updated": "2019-11-21T06:13:49.384Z",
"reasonDetail": "Used for setting focus only" "reasonDetail": "Used for setting focus only"
@ -14904,7 +14904,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/stickers/StickerPicker.js", "path": "ts/components/stickers/StickerPicker.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 42, "lineNumber": 55,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14913,7 +14913,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/stickers/StickerPreviewModal.js", "path": "ts/components/stickers/StickerPreviewModal.js",
"line": " const focusRef = React.useRef(null);", "line": " const focusRef = React.useRef(null);",
"lineNumber": 37, "lineNumber": 50,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Only used to focus the element." "reasonDetail": "Only used to focus the element."
@ -14922,7 +14922,7 @@
"rule": "React-createRef", "rule": "React-createRef",
"path": "ts/quill/mentions/completion.js", "path": "ts/quill/mentions/completion.js",
"line": " this.suggestionListRef = react_1.default.createRef();", "line": " this.suggestionListRef = react_1.default.createRef();",
"lineNumber": 24, "lineNumber": 25,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-30T23:03:08.319Z" "updated": "2020-10-30T23:03:08.319Z"
}, },
@ -14930,7 +14930,7 @@
"rule": "DOM-innerHTML", "rule": "DOM-innerHTML",
"path": "ts/quill/signal-clipboard/index.js", "path": "ts/quill/signal-clipboard/index.js",
"line": " return div.innerHTML;", "line": " return div.innerHTML;",
"lineNumber": 19, "lineNumber": 20,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-11-06T17:43:07.381Z", "updated": "2020-11-06T17:43:07.381Z",
"reasonDetail": "used for figuring out clipboard contents" "reasonDetail": "used for figuring out clipboard contents"
@ -14948,7 +14948,7 @@
"rule": "jQuery-wrap(", "rule": "jQuery-wrap(",
"path": "ts/shims/textsecure.js", "path": "ts/shims/textsecure.js",
"line": " wrap(textsecure.messaging.sendStickerPackSync([", "line": " wrap(textsecure.messaging.sendStickerPackSync([",
"lineNumber": 13, "lineNumber": 14,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-02-07T19:52:28.522Z" "updated": "2020-02-07T19:52:28.522Z"
}, },
@ -14964,7 +14964,7 @@
"rule": "jQuery-before(", "rule": "jQuery-before(",
"path": "ts/test-electron/models/messages_test.js", "path": "ts/test-electron/models/messages_test.js",
"line": " before(async () => {", "line": " before(async () => {",
"lineNumber": 35, "lineNumber": 47,
"reasonCategory": "testCode", "reasonCategory": "testCode",
"updated": "2020-10-21T00:45:53.649Z", "updated": "2020-10-21T00:45:53.649Z",
"reasonDetail": "Test code and a false positive." "reasonDetail": "Test code and a false positive."
@ -14973,7 +14973,7 @@
"rule": "jQuery-load(", "rule": "jQuery-load(",
"path": "ts/test-electron/models/messages_test.js", "path": "ts/test-electron/models/messages_test.js",
"line": " await window.ConversationController.load();", "line": " await window.ConversationController.load();",
"lineNumber": 37, "lineNumber": 49,
"reasonCategory": "testCode", "reasonCategory": "testCode",
"updated": "2020-10-21T00:45:53.649Z", "updated": "2020-10-21T00:45:53.649Z",
"reasonDetail": "Test code and a false positive." "reasonDetail": "Test code and a false positive."
@ -14982,7 +14982,7 @@
"rule": "jQuery-after(", "rule": "jQuery-after(",
"path": "ts/test-electron/models/messages_test.js", "path": "ts/test-electron/models/messages_test.js",
"line": " after(async () => {", "line": " after(async () => {",
"lineNumber": 41, "lineNumber": 53,
"reasonCategory": "testCode", "reasonCategory": "testCode",
"updated": "2020-10-21T00:45:53.649Z", "updated": "2020-10-21T00:45:53.649Z",
"reasonDetail": "Test code and a false positive." "reasonDetail": "Test code and a false positive."
@ -15018,7 +15018,7 @@
"rule": "jQuery-before(", "rule": "jQuery-before(",
"path": "ts/test-node/util/windowsZoneIdentifier_test.js", "path": "ts/test-node/util/windowsZoneIdentifier_test.js",
"line": " before(function thisNeeded() {", "line": " before(function thisNeeded() {",
"lineNumber": 21, "lineNumber": 33,
"reasonCategory": "testCode", "reasonCategory": "testCode",
"updated": "2020-09-02T18:59:59.432Z", "updated": "2020-09-02T18:59:59.432Z",
"reasonDetail": "This is test code (and isn't jQuery code)." "reasonDetail": "This is test code (and isn't jQuery code)."
@ -15036,7 +15036,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "ts/textsecure/ContactsParser.js", "path": "ts/textsecure/ContactsParser.js",
"line": " this.buffer.append(arrayBuffer);", "line": " this.buffer.append(arrayBuffer);",
"lineNumber": 9, "lineNumber": 10,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-04-05T23:45:16.746Z" "updated": "2020-04-05T23:45:16.746Z"
}, },
@ -15164,7 +15164,7 @@
"rule": "jQuery-wrap(", "rule": "jQuery-wrap(",
"path": "ts/textsecure/WebAPI.js", "path": "ts/textsecure/WebAPI.js",
"line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);", "line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);",
"lineNumber": 1265, "lineNumber": 1278,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-09-08T23:07:22.682Z" "updated": "2020-09-08T23:07:22.682Z"
}, },

View file

@ -16414,6 +16414,11 @@ typescript@3.8.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
typescript@4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
ua-parser-js@^0.7.18: ua-parser-js@^0.7.18:
version "0.7.19" version "0.7.19"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"