Commit Graph

9 Commits

Author SHA1 Message Date
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Christoph Pojer 5d515113e7 Don't require prettyFormat in every single bundle.
Summary:
WTF

(I updated it to the latest version too)

Reviewed By: yungsters

Differential Revision: D5256525

fbshipit-source-id: f3c7d620faf817a0e3c1e4c2bed9370318dff40a
2017-06-16 04:31:56 -07:00
Mike Lambert bfb2766c63 Allow Promise to display error strings and not just error objects.
Summary: Closes https://github.com/facebook/react-native/pull/9989

Reviewed By: bestander

Differential Revision: D4147256

Pulled By: hramos

fbshipit-source-id: 62d49b592391bad434062e3c0d9c8287842664a8
2017-03-09 14:30:57 -08:00
danieldunderfelt 591217ea7d Make onUnhandled safe for undefined errors
Summary:
This pull request fixes cases where the `error` argument of the `onUnhandled` method in `Libraries/Promise.js` is undefined. Previously this would result in a redbox with the helpful message: `Cannot read property message of undefined`. With this pull request, unhandled promise rejections result in the desired yellowbox saying that a promise rejection went unhandled.

I still do not know what would cause the error argument to be undefined, but this change makes the module behave as expected in an app I am building.

cc bestander

Relevant issue: #8452
Closes https://github.com/facebook/react-native/pull/9119

Differential Revision: D3655589

Pulled By: bestander

fbshipit-source-id: a975a0ab58701240ba06574c04521cd542700ff7
2016-08-02 07:58:28 -07:00
David Aurelio ad8a335864 Remove knowledge of fbjs from the packager
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
2016-03-02 04:28:38 -08:00
Adam Miskiewicz 28116ec3db Reverted commit D2803288
Summary:
As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.

This PR does several things:

1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
2. Removes the modules that were previously being used in lieu of their `fbjs` eq
Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2803288

Pulled By: javache

fb-gh-sync-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
shipit-source-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
2016-02-11 02:45:34 -08:00
Adam Miskiewicz 98e5e2b427 Remove knowledge of fbjs from the packager
Summary:
As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.

This PR does several things:

1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
2. Removes the modules that were previously being used in lieu of their `fbjs` eq
Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2803288

Pulled By: davidaurelio

fb-gh-sync-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2
shipit-source-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2
2016-02-11 02:21:37 -08:00
David Aurelio b064094687 Add support for promise rejection tracking
Summary:
Adds support for tracking unhandled rejections with `console.warn` (= yellow box).

I will create a follow-up with proper error stack formatting.

related: #4971
fixes: #4045, #4142

public

{F59857438}

{F59857439}

Reviewed By: bestander

Differential Revision: D2803126

fb-gh-sync-id: 376b33e42a967675a04338cbff3ec315a77d1037
2016-01-07 12:02:56 -08:00
Forbes Lindesay 4f8b2825a0 Replace ES6Promise with Promise 2015-04-15 06:06:29 -08:00