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

feat(es/minifier): Implement optional catch binding #9657

Merged
merged 3 commits into from
Oct 20, 2024

Conversation

CPunisher
Copy link
Member

Description:

BREAKING CHANGE:

Related issue (if exists):
closes #8966

I think removing !v.declared_as_catch_param is safe, since I can't think of a bad case:

  1. for the vars in the params of catch-clause, we prevent the removal if self.options.ecma < EsVersion::Es2019 || !self.options.unused is not satisfied.
  2. for the usages or re-declarations with the same var name in the body of catch-clause, I think it's safe to remove them.

@CPunisher CPunisher requested a review from a team as a code owner October 17, 2024 14:03
Copy link

changeset-bot bot commented Oct 17, 2024

🦋 Changeset detected

Latest commit: bafb840

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

Copy link

codspeed-hq bot commented Oct 17, 2024

CodSpeed Performance Report

Merging #9657 will not alter performance

Comparing CPunisher:feat/optional-catch-binding (bafb840) with main (32116a0)

Summary

✅ 194 untouched benchmarks

@kdy1 kdy1 added this to the Planned milestone Oct 19, 2024
Austaras
Austaras previously approved these changes Oct 20, 2024
@kdy1 kdy1 requested a review from a team as a code owner October 20, 2024 09:41
@kdy1 kdy1 merged commit f70b842 into swc-project:main Oct 20, 2024
23 of 24 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.7.37 Oct 21, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 20, 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.

Minifier should use optional catch binding
3 participants