Skip to content
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

Update to html-to-react 1.7.0 #7478

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pjonsson
Copy link
Contributor

What this PR does

Unpin html-to-react now that
modules are ESM.

Also TSify MoreShallowTools in the tests.

It's been almost 2 months since I did these changes, so I have forgotten why I put them in the same branch, but I always start a new branch for unrelated changes.

Test me

I believe this is tested by CI?

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

Copy link
Collaborator

@zoran995 zoran995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The html-to-react version 1.7.0 publishes its TypeScript types, so we should remove our types. The utility types are probably not exposed publicly, but you should be able to re-export them using the declare module syntax. After you remove our types, there may be some library usage issues. I can take this over if you can't or run into issues

@pjonsson pjonsson force-pushed the tsify-moreshallowtools branch from 48b874a to 43bea70 Compare February 26, 2025 16:38
@pjonsson
Copy link
Contributor Author

we should remove our types.

Nice find, I thought those kind of things were usually done in major versions! I have updated the PR.

@pjonsson pjonsson requested a review from zoran995 February 26, 2025 16:41
@pjonsson pjonsson force-pushed the tsify-moreshallowtools branch 3 times, most recently from 037c41f to d64b304 Compare February 27, 2025 12:28
Unpin html-to-react now that
modules are ESM.
@pjonsson pjonsson force-pushed the tsify-moreshallowtools branch from d64b304 to 24e04e6 Compare February 27, 2025 13:53
declare module "html-to-react";
declare module "html-to-react/lib/utils";
declare module "html-to-react/lib/utils" {
export * from "html-to-react/types/utils";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zoran995 was this what you meant with the comment yesterday about re-export of internal types?

I also updated this PR to make the html-to-react imports only import what they use, which I believe helps with tree-shaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants