11387 Commits

Author SHA1 Message Date
Justin Ridgewell
29d249e3b7
Cleanup isReferenced a bit (#7669)
* Cleanup isReferenced a bit

* Optimize isReferenced inside Functions

* Group return falses
2018-04-05 19:09:58 +01:00
Justin Ridgewell
6f9b0546ef
Class Properties Tests (#7670)
* Round out class properties tests

* Rename in preperation for private tests

* Fix options
2018-04-05 17:49:34 +01:00
Nicolò Ribaudo
fa2c6c5164 Never extract class fields into an initializer function. (#7659)
It was needed to avoid collision of identifiers used in fields
initializers with variables declared in the constructor, but it
broke `this` handling.
This commit removes that behavior and instead renames the
colliding variables.
2018-04-05 16:20:47 +01:00
Justin Ridgewell
43040a4181
Private Properties phase 1 (#7666)
* Private Properties phase 1

Co-authored-by: CodingItWrong

* Private fields are optional

* Docs update
2018-04-05 11:17:34 +01:00
Justin Ridgewell
01f4c2368e
OptionalMemberExpression properties are not referenced (#7668)
Fixes #7642.
2018-04-05 02:44:32 +01:00
hirochachacha
56cb4baf46 Add missing exponential operators to ast spec (#7663) [skip ci] 2018-04-04 14:27:19 -04:00
hirochachacha
b051243a63 Fix typo in ast spec (#7662) [skip ci] 2018-04-04 14:26:06 -04:00
Henry Zhu
e808b63c15 Bump to babel@7.0.0-beta.44 (#7656) 2018-04-02 19:47:25 -05:00
Henry Zhu
a6df92f245 v7.0.0-beta.44 v7.0.0-beta.44 2018-04-02 18:19:30 -04:00
Logan Smyth
f4b81ab101
Merge pull request #7655 from babel/babel-env-make
Remove setting BABEL_ENV to test by default in makefile
2018-04-02 13:57:47 -07:00
Brian Ng
360b632881
Remove setting BABEL_ENV to test by default in makefile 2018-04-02 15:18:50 -05:00
Henry Zhu
bdfeeb38c6 v7.0.0-beta.43 v7.0.0-beta.43 2018-04-02 12:47:55 -04:00
Henry Zhu
47ada5ab3a
revert prev pr to temp fix osx (#7652) 2018-04-02 12:40:03 -04:00
John-David Dalton
59ba3959dc Add options.allowAwaitOutsideFunction. (#7637) 2018-03-29 10:41:14 -04:00
unconfident
0200e6256a Allow StringLiteral to be used as ObjectTypeProperty.key (#7639) 2018-03-28 09:20:46 -05:00
Henry Zhu
9a26c2b07a
Merge pull request #7471 from yakotika/master
added support Node's --require and -r flags in babel-node
2018-03-27 14:44:35 -04:00
Henry Zhu
901571d72f
Merge pull request #7579 from devenbansod/migrate-to-jest-expect-2
Migrate a few packages' tests to use Jest Expect (see below)
2018-03-27 14:43:44 -04:00
Deven Bansod
b09c729675 Use expect's instanceOf and toHaveProperty methods 2018-03-27 22:34:25 +05:30
Sven SAULEAU
a36525be45
Merge pull request #7615 from babel/fix-clean-makefile
clean makefile a bit
2018-03-27 08:36:16 +02:00
Logan Smyth
a10c91790f
Merge pull request #7588 from loganfsmyth/register-cycle-fixes
Have @babel/core lazy-load all dependencies and make @babel/register not explode because of that
2018-03-25 15:24:00 -07:00
Justin Ridgewell
ab7d1231ad
Fix flow errors with Logical Assignment Operators (#7629)
* Fix flow errors with logical assignment

* Fix column numbers
2018-03-25 22:47:48 +01:00
Logan Smyth
a5df709bc3 Lazy-load @babel/core's dependencies to decrease up-front load times. 2018-03-25 14:22:32 -07:00
Logan Smyth
1dbed5f458 Have @babel/register explicitly skip re-entrant plugins/presets. 2018-03-25 14:22:32 -07:00
Logan Smyth
40e38646e4 Include stdout in error messages to aid debugging. 2018-03-25 12:50:35 -07:00
Logan Smyth
9e4dd861ee Ensure that sourceMapSupport is installed in all branches. 2018-03-25 12:50:35 -07:00
Justin Ridgewell
a7bddc02ba
Add ??= to Logical Assignment Operators (#7623)
`??=` is being merged into the Logical Assignment Operator proposal, and the overall proposal will wait until nullish coalescing is finalized.
2018-03-25 18:58:51 +01:00
Justin Ridgewell
023f8bd1cb
Move Logical Assignment Ops to Stage 1 (#7625) 2018-03-25 17:49:21 +01:00
Deven Bansod
c9b99af5a6 Remove assert.* from commented out assertions 2018-03-24 16:22:20 +05:30
Deven Bansod
c8d82d6483 Migrate all remaining fixtures to jest expect 2018-03-24 16:22:20 +05:30
Deven Bansod
db42a5d70f Migrate babel-preset-es2015 and -next-target tests to use jest expect 2018-03-24 16:22:19 +05:30
Deven Bansod
0856f89882 Migrate -transform-block-scoping and -transform-classes to jest expect 2018-03-24 16:22:18 +05:30
Deven Bansod
921702ef8c Migrate babel-plugin-proposal-do-expressions tests to jest-expect 2018-03-24 16:22:18 +05:30
Deven Bansod
8b57a3e3b9 Migrate a few packages' tests to use Jest Expect (see below)
* Migrate the following packages' tests:
    * babel-helper-annotate-as-pure
    * babel-helper-module-imports
    * babel-helper-transform-fixture-test-runner
    * babel-highlight
    * babel-node
    * babel-plugin-transform-modules-commonjs
    * babel-preset-env-standalone
    * babel-preset-env
    * babel-preset-es2015
    * babel-preset-react
    * babel-standalone
    * babel-template
    * babel-traverse
    * babel-types
2018-03-24 16:22:10 +05:30
Logan Smyth
21309cc8d4 Make these tests re-throw the same error to keep the trace. 2018-03-23 21:26:50 -07:00
Andy
19708e0154 TypeScript: support mapped type modifiers syntax (#7383) 2018-03-23 14:34:15 -04:00
Mateusz Burzyński
f98dff9189
Allow placeholders in JSXElements when parsing templates (#7583) 2018-03-23 09:27:51 +01:00
Brian Ng
840ba187a7
Prevent duplicate regex flags (#7617) 2018-03-22 10:25:26 -05:00
Sven SAULEAU
de00d939f0
fix: clean makefile 2018-03-22 10:29:25 +01:00
Brian Ng
e80488f1d5
Update to beta.42 (#7609) 2018-03-21 10:39:46 -05:00
Michał Pierzchała
81c1b49f6a Disable flow on transformClass, fix preset-env errors (#7605) 2018-03-20 18:42:11 -05:00
Justin Ridgewell
55bf55398a
Logical Assignment: ensure computed key isn't recomputed (#7604)
* Logical Assignment: ensure computed key isn't recomputed

* More tests
2018-03-20 23:06:09 +00: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
Logan Smyth
6d6fe844fd
Centralize Babel's own compilation config to make it easier to follow. (#7599) 2018-03-19 21:49:17 -07:00
Logan Smyth
edb0a70e14 Run prettier to format all JSON. 2018-03-19 18:26:55 -07:00
Brian Ng
669f6b97b2
Tweak es2015-related plugin order in preset-env (#7586) 2018-03-19 14:19:42 -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
Amin Marashi
8eee435cd6 Add RegExp support to include/exclude preset-env options (#7242)
* Add support for RegExp includes/excludes

* Keep the plugin order

* Detect invalid modules in regexp

* Add more tests for regexp

* Cover builtins, and unnormalized in the RegExp tests

* Remove babel-plugin- in all positions

* Change babel-plugin- prefix to string

* Add a test for the same module in include/exclude

* Handle partial matches explicitly

* Remove extra valid regexp check

* Optimise validation of plugins

* Optimise selecting the plugins

* Fix undefined include/exclude option

* Update documentation to reflect the new include matching

* Fix typo

* Apply reviews

Use regexp.test instead of string.match (slower)

Define flatten helper

Do not normalize babel-plugin anywhere in the string
2018-03-18 15:54:43 +01:00
Henry Zhu
d260bfaec4 v7.0.0-beta.42 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
Ben Wiley
b6e54800b4 Remove outdated spec deviation note [skip ci] (#7571)
`JSXText` was added to the JSX spec [here](https://github.com/facebook/jsx/pull/80).
2018-03-15 16:20:14 -04:00