Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all build/test issues on master for android, detox & objc CI stages + update to Babel 7 #20854

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d6a4838
[android] update Promise interface & to allow a userInfo WritableMap …
Salakar Aug 25, 2018
346b733
[android] update Promise implementation to allow a userInfo WritableM…
Salakar Aug 25, 2018
41e34bf
[android] remove inconsistent promise.reject with null arg - unnecess…
Salakar Aug 25, 2018
6d0aa8e
[android] fix failing unit tests build - missing buck dependency
Salakar Aug 25, 2018
9045294
[android] fix failing unit tests build - missing buck dependency
Salakar Aug 25, 2018
3919d36
[bundler] fix bundle failing to compile - babel7 changes + missing ro…
Salakar Aug 25, 2018
a993a77
[build] update to babel7 rc3 & exclude jest from babelrc
Salakar Aug 25, 2018
c9b2d2e
[build] update `react-native-xcode` script to start Node from the $RE…
Salakar Aug 26, 2018
3af30df
[build] Babel 7 - needs to be 7.0.0-beta.56 to match `metro`'s versio…
Salakar Aug 26, 2018
5a440ca
Switch to `metro-react-native-babel-preset` and remove now redundant …
Salakar Aug 28, 2018
5607bc7
Merge branch 'master' into cherry-pick
Salakar Aug 28, 2018
6a4c119
[flow] remove metro ignore from config - local-cli makes use of these…
Salakar Aug 28, 2018
5142188
Merge branch 'master' into cherry-pick
Salakar Aug 28, 2018
e7fcab3
update to latest metro (^0.45.0) and change to Babel 7 release version
Salakar Aug 30, 2018
422eb3a
Merge branch 'master' into cherry-pick
Salakar Aug 30, 2018
f4b8581
Merge branch 'master' of /~https://github.com/facebook/react-native int…
Salakar Aug 31, 2018
c2439e4
[buck] remove unused react_native_dep
Salakar Aug 31, 2018
39d054d
[buck][tests] remove duplicate react_native_dep (jsr-305:jsr-305) and…
Salakar Aug 31, 2018
fe5f3b4
[flow][android] remove metro ignore from config - local-cli makes use…
Salakar Aug 31, 2018
6ad1be5
Add comment indicating the `babel.config.js` files purpose
Salakar Aug 31, 2018
488e233
Merge pull request #1 from invertase/master
Salakar Aug 31, 2018
305bd44
Revert "-"
Salakar Aug 31, 2018
b47f7a5
Merge pull request #2 from invertase/revert-1-master
Salakar Aug 31, 2018
42b55b0
Merge branch 'master' of /~https://github.com/facebook/react-native int…
Salakar Sep 1, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*
; .*/node_modules/metro/.*
Salakar marked this conversation as resolved.
Show resolved Hide resolved

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/invariant')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("java/com/facebook/testing/instrumentation:instrumentation"),
react_native_dep("java/com/facebook/testing/instrumentation/base:base"),
react_native_dep("third-party/java/espresso:espresso"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/junit:junit"),
react_native_dep("third-party/java/testing-support-lib:testing-support-lib"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_integration_tests_target("java/com/facebook/react/testing:testing"),
react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"),
react_native_target("java/com/facebook/react:react"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ rn_android_library(
name = "core",
srcs = glob(["*.java"]),
deps = [
react_native_dep("java/com/facebook/fbreact/testing:testing"),
react_native_dep("third-party/java/espresso:espresso"),
react_native_dep("third-party/java/fest:fest"),
react_native_dep("third-party/java/junit:junit"),
react_native_dep("third-party/java/testing-support-lib:testing-support-lib"),
react_native_integration_tests_target("java/com/facebook/react/testing:testing"),
react_native_integration_tests_target("java/com/facebook/react/testing/rule:rule"),
react_native_target("java/com/facebook/react:react"),
Expand Down
1 change: 1 addition & 0 deletions ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rn_android_library(
proguard_config = "reactnative.pro",
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
],
required_for_source_only_abi = True,
visibility = [
Expand Down
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
require('@babel/plugin-transform-runtime'),
{
helpers: true,
regenerator: true,
},
],
],
};
1 change: 1 addition & 0 deletions jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = {
inlineRequires: true,
minify: false,
platform: '',
babelrc: false,
Salakar marked this conversation as resolved.
Show resolved Hide resolved
projectRoot: '',
retainLines: true,
sourceType: 'unambiguous', // b7 required. detects module vs script mode
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"metro-react-native-babel-preset": "^0.45.0",
"async": "^2.4.0",
"babel-eslint": "9.0.0-beta.2",
"babel-generator": "^6.26.0",
"babel-eslint": "^9.0.0",
"detox": "^8.2.3",
"eslint": "5.1.0",
"eslint-config-fb-strict": "22.1.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fi

[ -z "$NODE_BINARY" ] && export NODE_BINARY="node"

[ -z "$CLI_PATH" ] && export CLI_PATH="$REACT_NATIVE_DIR/local-cli/cli.js"
[ -z "$CLI_PATH" ] && export CLI_PATH="./local-cli/cli.js"

[ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"

Expand All @@ -106,7 +106,7 @@ type $NODE_BINARY >/dev/null 2>&1 || nodejs_not_found

BUNDLE_FILE="$DEST/main.jsbundle"

$NODE_BINARY "$CLI_PATH" $BUNDLE_COMMAND \
cd $REACT_NATIVE_DIR && $NODE_BINARY "$CLI_PATH" $BUNDLE_COMMAND \
$CONFIG_ARG \
--entry-file "$ENTRY_FILE" \
--platform ios \
Expand Down
Loading