Deven Bansod
a084339a15
Migrate -computed-properties and -jscript tests to use jest expect assertions
2018-04-13 16:30:06 +05:30
Deven Bansod
8a31eabf5e
Migrate -transform-classes tests to use jest expect assertions
2018-04-13 14:20:51 +05:30
Justin Ridgewell
ecbf0dd53c
Fix super nested class bugs ( #7691 )
...
* Properly traverse nested class for supers
* Add object nested in class cases
* Add object nested object cases
* Test class properties
* Undo changes to lerna.json
* Add tests arournd prefix/postfix super increment
* tmp
* Use sets
2018-04-12 13:02:26 -04:00
Justin Ridgewell
b1c9af3f05
Use new isInStrictMode ( #7714 )
2018-04-11 12:17:01 -04:00
Justin Ridgewell
ec3722b3f9
Get set helpers ( #7687 )
...
* Improve get/set helper
* fixtures
* Edge cases
* Add loose edge cases
* Spec compliant
* Add issue case
* Even more edge cases!
* Final updates
* Fix name
* Use Reflect.{get, set} when available
* Avoid block scoping in loose
* Remove semicolon
* Do not redefine a non-enumerable
* Get strictness from call site, not helpers
* Add called assertions
* Classes are always strict
* Update test fixture
2018-04-11 11:56:59 -04:00
Justin Ridgewell
7ae724f553
Add Path#isInStrictMode ( #7712 )
...
* Add Path#isInStrictMode
* Fix undefined directives
* Explicitly return for arrow expressions
2018-04-11 09:13:38 -04:00
Markus Török
6597a472b3
Add "use strict" directive ( #7411 )
...
* #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
2018-04-10 17:33:38 -04:00
Justin Ridgewell
d17adf40df
Use construct helper in New Spread ( #7677 )
...
* Use construct helper in New Spread
* CircleCI
2018-04-06 10:40:38 +01:00
Justin Ridgewell
450a1678f2
Use getProto and setProto helpers ( #7675 )
...
Depends on #7674 .
2018-04-06 02:54:08 +01:00
Justin Ridgewell
e9ed0f5f21
Split _wrapNativeSuper into helpers ( #7674 )
...
These can be reused in a few transforms.
2018-04-06 01:18:44 +01:00
Henry Zhu
a6df92f245
v7.0.0-beta.44
2018-04-02 18:19:30 -04:00
Henry Zhu
bdfeeb38c6
v7.0.0-beta.43
2018-04-02 12:47:55 -04:00
Deven Bansod
b09c729675
Use expect's instanceOf and toHaveProperty methods
2018-03-27 22:34:25 +05:30
Deven Bansod
c8d82d6483
Migrate all remaining fixtures to jest expect
2018-03-24 16:22:20 +05:30
Deven Bansod
0856f89882
Migrate -transform-block-scoping and -transform-classes to jest expect
2018-03-24 16:22:18 +05:30
Michał Pierzchała
81c1b49f6a
Disable flow on transformClass, fix preset-env errors ( #7605 )
2018-03-20 18:42:11 -05:00
Michał Pierzchała
e2c5f25e97
Refactored quirky inheritance in babel-plugin-transform-classes ( #7444 )
...
* chore(plugin-transform-classes): refactor inheritance
* path some flow types
* remove unused export
* get rid of class
* temporarily rename to vanilla for diff readability
* more setState with minor adjustments
* rename 'private' methods
* explicit null check
* adjust import ordering
* Rename createConstructor -> maybeCreateConstructor
* Rename vanilla.js -> transformClass.js
2018-03-19 16:37:59 +01:00
Henry Zhu
d260bfaec4
v7.0.0-beta.42
2018-03-15 16:50:03 -04:00
Logan Smyth
c662c2ada2
Use strict namespace behavior for mjs files. ( #7545 )
2018-03-15 13:27:01 -07:00
Mateusz Burzyński
586d3b5929
Wrap wrapNativeSuper helpers in redefining functions for better tree-shakeability ( #7188 )
2018-03-14 23:48:33 +01:00
Simon Kjellberg
07ab02f6b2
Fix incorrect value of _cache in _wrapNativeSuper ( #7570 )
...
The boolean expressions returns false in environments where Map is missing.
This change explicitly sets _cache to undefined in such cases, to ensure the cache methods will be ignored.
2018-03-14 16:37:51 -04:00
Nicolò Ribaudo
91a114f74a
[transform-classes] Fix typo in _wrapNativeSuper helper
2018-03-14 19:23:10 +01:00
Henry Zhu
270ea17fed
v7.0.0-beta.41
2018-03-14 12:25:26 -04:00
Nicolò Ribaudo
a86d311986
Reuse the assertThisInitialized helper in possibleConstructorReturn ( #7493 )
2018-03-05 08:11:16 -08:00
Logan Smyth
a4795408b4
Allow plugins to assert that a specific babel version has loaded the plugin. ( #7450 )
2018-03-04 14:36:54 -08:00
Logan Smyth
7cc00cce0d
Require output fixture extension to match sourceType output.
2018-03-04 13:31:33 -08:00
Logan Smyth
beb99dfda1
Rename test fixtures using module syntax to .mjs files.
2018-03-04 13:31:32 -08:00
Mateusz Burzyński
4d164bd8e6
Added babel-helper-split-export-declaration ( #7313 )
2018-02-13 16:44:05 +01:00
Henry Zhu
ea3f2d9299
v7.0.0-beta.40
2018-02-12 11:41:13 -05:00
Henry Zhu
73e64c6cb0
v7.0.0-beta.39
2018-01-30 15:27:19 -05:00
Nicolò Ribaudo
252ea5a966
Fix reused nodes - part 2 ( #7149 )
2018-01-29 22:59:06 +01:00
Mateusz Burzyński
912bcc186d
Fix reused nodes - part 1 ( #7149 )
2018-01-29 22:59:06 +01:00
Henry Zhu
b5d20ab171
v7.0.0-beta.38
2018-01-17 11:31:32 -05:00
Nicolò Ribaudo
8659e1a88c
Remove old expected.{js,json} files ( #7187 )
2018-01-09 13:10:30 -06:00
Raja Sekar
0f42accb87
Renamed files
2018-01-09 15:36:42 +01:00
Henry Zhu
7c99f4653f
v7.0.0-beta.37
2018-01-08 11:02:14 -05:00
Henry Zhu
7d798952d2
v7.0.0-beta.36
2017-12-25 14:04:08 -05:00
Nicolò Ribaudo
ae3f5b9149
Return the obj in setPrototypeOf fallback ( #7080 )
2017-12-20 22:48:10 +01:00
Nicolò Ribaudo
0c885b3200
Add support for extending builtins ( #7020 )
2017-12-20 14:46:00 -05:00
Henry Zhu
8a4124b2ff
v7.0.0-beta.35
2017-12-14 16:47:27 -05:00
Nicolò Ribaudo
509dbb7302
this before super() is a runtime error, not a static one. (#6467 )
...
* Check that super.* is after super() at runtime
* "missing super() call in constructor" runtime
* "'this' is not allowed before super()" runtime
2017-12-06 06:46:54 +01:00
Henry Zhu
a7c9264c79
v7.0.0-beta.34
2017-12-02 09:38:52 -05:00
Henry Zhu
413aa79711
v7.0.0-beta.33
2017-12-01 09:27:57 -05:00
Steven Hargrove
cee9ae48e0
[skip ci] removed shorthand usage of official babel scoped presets & plugins from README.md's ( #6820 )
2017-11-16 22:51:23 -05:00
Henry Zhu
4e6cd298c7
v7.0.0-beta.32
2017-11-12 08:32:53 -05:00
Logan Smyth
b19b66d94b
Use peerDep rather than plugin param for common APIs.
2017-11-06 11:32:47 -08:00
Henry Zhu
f76ac0b197
v7.0.0-beta.31
2017-11-03 16:03:01 -04:00
Logan Smyth
2d7685bdeb
Explicitly declare devDependency to satisfy peerDep on babel-core.
2017-10-31 17:00:55 -07:00
Henry Zhu
690d6465d8
v7.0.0-beta.5
2017-10-30 16:55:46 -04:00
Henry Zhu
624f00f23c
Fix peerDep to ^ for beta only ( #6644 )
2017-10-30 16:24:42 -04:00