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
Summary: Add session ID to be appended to every event in the current Packager session.
Reviewed By: davidaurelio
Differential Revision: D4029580
fbshipit-source-id: 8c34c1f44ee63f845d15f8f89e491ab5c936fb21
Summary: In order to make `Config` and defaults available to our new code, I’ve added flow types and put default values into one shared modile
Reviewed By: cpojer
Differential Revision: D4044600
fbshipit-source-id: 875ed3ade69c5b22bb3c1b177e7bad732834d476
Summary:
This makes ResolutionRequest stop calling `dirname` when arriving at `"."`, not only at `parse(path).root`.
Needed for Buck integration, as we are using relative paths there
Reviewed By: cpojer
Differential Revision: D4058723
fbshipit-source-id: d1856043193cfad3f750577ba0f63f03f8effe7a
Summary: I originally added fastpath to node-haste to speed up `path` operations by an order of magnitude. Now we are exclusively using Node 6 at FB so we don't need to ship this thing any more.
Reviewed By: bestander
Differential Revision: D4029092
fbshipit-source-id: 064cf67f4f79ce4f2774fb4e430d22eef4a95434
Summary:
This creates flow types for the module resolution code in node-haste, and implementations of types used by that code.
The idea is to use that code until we can replace it with something leaner, and provide objects that don’t touch the file system. These objects will be initialized with the static data provided by ModuleGraph/worker.
Reviewed By: cpojer
Differential Revision: D4037372
fbshipit-source-id: 2698dbb630f4122fc1d839d06e414d0963bd6ff2
Summary: Removes code that is no longer used
Reviewed By: matryoshcow
Differential Revision: D4021932
fbshipit-source-id: d73dc8450478288afd71eab451a30a505e7de945