Summary:
The `env` option has been broken in Babel for a while (https://github.com/babel/babel/issues/4539), and will be deprecated (https://github.com/babel/babel/issues/5276).
I am changing this code to the way Babel < 6.10 interpreted the `env` option. This should fix the `__source` JSX transform which was applied in DEV in the past, but stopped getting applied because of the Babel bug.
I also changed the `filename` passed by Babel to be relative (currently, to `fbsource` but open to other options). This way DEV builds are still reproducible.
This still needs some help from davidaurelio to make the root location more foolproof. I'd also appreciate zertosh taking a look in case there's a better way to "anchor" the relative path. All I need is to for `react-third-party/react-devtools/react-devtools` and `babelTransformer.js` to agree on what the relative path base is.
Closes https://github.com/facebook/react-native/pull/13893
Reviewed By: gaearon
Differential Revision: D5035892
Pulled By: davidaurelio
fbshipit-source-id: 19ffeb867d7ed5928e9de05dcec9ba85bf961dd5
Summary: I found myself a few times wanting that transform, that makes it slightly simpler to have bound method. So I propose we add it. Not a big deal though. Note it also allows static properties with the same syntax, that is handy.
Reviewed By: davidaurelio
Differential Revision: D5051579
fbshipit-source-id: 7ebf7c709bf52a30a525550c1eda1a6a2f7b8e1e
Summary:
Hi,
Today I upgraded from RN 0.44 to 0.45.0-rc.0 and noticed I add to include either `CxxBridge` or `BatchedBridge` in the React subspecs in my Podfile to get my project to compile again (https://github.com/facebook/react-native/issues/13010).
Adding `BatchedBridge` works fine. However I wanted to try `CxxBridge` as described in 5aca739cc2 but couldn't do it since the required `third-party-podspecs` folder with `Folly.podspec`, `GLog.podspec` and `DoubleConversion.podspec` hadn't been included in the npm release.
So here is the fix for that.
It should be included in the next 0.45.0-rc release.
Let me know what you think.
Closes https://github.com/facebook/react-native/pull/13922
Differential Revision: D5051477
Pulled By: javache
fbshipit-source-id: e5c527f1ee9c84734d3e3a3d85ec3f1e5d648bef
Summary: That module is not used anymore, remove it and its dependency `joi`.
Reviewed By: cpojer
Differential Revision: D5028909
fbshipit-source-id: 90b9b156fbfe642cce93a530faf8ce91c5b848f5
Summary: This is not used by live code anymore.
Reviewed By: cpojer
Differential Revision: D5029114
fbshipit-source-id: 9ab9f6075407623debfe23bc121cc48ae8903917
Summary:
I suggest we grab our own version of worker-farm, since there are a few changes we'd like to do. There are two reasons for forking:
* the original project does not seem maintained anymore, with a PR remaining unanswered (https://github.com/rvagg/node-worker-farm/pull/42);
* we don't need to keep the level of genericity of the original project: for example, we don't need the option `maxConcurrentCallsPerWorker`, that we always keep to one.
Forking gives us opportunity to simplify the code for our use case. Later on we could reuse it for other projects such as `jest`.
A few things we'd like to do:
* remove special node options from the forks, such as `--inspect`, or even, allow adding special options (if you want to debug a worker specifically for example);
* allow us to pipe `stdout` and `stderr` instead of having transform spit stuff out to the parent process output;
* remove code managing `maxConcurrentCallsPerWorker` and clean up the code in general;
* add `flow` typing.
Reviewed By: davidaurelio
Differential Revision: D4993300
fbshipit-source-id: 10f0c2a18b010c2a8b2e2afebcb3aab3504d7923
Summary: This update carries with it Babylon 6.17.0 which adds support for flow type spread, and babel-eslint 7.2.3, which has a fix for working with flow type spreads. The other upgrades are to dedupe the babel deps.
Reviewed By: bestander
Differential Revision: D4922240
fbshipit-source-id: e42d708ad8de1084e31e9be5678d3a3a665fdfa1
Summary:
Immutable doesn't seem to be used in react-native anymore so I've removed it as a dependency.
Ensure that all tests pass.
Closes https://github.com/facebook/react-native/pull/13471
Differential Revision: D4877659
Pulled By: javache
fbshipit-source-id: f06996d6d0af73e5bd0108cec75370eec66ca038
Summary:
There's something wrong with the Linux binary in Flow v0.44.1. It doesn't work. Flow v0.44.2 fixes, however CircleCI may have cached Flow v0.44.1. Putting this PR up in case it's needed.
yarn install
yarn run flow
Closes https://github.com/facebook/react-native/pull/13549
Differential Revision: D4902838
Pulled By: gabelevi
fbshipit-source-id: 7f5223f7447dc0387955a94a0945915521a508c4
Summary:
ericvicenti Here is the latest updates and fixes for the container testing. Everything should be good to go now, the update for `inotify.max_user_watches` should fix the E2E test issues you were seeing locally.
The update to the packer prevents excessively large filename lengths due to the hash used in the name and splits them into directories instead. I was getting errors locally on the E2E because the hash filename was over 248 characters which was causing issues on the base image file system. It might not have appeared in circle due to another file system being used with different limits. I can separate it out into another PR if you want though.
* Turned jenkins instrumentation parallelism up to 3
* Disabled various instrumentation tests that seemed to have inconsistent results from
Jenkins by default
* Install google-chrome in the android base image so the chrome debug E2E test does not fail
* Turned back on E2E tests
cc normanjoyner
Closes https://github.com/facebook/react-native/pull/13417
Differential Revision: D4876137
Pulled By: ericvicenti
fbshipit-source-id: 31e033c1e34b02acb5484478414197ac9eb11f95
Summary:
I'm not sure why we rely on react-dom, so this is an attempt to remove it.
Closes https://github.com/facebook/react-native/pull/13425
Reviewed By: gaearon
Differential Revision: D4862718
Pulled By: ericvicenti
fbshipit-source-id: b9fb9937bff445311880fb923e0b5eb362ca291b
Summary:
This should resolve the following npm deprecation warning:
```
WARN deprecated node-uuid@1.4.7: Use uuid module instead
```
Existing tests should cover this already.
Closes https://github.com/facebook/react-native/pull/13194
Differential Revision: D4796723
Pulled By: javache
fbshipit-source-id: 2783f5d04c696b887de2ab2d32805e4661484a83
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
Of the three dependencies I have that rely on `glob`, react-native is the only one not on 7.x. If react-native can upgrade, then npm can deduplicate the glob dependency.
```console
$ npm ls glob
├─┬ eslint@3.13.1
│ └── glob@7.1.1
├─┬ jest@18.1.0
│ └─┬ jest-cli@18.1.0
│ └─┬ istanbul-api@1.1.0
│ ├─┬ fileset@2.0.3
│ │ └── glob@7.1.1
│ ├─┬ istanbul-lib-report@1.0.0-alpha.3
│ │ └─┬ rimraf@2.5.4
│ │ └── glob@7.1.1
│ └─┬ istanbul-lib-source-maps@1.1.0
│ └─┬ rimraf@2.5.4
│ └── glob@7.1.1
└─┬ react-native@0.39.2
├── glob@5.0.15
└─┬ rimraf@2.5.4
└── glob@7.1.1
```
**Test plan (required)**
> Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull req
Closes https://github.com/facebook/react-native/pull/11893
Differential Revision: D4796721
Pulled By: javache
fbshipit-source-id: 6e7424dd731329f982c2f6c05b40dec8febf2e57
Summary:
fs-extra's first stable release is out since 1 of November.
I think its time to upgrade to 1.0.0. We've been running 1.0.0 locally and is having no problems with it.
**Test plan (required)**
Walked through the commits from 0.30 to 1.0.0 and no breaking changes has been made to the repository. https://github.com/jprichardson/node-fs-extra/compare/1.0.0...1.x
Closes https://github.com/facebook/react-native/pull/11542
Reviewed By: zertosh
Differential Revision: D4444576
Pulled By: hramos
fbshipit-source-id: 520311af8dc0911c026c08bdb74bec6572e7e17f
Summary:
Moves stack trace symbolication to a worker process.
The worker process is spawned laziliy, and is treated as an exclusive resource (requests are queued).
This helps keeping the server process responsive when symbolicating.
Reviewed By: cpojer
Differential Revision: D4602722
fbshipit-source-id: 5da97e53afd9a1ab981c5ba4b02a7d1d869dee71
Summary: Renaming since a file with the same name as a package confuses packager
Reviewed By: cpojer
Differential Revision: D4613215
fbshipit-source-id: 5cfae71d0bb1eef2675689b37a9b42596d25678d
Summary:
Created a containerized environment to run unit and integration tests for both javascript and android as well as a Jenkinsfile using the new 2.0 Pipeline syntax for integration into a Jenkins CI cluster.
Here is a quick summary of the changes:
* The android image is built from two separate dockerfiles. There is a base image that handles the heavy lifting of dependencies that are infrequently changed while the secondary image extends the base and allows for much quicker incremental builds on code updates.
* The javascript image is simple and is relatively quick to build, therefore there is no base image for any react specific javascript dependencies and it is all packaged in a single docker image.
* A new `scripts/docker` has been created including some javascript files and shell scripts to aid in the running of the tests
* The instrumentation test runner script can be passed various flags to control which tests run since the entire suite takes a significant amount of time to run synchronously
* Jen
Closes https://github.com/facebook/react-native/pull/11902
Differential Revision: D4609238
Pulled By: ericvicenti
fbshipit-source-id: a317f3ac3be898180b009254a9604ca7d579a8b9