Skip to content

Commit

Permalink
Resolve issues with latest xmldom
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Nov 24, 2024
1 parent 5895189 commit b8823b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"noParameterAssign": "off"
},
"suspicious": {
"noExplicitAny": "off"
"noExplicitAny": "off",
"noConfusingVoidType": "off"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion lib/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function parse(file: string) {
return new xmldom.DOMParser().parseFromString(
fs.readFileSync(file, "utf8"),
"text/xml"
);
) as unknown as Document;
}

describe("toGeoJSON", () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function get(
export function val1(
node: Element,
tagName: string,
callback: (val: string) => P | undefined
callback: (val: string) => P | undefined | void
): P {
const val = nodeVal(get1(node, tagName));
if (val && callback) return callback(val) || {};
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@tmcw/togeojson",
"version": "6.0.0-0",
"description": "convert KML and GPX to GeoJSON",
Expand All @@ -24,6 +25,7 @@
"release": "standard-version"
},
"peerDependencies": {
"@xmldom/xmldom": "^0.9.5",
"@types/geojson": "*"
},
"devDependencies": {
Expand Down

0 comments on commit b8823b3

Please sign in to comment.