* Mark transpiled JSX elements as pure
* Avoid duble annotation
* Add "pure" option to the React preset
* Fix generator indentation
* Update tests
* Add tests for the "pure" option
* Update windows fixtures
* Changes UMD callsite to be more likely to pass in the intended object.
Fixes#10476
Note: This PR should be considered pseudocode and used as an illustration of the proposed fix. I do not know nearly enough about this project to know if this is an appropriate solution to the problem, nor do I have the confidence to update the tests appropriately.
* Update tests
* Revert "Move subclass inheritance to end (#7772)"
This reverts commit f8ab9466d331871a90f458af40b14e8d831e0c29.
* Only use getPrototypeOf if setPrototypeOf is implemented
* Update fixtures
* Helpers updates
* Update fixtures
* Fall back to getPrototypeOf
* Update fixtures
We were using `Object.create` to setup the prototype chain at the start of the class definition, which lead to #7771.
I was a bit worried about a speed hit, but it seems everyone optimizes the two patterns the same way.
https://jsbench.github.io/#f9fca52407643d96458a35763b201215Fixes#7771.
* #7349
- Add "use strict" directive to transformed class bodies
* Update tests (#7349)
* Add test for program with use strict directive (#7349)
* Update tests (#7349)
* Update source mapping (#7349)
* Add test for parent blockStatement with use strict directive (#7349)
* Update tests (#7349)
* Update tests (#7349)
* Update tests (#7349)
* Add test for constructor-only class (#7349)
* Constructor only classes are strict, too
But constructor only that use non-simple parameters must use a strict function wrapper.
* Fix test
* Wrapper not needed if class is already strict
* Revert change to lerna.json
* Fix name computation for literal values
* Add more computed literal test cases
* Always return a string in getNameFromLiteralId
- Also concatenate quasis id for regex literal
* Add a test clarifying function name for template literals
* Remove useless else ifs
* Fix transform-arrow-functions in { spec: true } shadowing
The function name matching the variable declaration name could
shadow the actual function object inside the generated function,
leading to invalid behavior due to holding a reference to the
original unbound function.
* Combine it with transform-function-name just to be sure in spec: false
* Revert "Fix transform-arrow-functions in { spec: true } shadowing"
This reverts commit 1cafe2561d0b0ddd181b956a85eb074621da12e8.
* Much simpler version of the above fix
* Missing fixture updates
* Avoid using rest/spread to make the tests pass on node 4
* ...actually update _all_ the fixtures