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
Community contribution required: Typescript Compilebreak after updating from nodejs 8 to 12 #320
Comments
I just noticed that domhandler 3.0.0 is also typescript and therefore those types are used instead of So since another dependency pulls in So I think if |
I've opened an issue asking for some information as to what bc breaks, if
any, come with htmlparser2 4.0.0.
…On Fri, Dec 27, 2019 at 5:19 AM ceisele-r ***@***.***> wrote:
I just noticed that domhandler 3.0.0 is also typescript and therefore
those types are used instead of @types/domhandler because domutils 2.0.0
pulls in domhandler ^3.0.0.
So since another dependency pulls in htmlparser2 4.0.0 that pulls in domutils
^2.0.0, domhandler ^3.0.0 is pulled in which overwrites the domutils 1.7.0
version pulled in parallel by sanitize-html.
So I think if sanitize-html would also upgrade the htmlparser2 dependency
to ^4.0.0, the issue would be solved.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#320?email_source=notifications&email_token=AAAH27OEE6TUVCILQT723F3Q2XJCBA5CNFSM4J7ZNCY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHW6QTQ#issuecomment-569239630>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27JJZDAKAFFWR7KCOH3Q2XJCBANCNFSM4J7ZNCYQ>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
I did upgrade to htmlparser2 4.x, and it works great and all tests pass etc., but one user has reported a similar issue since the upgrade. I need a simple procedure to reproduce this issue. Ideally a failing test case PR. |
The upgrade doesn't look like it enforces htmlparser2 4.x, the relevant line of code is: https://github.com/apostrophecms/sanitize-html/blob/master/package.json#L30 |
Whoops, somehow didn't push master after publishing, fixed.
…On Mon, Feb 24, 2020 at 5:49 PM David Mattia ***@***.***> wrote:
The upgrade doesn't look like it enforces htmlparser2 4.x, the relevant
line of code is:
https://github.com/apostrophecms/sanitize-html/blob/master/package.json#L30
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#320?email_source=notifications&email_token=AAAH27OJXKL7MGSOZQ47METRERFGRA5CNFSM4J7ZNCY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMZ2W5Q#issuecomment-590588790>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27OZ2O47KLFA3RLC23DRERFGRANCNFSM4J7ZNCYQ>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
This is still broken for me, post upgrade I see the following issues:
|
Still have the same issue on my end too. |
This is also broken for us (matrix-org/matrix-appservice-irc#1003) |
Same here, have to use custom / very simplified typings for now. |
Same for me. |
We do not use typescript in house, so this will need to be resolved by a community contributor who is familiar with it. We are waiting for a PR, in other words. Thank you for verifying the issue — but past this point please do not add "me too" comments until there is some indication that an attempt has been made to resolve the issue. |
I've made a PR to |
That's great! Since we don't use TypeScript in-house, would someone please check out the PR from @dsyncerek and confirm that it does in fact solve the problem for them as well? cc @kieusonlam @vladimiry @Half-Shot @burtonator |
Actually it sounds like there might not be anything to do on our end? |
yes, only |
Until @dsyncerek DefinitelyTyped PR is merged I have solved the issues by fixing my project's dependencies to these versions:
Note: @types/node was required in my case as htmlparser2 seems to have issues with this sanitize-html version in conjunction with my node version - you might be able to skip it |
PR is merged now 🎉 |
Thanks @dsyncerek , I can confirm its working not in 1.23.0 with types in 1.23.0. |
👍
…On Mon, Apr 27, 2020 at 1:53 AM ceisele-r ***@***.***> wrote:
Closed #320 <#320>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27J75ARQHQBBNWXFOODROUMWVANCNFSM4J7ZNCYQ>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
Good Afternoon: I tried everything on this thread still having this problem: node -v "dependencies": { ERROR: TS2614: Module '"../../../../../../../Desktop/workflow-ui/node_modules/domhandler/lib"' has no exported member 'DomElement'. Did you mean to use 'import DomElement from "../../../../../../../Users/a-zhaque/Desktop/workflow-ui/node_modules/domhandler/lib"' instead? |
@zhaque44 That error doesn't look like it's referencing this package. |
I still get the error
in the typecheck step I'm using Thanks in advance. |
I'm facing the same problem
|
Are these not issues coming from |
We used
sanitize-html
in a typescript project with node 8.After upgrading to node 12, the following typescript compilebreaks occurr in sanitize-html and its dependencies:
In the
package.json
, we are usingand
for the typings.
Could anyone else update successfully to node 12?
Side-note - maybe it helps:
It seems the dependency
htmlparser2
was ported to typescript in fb55/htmlparser2@759b122 which was released in https://github.com/fb55/htmlparser2/releases/tag/v4.0.0. Stillsanitize-html
pulls in"htmlparser2": "^3.10.0",
as dependency.The text was updated successfully, but these errors were encountered: