diff --git a/package.json b/package.json index da64b27fd67..e4e32d0abae 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "workspaces": [ "packages/*", "private/*", - "tools/*", "!packages/helloworld" ], "devDependencies": { diff --git a/tools/api/ReactNativeCPP.api b/private/cxx-public-api/ReactNativeCPP.api similarity index 100% rename from tools/api/ReactNativeCPP.api rename to private/cxx-public-api/ReactNativeCPP.api diff --git a/tools/api/check-api.sh b/private/cxx-public-api/check-api.sh similarity index 91% rename from tools/api/check-api.sh rename to private/cxx-public-api/check-api.sh index 02f79634006..3bf419aa7a9 100755 --- a/tools/api/check-api.sh +++ b/private/cxx-public-api/check-api.sh @@ -73,12 +73,13 @@ pushd "$FBSOURCE_ROOT/xplat/js/react-native-github" || exit $ERR_CODE_CANT_FIND_ trap cleanup EXIT # TODO: This operates in the sandbox and can't modify files in the repository, which we need for change detection -# buck2 run //xplat/js/react-native-github/tools/api:public-api -(cd tools/api && $YARN_BINARY install) -$NODE_BINARY tools/api/public-api.js +# buck2 run //xplat/js/react-native-github/private/cxx-public-api:public-api +REPO_RELATIVE_DIR="private/cxx-public-api" +(cd "$REPO_RELATIVE_DIR" && $YARN_BINARY install) +$NODE_BINARY "$REPO_RELATIVE_DIR/public-api.js" echo -API_FILE=$(grep -oP '(?<=output=)[^ \n]+' tools/api/public-api.conf) +API_FILE=$(grep -oP '(?<=output=)[^ \n]+' "$REPO_RELATIVE_DIR/public-api.conf") API_STATUS=$(hg status --no-status "$API_FILE") if [ -z "$API_STATUS" ]; then diff --git a/tools/api/package.json b/private/cxx-public-api/package.json similarity index 89% rename from tools/api/package.json rename to private/cxx-public-api/package.json index e0e092d2338..11e3c5cb75e 100644 --- a/tools/api/package.json +++ b/private/cxx-public-api/package.json @@ -1,5 +1,5 @@ { - "name": "public-api", + "name": "@react-native/cxx-public-api", "version": "0.0.1", "description": "Captures the Objective-C / C++ public API of React Native", "main": "public-api.js", diff --git a/tools/api/public-api.conf b/private/cxx-public-api/public-api.conf similarity index 94% rename from tools/api/public-api.conf rename to private/cxx-public-api/public-api.conf index cc34a11319c..1abb1b3ef23 100644 --- a/tools/api/public-api.conf +++ b/private/cxx-public-api/public-api.conf @@ -22,6 +22,6 @@ packages/react-native/Libraries/WebSocket/* packages/react-native/Libraries/Wrapper/Example/* [settings] -output=tools/api/ReactNativeCPP.api +output=private/cxx-public-api/ReactNativeCPP.api ; clang=$HOME/some/path/to/clang ; clang-format=$HOME/some/path/to/clang-format diff --git a/tools/api/public-api.js b/private/cxx-public-api/public-api.js similarity index 100% rename from tools/api/public-api.js rename to private/cxx-public-api/public-api.js