Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
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 .

# 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
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 .


# 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 NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
shellScript = "export EXTRA_PACKAGER_ARGS=\"--reactNativePath $SRCROOT/../\"\nexport NODE_BINARY=node\n$SRCROOT/../scripts/react-native-xcode.sh RNTester/js/RNTesterApp.ios.js\n";
};
/* End PBXShellScriptBuildPhase section */

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update template too ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, this only affects projects that run React Native from source. RNTester uses react-native from source (../ folder). All other apps get react-native from node_modules/react-native

]

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

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

const {findPlugins} = require('@react-native-community/cli');
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": "node cli.js start",
"start": "react-native start --reactNativePath .",
"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.1.0",
"@react-native-community/cli": "^1.4.5",
"art": "^0.10.0",
"base64-js": "^1.1.2",
"connect": "^3.6.5",
Expand Down
19 changes: 1 addition & 18 deletions rn-cli.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,5 @@ module.exports = {
extraNodeModules: {
'react-native': __dirname,
},
serializer: {
getModulesRunBeforeMainModule: () => [
require.resolve('./Libraries/Core/InitializeCore'),
],
getPolyfills,
},
resolver: {
hasteImplModulePath: require.resolve('./jest/hasteImpl'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this affect out-of-tree platforms? cc @empyrical @rozele

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it shouldn't. This was added 2 weeks ago for me "as a workaround" and I reverted the format of config to what it's there already.

1af390b#diff-41fdc10e1b5862877e4afa7e9176ee09

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it looks fine for me in that regard. I can try and test it out later and see if everything still works just to double check

},
transformer: {
getTransformOptions: () => ({
transform: {
experimentalImportSupport: true,
inlineRequires: true,
},
}),
assetRegistryPath: require.resolve('./Libraries/Image/AssetRegistry'),
},
getPolyfills,
};
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
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 .

echo "Installing test app on the device..."
buck fetch ReactAndroid/src/androidTest/buck-runner:instrumentation-tests
Expand Down
122 changes: 31 additions & 91 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1020,20 +1020,21 @@
"@types/istanbul-lib-coverage" "^1.1.0"
"@types/yargs" "^12.0.9"

"@react-native-community/cli@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-1.1.0.tgz#aa915a86d3242923a77f3035b02103488fc6f91a"
integrity sha512-cIMD7IsE+NCSnHRcqU5MvVhhqjopRU9VvBVIndfD4pe9pee+qodOY+II25fa93+3lytxxEx4LEtG5sn0RoAWAQ==
"@react-native-community/cli@^1.4.5":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-1.4.5.tgz#6cf35d73e14f65e13e77fbb572f2d5b9d2cbadb5"
integrity sha512-WH5E7rEUpftXJ4aAS/U/3euMx1S7FI0+CwT2VN3sFDtErtCVgqmyBXnBNp9Zk3XK5ANbf49cVR25rkOBjf5TVw==
dependencies:
chalk "^1.1.1"
commander "^2.9.0"
commander "^2.19.0"
compression "^1.7.1"
connect "^3.6.5"
denodeify "^1.2.1"
envinfo "^5.7.0"
errorhandler "^1.5.0"
escape-string-regexp "^1.0.5"
fs-extra "^1.0.0"
execa "^1.0.0"
fs-extra "^7.0.1"
glob "^7.1.1"
graceful-fs "^4.1.3"
inquirer "^3.0.6"
Expand All @@ -1049,14 +1050,14 @@
morgan "^1.9.0"
node-fetch "^2.2.0"
node-notifier "^5.2.1"
npmlog "^2.0.4"
opn "^3.0.2"
plist "^3.0.0"
semver "^5.0.3"
serve-static "^1.13.1"
shell-quote "1.6.1"
slash "^2.0.0"
ws "^1.1.0"
xcode "^1.0.0"
xcode "^2.0.0"
xmldoc "^0.4.0"

"@reactions/component@^2.0.2":
Expand Down Expand Up @@ -1259,11 +1260,6 @@ ansi-wrap@0.1.0, ansi-wrap@^0.1.0:
resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768=

ansi@^0.3.0, ansi@~0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
integrity sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=

anymatch@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
Expand Down Expand Up @@ -1635,11 +1631,6 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=

base64-js@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.1.2.tgz#d6400cac1c4c660976d90d07a04351d89395f5e8"
integrity sha1-1kAMrBxMZgl22Q0HoENR2JOV9eg=

base64-js@^1.1.2, base64-js@^1.2.3:
version "1.3.0"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3"
Expand Down Expand Up @@ -2008,7 +1999,7 @@ combined-stream@1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"

commander@^2.11.0, commander@^2.15.1, commander@^2.9.0:
commander@^2.11.0, commander@^2.15.1, commander@^2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
Expand Down Expand Up @@ -3143,6 +3134,15 @@ fs-extra@^4.0.2:
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-minipass@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
Expand Down Expand Up @@ -3173,17 +3173,6 @@ functional-red-black-tree@^1.0.1:
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=

gauge@~1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93"
integrity sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=
dependencies:
ansi "^0.3.0"
has-unicode "^2.0.0"
lodash.pad "^4.1.0"
lodash.padend "^4.1.0"
lodash.padstart "^4.1.0"

gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
Expand Down Expand Up @@ -4610,21 +4599,6 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"

lodash.pad@^4.1.0:
version "4.5.1"
resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70"
integrity sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=

lodash.padend@^4.1.0:
version "4.6.1"
resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e"
integrity sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=

lodash.padstart@^4.1.0:
version "4.6.1"
resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b"
integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=

lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
Expand Down Expand Up @@ -5384,15 +5358,6 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"

npmlog@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-2.0.4.tgz#98b52530f2514ca90d09ec5b22c8846722375692"
integrity sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=
dependencies:
ansi "~0.3.1"
are-we-there-yet "~1.1.2"
gauge "~1.2.5"

npmlog@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
Expand Down Expand Up @@ -5710,11 +5675,6 @@ path-type@^3.0.0:
dependencies:
pify "^3.0.0"

pegjs@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd"
integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=

performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
Expand Down Expand Up @@ -5770,16 +5730,7 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"

plist@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b"
integrity sha1-CjLKlIGxw2TpLhjcVch23p0B2os=
dependencies:
base64-js "1.1.2"
xmlbuilder "8.2.2"
xmldom "0.1.x"

plist@^3.0.0:
plist@^3.0.0, plist@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c"
integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==
Expand Down Expand Up @@ -6573,14 +6524,14 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=

simple-plist@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723"
integrity sha1-cXZts1IyaSjPOoByQrp2IyJjZyM=
simple-plist@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.0.0.tgz#bed3085633b22f371e111f45d159a1ccf94b81eb"
integrity sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g==
dependencies:
bplist-creator "0.0.7"
bplist-parser "0.1.1"
plist "2.0.1"
plist "^3.0.1"

sisteransi@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -7183,11 +7134,6 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=

uuid@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
integrity sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=

uuid@^3.0.1, uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
Expand Down Expand Up @@ -7384,14 +7330,13 @@ ws@^6.1.4:
dependencies:
async-limiter "~1.0.0"

xcode@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/xcode/-/xcode-1.0.0.tgz#e1f5b1443245ded38c180796df1a10fdeda084ec"
integrity sha1-4fWxRDJF3tOMGAeW3xoQ/e2ghOw=
xcode@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.0.0.tgz#134f1f94c26fbfe8a9aaa9724bfb2772419da1a2"
integrity sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw==
dependencies:
pegjs "^0.10.0"
simple-plist "^0.2.1"
uuid "3.0.1"
simple-plist "^1.0.0"
uuid "^3.3.2"

xml-name-validator@^3.0.0:
version "3.0.0"
Expand All @@ -7403,11 +7348,6 @@ xml@^1.0.1:
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=

xmlbuilder@8.2.2:
version "8.2.2"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773"
integrity sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=

xmlbuilder@^9.0.7:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
Expand Down