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

Cherrypick commit to downgrade deprecations to warnings #9753

Commits on May 23, 2017

  1. Downgrade deprecation warnings from errors to warnings (facebook#9650)

    * Downgrade deprecation warnings from errors to warnings
    
    **what is the change?:**
    Swapping out `warning` module for a fork that uses `console.warn`.
    It looks like we were using the `warning` module for deprecation notices, *but* there is also a 'deprecated' module designed specifically for deprecation notices.
    
    However, we could not find any place that it was currently used.
    
    Since React's build process is not 100% clear to me, I assume it could still be used somewhere by something and just updated it along with other deprecation notices.
    
    We might consider a follow-up diff that does some clean up here;
     - remove 'deprecated' module if it's unused, OR
     - use 'deprecated' module for all our current deprecation warnings
    
    **why make this change?:**
    - We have had complaints about noisy warnings, in particular after introducing new deprecations
    - They potentially cause CI failures
    - Deprecations are not really time-sensitive, can ship without breaking your app, etc.
    
    For more context - facebook#9395
    
    **test plan:**
    `npm run test`
    and unit tests for the new modules
    and manual testing (WIP)
    
    **issue:**
    facebook#9395
    
    * Add 'lowPriorityWarning' to ReactExternals
    
    **what is the change?:**
    We won't bundle 'lowPriorityWarning' with the rest of React when building for Facebook.
    NOTE: A parallel commit will introduce an internal implementation of 'lowPriorityWarning' in Facebook's codebase, to compensate. Will post a comment with the diff number once that is up.
    
    **why make this change?:**
    So that the sync between github and Facebook can go more smoothly!
    
    **test plan:**
    We will see when I run the sync! But this is a reasonable first step imo.
    
    **issue:**
    facebook#9398
    flarnie committed May 23, 2017
    Copy the full SHA
    146e77f View commit details
    Browse the repository at this point in the history
  2. Tweaks to get tests passing after cherry-picking PR#9650

    **what is the change?:**
    - adds 'lowPriorityWarning' for deprecation of '__spread' and 'createMixin'
    - tweaks test to check for 'warn' and not 'error'
    
    **why make this change?:**
    Both these issues were introduced by merge conflict resolution when cherry-picking this change from master onto 15.6.
    
    **test plan:**
    `yarn test`
    
    **issue:**
    flarnie committed May 23, 2017
    Copy the full SHA
    9a59cce View commit details
    Browse the repository at this point in the history
  3. Fix mis-written 'require' for 'warning' module

    **what is the change?:**
    Fixes 'warning' to be required from 'warning'
    
    **why make this change?:**
    It was causing the browserify build to crash, because we don't expect to have a path to 'warning'.
    
    **test plan:**
    CI
    flarnie committed May 23, 2017
    Copy the full SHA
    22c4c55 View commit details
    Browse the repository at this point in the history