You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	remove legacy polyfills and unused dependencies
This commit is contained in:
		@@ -55,7 +55,6 @@
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@babel/runtime": "^7.12.5",
 | 
			
		||||
    "await-lock": "^2.1.0",
 | 
			
		||||
    "blueimp-canvas-to-blob": "^3.28.0",
 | 
			
		||||
    "browser-encrypt-attachment": "^0.3.0",
 | 
			
		||||
    "browser-request": "^0.3.3",
 | 
			
		||||
    "cheerio": "^1.0.0-rc.9",
 | 
			
		||||
@@ -88,7 +87,6 @@
 | 
			
		||||
    "png-chunks-extract": "^1.0.0",
 | 
			
		||||
    "prop-types": "^15.7.2",
 | 
			
		||||
    "qrcode": "^1.4.4",
 | 
			
		||||
    "qs": "^6.9.6",
 | 
			
		||||
    "re-resizable": "^6.9.0",
 | 
			
		||||
    "react": "^17.0.2",
 | 
			
		||||
    "react-beautiful-dnd": "^4.0.1",
 | 
			
		||||
@@ -99,7 +97,6 @@
 | 
			
		||||
    "rfc4648": "^1.4.0",
 | 
			
		||||
    "sanitize-html": "^2.3.2",
 | 
			
		||||
    "tar-js": "^0.3.0",
 | 
			
		||||
    "text-encoding-utf-8": "^1.0.2",
 | 
			
		||||
    "url": "^0.11.0",
 | 
			
		||||
    "what-input": "^5.2.10",
 | 
			
		||||
    "zxcvbn": "^4.4.2"
 | 
			
		||||
 
 | 
			
		||||
@@ -28,8 +28,6 @@ import encrypt from "browser-encrypt-attachment";
 | 
			
		||||
import extractPngChunks from "png-chunks-extract";
 | 
			
		||||
import Spinner from "./components/views/elements/Spinner";
 | 
			
		||||
 | 
			
		||||
// Polyfill for Canvas.toBlob API using Canvas.toDataURL
 | 
			
		||||
import "blueimp-canvas-to-blob";
 | 
			
		||||
import { Action } from "./dispatcher/actions";
 | 
			
		||||
import CountlyAnalytics from "./CountlyAnalytics";
 | 
			
		||||
import {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,13 +24,6 @@ import {sleep} from "./utils/promise";
 | 
			
		||||
import RoomViewStore from "./stores/RoomViewStore";
 | 
			
		||||
import { Action } from "./dispatcher/actions";
 | 
			
		||||
 | 
			
		||||
// polyfill textencoder if necessary
 | 
			
		||||
import * as TextEncodingUtf8 from 'text-encoding-utf-8';
 | 
			
		||||
let TextEncoder = window.TextEncoder;
 | 
			
		||||
if (!TextEncoder) {
 | 
			
		||||
    TextEncoder = TextEncodingUtf8.TextEncoder;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const INACTIVITY_TIME = 20; // seconds
 | 
			
		||||
const HEARTBEAT_INTERVAL = 5_000; // ms
 | 
			
		||||
const SESSION_UPDATE_INTERVAL = 60; // seconds
 | 
			
		||||
 
 | 
			
		||||
@@ -25,14 +25,8 @@ import Tar from "tar-js";
 | 
			
		||||
 | 
			
		||||
import * as rageshake from './rageshake';
 | 
			
		||||
 | 
			
		||||
// polyfill textencoder if necessary
 | 
			
		||||
import * as TextEncodingUtf8 from 'text-encoding-utf-8';
 | 
			
		||||
import SettingsStore from "../settings/SettingsStore";
 | 
			
		||||
import SdkConfig from "../SdkConfig";
 | 
			
		||||
let TextEncoder = window.TextEncoder;
 | 
			
		||||
if (!TextEncoder) {
 | 
			
		||||
    TextEncoder = TextEncodingUtf8.TextEncoder;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface IOpts {
 | 
			
		||||
    label?: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -15,17 +15,6 @@ See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
// polyfill textencoder if necessary
 | 
			
		||||
import * as TextEncodingUtf8 from 'text-encoding-utf-8';
 | 
			
		||||
let TextEncoder = window.TextEncoder;
 | 
			
		||||
if (!TextEncoder) {
 | 
			
		||||
    TextEncoder = TextEncodingUtf8.TextEncoder;
 | 
			
		||||
}
 | 
			
		||||
let TextDecoder = window.TextDecoder;
 | 
			
		||||
if (!TextDecoder) {
 | 
			
		||||
    TextDecoder = TextEncodingUtf8.TextDecoder;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
import { _t } from '../languageHandler';
 | 
			
		||||
import SdkConfig from '../SdkConfig';
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								yarn.lock
									
									
									
									
									
								
							@@ -2181,11 +2181,6 @@ bluebird@^3.5.0:
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
 | 
			
		||||
  integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
 | 
			
		||||
 | 
			
		||||
blueimp-canvas-to-blob@^3.28.0:
 | 
			
		||||
  version "3.28.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/blueimp-canvas-to-blob/-/blueimp-canvas-to-blob-3.28.0.tgz#c8ab4dc6bb08774a7f273798cdf94b0776adf6c8"
 | 
			
		||||
  integrity sha512-5q+YHzgGsuHQ01iouGgJaPJXod2AzTxJXmVv90PpGrRxU7G7IqgPqWXz+PBmt3520jKKi6irWbNV87DicEa7wg==
 | 
			
		||||
 | 
			
		||||
boolbase@^1.0.0:
 | 
			
		||||
  version "1.0.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
 | 
			
		||||
@@ -7945,11 +7940,6 @@ test-exclude@^6.0.0:
 | 
			
		||||
    glob "^7.1.4"
 | 
			
		||||
    minimatch "^3.0.4"
 | 
			
		||||
 | 
			
		||||
text-encoding-utf-8@^1.0.2:
 | 
			
		||||
  version "1.0.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13"
 | 
			
		||||
  integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==
 | 
			
		||||
 | 
			
		||||
text-table@^0.2.0:
 | 
			
		||||
  version "0.2.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user