fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.0 (#20513)

* fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
This commit is contained in:
renovate[bot]
2024-08-30 16:15:50 +02:00
committed by GitHub
parent dcb6de22ea
commit da3f9ff881
7 changed files with 36 additions and 19 deletions

37
package-lock.json generated
View File

@@ -3910,9 +3910,10 @@
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.0.tgz",
"integrity": "sha512-Zb9MTlKGnUdxglDKF75cJwvsNp+EhPwzguLSTp/u1yeDU59lz7eA9e14S9z/sn5HHKX5NEQZaKjePl/69uqGhw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
}
@@ -14680,6 +14681,15 @@
"node": ">=10.4.0"
}
},
"node_modules/plist/node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/plur": {
"version": "4.0.0",
"dev": true,
@@ -19614,7 +19624,7 @@
"license": "Apache-2.0",
"dependencies": {
"@types/bluebird": "3.5.42",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"asyncbox": "3.0.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
@@ -20261,7 +20271,7 @@
"license": "Apache-2.0",
"dependencies": {
"@types/xmldom": "0.1.34",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"fast-xml-parser": "4.4.1",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
@@ -20641,7 +20651,7 @@
"version": "file:packages/fake-driver",
"requires": {
"@types/bluebird": "3.5.42",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"asyncbox": "3.0.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
@@ -21081,7 +21091,7 @@
"version": "file:packages/universal-xml-plugin",
"requires": {
"@types/xmldom": "0.1.34",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"fast-xml-parser": "4.4.1",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
@@ -23596,9 +23606,9 @@
}
},
"@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.0.tgz",
"integrity": "sha512-Zb9MTlKGnUdxglDKF75cJwvsNp+EhPwzguLSTp/u1yeDU59lz7eA9e14S9z/sn5HHKX5NEQZaKjePl/69uqGhw=="
},
"@yarnpkg/lockfile": {
"version": "1.1.0",
@@ -30984,6 +30994,13 @@
"@xmldom/xmldom": "^0.8.8",
"base64-js": "^1.5.1",
"xmlbuilder": "^15.1.1"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="
}
}
},
"plur": {

View File

@@ -94,7 +94,7 @@ export class FakeApp {
this.rawXml = this.rawXml.replace('<app ', '<AppiumAUT><app ');
this.rawXml = this.rawXml.replace('<app>', '<AppiumAUT><app>');
this.rawXml = this.rawXml.replace('</app>', '</app></AppiumAUT>');
this.dom = new XMLDom.DOMParser().parseFromString(this.rawXml);
this.dom = new XMLDom.DOMParser().parseFromString(this.rawXml, XMLDom.MIME_TYPE.XML_TEXT);
this.activeDom = this.dom;
}
@@ -106,7 +106,7 @@ export class FakeApp {
activateWebview(wv) {
this.activeWebview = wv;
let fragment = new XMLDom.XMLSerializer().serializeToString(wv.node);
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, 'application/xml');
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, XMLDom.MIME_TYPE.XML_TEXT);
}
deactivateWebview() {
@@ -117,7 +117,7 @@ export class FakeApp {
activateFrame(frame) {
this.activeFrame = frame;
let fragment = new XMLDom.XMLSerializer().serializeToString(frame);
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, 'application/xml');
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, XMLDom.MIME_TYPE.XML_TEXT);
}
deactivateFrame() {

View File

@@ -108,7 +108,7 @@ export class FakeElement {
get xmlFragment() {
let frag = new XMLDom.XMLSerializer().serializeToString(this.node);
return new XMLDom.DOMParser().parseFromString(frag, 'application/xml');
return new XMLDom.DOMParser().parseFromString(frag, XMLDom.MIME_TYPE.XML_TEXT);
}
}

View File

@@ -43,7 +43,7 @@
},
"dependencies": {
"@types/bluebird": "3.5.42",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"asyncbox": "3.0.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",

View File

@@ -1,9 +1,9 @@
import {select as xpathQuery} from 'xpath';
import {DOMParser} from '@xmldom/xmldom';
import {DOMParser, MIME_TYPE} from '@xmldom/xmldom';
import _ from 'lodash';
export function runQuery(query, xmlStr) {
const dom = new DOMParser().parseFromString(xmlStr);
const dom = new DOMParser().parseFromString(xmlStr, MIME_TYPE.XML_TEXT);
const nodes = xpathQuery(query, dom);
return nodes;
}

View File

@@ -37,7 +37,7 @@
},
"dependencies": {
"@types/xmldom": "0.1.34",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"fast-xml-parser": "4.4.1",
"lodash": "4.17.21",
"source-map-support": "0.5.21",

View File

@@ -45,7 +45,7 @@ describe('UniversalXMLPlugin', function () {
driver.caps = {platformName: 'iOS'};
// mock out the findElement function to just return an xml node from the fixture
driver.findElement = (strategy, selector) => {
const nodes = runQuery(selector, XML_IOS.replace(/<\/?AppiumAUT>/, ''));
const nodes = runQuery(selector, XML_IOS.replace(/<\/?AppiumAUT>/g, ''));
return nodes[0];
};
const node = await p.findElement(next, driver, 'xpath', '//TextInput[@axId="username"]');