Cyp
e541d6031a
fix: Expression x === 'y' && '' should not evaluate to undefined. ( #8880 )
...
Fixes https://github.com/babel/minify/issues/908 .
2018-10-16 21:25:49 +02:00
Brian Ng
5895277b32
Bump prettier to v1.13.2
2018-06-03 07:54:39 -05:00
Brian Ng
c583a04a55
Fix setting deopt properly after evaluating multiple expressions ( #6882 )
2017-11-22 20:06:57 -05:00
Brian Ng
e4b35f680d
Run prettier
2017-06-27 12:15:00 -05:00
Joseph Frazier
a330cf2b09
Add support for evaluating String.raw expressions ( #5681 )
...
* Add support for evaluating `String.raw` expressions
* Dedupe evaluation code for template literal quasis
* Check scoping in `String.raw` evaluation
This addresses https://github.com/babel/babel/pull/5681#discussion_r114203497
* Ensure that `tag` is a MemberExpression in `String.raw` evaluation
This addresses https://github.com/babel/babel/pull/5681#discussion_r114203555
* babel-traverse: Move evaluateQuasis() outside _evaluate()
2017-06-24 16:00:42 -04:00
Justin Ridgewell
119d5c5871
Hoist several closures
2017-06-08 03:39:10 -04:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Henry Zhu
3ff77a61e4
Update babylon beta 3 ( #5394 )
...
* Update babylon to v7-beta.3
* convert RestProperty/SpreadProperty to RestElement/SpreadElement
* add virtual types to make it easier to upgrade
2017-02-28 16:58:19 -05:00
Boopathi Rajaa
f8ffe03e79
Deopt evaluation of undefined with a local binding. Fix #5204 ( #5206 )
2017-02-08 10:37:14 -05:00
Logan Smyth
b845f2b69d
Re-enable the max-len ESLint rule. ( #5265 )
2017-02-04 11:07:15 -05:00
Henry Zhu
672adba9a1
enable prefer const ( #5113 )
2017-01-14 09:48:52 -05:00
Boopathi Rajaa
7e020272c1
Fix path.evaluate for references before declarations ( #4875 )
2016-11-20 22:44:56 -05:00
Moti Zilberman
6bc10b5573
Support ObjectExpression in static path evaluation ( #4746 )
2016-10-17 18:55:02 -04:00
Boopathi Rajaa
183d9570f9
Fix bug where redeclaration of var doesn't deopt ( #3559 )
...
* Fix bug where redeclaration of var doesn't deopt. (Close T7470)
* [evaluate] Add tests for cases - let/const/different scopes
2016-08-17 19:23:09 -04:00
Erik Desjardins
aeb42c2228
Fix bug where path.evaluate treats repeated identifiers as undefined ( #3557 )
...
* babel-traverse: add test to demonstrate repeated identifiers being evaluated to `false`
* fix typo: `value` -> `val`
* path.evaluate: only mark item as resolved if we're confident
2016-08-04 16:58:41 -04:00
Sebastian McKenzie
b2390cca02
deopt on recursion in path.evaluate - fixes T7397
2016-06-19 22:08:39 +01:00
Amjad Masad
3667527d04
Revert "Remove flow"
...
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Sam Goldman
2827ff6b01
Remove flow
2016-03-01 22:33:30 -08:00
Sebastian McKenzie
5b89849f43
Switch to klint, fix some lint rules
2016-02-14 23:25:14 +00:00
Amjad Masad
6ce463399d
Fix evaluation bug with ||
2015-12-22 20:48:50 -08:00
Amjad Masad
a5b9afbebe
Make sure we always return when not confident
2015-12-21 02:04:16 -08:00
Daniel Lo Nigro
0076204f80
Fix Flow.
...
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.
Closes #3064
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
e62a00df50
rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
2015-11-03 01:19:35 +00:00
Sebastian McKenzie
ae7d5367f1
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
15f73b4fc3
remove noisy comments/documentation
2015-09-01 04:56:03 +01:00
Sebastian McKenzie
56c2903811
fix duplicate declarations
2015-08-24 15:33:36 -04:00
Sebastian McKenzie
daf171770a
add support for evaluating template literals
2015-08-17 15:09:30 -07:00
Sebastian McKenzie
def1f8823e
don't statically evaluate Math.random - fixes babel-plugins/babel-plugin-constant-folding#1
2015-08-13 15:32:50 +01:00
Sebastian McKenzie
3ef9bffcc2
split up babel core into multiple modules
2015-08-11 17:40:59 +01:00