Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop polyfilling Promise (facebook/react-native#29754) #5

Closed
wants to merge 2 commits into from

Commits on Aug 25, 2020

  1. android: Build binaries, add to git.

    Following RN's instructions [1].
    
    To build them, we used the recommended Docker command:
    
    ```
    docker run --rm --name rn-build -v $PWD:/pwd -w /pwd \
        reactnativecommunity/react-native-android /bin/sh -c \
        "./gradlew installArchives"
    ```
    
    We might have chosen to put the binaries in Maven instead of in the
    repository, but that seemed unnecessarily complicated [2].
    
    [1] https://github.com/facebook/react-native/wiki/Building-from-source#publish-your-own-version-of-react-native
    [2] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/.60react-native.60.20fork/near/984529
    chrisbobbe committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    6e39827 View commit details
    Browse the repository at this point in the history
  2. Jest setup: Stop polyfilling Promise.

    It looks like this line was introduced in 3ff3987, in 2015, and it
    has remained in a similar form since then. I haven't found any
    explanation for it.
    
    At jestjs/jest#10221 [1], a core Jest maintainer says,
    
    """
    As an aside, one should never replace `global.Promise` [...]. E.g.
    when using `async-await` you will always get the native `Promise`
    regardless of the value of `global.Promise`.
    """
    
    jestjs/jest#10221 is one issue this line has raised, for anyone
    using the latest features of Jest to test async code in their React
    Native projects.
    
    [1] jestjs/jest#10221 (comment)
    
    Fixes: facebook#29303
    chrisbobbe committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    98a12ee View commit details
    Browse the repository at this point in the history