diff --git a/package-lock.json b/package-lock.json index ef6db10..9abdefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "0.16.1", "license": "BSD-2-Clause", "dependencies": { + "@xmldom/xmldom": "^0.8.10", "concat-stream": "~2.0.0", - "minimist": "1.2.8", - "xmldom": "~0.6.0" + "minimist": "1.2.8" }, "bin": { "togeojson": "togeojson" @@ -26,6 +26,14 @@ "tape": "~4.6.0" } }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", @@ -3327,14 +3335,6 @@ "node": ">=0.10.0" } }, - "node_modules/xmldom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", - "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -3346,6 +3346,11 @@ } }, "dependencies": { + "@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==" + }, "abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", @@ -5959,11 +5964,6 @@ "mkdirp": "^0.5.1" } }, - "xmldom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", - "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 159ff83..c68a1a9 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "xmldom": "~0.6.0", + "@xmldom/xmldom": "^0.8.10", "concat-stream": "~2.0.0", "minimist": "1.2.8" }, diff --git a/test/index.js b/test/index.js index b92adcf..1483ddf 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ var test = require('tape').test, tj = require('../'); if (!process.browser) { - var xmldom = require('xmldom'); + var xmldom = require('@xmldom/xmldom'); } function kmlFixtureEqual(t, file) { diff --git a/togeojson b/togeojson index aa8b639..49ae279 100755 --- a/togeojson +++ b/togeojson @@ -4,7 +4,7 @@ var tj = require('./'), argv = require('minimist')(process.argv.slice(2)), concat = require('concat-stream'), fs = require('fs'), - xmldom = new (require('xmldom').DOMParser)(); + xmldom = new (require('@xmldom/xmldom').DOMParser)(); var filename = argv._[0] || '', filetype = (argv.f || 'kml'); diff --git a/togeojson.js b/togeojson.js index 23ec6cc..73f870e 100644 --- a/togeojson.js +++ b/togeojson.js @@ -87,7 +87,7 @@ var toGeoJSON = (function() { var isNodeEnv = (typeof process === 'object' && !process.browser); var isTitaniumEnv = (typeof Titanium === 'object'); if (typeof exports === 'object' && (isNodeEnv || isTitaniumEnv)) { - serializer = new (require('xmldom').XMLSerializer)(); + serializer = new (require('@xmldom/xmldom').XMLSerializer)(); } else { throw new Error('Unable to initialize serializer'); }