Skip to content

Commit 2a7e37e

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Move tools/api to private/cxx-public-api (#51859)
Summary: Pull Request resolved: #51859 Moves `tools/apis` to `private/cxx-public-api` and cleans up a few things: - Clean up the `BUCK` file a bit. - Deduplicate relative paths in scripts. - Prefix the private package name with `react-native/`. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76091765 fbshipit-source-id: 6fac7423f9d205085b0b21465f65075a850b61e2
1 parent bcffd4e commit 2a7e37e

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"workspaces": [
4141
"packages/*",
4242
"private/*",
43-
"tools/*",
4443
"!packages/helloworld"
4544
],
4645
"devDependencies": {
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ pushd "$FBSOURCE_ROOT/xplat/js/react-native-github" || exit $ERR_CODE_CANT_FIND_
7373
trap cleanup EXIT
7474

7575
# TODO: This operates in the sandbox and can't modify files in the repository, which we need for change detection
76-
# buck2 run //xplat/js/react-native-github/tools/api:public-api
77-
(cd tools/api && $YARN_BINARY install)
78-
$NODE_BINARY tools/api/public-api.js
76+
# buck2 run //xplat/js/react-native-github/private/cxx-public-api:public-api
77+
REPO_RELATIVE_DIR="private/cxx-public-api"
78+
(cd "$REPO_RELATIVE_DIR" && $YARN_BINARY install)
79+
$NODE_BINARY "$REPO_RELATIVE_DIR/public-api.js"
7980
echo
8081

81-
API_FILE=$(grep -oP '(?<=output=)[^ \n]+' tools/api/public-api.conf)
82+
API_FILE=$(grep -oP '(?<=output=)[^ \n]+' "$REPO_RELATIVE_DIR/public-api.conf")
8283

8384
API_STATUS=$(hg status --no-status "$API_FILE")
8485
if [ -z "$API_STATUS" ]; then
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "public-api",
2+
"name": "@react-native/cxx-public-api",
33
"version": "0.0.1",
44
"description": "Captures the Objective-C / C++ public API of React Native",
55
"main": "public-api.js",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ packages/react-native/Libraries/WebSocket/*
2222
packages/react-native/Libraries/Wrapper/Example/*
2323

2424
[settings]
25-
output=tools/api/ReactNativeCPP.api
25+
output=private/cxx-public-api/ReactNativeCPP.api
2626
; clang=$HOME/some/path/to/clang
2727
; clang-format=$HOME/some/path/to/clang-format

0 commit comments

Comments
 (0)