Skip to content

TypeScript: Converts HtmlEntities Package to TS #69326

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

Merged
merged 5 commits into from
Jun 20, 2025

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Feb 26, 2025

What?

Part of: #67691
Migrating the HtmlEntities package to Typescript.

Why?

Type safety.

How?

Testing Instructions

Typecheck and unit tests.

@im3dabasia im3dabasia changed the title Converts HtmlEntites Package to Typescript Converts HtmlEntities Package to Typescript Feb 26, 2025
@im3dabasia im3dabasia marked this pull request as ready for review February 27, 2025 09:04
Copy link

github-actions bot commented Feb 27, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: manzoorwanijk <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] HTML entities /packages/html-entities labels Feb 27, 2025
@im3dabasia im3dabasia changed the title Converts HtmlEntities Package to Typescript TypeScript: Converts HtmlEntities Package to TS Mar 6, 2025
Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

Thank you. This looks great.

Let us also remove the types in JSDoc params and return types

- * @param {string} html String that contain HTML entities.
+ * @param html String that contain HTML entities.

@im3dabasia im3dabasia force-pushed the try/html-entities-ts branch from 6b2c1c4 to fab8069 Compare June 17, 2025 07:07
@im3dabasia im3dabasia requested a review from manzoorwanijk June 17, 2025 07:14
Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

This looks good now. Thank you for implementing the suggestions.

@manzoorwanijk manzoorwanijk enabled auto-merge (squash) June 17, 2025 07:18
@im3dabasia
Copy link
Contributor Author

Hey @manzoorwanijk ,

Firstly thanks for the review!

I was thinking to make similar conversions for the icons package. I will tag you for a quick review once I am ready with the PR.

@manzoorwanijk manzoorwanijk self-assigned this Jun 17, 2025
@manzoorwanijk
Copy link
Member

I see that E2E tests are failing. Can we please do a trunk merge?

auto-merge was automatically disabled June 19, 2025 12:13

Head branch was pushed to by a user without write access

@im3dabasia im3dabasia force-pushed the try/html-entities-ts branch from 62e7f9e to 5931ed3 Compare June 19, 2025 12:13
@im3dabasia
Copy link
Contributor Author

im3dabasia commented Jun 19, 2025

Hey @manzoorwanijk ,

Thank you for the follow-up.

I have updated the PR with the latest trunk and now all the CI tests seem to be passing. Please ship the PR.

PS: I have also completed work on the migrating icons package to TypeScript, please have a look at it too. #70456

@manzoorwanijk manzoorwanijk merged commit 717ba2c into WordPress:trunk Jun 20, 2025
59 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.1 milestone Jun 20, 2025
@t-hamano
Copy link
Contributor

@manzoorwanijk To ensure your contributions are properly credited, when merging the PR, you may want to add the contributor list in this comment to the description.

Thank you!

Example:
merge

@manzoorwanijk
Copy link
Member

@manzoorwanijk To ensure your contributions are properly credited, when merging the PR, you may want to add the contributor list in this comment to the description.

Ah, yes, I forgot to do that. I will keep that in mind for the future. Thank you.

@t-hamano t-hamano mentioned this pull request Jun 24, 2025
32 tasks
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
* feat: Convert html-entites to ts

* feat: Update tests to ts

* fix: Remove type for this _decodeTextArea

* fix: Remove return type for decoded string in decodeEntities

* fix: Remove function doc comments type inferences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] HTML entities /packages/html-entities [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants