crates_v0.142.0

oxc-project/oxccrates_v0.142.0Jul 27, 2026by github-actions[bot]

AI Summary

The minifier gains optimizations for folding parenthesized ternaries and integer zero comparisons. AST visitor receives a new `VisitJsMut` visitor and a `static_str!` macro is added.

Key Highlights

  • Minifier: Fold parenthesized boolean ternary tests
  • Minifier: Shorten integer zero comparisons
  • ast_visit: Add VisitJsMut visitor
  • str: Add `static_str!` macro

Breaking Changes

  • ast: [**BREAKING**] Tighten bound on `AstBuild` trait

New Features

  • ast_visit: Add VisitJsMut visitor
  • str: Add `static_str!` macro
  • minifier: Fold parenthesized boolean ternary tests

Full Release Notes

### 💥 BREAKING CHANGES

- 1ac5ac7 ast: [**BREAKING**] Tighten bound on `AstBuild` trait (#24925) (overlookmotel)

### 🚀 Features

- c7c5696 minifier: Fold parenthesized boolean ternary tests (#24968) (Dunqing)
- 82c5806 minifier: Fold sequence branches in boolean ternaries (#24943) (Dunqing)
- cc623d9 ast_visit: Add VisitJsMut visitor (#24828) (Boshen)
- b31713a minifier: Add new IsTerminated trait and use it in exit-point optimization (#24950) (Armano)
- e9e0f24 minifier: Shorten integer zero comparisons (#24933) (Dunqing)
- 34f5559 minifier: Convert switch with one case to if statement (#24611) (Armano)
- 9107e74 str: Add `static_str!` macro (#24887) (overlookmotel)
- 4d6f623 parser: Emit error for type args in JS files (#24896) (camc314)
- ec08afc ast: Re-export `Ident` from `oxc_ast` crate (#24861) (overlookmotel)
- 73cfdfa oxc: Re-export `oxc_str` types from `oxc` crate (#24860) (overlookmotel)
- 11f5d1f ast_visit: Add `Utf8ToUtf16::convert_program_and_comments` (#24859) (overlookmotel)

### 🐛 Bug Fixes

- cb5acfb minifier: Optimize termination statements in labeled statements (#24813) (Armano)
- 4618300 minifier: Avoid longer numeric constant folds (#24875) (Dunqing)
- f7971f1 minifier: Keep side effects in typeof comparisons (#24940) (sapphi-red)
- 4597d6f minifier: Keep side effects when compressing `== true` to `== 1` (#24939) (sapphi-red)
- c3a48df minifier: Keep side effects values in template literals (#24938) (sapphi-red)
- e19f183 minifier: Keep side effects when folding `Number` call (#24937) (sapphi-red)
- 9d7745a react-compiler: Preserve warning bailouts (#24935) (Boshen)
- 0126aba codegen: Preserve orphaned file coverage comments (#24815) (Dunqing)
- 9fbbaf8 parser: Clarify return in class static blocks (#24899) (camc314)
- e7d5c78 str: Fix hygiene of `format_ident!` and `format_str!` macros (#24886) (overlookmotel)
- 07e9acc ecmascript: Keep side effects in parent of `toString` calls (#24846) (sapphi-red)
- 16a40ad ecmascript: Detect side effects in unused arguments to `charCodeAt` (#24845) (sapphi-red)
- 5b4ae54 parser: Use specific for-await diagnostic (#24856) (camc314)
- ffcc33a parser: Report for-await in non-async functions (#24855) (camc314)
- df230d0 minifier: Avoid reordering this in nested class keys (#24785) (Dunqing)
- d24b76b minifier: Isolate derived constructor this state (#24784) (Dunqing)
- 582805d parser: Parse unary conditional after satisfies (#24807) (Boshen)
- 23b904f minifier: Preserve default parameter side effects (#24791) (Dunqing)
- 3048594 parser: Use correct diagnostic for `await using` in bare switch case (#24798) (camc314)
- e80574f estree: Handle empty spans serializing `ImportMeta` and `NewTarget` (#24775) (overlookmotel)
- 4b12840 minifier: Do not fold a `-0` ternary branch to `+a` (loses the sign) (#23637) (Jerry Zhao)
- 133bb35 ecmascript: Detect side effects of `foo().#bar` correctly when PropertyReadSideEffects::None (#24769) (sapphi-red)

### ⚡ Performance

- a086d91 ecmascript: Avoid number literal allocations (#24889) (Dunqing)
- 98f2ecb react_compiler: Compare value set pointers before probing in state merge (#24805) (Marius Schulz)
- b287f29 estree: Avoid ident hash calculations when serializing (#24774) (overlookmotel)

### 📚 Documentation

- 4d2e2bf ast: Fix incorrect return value in `common_js_require` docs (#24945) (connorshea)
- b539e74 estree: Document custom serializers for `ImportMeta` and `NewTarget` (#24777) (overlookmotel)