930 Commits

Author SHA1 Message Date
Brian Ng
0cd868a5f2
fixup tests 2018-04-19 09:17:33 -05:00
Logan Smyth
42244123e1 Update the docs to correctly reflect default value changed in #7436. [skip ci] 2018-04-18 23:33:34 -07:00
Nicolò Ribaudo
341bdab90c Update decorators parsing (#7719)
* Update decorators parsing

This commit introduces three changes:
1) Class properties can be decorated
2) Decorators can contain arbitrary expressions, using @(...)
3) The Decorator node type has a new property, "arguments". This
    makes it possible do distinguish @dec() and @(dec()), which have
    different behaviors because @(dec()) is equivalent to @(dec())().

* Rename Decorator#expression to Decorator#callee

* Add test for @dec()()
2018-04-17 16:22:03 -05:00
Nicolò Ribaudo
a62cfe9045 Disallow arguments in class properties 2018-04-12 22:41:28 +02:00
Deven Bansod
95894397eb Migrate babel-cli and babel-generator tests to use jest-expect (#7549) 2018-04-11 13:12:56 -05: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
450a1678f2
Use getProto and setProto helpers (#7675)
Depends on #7674.
2018-04-06 02:54:08 +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
Daniel Tschinder
f0d681a238 Remove obsolete max-len eslint rule and reformat some stuff to fit (#7602) 2018-03-20 08:51:47 -05:00
Henry Zhu
d260bfaec4 v7.0.0-beta.42 2018-03-15 16:50:03 -04:00
Logan Smyth
017d0e7078
Ensure that the backward-compat logic for plugin-utils copies over the version API properly. (#7580) 2018-03-15 11:45:53 -07:00
Henry Zhu
270ea17fed v7.0.0-beta.41 2018-03-14 12:25:26 -04:00
Daniel Tschinder
1d69cd41ca Fix import of type ConfigItem (#7561)
It is also exported as type
2018-03-13 13:31:32 -05:00
Daniel Tschinder
3a7881379a jest: ToEqual -> toBe 2018-03-10 11:48:09 +01:00
Deven Bansod
f3f0197890 Migrate babel-core tests to use jest-expect (#7513)
* Used codemods at: https://gist.github.com/devenbansod/03c5cff857661e076cbec72fcb2e7eb3 along with some manual intervention and review
2018-03-10 11:40:28 +01:00
Logan Smyth
b5e6536f26
Remove the sourceMapTarget option from core and implement it in babel-cli. (#7500) 2018-03-09 14:14:25 -08:00
Logan Smyth
74ab2798e2 Tweaks around PR comments. 2018-03-07 18:02:38 -08:00
Logan Smyth
fef5c7e523 Expose the partial Babel config for people to load and mutate. 2018-03-07 16:33:25 -08:00
Daniel Tschinder
eb2a0b0fcd Raise minimum version for debug to only allow secure version. (#7495) 2018-03-05 20:12:56 +01:00
Logan Smyth
15a80f0df8
Merge pull request #7490 from loganfsmyth/sourcetype-helpful-errors
Give helpful errors if the wrong sourceType is detected
2018-03-04 15:03:49 -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
5f6e3122a0 Give users helpful feedback if they are detected as using the wrong sourceType. 2018-03-04 14:12:37 -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
Daniel Tschinder
3e95830646
Migrate to jest (#7455) 2018-03-03 10:58:19 +01:00
Logan Smyth
2c3eb3096f Expand the '.env()' API call with more flexibility. 2018-02-27 18:48:24 -08:00
Logan Smyth
148e6dfc26 Centralize the plugin/configuration API object. 2018-02-27 18:48:24 -08:00
Logan Smyth
ddd40bf5c7
Rely entirely on sourceType for module vs script differentiation. (#7417) 2018-02-27 18:11:13 -08:00
Logan Smyth
b19b7fd2cf Fix PR comments. 2018-02-27 17:46:17 -08:00
Logan Smyth
8e3e6e0a88 Require AST output to be opt-in, rather than opt-out. 2018-02-26 18:44:59 -08:00
Logan Smyth
d4a8c7672c Avoid using lodash during config loading, for require() performance. 2018-02-26 18:44:58 -08:00
Logan Smyth
600106b9cb Lazy-initialize external helper template. 2018-02-26 18:44:57 -08:00
Mike S
84de90e572 Better error message for invalid plugin/preset (#7238)
- Error for invalid plugin/preset now includes file path
2018-02-22 18:30:01 -08:00
Justin Ridgewell
7e90d56024
Proposal: Logical Assignment Operators (#7385)
* Proposal: Logical Assignment Operators

https://github.com/jridgewell/proposal-logical-assignment

I'm bringing it [back](https://github.com/babel/babel/pull/516). 😉

* Use expectPlugin

* Add to stage 0 preset

* Add logicalAssignment missing plugin log stuff
2018-02-18 13:56:29 -05:00
Henry Zhu
ea3f2d9299 v7.0.0-beta.40 2018-02-12 11:41:13 -05:00
Logan Smyth
213805f21e Avoid duplicating types in index-browser. 2018-02-08 09:19:16 -08:00
Logan Smyth
28d13cb09b Fix small bug in the new .parse function. 2018-02-08 00:22:50 -08:00
Logan Smyth
9a8ba76e1f Merge .babelrc and .babelignore searching into a single pass. 2018-02-08 00:22:49 -08:00
Logan Smyth
85174b6ce1 Remove unneeded param from buildRootConfig. 2018-02-07 23:23:19 -08:00
Logan Smyth
ec2e0b664a Properly allow undefined ignore patterns for test/include/exclude. 2018-02-07 23:23:19 -08:00
Kai Cataldo
7234442fde Add location information to parsing errors (#7314) 2018-02-04 13:00:03 -06:00
Henry Zhu
73e64c6cb0 v7.0.0-beta.39 2018-01-30 15:27:19 -05:00
Kai Cataldo
22c8f6376c babel-core: Add parse method (#7291) 2018-01-30 12:38:58 -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
Nicolò Ribaudo
63ae923987 Add t.cloneNode and deprecate t.clone and t.cloneDeep (#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