11387 Commits

Author SHA1 Message Date
Henry Zhu
84dfa659e7 update to alpha.15 (#6009) 2017-07-25 17:08:15 -04:00
Samuel Reed
e0b4543601 feature: Support whitelisting mutable props for react-constant-elements (#5307) 2017-07-25 13:34:21 -05:00
Andy
248743e6c5 babel-types: Add TypeScript definitions (#5856)
* babel-types: Add TypeScript definitions

* Add missing builders

* Allow arrow function to have "generator"

* Replace link to resolved issue with comment

* Re-add 'generator' to functionCommon
2017-07-25 11:42:25 -04:00
Brian Ng
9a1b8ea443 Add support for flow predicates in babel-generator (#5984) 2017-07-25 11:38:17 -04:00
Brian Ng
55aea26f13 Add support for export type star in babel-generator (#5985)
* Add support for export type star in babel-generator

* Bump babylon
2017-07-25 11:37:27 -04:00
Nicolò Ribaudo
fb9a752262 Function sent (#5920)
* Create "babel-helper-wrap-function"

It contains the logic to wrap a function inside a call expression.
It was part of the "babel-helper-remap-async-to-generator" package, but
it is needed to transpile "function.sent"

* Create "babel-transform-function-sent"

It transforms the "function.sent" meta property by replacing it with
"yield" and making the generator ignore the first ".next()" call.

* "function.sent" is the last value passed to .next(), not the first one

* Disable exec tests on old node

* Fix flow error

* Add "transform-function-sent" to "stage-2" preset

* Do every trasformation in one traversal

* Test for "yield function.sent"

* [skip ci]

* Fix some typos [skip ci]
2017-07-25 11:07:01 -04:00
Peeyush Kushwaha
4a35243118 Non string computed keys in object-rest-spread (#5757) 2017-07-25 09:46:52 -05:00
MarckK
9fc910d8c0 Add optionality to catch bindings (#5956) 2017-07-25 09:38:48 -05:00
Noah Lemen
51a293601b add JSXAttribute visitor function, wraps JSXElement attributes in a JSXExpressionContainer; also adds test fixtures (#6006) 2017-07-25 09:30:32 -04:00
Karl Cheng
42d5dbe544 Remove private field shorthand
There seems to be tentative agreement to remove the private field
shorthand given the added confusion and edge cases involved with the
shorthand.

Refs: https://github.com/tc39/proposal-class-fields/issues/21
2017-07-25 11:53:38 +10:00
Shuaibird Hwang
4d51052037 FIX access to the prototype of an instance (#6005)
The right way access to the prototype of an instance is using the `__proto__` rather than the `prototype`.
2017-07-24 21:46:38 -04:00
Artem Yavorsky
5fa460ff2a Merge pull request #380 from leggiero/patch-1
Fixed "node: current" example
2017-07-25 03:38:03 +03:00
Daniel Tschinder
19c4dd2d8c Update chai to 4.x (#6002) 2017-07-24 15:19:32 -04:00
Peeyush Kushwaha
2225892348 Use first binding for multiple var declarations (#5745)
* Use first binding for multiple var declarations
Since var declarations after initial binding have no effect, use the
first declaration. Fixes #2378

* Include hoisted function bindings

* Missing newline in expected.js

* Simplify constantViolations in new Binding on existing

* clarify comment language
2017-07-24 14:43:17 -04:00
Daniel Tschinder
677160385c Update chalk to 2.x (#6003) 2017-07-24 11:06:57 -04:00
Daniel Tschinder
9b04cbbc4f Update find-cache-dir to 1.0 (#5999) 2017-07-23 20:23:55 -04:00
Daniel Tschinder
4aca487b6d Update default-require-extensions to 2.0 (#6000) 2017-07-23 20:23:29 -04:00
Daniel Tschinder
5afe40b095 Update to-fast-properties to 2.0 (#5997) 2017-07-23 09:22:05 -04:00
Daniel Tschinder
b081f68e87 Update output-file-sync to 2.0 (#5996)
* Update output-file-sync to 2.0

* Ignore test tmp directory
2017-07-23 09:21:51 -04:00
Daniel Tschinder
c9ed159a18 Update jsesc to the latest version (#5995) 2017-07-23 09:21:22 -04:00
Daniel Tschinder
b9ed9919c1 Update globals to v10 (#5993) 2017-07-23 09:21:08 -04:00
Daniel Tschinder
04b4e414ad Fix clean to remove package-lock files (#5991)
Otherweise the same versions get installed over an over again in
dev environments
2017-07-23 09:20:36 -04:00
Eduardo Leggiero
d156afff2e Fixed "node: current" example
`parseFloat` is not applied anymore to "node: current" logic:
The parseFloat was wrong, as `parseFloat('6.3.2')` will parse as 6.3, but `parseFloat('6.10.2')` will output 6.1 that is not correct.

Ref: https://github.com/babel/babel-preset-env/blob/master/src/targets-parser.js#L73
2017-07-22 18:19:54 +01:00
Daniel Tschinder
59ffa6268e Fix flow test runner (#647)
* Fix flow test runner

* Retry parsing in scriptmode
2017-07-22 11:11:52 +02:00
greenkeeper[bot]
23d325ba75 Update flow-bin to the latest version 🚀 (#646)
* chore(package): update flow-bin to version 0.51.0

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile
2017-07-22 09:38:18 +02:00
Henry Zhu
92d64f202d 7.0.0-beta.17 2017-07-21 15:56:42 -04:00
jbrown215
e7e7593ca5 Flow opaque type aliases parsing (#643)
* Add support for Flow opaque type aliases

* Add tests for Flow opaque type aliases
2017-07-21 10:48:28 -04:00
MarckK
c88af90c0a Add optionality to catch bindings (#634)
* Add optionality to catch bindings (plus tests)

* Update ast/spec, README, set param to null if no param with plugin optionalCatchBinding

* Fix: wrap param = null in else case

* Fix tests for optional catch binding; add tests which include finally clause
2017-07-21 10:18:57 -04:00
Ryan Gaus
0b890ced19 Code generator tests (#5847) 2017-07-20 18:22:18 -04:00
Brian Ng
77bdb9ae3e Reorganize new.target tests (#642) 2017-07-20 16:17:40 -05:00
Justin Ridgewell
c60bf9a897 Fixup builder-binary-assignment-operator-visitor (#5969)
Using a `SequenceExpression` instead, we avoid awkward
`AssignmentExpression`s as direct children of `BlockStatement`s.
2017-07-20 11:47:47 -04:00
Naveen jain
245c78dcdc Added test cases for babel-generator (#5934)
* edited .gitignore to ignore all package-lock.json files
2017-07-20 11:39:26 -04:00
Justin Ridgewell
8a98141b60 Fix a few type inferences (#5835) 2017-07-20 11:38:12 -04:00
Justin Ridgewell
78544417fc Remove noop (#5970)
It’s ugly, but it gets the job done. And it unblocks my babel-type
changes.
2017-07-20 11:36:13 -04:00
Justin Ridgewell
c6edce115c Fix numeric-separator transform (#5968) 2017-07-20 11:35:53 -04:00
Marcus Cavanaugh
fe13ba8fc2 Remove unused functions from renamer.js. (#5965) 2017-07-20 11:19:10 -04:00
Henry Zhu
2f50fd00c3 update to babel 7 alpha.15 (#638) 2017-07-19 16:38:45 -04:00
Henry Zhu
135c3bafac drop node 7 [skip ci] 2017-07-19 16:37:09 -04:00
Selwyn
579499c66d Update v8flags to version 3.0.0 (#5975) 2017-07-19 14:31:23 -04:00
Brian Ng
a46f87f726 Check for function when parsing export async (#639) 2017-07-19 14:03:49 -04:00
Henry Zhu
36dc6ee5dc 2.0.0-alpha.15 2017-07-19 10:52:23 -04:00
Justin Ridgewell
827c70e015 Support exporting deep destructuring (#5953) 2017-07-18 14:07:09 -05:00
Justin Ridgewell
8a5488e59f Fix for-of loose optimization (#5964)
VariableDeclarators can’t have a MemberExpression id.
2017-07-18 15:01:36 -04:00
Justin Ridgewell
63204ae51e Remove maybePopFromStatements (#5945)
It prevented you from pushing into the `params` of a function.

```js
fnpath.pushContainer("params", t.identifier("memo"))
```
2017-07-18 14:55:33 -04:00
Justin Ridgewell
28ae47a174 Stop mutating nodes (#5963)
* Stop mutating nodes

* Update tests

* linting
2017-07-18 13:24:07 -04:00
Henry Zhu
fa0b73ba33 Bump babel to alpha 15 (#372) 2017-07-18 09:55:30 -05:00
Mauro Bringolf
aa684d1b0c Spec compliancy of check-es2015-constants plugin (#5930)
* Figuring out where to place throw statement

* Restored path argument destructuring

* New approach using comma expressions for assignments

* Moved throwNode into body of forXstatements

* Refactored with helper function and ensureBlock, additional tests for update exprs

* Added exec tests for all violations

* Hoisted helper function for comma expression outside of visitor
2017-07-17 20:01:01 -04:00
Ryan Tsao
6ae350773e Normalize module format of plugins/built-ins data (#376)
* Reference plugins json instead of module in normalize-options.js

* Make plugins module format match built-ins module
2017-07-17 16:08:15 -04:00
Brian Ng
1fdec955f8 Bump istanbul and nyc (#5959) 2017-07-17 15:58:49 -04:00
Sarup Banskota
213ad1ed7a [generator] remove parens from break & continue (#5950)
* Remove parens around break and continue

Fixes #5742

* Fix space in doc comment

* Add some tests

* Remove newlines within CommentBlock

* Prevent newline before/after label

* Remove reference to node

* Check for label within startTerminatorless

* Print block instead of single line comment

* Clean up
2017-07-17 09:30:28 -07:00