This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@napi-rs/cli](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs)) | [`3.10.6` → `3.10.7`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.10.6/3.10.7) |  |  |  |  | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.10.7`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.10.7) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.10.6...@napi-rs/cli@3.10.7) #### What's Changed - feat(cli, async-runtime): preload the threaded WASI worker pool from the loader by [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) in [#​3558](https://redirect.github.com/napi-rs/napi-rs/pull/3558) #### New Contributors - [@​colinhacks](https://redirect.github.com/colinhacks) made their first contribution in [#​3560](https://redirect.github.com/napi-rs/napi-rs/pull/3560) **Full Changelog**: <https://github.com/napi-rs/napi-rs/compare/napi-async-runtime-v0.2.4...@napi-rs/cli@3.10.7> </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com>
Oxc Relay Transform
Native Node.js bindings for Oxc's Rust port of the Relay transform (babel-plugin-relay / @swc/plugin-relay).
The API follows oxc-transform: pass a filename, source text, and optional
options to either transformSync or transform. graphql tagged template
expressions are replaced with references to the artifact files generated by
relay-compiler; everything else — including TypeScript and JSX syntax — is
preserved untouched, so the output composes with any downstream toolchain.
import { transformSync } from "oxc-transform-relay";
const result = transformSync("src/Component.tsx", "const data = graphql`query FooQuery { id }`;");
console.log(result.code);
// import _FooQuery from "./__generated__/FooQuery.graphql.js";
// const data = _FooQuery;
errors contains every diagnostic reported by parsing and the transform; when
it is non-empty, code is empty.
Options
artifactDirectory— directoryrelay-compileremits all artifacts to (itsartifactDirectorysetting). When set, artifacts are imported via a relative path computed lexically from the file being transformed, so pass the filename and directory either both absolute or both relative to the same base directory. When unset, artifacts are imported from the__generated__directory next to the file being transformed.language—"typescript","javascript"(default), or"flow". Artifacts are imported asName.graphql.tsfor"typescript"andName.graphql.jsotherwise.eagerEsModules— emit a hoisted default import pergraphqltag (default, matchingbabel-plugin-relaysince Relay v17) instead of an inlinerequire()call (@swc/plugin-relayand Next.js behavior).lang,sourceType,sourcemap— configure the surrounding Oxc parse/codegen pipeline, as inoxc-transform.
Limitations
Compared to babel-plugin-relay: no development-mode artifact hash validation,
no jsModuleFormat: "haste", no isDevVariableName, and the GraphQL definition
name is extracted textually (like @swc/plugin-relay) rather than by parsing
the document, so documents are not validated.