fix: finish updating dependencies

This commit is contained in:
Audric Ackermann 2023-08-02 06:50:35 +02:00
parent 9e21d6e0ac
commit ab946e69b1
29 changed files with 1143 additions and 1229 deletions

View File

@ -108,7 +108,7 @@
"p-retry": "^4.2.0",
"pify": "3.0.0",
"protobufjs": "^6.11.2",
"rc-slider": "^8.7.1",
"rc-slider": "^10.2.1",
"react": "^17.0.2",
"react-contexify": "5.0.0",
"react-dom": "^17.0.2",
@ -119,8 +119,8 @@
"react-qr-svg": "^2.2.1",
"react-redux": "8.0.4",
"react-toastify": "^6.0.9",
"react-use": "^17.2.1",
"react-virtualized": "9.22.3",
"react-use": "^17.4.0",
"react-virtualized": "^9.22.4",
"read-last-lines-ts": "^1.2.1",
"redux": "4.2.0",
"redux-logger": "3.0.6",
@ -130,7 +130,8 @@
"sanitize.css": "^12.0.1",
"semver": "5.4.1",
"styled-components": "5.1.1",
"uuid": "8.3.2"
"uuid": "8.3.2",
"webrtc-adapter": "^4.1.1"
},
"devDependencies": {
"@electron/notarize": "^2.1.0",
@ -155,7 +156,6 @@
"@types/mocha": "5.0.0",
"@types/node-fetch": "^2.5.7",
"@types/pify": "3.0.2",
"@types/rc-slider": "^8.6.5",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/react-redux": "^7.1.24",
@ -168,7 +168,6 @@
"@types/uuid": "8.3.4",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"asar": "3.1.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-bytes": "^0.1.2",
@ -339,9 +338,12 @@
"!build/*.js",
"build/afterPackHook.js",
"build/launcher-script.sh",
"!node_modules/better-sqlite3/deps/*",
"!node_modules/better-sqlite3/src/*",
"node_modules/better-sqlite3/build/Release/better_sqlite3.node",
"!node_modules/@signalapp/better-sqlite3/deps/*",
"!node_modules/@signalapp/better-sqlite3/src/*",
"!node_modules/@signalapp/better-sqlite3/build/Release/obj/*",
"node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node",
"!node_modules/libsession_util_nodejs/libsession-util/*",
"!node_modules/libsession_util_nodejs/src/*",
"ts/webworker/workers/node/libsession/*.node",
"!dev-app-update.yml"
]

View File

@ -1,13 +0,0 @@
diff --git a/node_modules/component-classes/index.js b/node_modules/component-classes/index.js
index eb9d292..752ebf2 100644
--- a/node_modules/component-classes/index.js
+++ b/node_modules/component-classes/index.js
@@ -3,7 +3,7 @@
*/
try {
- var index = require('indexof');
+ // var index = require('indexof');
} catch (err) {
var index = require('component-indexof');
}

View File

@ -1,5 +1,5 @@
import _ from 'lodash';
import os from 'os';
import _ from 'lodash';
import semver from 'semver';
export const isMacOS = () => process.platform === 'darwin';

View File

@ -1,6 +1,5 @@
import React from 'react';
import { shell } from 'electron';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import useHover from 'react-use/lib/useHover';

View File

@ -1,5 +1,5 @@
import { Dispatch } from '@reduxjs/toolkit';
import { shell } from 'electron';
import { Dispatch } from '@reduxjs/toolkit';
import React, { useState } from 'react';
import { MessageInteraction } from '../../interactions';
import { updateConfirmModal } from '../../state/ducks/modalDialog';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { shell } from 'electron';
import React from 'react';
import autoBind from 'auto-bind';
import styled from 'styled-components';

View File

@ -1,14 +1,17 @@
import Slider from 'rc-slider';
import React from 'react';
import { isNumber } from 'lodash';
import useUpdate from 'react-use/lib/useUpdate';
import { SessionSettingsItemWrapper } from './SessionSettingListItem';
export const ZoomingSessionSlider = (props: { onSliderChange?: (value: number) => void }) => {
const forceUpdate = useUpdate();
const handleSlider = async (valueToForward: number) => {
props?.onSliderChange?.(valueToForward);
await window.setSettingValue('zoom-factor-setting', valueToForward);
const handleSlider = async (val: number | Array<number>) => {
const newSetting = isNumber(val) ? val : val?.[0] || 1;
props?.onSliderChange?.(newSetting);
await window.setSettingValue('zoom-factor-setting', newSetting);
window.updateZoomFactor();
forceUpdate();
};
@ -23,8 +26,9 @@ export const ZoomingSessionSlider = (props: { onSliderChange?: (value: number) =
min={60}
max={200}
defaultValue={currentValueFromSettings}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
onAfterChange={handleSlider}
onChange={e => {
void handleSlider(e);
}}
/>
<div className="slider-info">

View File

@ -1,7 +1,7 @@
import path from 'path';
import { ipcMain } from 'electron';
import { isString, map } from 'lodash';
import rimraf from 'rimraf';
import path from 'path';
import fse from 'fs-extra';
import pify from 'pify';
// eslint-disable-next-line import/no-named-default

View File

@ -1,6 +1,6 @@
import path from 'path';
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
import { isNumber } from 'lodash';
import path from 'path';
import {
ATTACHMENT_DOWNLOADS_TABLE,

View File

@ -1,7 +1,7 @@
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
import { app, clipboard, dialog, Notification } from 'electron';
import fs from 'fs';
import path from 'path';
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
import rimraf from 'rimraf';
import {

View File

@ -1,8 +1,8 @@
import tls from 'tls';
import https from 'https';
// eslint-disable-next-line import/no-named-default
import { default as insecureNodeFetch } from 'node-fetch';
import https from 'https';
import _ from 'lodash';
import tls from 'tls';
import pRetry from 'p-retry';
import { sha256 } from '../../crypto';

View File

@ -1,11 +1,13 @@
import https from 'https';
// eslint-disable-next-line import/no-named-default
import { default as insecureNodeFetch, RequestInit, Response } from 'node-fetch';
import https from 'https';
import ByteBuffer from 'bytebuffer';
import pRetry from 'p-retry';
import { cloneDeep, isEmpty, isString, omit } from 'lodash';
import { AbortSignal } from 'abort-controller';
import { to_string } from 'libsodium-wrappers-sumo';
// eslint-disable-next-line import/no-unresolved
import { AbortSignal as AbortSignalNode } from 'node-fetch/externals';
import { dropSnodeFromSnodePool, dropSnodeFromSwarmIfNeeded, updateSwarmFor } from './snodePool';
@ -1068,7 +1070,7 @@ const sendOnionRequestNoRetries = async ({
};
if (abortSignal) {
guardFetchOptions.signal = abortSignal;
guardFetchOptions.signal = abortSignal as AbortSignalNode;
}
const guardUrl = `https://${guardNode.ip}:${guardNode.port}/onion_req/v2`;

View File

@ -1,6 +1,6 @@
import https from 'https';
// eslint-disable-next-line import/no-named-default
import { default as insecureNodeFetch } from 'node-fetch';
import https from 'https';
import { clone } from 'lodash';
import pRetry from 'p-retry';

View File

@ -9,10 +9,10 @@
*
*
*/
import path from 'path';
import { reject } from 'lodash';
import * as fse from 'fs-extra';
import path from 'path';
import { DURATION } from '../constants';
import { makeObjectUrl, urlToBlob } from '../../types/attachments/VisualAttachment';

View File

@ -2,8 +2,8 @@
// RelativePath ->
// IO Unit
import { isString } from 'lodash';
import path from 'path';
import { isString } from 'lodash';
import fse from 'fs-extra';
export const createDeleter = (root: string) => {

View File

@ -1,7 +1,7 @@
import { Page } from '@playwright/test';
import { readdirSync, rmdirSync } from 'fs-extra';
import { join } from 'path';
import { homedir } from 'os';
import { Page } from '@playwright/test';
import { readdirSync, rmdirSync } from 'fs-extra';
import { isLinux, isMacOS } from '../../../OS';
import { MULTI_PREFIX, NODE_ENV } from './open';

View File

@ -1,5 +1,5 @@
import { _electron } from '@playwright/test';
import { join } from 'path';
import { _electron } from '@playwright/test';
import { getAppRootPath } from '../../../node/getRootPath';
export const NODE_ENV = 'production';

View File

@ -1,9 +1,7 @@
/* eslint-disable no-useless-escape */
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable no-await-in-loop */
import { Page } from 'playwright-core';
import { ElementHandle } from '@playwright/test';
import { ElementHandle, Page } from '@playwright/test';
import { sleepFor } from '../../../session/utils/Promise';
import { loaderType, Strategy } from '../types/testing';

View File

@ -1,5 +1,5 @@
import chai, { expect } from 'chai';
import * as crypto from 'crypto';
import chai, { expect } from 'chai';
import Sinon, * as sinon from 'sinon';
import chaiBytes from 'chai-bytes';

View File

@ -1,6 +1,6 @@
import { TextEncoder } from 'util';
import { expect } from 'chai';
import { TextEncoder } from 'util';
import { toNumber } from 'lodash';
import { SignalService } from '../../../../protobuf';
import { Constants } from '../../../../session';

View File

@ -1,8 +1,7 @@
import path from 'path';
import chai, { expect } from 'chai';
import { describe } from 'mocha';
import path from 'path';
import chaiAsPromised from 'chai-as-promised';
import { redactAll } from '../../../../util/privacy';

View File

@ -6,10 +6,11 @@
/* eslint-disable no-await-in-loop */
/* eslint-disable no-unreachable-loop */
/* eslint-disable no-restricted-syntax */
import { randomBytes } from 'crypto';
import chai from 'chai';
import Sinon, * as sinon from 'sinon';
import { describe } from 'mocha';
import { randomBytes } from 'crypto';
import chaiAsPromised from 'chai-as-promised';
import { GroupUtils, PromiseUtils, UserUtils } from '../../../../session/utils';

View File

@ -1,5 +1,5 @@
import { expect } from 'chai';
import * as crypto from 'crypto';
import { expect } from 'chai';
import _ from 'lodash';
import Sinon, * as sinon from 'sinon';
import { SignalService } from '../../../../protobuf';

View File

@ -1,6 +1,6 @@
import path from 'path';
import { readFileSync } from 'fs-extra';
import { isEmpty } from 'lodash';
import path from 'path';
describe('Updater', () => {
it.skip('isUpdateAvailable', () => {});

View File

@ -156,5 +156,6 @@ export function declareCSSVariables(variables: Record<string, string>) {
for (const [key, value] of Object.entries(variables)) {
output += `${key}: ${value};\n`;
}
return output;
}

View File

@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-misused-promises */
/* eslint-disable no-console */
import * as path from 'path';
import { app, BrowserWindow } from 'electron';
import { autoUpdater, UpdateInfo } from 'electron-updater';
import * as fs from 'fs-extra';
import * as path from 'path';
import { gt as isVersionGreaterThan, parse as parseVersion } from 'semver';
import { windowMarkShouldQuit } from '../node/window_state';

View File

@ -1,5 +1,7 @@
import { RequestInit, Response } from 'node-fetch';
import { AbortSignal } from 'abort-controller';
// eslint-disable-next-line import/no-unresolved
import { AbortSignal as AbortSignalNode } from 'node-fetch/externals';
import { IMAGE_GIF, IMAGE_ICO, IMAGE_JPEG, IMAGE_PNG, IMAGE_WEBP, MIMEType } from '../types/MIME';
@ -371,7 +373,7 @@ export async function fetchLinkPreviewMetadata(
Accept: 'text/html,application/xhtml+xml',
'User-Agent': 'WhatsApp',
},
signal: abortSignal,
signal: abortSignal as AbortSignalNode,
});
} catch (err) {
window?.log?.warn('fetchLinkPreviewMetadata: failed to fetch link preview HTML; bailing');
@ -456,7 +458,7 @@ export async function fetchLinkPreviewImage(
'User-Agent': 'WhatsApp',
},
size: MAX_IMAGE_CONTENT_LENGTH,
signal: abortSignal,
signal: abortSignal as AbortSignalNode,
});
} catch (err) {
window?.log?.warn('fetchLinkPreviewImage: failed to fetch image; bailing');

View File

@ -1,7 +1,6 @@
/* global URL */
import { compact, isEmpty, isNumber, range } from 'lodash';
import nodeUrl from 'url';
import { compact, isEmpty, isNumber, range } from 'lodash';
import LinkifyIt from 'linkify-it';
const linkify = LinkifyIt();

2258
yarn.lock

File diff suppressed because it is too large Load Diff