Summary:
This vars should be let instead of const because they are reassigned.
Closes https://github.com/facebook/react-native/pull/10818
Differential Revision: D4179219
Pulled By: javache
fbshipit-source-id: b09959c5ff31ad1a896d454011dffd915a0a44c4
Summary:
Solving this issue https://github.com/facebook/react-native/issues/10364
In development when assets are requested from AssetServer, it tries to find them with URI-friendly filenames. I added a single line to decode these filenames.
Tests are passing. Couldn't find any discussion regarding whether this is a good idea. This was causing some members of my team a bit of grief earlier.
Closes https://github.com/facebook/react-native/pull/10365
Differential Revision: D4168401
Pulled By: hramos
fbshipit-source-id: 9ed3606392d8a6f170998caaf0f9254ba4879b49
Summary:
This PR tells babel where the babelrc file is if it has been found in the project root. I know you guys are relying on babel to find it when you tell babel the filename and sourceFilename, this works fine in normal js/node projects, here is an example where this will not work.
We have a big repo that can contain a few react-native / js projects. Our build system is similar to BUCK and we keep our third party dependencies in a separate folder (having a global package.json at the project route is not feasible as everyone will have to install every apps dependencies even when they don't need them), the structure looks a bit like this:
`third_party/js/.` packages from node_modules
`common/js/` common code used by numerous apps, common components, services etc.
`my_app/native` the app
What's happening is something from `my_app/native` (where the .babelrc file is) is requiring something from `common/js` which is then requiring something from `third_party/js` and so babel has no idea what .babelrc file to use and
Closes https://github.com/facebook/react-native/pull/8131
Differential Revision: D4167844
Pulled By: hramos
fbshipit-source-id: 3569981e26ff8f8c632d8ae365a1f43a3483b13b
Summary:
- Put `isPolyfill` parameter into `options` object
- Save information whether a file is a polyfill
- Sort properties alphabetically
- Rename parameters
Reviewed By: cpojer
Differential Revision: D4153203
fbshipit-source-id: 67da97546a15c899112b74da6072acdea18d10e8
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
Provides better documentation for a confusing (and common) error message. Solves https://github.com/facebook/react-native/issues/3634
> **Test plan (required)**
This is just an error message shown in dev environment. I ran the tests and they pass.
Closes https://github.com/facebook/react-native/pull/10472
Differential Revision: D4053818
Pulled By: hramos
fbshipit-source-id: e80dc6ab787a8d8cabbcb442c438c07269401ff7
Summary: This adds support to wrap polyfills differently from regular modules (`(function(global){ ... }(this))` instead of `__d(function...)`.
Reviewed By: cpojer
Differential Revision: D4147031
fbshipit-source-id: c19e968c1498cac653ab2649e3089d8c29571926
Summary: Use native Promises in React Native Packager. Remove all the non-standard `Promise.done()` calls throughout the codebase & replace `Promise.denodeify` with the stand-alone `denodeify` module.
Reviewed By: davidaurelio
Differential Revision: D4146965
fbshipit-source-id: 1730531c914863ac3c52626801d9f91c28eed717
Summary: In addition to adding flow in that file, I also had to fix `Module.js` and others to make everything compatible together.
Reviewed By: davidaurelio
Differential Revision: D4118829
fbshipit-source-id: 4f6dbc515741c38817cc4c9757e981fabb03915a
Summary:
The new Packager/Buck integration passes module factory functions as first argument, so that the complete call can be amended at the end safely at a later point in time.
The call expression as a whole is covered perfectly by the created source map. Appending to that code later won’t break mappings.
`__d` now also accepts an additional `dependencyMap` parameter, which so far is only used by the new Packager/Buck integration. It enables module-local dependency IDs, thus eliminating the need to insert `correct` module IDs when building a bundle. Advantages are that source maps are no longer affected, and that builds can be quicker.
Reviewed By: cpojer
Differential Revision: D4124333
fbshipit-source-id: 12eba15d0b9d8c6624280a2ba1e7e4bc654bc83d
Summary:
increase the `MAX_WAIT_TIME` in FileWatcher since live reloading doesn't work for a lot of users on windows when developing android. There may be a better timeout than arbitrarily tripling it, I'm sure the original developer would be able to pick out a good one, but many of us have used this change to finally be able to use RN here on windows.
fixes https://github.com/facebook/react-native/issues/8784https://github.com/facebook/react-native/issues/7257
Closes https://github.com/facebook/react-native/pull/10690
Differential Revision: D4126110
Pulled By: mkonicek
fbshipit-source-id: 9b6f188fe9d39bcdcc2b38392dfc644a518296b2
Summary: Correctly generate log entries for file transforms and ping telemetry using the new Logger API.
Reviewed By: bestander, cpojer
Differential Revision: D4081325
fbshipit-source-id: 7d50d54eb673a0276512db6ad5ff21c344495612
Summary: Adds the Console agent which we hook from our console polyfill. It captures the stack and strips the frames of the polyfill.
Reviewed By: davidaurelio
Differential Revision: D4021502
fbshipit-source-id: 49cb700a139270485b7595e85e52d50c9a620db6
Summary: We actually use the AST, not regexes. Fix comment.
Reviewed By: davidaurelio
Differential Revision: D4104797
fbshipit-source-id: e37d168bd541d9d222667d0d168aa6b6099c1275
Summary:
This change is related to https://github.com/facebook/react-native/issues/9677 that can happen when trying to get an Xcode release build, which in turn calls `react-native-xcode.sh` and if one has a non-standard file setup, ex:
```
ios/
|_ (iOS related code)
js/
|
|_ index.ios.js
node_modules
package.json
(other React Native JS code)
```
The error output in this case is:
```
+ DEST=/Users/caabernathy/Library/Developer/Xcode/DerivedData/Mixer-ffglwypovddbciahtlducaeuqxqa/Build/Products/Release-iphonesimulator/Mixer.app
+ [[ Release = \D\e\b\u\g ]]
+ BUNDLE_FILE=/Users/caabernathy/Library/Developer/Xcode/DerivedData/Mixer-ffglwypovddbciahtlducaeuqxqa/Build/Products/Release-iphonesimulator/Mixer.app/main.jsbundle
+ node /Users/caabernathy/Facebook/OpenSource/Apps/RWMixer/Sample/Build/Mixer-Challenge/js/node_modules/react-native/local-cli/cli.js bundle --entry-file index.ios.js --platform ios --dev false --reset-cache --bundle-output /Users/caabernathy/Library/Developer/X
Closes https://github.com/facebook/react-native/pull/10262
Differential Revision: D4100083
Pulled By: lacker
fbshipit-source-id: 476f38990d09d5c26c22df77630b1a71b42959e2