Repository navigation
Highlights
@xmldom/xmldom upgraded from 0.8 to 0.9 (#636, #638). xmldom 0.8's typings start with /// <reference lib="dom" />, which forced the browser DOM types into every TypeScript project that imports samlify, even Node-only ones. 0.9 removes that line, so samlify no longer adds DOM globals such as document and window, or DOM's fetch/BodyInit types, to your program.
⚠️ Behaviour changes
- Malformed or non-XML input is now a parse error. xmldom 0.8 used to turn it into a partial document. For example:
encryptAssertionon a non-XML string now rejects withXML fatal error: missing root elementinstead ofERR_NO_ASSERTION.- Metadata with two root
EntityDescriptorelements is now rejected.
- Parse error messages are wrapped by xmldom's
ParseError. They still containXML parsing error:/XML fatal error:. If you match error messages exactly, switch to a substring or regex match. setDOMParserOptionsaccepts xmldom 0.9 options. UseonError(level, message)instead of the deprecatederrorHandler.- The old
errorHandler: { warning, error, fatalError }object form still works: samlify converts it for you, although xmldom 0.9 itself rejects it. - Levels you leave out still fail closed.
- TypeScript users who imported xmldom's
Optionstype should useDOMParserOptions.
- The old
Dependencies
@xmldom/xmldom^0.8.11 → ^0.9.12.- Nested
@xmldom/xmldomused by@authenio/xml-encryption/xml-crypto→ 0.8.15. This clears the open xmldom advisories inyarn auditfor production dependencies. - Dev: vitest 3.2.7, postcss 8.5.25, js-yaml 3.15.1. These include the pending Dependabot PRs #631, #633 and #635. The unused
@types/xmldomwas removed.
Tests
- New consumer type check in
yarn test:types: compiles against the published declarations withlib: ["es2020"]andskipLibCheck: false, and fails iflib.domcomes back.
What's Changed
- fix: upgrade @xmldom/xmldom to 0.9 to keep lib.dom out of consumers (closes #636) by @tngan in #638
- docs: replace react-samlify reference with samlify-starter by @tngan
Full Changelog: v2.13.1...v2.14.0