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 
			
		
		
		
	Add dev dependency for parse5 typings
This commit is contained in:
		@@ -132,6 +132,7 @@
 | 
				
			|||||||
    "@types/modernizr": "^3.5.3",
 | 
					    "@types/modernizr": "^3.5.3",
 | 
				
			||||||
    "@types/node": "^14.14.22",
 | 
					    "@types/node": "^14.14.22",
 | 
				
			||||||
    "@types/pako": "^1.0.1",
 | 
					    "@types/pako": "^1.0.1",
 | 
				
			||||||
 | 
					    "@types/parse5": "^6.0.0",
 | 
				
			||||||
    "@types/qrcode": "^1.3.5",
 | 
					    "@types/qrcode": "^1.3.5",
 | 
				
			||||||
    "@types/react": "^16.9",
 | 
					    "@types/react": "^16.9",
 | 
				
			||||||
    "@types/react-dom": "^16.9.10",
 | 
					    "@types/react-dom": "^16.9.10",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,7 +38,7 @@ import {isPermalinkHost, parsePermalink} from "./utils/permalinks/Permalinks";
 | 
				
			|||||||
import {inviteUsersToRoom} from "./RoomInvite";
 | 
					import {inviteUsersToRoom} from "./RoomInvite";
 | 
				
			||||||
import { WidgetType } from "./widgets/WidgetType";
 | 
					import { WidgetType } from "./widgets/WidgetType";
 | 
				
			||||||
import { Jitsi } from "./widgets/Jitsi";
 | 
					import { Jitsi } from "./widgets/Jitsi";
 | 
				
			||||||
import { parseFragment as parseHtml } from "parse5";
 | 
					import { parseFragment as parseHtml, Element as ChildElement } from "parse5";
 | 
				
			||||||
import BugReportDialog from "./components/views/dialogs/BugReportDialog";
 | 
					import BugReportDialog from "./components/views/dialogs/BugReportDialog";
 | 
				
			||||||
import { ensureDMExists } from "./createRoom";
 | 
					import { ensureDMExists } from "./createRoom";
 | 
				
			||||||
import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
 | 
					import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
 | 
				
			||||||
@@ -856,7 +856,7 @@ export const Commands = [
 | 
				
			|||||||
                // some superfast regex over the text so we don't have to.
 | 
					                // some superfast regex over the text so we don't have to.
 | 
				
			||||||
                const embed = parseHtml(widgetUrl);
 | 
					                const embed = parseHtml(widgetUrl);
 | 
				
			||||||
                if (embed && embed.childNodes && embed.childNodes.length === 1) {
 | 
					                if (embed && embed.childNodes && embed.childNodes.length === 1) {
 | 
				
			||||||
                    const iframe = embed.childNodes[0];
 | 
					                    const iframe = embed.childNodes[0] as ChildElement;
 | 
				
			||||||
                    if (iframe.tagName.toLowerCase() === 'iframe' && iframe.attrs) {
 | 
					                    if (iframe.tagName.toLowerCase() === 'iframe' && iframe.attrs) {
 | 
				
			||||||
                        const srcAttr = iframe.attrs.find(a => a.name === 'src');
 | 
					                        const srcAttr = iframe.attrs.find(a => a.name === 'src');
 | 
				
			||||||
                        console.log("Pulling URL out of iframe (embed code)");
 | 
					                        console.log("Pulling URL out of iframe (embed code)");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1594,6 +1594,11 @@
 | 
				
			|||||||
  resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
 | 
					  resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
 | 
				
			||||||
  integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
 | 
					  integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"@types/parse5@^6.0.0":
 | 
				
			||||||
 | 
					  version "6.0.0"
 | 
				
			||||||
 | 
					  resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.0.tgz#38590dc2c3cf5717154064e3ee9b6947ee21b299"
 | 
				
			||||||
 | 
					  integrity sha512-oPwPSj4a1wu9rsXTEGIJz91ISU725t0BmSnUhb57sI+M8XEmvUop84lzuiYdq0Y5M6xLY8DBPg0C2xEQKLyvBA==
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"@types/prettier@^2.0.0":
 | 
					"@types/prettier@^2.0.0":
 | 
				
			||||||
  version "2.1.6"
 | 
					  version "2.1.6"
 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03"
 | 
					  resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user