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

Add new primitive PropType Symbol #6377

Merged
merged 14 commits into from
May 10, 2016
Merged

Add new primitive PropType Symbol #6377

merged 14 commits into from
May 10, 2016

Commits on Mar 30, 2016

  1. Added Symbol primative PropType.

    With the edition of ECMA-262, we now have a new primative type called
    Symbol. This primative type should be added to the PropTypes, as users
    will eventually be using Symbols in their props for describing unique
    and immutable data, such as identifiers.
    puradox committed Mar 30, 2016
    Configuration menu
    Copy the full SHA
    97bcce5 View commit details
    Browse the repository at this point in the history
  2. Added tests for the new primative, Symbol.

    I believe that I covered all the typical use cases for Symbols.
    If you think that I missed one, feel free to contribute.
    puradox committed Mar 30, 2016
    Configuration menu
    Copy the full SHA
    75c4e03 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2016

  1. Support for ES6 polyfills

    Most ES6 polyfills will add support by implementing `Symbol` as a
    function. This causes `typeof` to return `function` rather than `symbol`
    for polyfilled clients.
    puradox committed Mar 31, 2016
    Configuration menu
    Copy the full SHA
    5485ac8 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2016

  1. Configuration menu
    Copy the full SHA
    13d9720 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d8ab0e View commit details
    Browse the repository at this point in the history
  3. prop-types(symbols): rewrite isSymbol to be simpler

    1) If it is a native Symbol
    2) If it is spec-compliant
    3) Try to match non-spec compliant polyfill by a instanceof check on Symbol if it exists in the global namespace
    RaitoBezarius committed Apr 2, 2016
    Configuration menu
    Copy the full SHA
    4239f8a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c291f8a View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2016

  1. Merge pull request #1 from RaitoBezarius/fork/proptypes-symbol

    Improve symbol check for (local) polyfills
    puradox committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    f846b54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a98e2cb View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2 from RaitoBezarius/fork/proptypes-symbol

    Fix code-style issue with React guidelines
    puradox committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    ced7a3d View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2016

  1. More specific typeof check for polyfilled Symbol

    Let's get more specific with our tests. Symbol has to be a function if
    it's a polyfill. There are no object polyfills out there. (If there is,
    ping me and I'll add support)
    
    Instead of checking if Symbol is undefined, let's check if it's a
    function instead since instanceof is depending that Symbol is already a
    function.
    puradox committed Apr 7, 2016
    Configuration menu
    Copy the full SHA
    05820f8 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2016

  1. Removed test support for medikoo/es6-symbol

    There seems to be a bug with medikoo/es6-symbol where the global state
    affects the implementation of the polyfill. I found this by running the
    individual test file alone then running all the tests using `grunt
    test`. I found that it passes when ran alone and failed when ran
    collectively.
    
    I did not find this buggy behavior with zloirock/core-js's
    implementation of a polyfill for Symbol. Thus, removing I will keep the
    more popular polyfill (core-js) and remove the buggy polyfill
    (es6-symbol).
    
    If you are reading this and can think of a confounding factor that is
    causing this bug, please let me know and we can try to work together to
    add support for medikoo/es6-symbol.
    puradox committed Apr 8, 2016
    Configuration menu
    Copy the full SHA
    ad94295 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2016

  1. Configuration menu
    Copy the full SHA
    95fed01 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #3 from RaitoBezarius/fork/proptypes-symbol

    Remove unused ES6 Symbol dependency
    puradox committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    6e4f3ea View commit details
    Browse the repository at this point in the history