-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade @xmldom/xmldom to v0.9.5 #127
base: main
Are you sure you want to change the base?
Conversation
Might also get resolved by xmldom/xmldom#724 but using the more narrow types of xmldom might be right. |
This is a little problematic: xmldom/xmldom in this PR is still in I think in the medium term, only taking the part of this PR that switches from |
The array spread is also only to resolve type issues. Wise consideration regarding dependency size. If we keep only I think for xmldom to have stricter types is the right move. So using the types within the lib might help to limit to the available functions. And having to use unknown when xmldom is the recommended parser feels a bit off. |
I've updated with my proposal. Another possibility would be to add xmldom as an optional peer dependency. This would require TypeScript users to install xmldom. |
I'm not sure about this overall - it'll take some testing to figure out that if this package introduces Adding I'll think about it some more, but having |
I've upgraded
@xmldom/xmldom
to 0.9.5 and added the types to allow both DOM and xmldom Element/Node/Document. Otherwise the parsing result of the new versions wouldn't be accepted. I'm not sure if there would be a smoother path? Looks weird on the Docs likeDocument | Document
🤔.Otherwise I only had to switch
Array.from()
to[...]
.