Skip to content

Commit

Permalink
Revert D14472633: [react-native][PR] Update React Native to use lates…
Browse files Browse the repository at this point in the history
…t CLI

Differential Revision:
D14472633

Original commit changeset: b7ea92ee130d

fbshipit-source-id: ed5bce3ba4a39c8b60e787cb678747231583f6f5
  • Loading branch information
adamjernst authored and facebook-github-bot committed Mar 15, 2019
1 parent d4aa1e7 commit 0ceaaf0
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ watchman shutdown-server

# integration tests
# build JS bundle for instrumentation tests
node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js --reactNativePath .
node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js

# build test APK
# shellcheck disable=SC1091
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ jobs:
# Build JavaScript Bundle for instrumentation tests
- run:
name: Build JavaScript Bundle
command: node cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js --reactNativePath .
command: node cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js


# Wait for AVD to finish booting before running tests
Expand Down
2 changes: 1 addition & 1 deletion RNTester/RNTester.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export EXTRA_PACKAGER_ARGS=\"--reactNativePath $SRCROOT/../\"\nexport NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
shellScript = "export NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
3 changes: 1 addition & 2 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ project.ext.react = [
bundleAssetName: "RNTesterApp.android.bundle",
entryFile: file("../../js/RNTesterApp.android.js"),
root: "$rootDir",
inputExcludes: ["android/**", "./**", ".gradle/**"],
extraPackagerArgs: ["--reactNativePath", "$rootDir"]
inputExcludes: ["android/**", "./**", ".gradle/**"]
]

apply from: "../../../react.gradle"
Expand Down
4 changes: 3 additions & 1 deletion jest/hasteImpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ if (REACT_NATIVE_CI) {

function getPlugins() {
try {
const {findPlugins} = require('@react-native-community/cli');
// @todo do not rely on private files
const findPlugins = require('@react-native-community/cli/build/core/findPlugins');

return findPlugins(path.resolve(__dirname, pluginsPath));
} catch (e) {
return {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"local-cli"
],
"scripts": {
"start": "react-native start --reactNativePath .",
"start": "node cli.js start",
"test": "jest",
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
"flow": "flow",
Expand Down Expand Up @@ -81,7 +81,7 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@react-native-community/cli": "^1.4.5",
"@react-native-community/cli": "^1.1.0",
"art": "^0.10.0",
"base64-js": "^1.1.2",
"connect": "^3.6.5",
Expand Down
54 changes: 27 additions & 27 deletions packages/eslint-config-react-native-community/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
dependencies:
"@babel/highlight" "^7.0.0"

"@babel/generator@^7.3.4":
version "7.3.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.4.tgz#9aa48c1989257877a9d971296e5b73bfe72e446e"
integrity sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==
"@babel/generator@^7.2.2":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.3.tgz#185962ade59a52e00ca2bdfcfd1d58e528d4e39e"
integrity sha512-aEADYwRRZjJyMnKN7llGIlircxTCofm3dtV5pmY6ob18MSIuipHpA2yZWkPlycwu5HJcx/pADS3zssd8eY7/6A==
dependencies:
"@babel/types" "^7.3.4"
"@babel/types" "^7.3.3"
jsesc "^2.5.1"
lodash "^4.17.11"
source-map "^0.5.0"
Expand Down Expand Up @@ -52,10 +52,10 @@
esutils "^2.0.2"
js-tokens "^4.0.0"

"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.3.4":
version "7.3.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.4.tgz#a43357e4bbf4b92a437fb9e465c192848287f27c"
integrity sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==
"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.3.tgz#092d450db02bdb6ccb1ca8ffd47d8774a91aef87"
integrity sha512-xsH1CJoln2r74hR+y7cg2B5JCPaTh+Hd+EbBRk9nWGSNspuo6krjhX0Om6RnRQuIvFq8wVXCLKH3kwKDYhanSg==

"@babel/template@^7.1.0":
version "7.2.2"
Expand All @@ -67,24 +67,24 @@
"@babel/types" "^7.2.2"

"@babel/traverse@^7.0.0":
version "7.3.4"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.3.4.tgz#1330aab72234f8dea091b08c4f8b9d05c7119e06"
integrity sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8"
integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.3.4"
"@babel/generator" "^7.2.2"
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.0.0"
"@babel/parser" "^7.3.4"
"@babel/types" "^7.3.4"
"@babel/parser" "^7.2.3"
"@babel/types" "^7.2.2"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.11"
lodash "^4.17.10"

"@babel/types@^7.0.0", "@babel/types@^7.2.2", "@babel/types@^7.3.4":
version "7.3.4"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.4.tgz#bf482eaeaffb367a28abbf9357a94963235d90ed"
integrity sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==
"@babel/types@^7.0.0", "@babel/types@^7.2.2", "@babel/types@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.3.tgz#6c44d1cdac2a7625b624216657d5bc6c107ab436"
integrity sha512-2tACZ80Wg09UnPg5uGAOUvvInaqLk3l/IAhQzlxLQOIXacr6bMsra5SH6AWw/hIDRCSbCdHP2KzSOD+cT7TzMQ==
dependencies:
esutils "^2.0.2"
lodash "^4.17.11"
Expand Down Expand Up @@ -329,9 +329,9 @@ [email protected]:
jest-docblock "^21.0.0"

eslint-plugin-react-hooks@^1.0.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.5.1.tgz#3c601326914ee0e1fedd709115db4940bdbbed4a"
integrity sha512-i3dIrmZ+Ssrm0LrbbtuGcRf7EEpe1FaMuL8XnnpZO0X4tk3dZNzevWxD0/7nMAFa5yZQfNnYkfEP0MmwLvbdHw==
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.3.0.tgz#d73f1a61d8dd6a14f15159ab1c6e8e3aeabb6da8"
integrity sha512-hjgyNq0sfDXaLkXHkmo3vRh+p+42lwQIU3r56hVoomMYRMToJ2D/PGhwL2EPyB5ZEMlbLsRm3s5v4gm5FIjlvg==

eslint-plugin-react-native-globals@^0.1.1:
version "0.1.2"
Expand Down Expand Up @@ -716,7 +716,7 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

lodash@^4.15.0, lodash@^4.17.11:
lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
Expand Down Expand Up @@ -865,9 +865,9 @@ punycode@^2.1.0:
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

react-is@^16.8.1:
version "16.8.4"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2"
integrity sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA==
version "16.8.3"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d"
integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==

regexpp@^2.0.1:
version "2.0.1"
Expand Down
19 changes: 18 additions & 1 deletion rn-cli.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,22 @@ module.exports = {
extraNodeModules: {
'react-native': __dirname,
},
getPolyfills,
serializer: {
getModulesRunBeforeMainModule: () => [
require.resolve('./Libraries/Core/InitializeCore'),
],
getPolyfills,
},
resolver: {
hasteImplModulePath: require.resolve('./jest/hasteImpl'),
},
transformer: {
getTransformOptions: () => ({
transform: {
experimentalImportSupport: true,
inlineRequires: true,
},
}),
assetRegistryPath: require.resolve('./Libraries/Image/AssetRegistry'),
},
};
2 changes: 1 addition & 1 deletion scripts/run-android-local-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "Compiling native code..."
./gradlew :ReactAndroid:packageReactNdkLibsForBuck

echo "Building JS bundle..."
node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js --reactNativePath .
node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js

echo "Installing test app on the device..."
buck fetch ReactAndroid/src/androidTest/buck-runner:instrumentation-tests
Expand Down
Loading

0 comments on commit 0ceaaf0

Please sign in to comment.