Skip to content

Commit

Permalink
Use promise-polyfill as polyfill for Promise (instead of fbjs/Promise)
Browse files Browse the repository at this point in the history
Summary:
This matches the polyfill used by our internal infra, and ensures that our timer behaviors in tests is consistent.

Inconsistent timer behavior in our tests is what is blocking us from moving relay-experimental into open source

Reviewed By: kassens

Differential Revision: D17169476

fbshipit-source-id: 805c281849ca77bb98bf386c28e27a9d760a7622
  • Loading branch information
Juan Tejada authored and facebook-github-bot committed Sep 3, 2019
1 parent b4c49a9 commit 282bb87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"nullthrows": "^1.1.0",
"object-assign": "4.1.1",
"prettier": "1.17.0",
"promise-polyfill": "6.1.0",
"react": "16.9.0",
"react-test-renderer": "16.9.0",
"signedsource": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/getBabelOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function(options) {
{
map: {
ErrorUtils: 'fbjs/lib/ErrorUtils',
Promise: 'fbjs/lib/Promise',
Promise: 'promise-polyfill',
areEqual: 'fbjs/lib/areEqual',
invariant: 'fbjs/lib/invariant',
mapObject: 'fbjs/lib/mapObject',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5809,6 +5809,11 @@ promise-inflight@^1.0.1:
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=

promise-polyfill@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057"
integrity sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc=

promise@^7.1.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
Expand Down

0 comments on commit 282bb87

Please sign in to comment.