Files
oxc-project__oxc/.github/CODEOWNERS
Boshen 1c4f519e36 feat(napi): add Relay transform plugin (#25503)
## What

Ports the Relay `graphql` tagged template transform (babel-plugin-relay / swc_relay) as an individual napi transform, per #24914:

- **`crates/oxc_relay`** — the core transform as its own crate (modeled on `oxc_react_compiler`): replaces `graphql` tagged templates with references to relay-compiler artifacts. Definition names are extracted textually like `swc_relay` (equivalent to `\b(fragment|mutation|query|subscription)\s+(\w+)` with `#` comments stripped; hand-rolled scanner, no regex dependency).
- **`napi/transform-relay`** (`oxc-transform-relay`) — standalone napi package copied from the `napi/transform-react` template: parse → semantic → relay traverse → codegen. Only `graphql` tags are rewritten; TypeScript/JSX syntax is preserved untouched, so the output composes with any downstream toolchain.

## Options

| option | default | behavior |
|---|---|---|
| `artifactDirectory` | unset | when set, the import path is computed lexically relative to the transformed file (babel-plugin-relay `getRelativeImportPath` semantics — swc emits absolute paths instead); unset → `./__generated__/` next to the file |
| `language` | `javascript` | `typescript` imports `Name.graphql.ts`, otherwise `Name.graphql.js` |
| `eagerEsModules` | `true` | hoisted default imports (babel-plugin-relay ≥ v17 parity); `false` emits inline `require()` (`@swc/plugin-relay` / Next.js behavior) |

A `graphql` tag with no extractable definition name produces an error diagnostic (babel throws; swc silently skips).

Not supported, documented in both READMEs: dev-mode artifact hash validation, `jsModuleFormat: "haste"`, `isDevVariableName`, swc's Next.js-specific `projects`/`pagesDir`, and GraphQL document validation.

closes #24914

---

Implemented with Claude Code.
2026-08-13 13:56:01 +00:00

108 lines
3.1 KiB
Plaintext

# Default to project owner @Boshen
@Boshen
# Ignore lock files
Cargo.lock
pnpm-lock.yaml
# Linter (@camc314)
/crates/oxc_linter @camc314
/oxlintrc.json @camc314
/apps/oxlint @camc314
/apps/oxlint/conformance @camc314 @overlookmotel
/apps/oxlint/src-js @camc314 @overlookmotel
/apps/oxlint/src-js/package/config.generated.ts @camc314
/apps/oxlint/test @camc314 @overlookmotel
/apps/oxlint/tsdown_plugins @camc314 @overlookmotel
/npm/oxlint @camc314
/npm/oxlint-plugin-eslint @camc314
/npm/oxlint-plugins @camc314
/tasks/lint_rules @camc314
/tasks/linter_codegen @camc314
/tasks/rulegen @camc314
/tasks/website_linter @camc314
# Formatter (@leaysgur)
/crates/oxc_formatter @leaysgur
/crates/oxc_formatter_core @leaysgur
/crates/oxc_formatter_json @leaysgur
/crates/oxc_formatter_graphql @leaysgur
/crates/oxc_formatter_css @leaysgur
/crates/oxc_formatter_yaml @leaysgur
/crates/oxc_formatter_tests @leaysgur
/crates/oxc_jsdoc @leaysgur
/crates/oxc_regular_expression @leaysgur
/oxfmtrc.jsonc @leaysgur
/apps/oxfmt @leaysgur
/npm/oxfmt @leaysgur
/tasks/website_formatter @leaysgur
# Shared application tooling (@camc314 @leaysgur)
/crates/oxc_language_server @camc314 @leaysgur @sysix
/crates/oxc_config @camc314 @leaysgur
/apps/shared @camc314 @leaysgur
# Transformer / Minifier / Semantic (@dunqing)
/crates/oxc_transformer @dunqing
/crates/oxc_transformer_plugins @dunqing
/crates/oxc_minifier @dunqing
/crates/oxc_mangler @dunqing
/crates/oxc_semantic @dunqing
/crates/oxc_isolated_declarations @dunqing
/crates/oxc_ecmascript @dunqing
/crates/oxc_cfg @dunqing
/crates/oxc_compat @dunqing
/crates/oxc_codegen @dunqing
/crates/oxc_napi @dunqing
/napi/transform @dunqing
/napi/minify @dunqing
/npm/runtime @dunqing
/tasks/transform_conformance @dunqing
/tasks/transform_checker @dunqing
/tasks/minsize @dunqing
/tasks/compat_data @dunqing
# React Compiler (@Boshen)
/crates/oxc_react_compiler @Boshen
/crates/oxc_linter/src/rules/react/react_compiler.rs @Boshen
/crates/oxc_linter/src/snapshots/react_react_compiler.snap @Boshen
/napi/transform-react @Boshen
/tasks/benchmark/benches/react_compiler.rs @Boshen
/.github/workflows/release_napi_transform_react.yml @Boshen
# Relay transform (@Boshen)
/crates/oxc_relay @Boshen
/napi/transform-relay @Boshen
/.github/workflows/release_napi_transform_relay.yml @Boshen
# Core infrastructure crates (@overlookmotel)
/crates/oxc_allocator @overlookmotel
/crates/oxc_data_structures @overlookmotel
/crates/oxc_traverse @overlookmotel
/crates/oxc_ast @overlookmotel
/crates/oxc_ast_macros @overlookmotel
/crates/oxc_ast_visit @overlookmotel
/crates/oxc_macros @overlookmotel
/crates/oxc_span @overlookmotel
/crates/oxc_str @overlookmotel
/crates/oxc_syntax @overlookmotel
/crates/oxc_estree @overlookmotel
/crates/oxc_estree_tokens @overlookmotel
/npm/oxc-types @overlookmotel
/tasks/ast_tools @overlookmotel
/tasks/track_memory_allocations @overlookmotel
# Everything else falls through to the default owner @Boshen, including:
# parser (crates/oxc_parser, napi/parser), umbrella crates (crates/oxc,
# crates/oxc_diagnostics), CI/release config, .github, build/dev toolchain
# configs, and project documentation.