Summary: Manually resolve all default Babel plugins. `babel.transform` will attempt to resolve all base plugins relative to the file it's compiling. This makes sure that we're using the plugins installed in the react-native package.
**NOTE:** Haven't tested this. Please don't merge until Travis has done CI.
Closes https://github.com/facebook/react-native/pull/4248
Reviewed By: svcscm
Differential Revision: D2679651
Pulled By: davidaurelio
fb-gh-sync-id: 0cdef1e738ba28c09c811432a71047f80540ed7b
Summary: public
The inline-requires transform (from `fbjs-scripts`) is only used for oss tests, and wasn't updated, fix it.
Reviewed By: mkonicek
Differential Revision: D2641711
fb-gh-sync-id: 90a084082b9c55c5bcb776346f4655451a8a61f7
Summary: The previous version of `performanceNow` used to reassign to a `require(...)` alias, which our inline requires transform guarded against. Before the update to React 0.14, we were pulling `performanceNow` from a hardcoded `react-tools` version (b4e74e38e4/src/shared/vendor/performance/performanceNow.js), so we couldn't just fix the file and had to special case it. Now that we've updated to React 0.14, `performanceNow` is pulled from fbjs and no longer needs to be special cased.
public
Reviewed By: cpojer
Differential Revision: D2634940
fb-gh-sync-id: 7085cde3179c04f9ecfd87bdd472b19e370ee73c
Summary: This is an updated copy of #1993, which was approved by @vjeux but hasn't been rebased. It whitelists the es6 module syntax and updates the JS Environment docs to match. cc @ide @hkjorgensenCloses https://github.com/facebook/react-native/pull/3175
Reviewed By: @svcscm
Differential Revision: D2498360
Pulled By: @vjeux
Summary: In javascriptcore(ios9), this code will run as expected(output 0 1):
```js
for(let i=0; i<2; i++) {
const data = i;
console.log(data);
}
```
But when debug in chrome, the above code will fail without `use strict` prologue (if you add prologue, rn will fail with red screen `Const declarations are not supported in strict mode`): https://code.google.com/p/v8/issues/detail?id=4432.
So it's better to transpile contant by default.
Closes https://github.com/facebook/react-native/pull/2955
Reviewed By: @svcscm
Differential Revision: D2483398
Pulled By: @vjeux
Summary: The `react.displayName` transform was added in 93b9329b758cde3e921b26e11ba91d9700d2a06d.
That diff missed to update the `.babelrc` where the comment says it should stay
in sync (I'm not sure where it's used though). I added a comment in the other
direction so this can be prevented in the future.
I also updated the `cacheVersion` so we actually transform the code again to add
the missing displayName properties to unchanged components.
Closes https://github.com/facebook/react-native/pull/2905
Reviewed By: @vjeux
Differential Revision: D2473447
Pulled By: @kassens
Summary:
This sets NODE_ENV based on the value of the `dev` option when bundling the apps. This would then be inlined by the node-env-inline babel plugin. And finally -- if unreachable -- will be dead-code-eliminated by uglify.
This is not used in development because we set NODE_ENV to the value of __DEV__, which can be switched via a query param. However, the plugin has minimal overhead and to avoid complexity in the transformers I just enabled it by default.
Summary:
- Enables async/await in .babelrc and transformer.js
- Adds regenerator to package.json. Users still need to explicitly require the regenerator runtime -- this is so that you only pay for what you use.
- Update AsyncStorage examples in UIExplorer to use async/await
- Update promise tests in UIExplorer to use async/await in addition to the promise API
Closes https://github.com/facebook/react-native/pull/1765
Github Author: James Ide <ide@jameside.com>
Summary:
@public
Replaces jstransform with Babel. Additionally, stops (using the deprecated) passing an error property
back from the transformer, and instead passes an error in the first argument. This is because we were
able to update node-worker-farm to handle custom properties on errors.
Test Plan:
1. Export the oss project
2. npm install
3. Start the movies app
4. Make sure it works
5. Add a syntax error
6. Make sure the message is correct
Summary:
@public
Apparently trailing commas transform isn't exported by react-tools. We need to pull it out manually. This is not so clean but we're swtching to babel very shortly.
Test Plan:
* npm start
* write `foo(a,b,c,)` in some file
* request that file in the browser and make sure that trailing comma is gone
- [ReactNative] Use deprecated ix in TabBarExample | Amjad Masad
- [ReactNative] Expanded license on obj-c files | Christopher Chedeau
- [ReactNative] Expanded license on js files | Christopher Chedeau
- [ReactNative] Fix React Devtools integration | Alex Kotliarskyi
- [Text] Account for font leading so descenders are not clipped | James Ide
- [ReactNative] Expanded license on js packager files | Christopher Chedeau
- more UIExplorer flow | Basil Hosmer
- [react-packager] Pick up package changes while running | Amjad Masad
- Added a graph view and a ReactNative metric that displays current queue and execution time for the JS thread. | Bryce Redd
- [ReactNative] Add NativeModules and DeviceEventEmitter to react-native exports | Alex Kotliarskyi
- [ReactNative] Move merge & mergeInto from downstream to vendor | Christopher Chedeau
- [ReactNative] Replace all the call sites of mergeInto by Object.assign | Christopher Chedeau
- [WIP] Migrated View Managers over to new architecture | Nick Lockwood
- [ReactNative] Replace all the call sites of copyProperties by Object.assign | Christopher Chedeau
- [ReactNative] Migrate navigator.geolocation to open source | Christopher Chedeau
- [ReactNative] Remove README.md, LICENSE and .travis.yml from fbobjc | Christopher Chedeau
- [react-packager] Better transform errors | Amjad Masad
- [React Native][react-packager] Fix test runner and fialing tests | Amjad Masad