chore(terser): update terser to ^5.49.2 - #2019
Open
itsjamie wants to merge 1 commit into
Open
Conversation
Bumps terser from ^5.17.4 to the current release. No plugin code changes needed; typescript moves to the workspace catalog (5.9) because terser's types now pull in .d.cts declarations from its source-map dependency that TS 4.8 can't parse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollup Plugin Name:
terserThis PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Updates
terserfrom^5.17.4(May 2023) to the current release,^5.49.2.I reviewed the changelog between the two versions against what the plugin actually uses:
minify(), theresult.code/result.maphandling, the in-placenameCachemutation, and the options that cross the worker boundary throughserialize-javascript. Nothing in the range breaks any of it and no plugin code changes were needed. All 19 existing tests pass unchanged against 5.49.2, including the exact-output, mangled-name, and error-message assertions, so no new tests are included.The
typescriptdevDependency moves from^4.8.3to the workspace catalog (^5.9.3, asaliasalready does) because terser's type declarations now pull in.d.ctsfiles from its source-map dependency, and TS 4.8 can't parse those (TS2691), which broketest:ts.Three terser defaults changed in this range, so users may see slightly different but equivalent output after upgrading:
format.wrap_func_argsis nowfalse(v5.43.0): callbacks and IIFEs passed as call arguments are no longer wrapped in parentheses.undefinedis now emitted asvoid 0(v5.45.0): safer, sinceundefinedcan be shadowed.preserve_annotations(v5.26.0): enabling it now keeps/*#__PURE__*/-style annotation comments without also configuring thecommentsformat option, and/*#__PURE__*/is ignored when theside_effectscompress option is off.None of these affect the plugin's own behaviour or its test expectations.