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

Build: Switch from UglifyJS to SWC minify, make the minified file ES5 #630

Merged
merged 4 commits into from
Mar 6, 2025

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 2, 2025

More recent UglifyJS versions have started converting regular functions to arrow ones, making ES5 source file migrated to a ES2015+ minified one. We want to avoid that even in 1.14.x as long as we keep the source file in ES5. But the bigger problem is that we generate ES2015+ minified code even for 1.13.3 releases which support IE.

Fixes gh-629
Ref mishoo/UglifyJS#5967
Ref #629

@mgol mgol requested a review from fnagel March 2, 2025 23:45
@mgol mgol self-assigned this Mar 2, 2025
More recent UglifyJS versions have started converting regular functions to arrow
ones, making ES5 source file migrated to a ES2015+ minified one. We want to
avoid that even in 1.14.x as long as we keep the source file in ES5. But the
bigger problem is that we generate ES2015+ minified code even for 1.13.3
releases which support IE.

Closes jquerygh-629
Ref mishoo/UglifyJS#5967
Ref jquery#629
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

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

Looks good, but we talked about verifying es5 at runtime

@mgol mgol force-pushed the swc-minify branch 2 times, most recently from bbc7b6f to 0df48a9 Compare March 3, 2025 19:11
@mgol
Copy link
Member Author

mgol commented Mar 3, 2025

@timmywil I had to update GitHub Actions as the older ones didn't work anymore; I copied automatic Dependabot updates setup from Core as well.

I reverted the minifier change to make sure new tests fail and they do, with expected messages complaining about parsing errors:
https://github.com/jquery/download.jqueryui.com/actions/runs/13638505216/job/38122855881?pr=630

I reverted the reverts and the PR is green now.

@mgol mgol requested a review from timmywil March 3, 2025 19:14
Copy link
Member

@fnagel fnagel left a comment

Choose a reason for hiding this comment

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

+1 by reading

@mgol mgol merged commit 568e1f7 into jquery:main Mar 6, 2025
4 checks passed
@mgol mgol deleted the swc-minify branch March 6, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Download Builder emits jQuery-UI 1.13.3 custom causing Syntax error in MS WebBrowser control (IE11 mode)
3 participants