Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/target-flag-meta-internal.js
Boshen 0e5642162e test(react_compiler): normalize fixture pragma headers to a single shape (#24109)
The fixture corpus mixed the canonical `@key:value` pragma form with three legacy forms — `@key(value)`, `@key="value"`, and `@key value` — that upstream's `splitPragma` silently ignores or mis-reads. This rewrites the 9 affected fixtures to the canonical `@key:value` form so there is only one shape to parse, and drops the space-form tolerance from `parse_pragma` accordingly.

## Normalized headers

| fixture | before | after |
|---|---|---|
| `no-cache-slots-no-import` | `@compilationMode(all)` | `@compilationMode:"all"` |
| `repro-bailout-nopanic-shouldnt-outline` | `@panicThreshold(none)` | `@panicThreshold:"none"` |
| `fbt/error.todo-fbt-plural-in-expression-container` | `@compilationMode(infer)` | `@compilationMode:"infer"` |
| `meta-isms/repro-cx-namespace-assigned-to-temporary` | `@customMacros(cx)` | `@customMacros:"cx"` |
| `target-flag` | `@target="18"` | `@target:"18"` |
| `target-flag-meta-internal` | `@target="donotuse_meta_internal"` | `@target:"donotuse_meta_internal"` |
| `immutable-hooks` | `@enableAssumeHooksFollowRulesOfReact true` | `@enableAssumeHooksFollowRulesOfReact:true` |
| `ref-current-aliased-no-added-to-dep` | `@validateRefAccessDuringRender false` | `@validateRefAccessDuringRender:false` |
| `ref-current-field-not-added-to-dep` | `@validateRefAccessDuringRender false` | `@validateRefAccessDuringRender:false` |

## Behavior-preserving

Every regenerated snapshot differs only in the echoed header comment (codegen preserves the leading comment), plus one +1 byte-offset shift in the `fbt` diagnostic from the comment being one character longer. No compiled output changed, and no other fixture is affected by the parser simplification.
2026-07-03 09:25:46 +00:00

12 lines
187 B
JavaScript

// @target:"donotuse_meta_internal"
function Component() {
return <div>Hello world</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
isComponent: true,
};