Skip to content

Commit

Permalink
Re-add haste modules for ReactTypes and ReactNativeRTTypes shims (fac…
Browse files Browse the repository at this point in the history
…ebook#11557)

* Re-add haste module for ReactNativeRTTypes

* Re-added ReactTypes @providesModule annotation as well

* Updated expected provides modules list

* Improved clarity of check_modules.sh error message

* Added ReactTypes to provides module whitelist
  • Loading branch information
bvaughn authored Nov 15, 2017
1 parent 634b70a commit 3322f6b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-rt-renderer/src/ReactNativeRTTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule ReactNativeRTTypes
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/shared/ReactTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule ReactTypes
*/

export type ReactNode =
Expand Down
8 changes: 7 additions & 1 deletion scripts/circleci/check_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ set -e
# Make sure we don't introduce accidental @providesModule annotations.
EXPECTED='packages/react-cs-renderer/src/ReactNativeCSTypes.js
packages/react-native-renderer/src/ReactNativeTypes.js
packages/react-rt-renderer/src/ReactNativeRTTypes.js
packages/shared/ReactTypes.js
scripts/rollup/wrappers.js'
ACTUAL=$(git grep -l @providesModule -- './*.js' ':!scripts/rollup/shims/*.js')

# Colors
red=$'\e[1;31m'
end=$'\e[0m'

if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "@providesModule crept into some new files?"
printf "%s\n" "${red}ERROR: @providesModule crept into some new files?${end}"
diff -u <(echo "$EXPECTED") <(echo "$ACTUAL") || true
exit 1
fi

0 comments on commit 3322f6b

Please sign in to comment.