Skip to content

Commit

Permalink
Merge pull request #86 from IGNF/update/xml-dom-dependency
Browse files Browse the repository at this point in the history
Update/xml dom dependency
  • Loading branch information
elias75015 authored Mar 21, 2024
2 parents 0ea45c8 + f96d731 commit dff5ab6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions DRAFT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

* [Fixed]

- remplace dépendance xmldom par @xmldom/xmldom (ba127d66030d632ce5058ce7274013f531acbfcc)

* [Deprecated]

* [Security]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dependencies": {
"es6-promise": "^4.2.4",
"node-fetch": "^2.6.1",
"xmldom": "^0.1.27"
"@xmldom/xmldom": "^0.8.10"
},
"devDependencies": {
"@babel/core": "^7.12.10",
Expand Down
2 changes: 1 addition & 1 deletion src/Formats/XML.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ XML.prototype = {
function __getXMLDOC (xmlString) {
if (typeof window === "undefined") {
// env. nodejs
var DOMParser = require("xmldom").DOMParser; // __xmldom.DOMParser;
var DOMParser = require("@xmldom/xmldom").DOMParser; // __xmldom.DOMParser;
return new DOMParser().parseFromString(xmlString, "text/xml");
} else {
// env. browser
Expand Down
2 changes: 1 addition & 1 deletion src/Protocols/XHR.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ var XHR = {

// test on env. nodejs or browser
if (typeof window === "undefined") {
var DOMParser = require("xmldom").DOMParser; // __xmldom.DOMParser
var DOMParser = require("@xmldom/xmldom").DOMParser; // __xmldom.DOMParser
xmlDoc = new DOMParser().parseFromString(response, "text/xml");
} else {
if (window.DOMParser) {
Expand Down

0 comments on commit dff5ab6

Please sign in to comment.