Commit Graph

87 Commits

Author SHA1 Message Date
Boshen e74de61886 fix(transform-react): match Babel diagnostic reporting (#26128)
Match Babel’s default React Compiler diagnostic reporting and severity.

AI-assisted.
2026-08-27 05:27:21 +00:00
Boshen a565a37d1d fix(react_compiler): bail out on missing identifier nodes (#26112)
Match upstream's catchable missing-identifier invariant in `PruneNonEscapingScopes`, preventing a later misleading `PreserveManualMemo` diagnostic. Adds the original-shaped named function expression regression.

AI-assisted and reviewed by the contributor.
2026-08-26 14:47:42 +00:00
Boshen b1201f1c8f fix(react-compiler): support for loops without test expressions (#25990)
Support for (;;) by lowering the omitted test to true and omitting the synthetic HIR initializer during codegen.

AI assistance was used to implement and verify this change.
2026-08-22 06:24:33 +00:00
Boshen f2e4ab0921 perf(react-compiler): omit codegen from oxlint (#25935)
Separate React Compiler emission from lint analysis so oxlint can dead-strip compiler codegen.

This reduces the stripped oxlint binary by 145 KiB (1.21%).

AI-assisted with Codex.
2026-08-22 05:53:45 +00:00
Boshen 975181512c fix(react-compiler): preserve computed property access (#25933)
Closes #25918.

Supersedes #25919.
References react/react#37234.

AI-assisted.
2026-08-20 07:19:24 +00:00
Boshen b831ca8af9 fix(react-compiler): improve derived state diagnostic (#25804)
Improve `react/no-deriving-state-in-effects` diagnostics with labeled state updates, named reactive dependencies, and actionable render guidance. Adds fixture coverage for single and multiple dependencies.

AI assistance was used for this change.
2026-08-17 14:33:28 +00:00
Boshen 28c0493682 fix(react-compiler): support typed assignment targets (#25758)
Support TypeScript-wrapped assignment targets in context analysis and
HIR lowering.

AI-assisted; reviewed and validated by the contributor.
2026-08-17 17:22:29 +08:00
Boshen c41d2a569e fix(react-compiler): support bigint object keys (#25749)
BigInt object keys fell through generic unsupported-key handling. Lower
them through the exact parser-provided decimal string, preserving
alternate bases and values beyond Number precision.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:28 +08:00
Boshen fd3980e91b fix(react-compiler): support escaped tagged templates (#25748)
React Compiler HIR already preserves both raw and cooked tagged-template
values, but lowering rejected templates whenever they differed. Remove
the stale bailout and cover escaped and invalid escape sequences.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:28 +08:00
Boshen a469a928d5 fix(react-compiler): cover incompatible aliasing signatures (#25744)
`known_incompatible` is already checked before both aliasing and legacy
signature handling, making the legacy-path TODO stale. Add
aliasing-signature coverage to guard the shared behavior.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:27 +08:00
Boshen c108d5c45e fix(linter): improve React Compiler diagnostics (#25742)
Improve React Compiler diagnostics with actionable help and cause-oriented labels. Preserve-memoization and recursive-initialization diagnostics previously spanned entire callbacks; they now keep codeframes compact while refs and `try`/`finally` show related locations.

Validated with React Compiler and React linter suites, Clippy, `just ready`, and the 24-rule VS Code ecosystem audit.

AI-assisted: Codex was used to implement and validate this change. I reviewed and take responsibility for the result.
2026-08-16 14:08:22 +00:00
Boshen daf03ff25d fix(react-compiler): bail out on JSX ref property loads (#25739)
Bail out when JSX `ref` values are loaded through properties, matching React Compiler and preserving getter and live-binding evaluation semantics.

The validator previously stopped temporary tracking for every property result inferred as ref-like instead of only stopping for `ref.current`.

Validation: `cargo test -p oxc_react_compiler` and `just ready`.

AI assistance: Codex was used to investigate and prepare this change; the contributor remains responsible for reviewing it before merge.
2026-08-16 13:25:12 +00:00
Boshen 066b31bdc6 fix(react-compiler): recompile outlined JSX components (#25737)
Queue JSX-outlined components back through the normal `process_fn` pipeline, matching Babel's `Program.ts`. Oxc rebuilds immutable semantics once per FIFO generation and preserves Babel's outlined declaration order.

Validated against the React Compiler fixture suite, Babel output, and `just ready`.

AI-assisted; reviewed and validated by the contributor.
2026-08-16 13:18:57 +00:00
Boshen 33d4ed9dec fix(react-compiler): preserve unreferenced function expression names (#25733)
Preserve named function expression names when the private name is unreferenced. This matches React Compiler lowering and avoids changing observable `Function.name` values.

Validated with `just ready`.

AI-assisted.
2026-08-16 05:27:34 +00:00
Boshen c9ec55e635 fix(react-compiler): improve diagnostic spans (#25731)
Improve React Compiler diagnostics with focused primary spans and related labels for declarations, dependencies, effects, nested functions, dynamic Hooks, and transitive ref access. This avoids full-function highlights and fixes zero-width arrow labels when lowered parameter spans are missing.

Validation: `env -u NO_COLOR just ready`.

AI-generated with Codex; reviewed and validated by the contributor.
2026-08-16 03:22:59 +00:00
Boshen 4e591ed4ed fix(react_compiler): support destructured context parameters (#25724)
Fix destructured function and rest parameters that become context variables by lowering them through temporaries before `StoreContext`. This avoids inconsistent `Destructure`/context HIR and compiles supported components correctly.

Validated with `just ready` and runtime equivalence checks against React 19.2.1's compiler runtime.

AI usage: Implemented with assistance from OpenAI Codex.
2026-08-16 03:04:17 +00:00
Boshen 8c4552dfa6 feat(linter)!: split react/react-compiler into per-category rules (#25500)
Splits the experimental `react/react-compiler` rule into 24 category-specific rules matching `eslint-plugin-react-hooks` v7.

- Runs React Compiler once per file and routes structured diagnostics to each enabled rule.
- Removes `react/react-compiler` and `reportAllBailouts`, with rules categorized by user-facing lint intent.
- Adds per-rule documentation and deduplicates shared React lint URLs.
- Preserves standardized compiler diagnostics while reporting each finding under its Oxlint rule name.

Breaking change: configurations using `react/react-compiler` must migrate to the category-specific rules.

Written with Claude Code and Codex.
2026-08-15 14:56:58 +00:00
Boshen dec0a86412 fix(react-compiler): standardize diagnostics (#25702)
Standardize React Compiler diagnostics with concise titles, primary labels, actionable help, notes, structured categories, and official guidance links.

Preserve React guidance when diagnostics are surfaced through Oxlint, and refresh affected snapshots.

AI-assisted; reviewed and validated by the contributor.
2026-08-15 13:31:34 +00:00
Boshen ad963b689d refactor(react_compiler): centralize diagnostics (#25699)
Centralizes React compiler diagnostics in explicit `#[cold]` functions and removes the `[ReactCompiler]` prefix, keeping diagnostic formatting off hot paths. Updates related NAPI expectations.

AI assistance was used.
2026-08-15 05:57:29 +00:00
Boshen 48e917fcba fix(react-compiler): preserve tagged template runtime semantics (#25678)
Preserve tagged-template call, aliasing, and mutation effects instead of assuming no-substitution tags are primitive or pure.

Execute opaque or effectful tags unconditionally while retaining memoization only when a configured signature proves a read-only pure call and safe return.

AI-assisted investigation and implementation; reviewed and understood by the contributor.
2026-08-15 05:12:06 +00:00
Boshen b0e6c2574c fix(react-compiler): match upstream inline enum handling (#25672)
Preserve inline TypeScript enums as opaque pass-through HIR nodes, matching upstream React Compiler behavior. Apply Oxc-specific raw AST reference renaming, and skip compilation when passthrough would hide nested captures or flatten block-local bindings.

AI-assisted: Codex was used to implement and validate this change.
2026-08-15 03:45:50 +00:00
Boshen c5f188a608 fix(react-compiler): use Babel v1 validation defaults (#25676)
Match the public validation defaults from babel-plugin-react-compiler 1.0 while retaining explicit opt-in for newer validations.

Validated with fixture snapshots and `just ready`.

AI-assisted investigation and implementation; reviewed and understood by the contributor.
2026-08-15 01:52:58 +00:00
Boshen e76632d9a0 fix(react_compiler): lower lowercase JSX tags as strings (#25667)
React Compiler's JSX reconstruction preserved the HIR identifier expression kind, causing compiler-generated lowercase aliases such as `navTitle` to lower as variable references. Classify reconstructed tags by their emitted JSX spelling while preserving underscore-prefixed component references.

Validation: `cargo test -p oxc_react_compiler`, `cargo clippy -p oxc_react_compiler --all-targets -- -D warnings`, and the transform-react NAPI suite.

AI assistance: OpenAI Codex was used to investigate, implement, and validate this change.
2026-08-14 13:53:59 +00:00
Boshen ecab5f7d2b fix(react-compiler): remove redundant compound assignment expressions (#25642)
Removes synthetic expression statements emitted after captured compound assignments when their value is unused. The lowering-created context load is tagged so analysis retains it, while codegen can omit it after the lvalue is pruned. Consumed assignment results are preserved.

Validated with `env -u NO_COLOR just ready`.

AI assistance: Codex was used to investigate, implement, and validate this change.
2026-08-14 05:25:06 +00:00
Boshen d68059a2d8 fix(react_compiler): retry after caught throws (#25641)
Retain exception-handler edges for value-block stores so caught throws do not commit the input/result memo entry. This preserves retries for identical inputs after a transient throw.

Adds a sequential-render evaluator fixture covering throw-once behavior.

Validated with `env -u NO_COLOR just ready` and a Sprout runtime comparison.

AI assistance was used to investigate and implement this change.
2026-08-14 05:02:31 +00:00
Boshen 0eac5a0373 fix(react_compiler): preserve caught throw semantics (#25593)
Preserve potentially throwing operations inside try/catch when dead-code elimination would otherwise remove their unused results. Share the throw classifier with try-edge pruning, retain caught destructuring, and use safe root dependencies without hoisting throwing operations outside their handlers.

This preserves source runtime behavior for property and computed reads, coercions, destructuring, computed keys, and spreads. Latest React Compiler currently has the same DCE divergence, so this follows JavaScript semantics rather than its incorrect output.

Validated with `just ready` and React Compiler’s Sprout evaluator.

AI assistance was used to investigate and implement this change.
2026-08-13 15:54:06 +00:00
Boshen 721a8eaced fix(react_compiler): preserve Symbol identity (#25597)
Model `Symbol()` as identity-bearing so escaping symbols are memoized, matching Babel. The regression came from registering `Symbol` with copy-like primitive globals while allowing capitalized built-in calls.

Validation: `cargo test -p oxc_react_compiler`; Babel output comparison; runtime identity check. `just ready` is blocked by three unrelated ANSI-sensitive Oxlint snapshot mismatches in this environment.

AI-assisted: Codex was used to investigate, implement, verify, and prepare this PR.
2026-08-13 13:44:56 +00:00
Boshen a2259b8e75 fix(react-compiler): scope forwardRef discovery context (#25591)
Scopes `forwardRef`/`memo` discovery context to the direct callback so nested helpers are not incorrectly compiled with stale caches. Adds regression coverage for arrow and function callbacks.

Validated with `just ready`.

AI-assisted.
2026-08-13 13:26:28 +00:00
Boshen 78bf14f4f8 fix(react_compiler): insert outlined functions as siblings at any nesting depth (#25548)
Closes #25536

## Problem

With `enableFunctionOutlining` (default on), the compiler outlines function expressions whose lowered **context** is empty. Context only counts variables captured from scopes inside the function being compiled — a free variable of the whole compiled function (e.g. a binding of an *enclosing* function) is modeled as a plain global load/store in HIR, so a callback referencing one still gets outlined. Correctness then depends entirely on where the outlined declaration is inserted: upstream uses Babel `originalFn.insertAfter(...)`, which splices into the statement list containing the original at **any nesting depth**, preserving the invariant that every name visible to the original is visible at its sibling position.

`ox_insert_outlined_after` searched only `program.body`. For a component declared inside another function, the search missed and the fallback appended the outlined declaration at module scope:

```js
export function makeProbe() {
  let mounts = 0;
  function MountCounter() {
    useEffect(() => { mounts += 1; }, []);
    return null;
  }
  return { MountCounter, read: () => mounts };
}
```

compiled to

```js
export function makeProbe() { /* ... useEffect(_temp, t0) ... */ }
function _temp() {
  mounts = mounts + 1; // ReferenceError: mounts is not defined
}
```

with no diagnostic — a silent miscompilation that only fails when the effect fires.

A second instance of the same shape: gating ran before outlined insertion. The gating rewrite replaces the declaration statement with a `const`, destroying the scope-id anchor, so gated components' outlined functions always fell to the end-of-program fallback (upstream inserts them during the compile-queue loop, before any replacement, so they land right after the gated `const`).

## Fix

- `ox_insert_outlined_after` locates the declaring statement through a new `InsertOutlinedAfter` mode on the shared `OxcVisitor`, scanning each statement list before descending into it. Top-level originals (the common case) cost the same as before — the target is found in the first list scanned with no descent — and the walk prunes itself once insertion happens. Matching by `scope_id` cell stays sound because `ox_replace_function` mutates originals in place and discovery skips compiled bodies, so the anchor statement is always original AST. The top-level append survives only as a fallback for sloppy-mode annex-B positions (`if (c) function F() {}`).
- Outlined insertion now runs before `ox_apply_gated_conditional`, restoring upstream's sequencing.

Arrow/function-expression originals still append at module scope: upstream does the same (`program.pushContainer('body', ...)`) — including for nested originals, where upstream's own output breaks the same way — and the port reproduces upstream behavior rather than diverging (now documented in the placement comment).

Placement in all three added fixtures (nested declaration = the issue repro, nested block, gating + outlining) is byte-identical to `babel-plugin-react-compiler` built from react @ 22e4f993c7 with matching options; the existing 1310 fixture snapshots are unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-08-12 14:31:36 +00:00
Boshen e3c6c4e739 fix(react-compiler): initialize named function expression bindings (#25515)
Treat a named function expression’s private name as a function-entry binding through HIR, SSA, and alias analysis. This prevents self-references from reaching mutation inference uninitialized and adds fixture coverage.

Closes #23752.

Validated with targeted compiler and linter checks, workspace checking, and linting.

AI-assisted.
2026-08-12 07:38:16 +00:00
Boshen 9f63f86f6a fix(react-compiler): handle tagged template hooks (#25525)
Fix tagged template hooks so they are validated and treated like hook calls, including unconditional execution across renders.

Closes #24473.

AI-assisted: Codex was used to investigate and implement this change. I reviewed and take responsibility for it.
2026-08-12 05:03:16 +00:00
Boshen 0bd116abe9 fix(react_compiler): handle local self-references in memo deps (#25524)
Fixes #25049.

Register `DeclareContext` bindings as locals before analyzing nested functions so local self-references are not treated as missing memo dependencies. Skip exhaustive dependency validation when both modes are disabled.

Validation: `just ready`

AI assistance was used to investigate and implement this change.
2026-08-12 04:41:18 +00:00
Boshen f76aad4b59 fix(react_compiler): allow callback ref member expressions (#25517)
Prevent JSX callback-ref member expressions from marking their receiver as a React ref. Add a compiler fixture covering the regression.

Fixes #23753.

Validated with `just ready`.

AI assistance was used to prepare this change.
2026-08-12 03:45:30 +00:00
Boshen d5140f192e fix(react_compiler): support computed string destructuring keys (#25513)
Normalize computed string-literal destructuring keys before React Compiler HIR lowering so aliased bindings are initialized correctly.

Fixes #23750.

AI assistance: Codex was used to investigate, implement, and validate this change.
2026-08-12 02:53:19 +00:00
Boshen 9d49d279fd fix(react_compiler): bail out instead of panicking on "Expected a node for all scopes" (#25506)
## Summary

`oxlint` with `react/react-compiler` enabled aborted the whole process with

```
panicked at .../prune_non_escaping_scopes.rs:
Expected a node for all scopes
```

on inputs like:

```ts
export const Component = () => {
  const raw = useValue();
  return (() => {
    try {
      return check(raw) ? raw : null;
    } catch {
      return null;
    }
  })();
};
```

## Root cause

Running the same input through the version-matched `babel-plugin-react-compiler` fails the **identical invariant** (still present at facebook/react HEAD), so the analysis inconsistency is an upstream bug the port reproduces faithfully:

- IIFE inlining turns both inner `return`s into reassignments of a temporary, and scope alignment widens the `check(raw)` scope over the try/catch, so `visit_scope` associates the temporary with that scope;
- the scope's only own declarations sit in the ternary *test*, which `computeMemoizationInputs` deliberately never descends into ("Conditionals do not alias their test value"), so `visit_operand` — the only place scope nodes are registered — never fires for it;
- when the escaping temporary is memoized, `force_memoize_scope_dependencies` looks up the unregistered scope and fails the invariant.

The port's actual defect is the error channel: upstream raises a *catchable* `CompilerError`, so with `panicThreshold: 'none'` (what linting uses) the function is silently skipped and the rest of the file proceeds. The port had written this invariant as `.expect()`, turning the per-function bail-out into a process abort.

## Fix

- `compute_memoized_identifiers` and its recursive helpers now return `Result`; the invariant becomes `Err(ErrorCategory::Invariant.diagnostic(...))` and flows through the existing per-function `handle_error` / `panic_threshold` path — the same observable behavior as Babel (function skipped, everything else still compiles/lints).
- The `react/react-compiler` rule now drops `Invariant`-category diagnostics unless `reportAllBailouts` is enabled, matching the eslint plugin where the `invariant` rule is `preset: Off` ("only meant for the compiler team's consumption"); without this, the fix would have replaced the crash with a spurious error-level report on valid code. `ErrorCategory` is now exported from `oxc_react_compiler` for this check.
- New fixture `error.bug-prune-non-escaping-scopes-iife-try-catch-ternary.js` (upstream's `error.bug-*` convention for known compiler bugs) plus rule tests covering both configs.

With the rule enabled, `oxlint` on the repro now exits cleanly with no report — identical to ESLint on the same input.

## Also fixes #24842

The rule-side filter resolves #24842 as well: `react/react-compiler` reported `Invariant: Expected a variable declaration` on a `for` loop without a variable-declaration initializer (`for (; i < 3; i++)`). Same pattern, different stage: that invariant fires in `codegenForInit` and already flowed through the catchable `Err` channel, so it surfaced as a spurious error report rather than a panic. It too reproduces upstream faithfully — the version-matched `babel-plugin-react-compiler` fails the identical invariant (`Got ExpressionStatement`) and upstream's own `error.todo-kitchensink` fixture expects it; by default Babel silently skips the function and ESLint reports nothing. The #24842 repro is added to the rule tests (clean by default, surfaced under `reportAllBailouts`).

## Relation to #25347

#25347 diagnosed this accurately (thanks @controversial!) but fixes it by registering scope nodes eagerly so compilation succeeds and emits memoized output. That would make oxc compile an input every upstream compiler version refuses to compile, producing memoization decisions with no upstream validation, exactly where upstream's invariant declares its internal model inconsistent — a wrong scope association would then surface as a missed invalidation (stale UI) instead of a crash, and the pass would permanently diverge from upstream for future syncs. The behavioral fix belongs upstream in facebook/react; this PR restores upstream's bail-out semantics so oxlint no longer crashes, and the port will inherit the upstream fix when it lands.

Closes #24710
Closes #24842
Closes #25347

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-08-11 16:40:36 +00:00
Boshen 00e1b762e0 refactor(diagnostics): vendor oxc-miette (#25499)
We no longer need to maintain the `oxc-miette` repo as most of the code is now removed, the remaining code is minimal and can be vendored.
2026-08-11 08:04:02 +00:00
Boshen 2fe0a0dfd4 fix(react_compiler): preserve caught property loads (#25498)
Preserve catch-observable property and computed loads during dead-code elimination, and record their root operands as reactive-scope dependencies so throwing reads remain inside `try`.

This prevents memoization from suppressing catch behavior or hoisting potentially throwing property access into cache guards.

Validated with the React Compiler crate suite, NAPI transform suite, and original-vs-compiled runtime cases.

AI assistance was used to investigate and implement this change.
2026-08-11 07:15:55 +00:00
Boshen c3a9731624 fix(react_compiler): preserve underscore-prefixed JSX components (#25496)
Preserve JSX component classification through React Compiler HIR and codegen so underscore-prefixed components are emitted as identifiers instead of intrinsic string tags.

Update the existing context-variable JSX fixture to cover `_Component`.

Validated with the React Compiler crate suite, NAPI suite, and all six ecosystem reproductions.

AI assistance was used.
2026-08-11 06:53:51 +00:00
Boshen 1645d93cfb fix(react_compiler): preserve source spans (#25462)
React Compiler rebuilt source-derived AST nodes with empty spans, so compiled function bodies had no useful source mappings. Preserve retained HIR and reactive spans during codegen while keeping synthetic memoization scaffolding unmapped.

AI-assisted: implementation used Codex; the author remains responsible for review.
2026-08-11 02:10:30 +00:00
Boshen 93c83d3d9b fix(react_compiler): model tagged templates as calls (#25485)
Model tagged-template expressions as function applications during mutation and alias inference. This keeps mutations of returned objects within the memoization scope and preserves the implicit template argument position.

Checked with `cargo test -p oxc_react_compiler` and the transform-react NAPI suite.

AI-assisted.
2026-08-10 15:43:19 +00:00
Boshen 8d7f9cff3f fix(react_compiler): honor eslint suppressions (#25394)
Honor React ESLint suppressions independently of internal compiler validation settings, matching `babel-plugin-react-compiler@1.0.0`.

Closes #25392.

AI-assisted.
2026-08-10 10:42:23 +00:00
Boshen 2e35238d65 fix(react-compiler): compile forwardRef callbacks with non-ref param names (#25468)
The discovery walker let a declarator name flow through `forwardRef`/`memo` calls, so `const Foo = forwardRef((props, viewTracker) => ...)` was treated as a named component and rejected by the component param check (a second param must look like a ref). Upstream only names a function from its direct parent (declarator/assignment/property); a function in call arguments is anonymous and is detected through the forwardRef/memo callback branch, which never checks params.

Fixes the two Simorgh files from the ecosystem comparison (`TopStoriesItem`, `LatestMediaItem`): both now compile with output matching upstream, including identical memo cache sizes. Adds a fixture for the pattern; no existing fixture snapshots change.

Created with assistance from Claude.
2026-08-10 08:54:59 +00:00
Boshen 030857b509 refactor(diagnostics): update oxc-miette to v4 (#25395)
Remove the miette `Report` wrapper and update oxc-miette to v4's narrowed diagnostic and source protocol.

AI-assisted by OpenAI Codex.
2026-08-10 07:48:02 +00:00
Boshen fa7fdd2123 fix(react-compiler): compile parenthesized arrow components (#25463)
Compile parenthesized arrow components by preserving declarator name inference through nested parentheses.

Adds a React Compiler fixture for the ecosystem reproduction.

Created with assistance from Codex.
2026-08-10 07:30:16 +00:00
Boshen 28c2e09838 feat(react_compiler): recognize oxlint suppressions (#25456)
Recognize `oxlint-disable*` and `oxlint-enable` comments wherever React Compiler accepts their ESLint-prefixed equivalents.

AI-assisted.
2026-08-10 05:19:14 +00:00
Boshen e3683f29d8 fix(react_compiler): materialize compound assignment reads (#25450)
Materializes identifier reads before compound-assignment binary operations so constant propagation matches the upstream React Compiler. AI-assisted.
2026-08-09 16:25:11 +00:00
Boshen 92426aefeb fix(react_compiler): align nested ref validation (#25427)
Align ref validation with Babel React Compiler 1.0 by limiting call-site alias-effect checks to values actually passed to the call. This keeps refs captured by returned event handlers valid while preserving diagnostics for refs passed to invoked functions.

Validated with `cargo test -p oxc_react_compiler`, the rebuilt `oxc-transform-react` binding against Outline’s `ContentEditable.tsx`, and `just ready`.

AI-assisted; the contributor remains responsible for review and submission.
2026-08-09 13:15:18 +00:00
Boshen 937825c6a6 fix(react_compiler): disable exhaustive memo validation by default (#25417)
Disable exhaustive memo dependency validation by default and align
suppression handling.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-09 11:18:12 +08:00
Boshen ad4479ea28 test(react_compiler): cover manual memo semantics (#25415)
Cover manual memoization semantics.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-09 11:18:12 +08:00
Boshen 495b02483d fix(react_compiler): preserve parenthesized non-node returns (#25289)
Preserve Babel's non-node classification for parenthesized object returns so ordinary PascalCase factories are not compiled as React components.

Validated against the React Compiler suite and the Kibana reproduction.

AI-assisted.
2026-08-05 01:38:14 +00:00