Skip to content

Commit

Permalink
Update dependency @xmldom/xmldom to v0.9.0 (#84)
Browse files Browse the repository at this point in the history
* Update dependency @xmldom/xmldom to v0.9.0

* Pass mime type to XML parser

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ruby Iris Juric <[email protected]>
  • Loading branch information
renovate[bot] and Sorixelle committed Sep 1, 2024
1 parent 7390f77 commit 9c16759
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 30 deletions.
7 changes: 5 additions & 2 deletions lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import semverMaxSatisfying from "semver/ranges/max-satisfying";
import urljoin from "url-join";
import { DOMParser } from "@xmldom/xmldom";
import { DOMParser, MIME_TYPE } from "@xmldom/xmldom";
import xpath from "xpath";
import type { Config } from "./config";

Expand All @@ -39,7 +39,10 @@ async function getVersionInfo(config: Config): Promise<VersionInfo> {
}

const metaXml = await metaXmlRes.text();
const metaDoc = new DOMParser().parseFromString(metaXml);
const metaDoc = new DOMParser().parseFromString(
metaXml,
MIME_TYPE.XML_APPLICATION,
);
const latestVersion = xpath.select1(
"string(/metadata/versioning/latest)",
metaDoc,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prepack": "pnpm build"
},
"dependencies": {
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.0",
"cachedir": "2.4.0",
"cross-spawn": "7.0.3",
"decompress": "4.2.1",
Expand Down
59 changes: 32 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c16759

Please sign in to comment.