mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Move tools/api to private/cxx-public-api (#51859)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bcffd4ef9b
commit
2a7e37e51e
@@ -40,7 +40,6 @@
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
"private/*",
|
||||
"tools/*",
|
||||
"!packages/helloworld"
|
||||
],
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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
|
||||
@@ -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",
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user