Skip to content

chore(terser): update terser to ^5.49.2 - #2019

Open
itsjamie wants to merge 1 commit into
rollup:masterfrom
itsjamie:chore/terser-update-5.49
Open

chore(terser): update terser to ^5.49.2#2019
itsjamie wants to merge 1 commit into
rollup:masterfrom
itsjamie:chore/terser-update-5.49

Conversation

@itsjamie

@itsjamie itsjamie commented Aug 10, 2026

Copy link
Copy Markdown

Rollup Plugin Name: terser

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

Updates terser from ^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(), the result.code/result.map handling, the in-place nameCache mutation, and the options that cross the worker boundary through serialize-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 typescript devDependency moves from ^4.8.3 to the workspace catalog (^5.9.3, as alias already does) because terser's type declarations now pull in .d.cts files from its source-map dependency, and TS 4.8 can't parse those (TS2691), which broke test:ts.

Three terser defaults changed in this range, so users may see slightly different but equivalent output after upgrading:

  • format.wrap_func_args is now false (v5.43.0): callbacks and IIFEs passed as call arguments are no longer wrapped in parentheses.
  • undefined is now emitted as void 0 (v5.45.0): safer, since undefined can be shadowed.
  • preserve_annotations (v5.26.0): enabling it now keeps /*#__PURE__*/-style annotation comments without also configuring the comments format option, and /*#__PURE__*/ is ignored when the side_effects compress option is off.

None of these affect the plugin's own behaviour or its test expectations.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant