Huáng Jùnliàng
c9da3bc8b8
refactor: do not rely on AST extra properties in plugins ( #11662 )
2020-06-05 01:12:07 +02:00
Huáng Jùnliàng
1e115aed33
fix: ensure (a?.b)() has proper this ( #11623 )
...
* fix: ensure (a?.b)() has proper this
* let test be more restrictive
* fix: transformed member call should preserve computed
* chore: revamp test files
* refactor: simplify
* fix: unwrap parthenthesizedExpression
* add loose test cases
* add `(a?.#b)()` support
* add with-transform test cases
* Update packages/babel-plugin-proposal-optional-chaining/src/index.js
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
* address review comments
* update test fixtures
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2020-06-01 10:25:22 -04:00
Bruno Macabeus
75a6530abe
Fix optional-chaining with TS non-null operator ( #10961 )
2020-05-24 22:56:31 +02:00
Oliver Dunk
693a5df7a9
Memoize call expressions in optional chains in loose mode ( #11261 )
...
* Memoize in loose mode when callee is a CallExpression
* Handle more complex OptionalCallExpressions where memoization is needed
* Convert calls to Function#call when member needs memoization
* Only update call context for member expressions
2020-03-20 08:59:03 +01:00
Alex Lewis
bb6cc61979
fix(optional chaining): Optional delete returns true with nullish base ( #10806 )
...
Per issue 10805, the return value when using delete on a nullish base is
currently undefined. The correct return type should be true.
2019-12-04 12:56:25 +01:00
Kai Cataldo
a6d134804a
Unify build step for ESLint packages ( #10723 )
2019-11-16 10:15:15 +01:00
Shriram Balaji
ecad667dda
Fix optional method chaining in derived classes ( #10694 )
2019-11-12 10:28:40 -06:00
Thiago Arrais
e7fa566442
Includes test for #8354 ( #10385 )
2019-09-02 21:58:54 +02:00
Justin Ridgewell
844dd33f3d
Microbouji patch/8136 ( #9073 )
...
* Fix optional chaining bug regarding spread in function calls
* Revamp optional-chain to be top down
Instead of going both upwards and downwards from the first real optional expression, we can just start from the top down.
* Add more tests
2018-11-24 09:32:24 -05:00
Logan Smyth
79b2af5997
Format fixture JSON with Prettier. ( #8658 )
2018-09-09 17:57:52 -07:00
Justin Ridgewell
01f4c2368e
OptionalMemberExpression properties are not referenced ( #7668 )
...
Fixes #7642 .
2018-04-05 02:44:32 +01:00
Deven Bansod
c8d82d6483
Migrate all remaining fixtures to jest expect
2018-03-24 16:22:20 +05:30
Naveen jain
a3ad518ce1
[BugFix] : OptionalChaining Bug fixes ( #7288 )
...
* Added optionalExpression types to babylon and babel-types
* OptionalChain transforms bug fix
* Added OptionalExpressions to babel-generator. Fixed OptionalChain Bugs
* Removed 'optionalChain' from newExpression and added test cases
* Added test cases for optionalChain
* Update index.js
2018-02-07 19:42:14 -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
Justin Ridgewell
ca18ea5e79
Re-add optional chaining delete ( #7257 )
...
* Re-add optional chaining delete
* Move exec tests next to output tests
* Forgot to commit these
2018-01-24 11:26:02 -08:00
Justin Ridgewell
180eda3211
Remove old optional chain features ( #6345 )
2018-01-22 14:03:43 -08: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
c41abd79a1
Rename all proposal plugins to -proposal- from -transform- ( #6570 )
2017-10-27 15:26:38 -04:00