Hendrik Niemann
fdd0789936
Fix literal type annotation argument number ( #7706 )
...
Added the value argument to the visitors of flow literal type
annotations.
Literal type annotations need a value since they work very much like
primitive literals in normal JavaScript.
Fixes #7697
2018-04-10 09:38:20 -04:00
Guy Bedford
5b1332457c
arrayWithHoles internal function name consistency ( #7709 ) [skip ci]
2018-04-10 09:33:54 -04:00
Axel Nyffenegger
bd98041321
Fix function name computation for literal values ( #7435 )
...
* Fix name computation for literal values
* Add more computed literal test cases
* Always return a string in getNameFromLiteralId
- Also concatenate quasis id for regex literal
* Add a test clarifying function name for template literals
* Remove useless else ifs
2018-04-09 21:00:55 -04:00
Devon Govett
6a8c4ab433
Make babel-types type checking functions 36% faster ( #7685 )
...
* Precompile 25% faster type checking functions
* Pre-fetch type-check function when generating NodePath methods
Additional ~11% speed improvement.
* Slightly faster assert calls
2018-04-09 15:11:04 -04:00
Justin Ridgewell
637bfe76b1
Cleanup object super traversal ( #7681 )
2018-04-06 20:39:57 +01:00
Justin Ridgewell
3f72f1d637
Add option to overwrite failing output fixtures ( #7679 )
2018-04-06 12:13:10 -05: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
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
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
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
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
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
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
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
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
Henry Zhu
ae210a46d1
Merge pull request #7562 from babel/pr/7534
...
Use helper-module-import inside preset-env
2018-03-15 16:19:03 -04:00