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

fix(html/minifier): Fix HTML minifier TS types #9615

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

slorber
Copy link
Contributor

@slorber slorber commented Oct 4, 2024

Description:

preserveComments is optional but required in the TS type

removeRedundantAttributes is an enum and passing a boolean leads to errors

See https://github.com/swc-project/swc/blob/main/crates/swc_html_minifier/src/option.rs#L54

Sync HTML minifier TS options with Rust options.

I'm not sure if I'm supposed to edit this file manually or if it's generated, but let's figure it out together 😄

BREAKING CHANGE: no, type bugfix

Related issue (if exists): facebook/docusaurus#10554

@slorber slorber requested a review from a team as a code owner October 4, 2024 10:28
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

changeset-bot bot commented Oct 4, 2024

⚠️ No Changeset found

Latest commit: 8849a2c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codspeed-hq bot commented Oct 4, 2024

CodSpeed Performance Report

Merging #9615 will improve performances by 9.07%

Comparing slorber:patch-1 (8849a2c) with main (2480bb0)

Summary

⚡ 1 improvements
✅ 193 untouched benchmarks

Benchmarks breakdown

Benchmark main slorber:patch-1 Change
es/full/bugs-1 550.6 µs 504.8 µs +9.07%

@kdy1 kdy1 self-assigned this Oct 6, 2024
@kdy1 kdy1 added this to the Planned milestone Oct 6, 2024
@kdy1 kdy1 merged commit 7b98bb5 into swc-project:main Oct 6, 2024
155 checks passed
@kdy1
Copy link
Member

kdy1 commented Oct 6, 2024

Thank you!

@kdy1 kdy1 modified the milestones: Planned, v1.7.31 Oct 8, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants