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

Replace deprecated uglify-es with uglify-js #793

Closed
wants to merge 1 commit into from

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Mar 19, 2022

Summary

This PR replaces the deprecated uglify-es package (https://www.npmjs.com/package/uglify-es) with the uglify-js as suggested in the deprecation notice.

Screenshot 2022-03-19 at 18 18 49

Affected packages are metro-minify-uglify and metro-source-map.

It looks like the switch should be quite trouble free, since there are almost no difference between packages APIs.

Test plan

I have updated the dependencies and code, then I run the test script from the workspace root.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Mar 19, 2022
@robhogan
Copy link
Contributor

Hi @Simek - thanks for the PR. It's a duplicate of #661 though, and the reason that hasn't been merged is that the minified output of uglify-js differs from uglify-es in a couple of ways that turn out to be problematic internally.

We're planning to switch Metro's default to terser instead (originally a fork of uglify-es), as soon as we can overcome the issue in terser/terser#1164.

@robhogan robhogan closed this Mar 21, 2022
@Simek Simek deleted the replace-uglify-es-with-uglify-js branch March 21, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants