Skip to content

Commit

Permalink
Remove metro-minify-uglify (#1013)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1013

`metro-minify-terser` has been Metro's default JS minifier since Metro [0.73.0](https://github.com/facebook/metro/releases/tag/v0.73.0) (#871). However, we have continued to publish the deprecated `metro-minify-uglify` and included it in `metro`'s dependencies for a time for convenience.

(Consequently, package managers have displayed a confusing warning for the use of the deprecated `uglify-es`, even when it isn't actually used.)

This PR removes `metro-minify-uglify` from the main branch and from `metro`'s dependencies. If any critical patches are required in future, they may be published from the `0.76.x` branch.

Users wishing to use `metro-minify-uglify` as of the latest version published may still do so by adding `metro-minify-uglify@^0.76.0` to their project's dependencies and configuring [`transformer.minifierPath`](https://facebook.github.io/metro/docs/configuration/#minifierpath):
```
minifierPath: require.resolve('metro-minify-uglify')
```

Changelog:
```
 - **[Breaking]**: Remove `metro-minify-uglify` from `metro` dependencies.
```

Reviewed By: motiz88

Differential Revision: D47000809

fbshipit-source-id: aa3ab28ba6fc1cb35415247ef07aace952aa47f8
  • Loading branch information
robhogan authored and facebook-github-bot committed Jun 26, 2023
1 parent 260125e commit 7a8fcd5
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 227 deletions.
6 changes: 0 additions & 6 deletions packages/metro-minify-uglify/.npmignore

This file was deleted.

21 changes: 0 additions & 21 deletions packages/metro-minify-uglify/package.json

This file was deleted.

100 changes: 0 additions & 100 deletions packages/metro-minify-uglify/src/__tests__/minify-test.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/metro-minify-uglify/src/index.js

This file was deleted.

69 changes: 0 additions & 69 deletions packages/metro-minify-uglify/src/minifier.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/metro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"metro-file-map": "0.76.7",
"metro-inspector-proxy": "0.76.7",
"metro-minify-terser": "0.76.7",
"metro-minify-uglify": "0.76.7",
"metro-react-native-babel-preset": "0.76.7",
"metro-resolver": "0.76.7",
"metro-runtime": "0.76.7",
Expand Down
15 changes: 1 addition & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2152,11 +2152,6 @@ commander@^2.20.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

commander@~2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
Expand Down Expand Up @@ -5846,7 +5841,7 @@ source-map@^0.5.6:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=

source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
source-map@^0.6.0, source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
Expand Down Expand Up @@ -6275,14 +6270,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==

uglify-es@^3.1.9:
version "3.3.9"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==
dependencies:
commander "~2.13.0"
source-map "~0.6.1"

unbox-primitive@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471"
Expand Down

0 comments on commit 7a8fcd5

Please sign in to comment.