Skip to content

Commit 641301a

Browse files
committed
facebook/react -> react/react
The repo moved orgs.
1 parent cbb3a34 commit 641301a

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

MAINTAINANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All recipes live in the [`justfile`](./justfile); run `just --list` for the full
88
## Syncing from upstream
99

1010
```sh
11-
just sync # re-extract react's compiler/ (PR #36173), re-run codemod, re-apply patches, commit
11+
just sync # re-extract react's compiler/ from main, re-run codemod, re-apply patches, commit
1212
just status # show which upstream commit is currently vendored
1313
just check # cargo check the vendored workspace
1414
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Forked React Compiler
22

3-
* this vendors the [React Compiler (Rust port)](https://github.com/facebook/react/pull/36173) into [`react-compiler/`](./react-compiler)
3+
* this vendors the [React Compiler (Rust port)](https://github.com/react/react/tree/main/compiler) into [`react-compiler/`](./react-compiler)
44
* patches `Cargo.toml` to make it releasable — published to crates.io as [`nextjs_react_compiler_*`](https://crates.io/crates/nextjs_react_compiler)
55
* license is "Copyright (c) Meta Platforms, Inc. and affiliates."
66

77
## Why this exists
88

99
[oxc](https://github.com/oxc-project/oxc) and [Rolldown](https://github.com/rolldown/rolldown) need
1010
the React Compiler Rust port on crates.io, but published crates can't use `git` dependencies — every
11-
dependency must itself be on crates.io. The port lives only in an unmerged
12-
[React PR](https://github.com/facebook/react/pull/36173) and was never published, so this repo
11+
dependency must itself be on crates.io. The port lives in
12+
[react/react](https://github.com/react/react/tree/main/compiler) and was never published, so this repo
1313
vendors it, patches the crates to be releasable, and publishes them as `nextjs_react_compiler_*`.
1414

1515
The source is synced over unchanged — the only edits are to `Cargo.toml` files (no code changes).

justfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This repo vendors the React Compiler (Rust port) from facebook/react PR #36173
1+
# This repo vendors the React Compiler (Rust port) from react/react main
22
# into ./react-compiler, then (editing only Cargo.toml for crate naming) sets each
33
# crate's published name to `nextjs_react_compiler_*` while keeping the lib/import
44
# name, source, and directories as upstream's `react_compiler_*`, and adds the
@@ -10,18 +10,18 @@
1010
# Both are re-applied every sync because the snapshot is taken fresh.
1111
#
1212
# just import # one-time: create ./react-compiler (transformed)
13-
# just sync # update ./react-compiler to the latest PR state (re-transformed)
13+
# just sync # update ./react-compiler to the latest main state (re-transformed)
1414
# just codemod # (re)run codemod on ./react-compiler in place
1515
# just patch # apply ./patches/*.patch (Rust source changes the codemod can't express)
1616
# just check # cargo check the vendored workspace
1717
# just publish-dry # dry-run publishing the whole set (cargo publish --workspace --dry-run)
1818
# just publish # publish nextjs_react_compiler + its deps via cargo-release-oxc
1919
# just status # show which upstream commit is currently vendored
2020

21-
react_repo := "https://github.com/facebook/react.git"
22-
pr_ref := "pull/36173/head"
23-
src_dir := "compiler" # path of the compiler inside the react monorepo
24-
prefix := "react-compiler" # where it lives in THIS repo
21+
react_repo := "https://github.com/react/react.git"
22+
upstream_ref := "main"
23+
src_dir := "compiler" # path of the compiler inside the react monorepo
24+
prefix := "react-compiler" # where it lives in THIS repo
2525

2626
# Show available recipes
2727
default:
@@ -34,7 +34,7 @@ import: sync
3434
sync:
3535
#!/usr/bin/env bash
3636
set -euo pipefail
37-
git fetch --depth=1 --no-tags {{react_repo}} {{pr_ref}}
37+
git fetch --depth=1 --no-tags {{react_repo}} {{upstream_ref}}
3838
upstream="$(git rev-parse FETCH_HEAD)"
3939
tree="$(git rev-parse "FETCH_HEAD:{{src_dir}}")"
4040
# Preserve the currently-published version across the wipe so cargo-release-oxc
@@ -49,9 +49,9 @@ sync:
4949
just patch
5050
git add -A {{prefix}}
5151
if git diff --cached --quiet -- {{prefix}}; then
52-
echo "{{prefix}} already at react {{pr_ref}} @ ${upstream} — nothing to commit."
52+
echo "{{prefix}} already at react {{upstream_ref}} @ ${upstream} — nothing to commit."
5353
else
54-
git commit -q -m "vendor: react-compiler from {{pr_ref}} @ ${upstream} (nextjs_react_compiler)"
54+
git commit -q -m "vendor: react-compiler from {{upstream_ref}} @ ${upstream} (nextjs_react_compiler)"
5555
echo "Committed {{prefix}} @ ${upstream}."
5656
fi
5757

0 commit comments

Comments
 (0)