13320 Commits

Author SHA1 Message Date
Daniel Tschinder
72a0f10825 Merge branch '7.0-dev' into 7.0 2017-02-20 23:09:42 +01:00
Daniel Tschinder
50ffa49201
Merge branch 'master' into 7.0
# Conflicts:
#	src/plugins/flow.js
2017-02-20 22:47:17 +01:00
Daniel Tschinder
2ef00a6631 Fix negative number literal typeannotations (#366)
* Fix negative number literal typeannotations

Also use parseLiteral() to parser string and number literal typeannotations
so that future changes (estree) to literals are also reflected to flow.

* Instead of invalid fallthrough throw immediately

* Increase coverage and better error mesage
2017-02-20 22:43:59 +01:00
Brian Ng
7b63af0e91 Fix typo in CONTRIBUTING.md [skip ci] 2017-02-20 11:37:04 -06:00
Henry Zhu
d9f01cbce6 Merge pull request #5317 from babel/update-babylon
Update to babylon@7.0.0-beta.0
2017-02-18 13:06:39 -05:00
Daniel Tschinder
7e540cdcc9 Remove obsolete code 2017-02-18 12:30:46 +01:00
Brendan Houle
07dd2b1e20 Shorthand properties examples (#5334) 2017-02-17 12:01:57 -06:00
Zachary Miller
d55a775024 Update CONTRIBUTING.md with respect to coverage check [skip ci] (#5329) 2017-02-16 22:14:16 -05:00
Joe Lencioni
69c6d27794 Improve syntax highlighting in readme for JSX (#5331) [skip ci] 2017-02-16 20:36:05 -05:00
Wilhelmina Drengwitz
7e59f86444 Fix 'o' is undefined in example code (#5327) [skip ci] 2017-02-16 15:24:20 -05:00
Daniel Tschinder
28853bf190 Fix for-await printing (#5322)
Only the first for-await was correctly printed all subsequent for-await statements
where printed as for-of as the variable op was changed inside the buildForXStatement
2017-02-15 17:43:06 -05:00
Daniel Tschinder
7c62278dcd [7.0] Change for-await to use new AST (#5321) 2017-02-15 17:29:09 -05:00
Alexander
1ba3269ece [7.0] Switch decorators-legacy to decorators in the Stage 1 Preset (#5318) (#5319) 2017-02-15 16:58:31 -05:00
Daniel Tschinder
ca78da6501 Fix variance (#5320) 2017-02-15 22:37:19 +01:00
Alex Kuzmenko
fa2a373acd [7.0] Replacing current decorators with decorators-legacy (#5290) 2017-02-15 15:42:50 -05:00
Jason Laster
ff2c24eed2 Add test for reference paths (#5296) 2017-02-15 15:05:31 -05:00
Toru Kobayashi
9188be9ed5 [7.0] Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#5199) 2017-02-15 14:58:07 -05:00
Charles Pick
bc8f476d33 [7.0] Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#5229) 2017-02-15 14:54:27 -05:00
Henry Zhu
b3e208fcd0 Update to babylon@7.0.0-beta.0 2017-02-15 14:45:21 -05:00
Brian Ng
b77c435f0f Ignore babel-register test artifacts (#5316) [skip ci] 2017-02-15 14:38:54 -05:00
Henry Zhu
401733d19f 7.0.0-beta.0 2017-02-15 14:28:29 -05:00
Sergey Rubanov
958f72ddc2 Add name field to package.json (#5311) [skip ci] 2017-02-15 10:55:12 -05:00
Logan Smyth
7dcc9708e3 Manually bump and publish babel-runtime 2017-02-14 11:26:49 -08:00
Sergey Rubanov
c3098d2437 Add Node 7 to CI (#5165)
This reapplies this commit, as it was lost before
2017-02-14 15:33:10 +01:00
Daniel Tschinder
6c03cb0783
Merge branch 'master' into merge-master
# Conflicts:
#	lerna.json
#	packages/babel-cli/package.json
#	packages/babel-core/package.json
#	packages/babel-generator/package.json
#	packages/babel-helper-builder-react-jsx/package.json
#	packages/babel-helper-function-name/package.json
#	packages/babel-helper-optimise-call-expression/package.json
#	packages/babel-helper-replace-supers/package.json
#	packages/babel-helper-transform-fixture-test-runner/package.json
#	packages/babel-helpers/package.json
#	packages/babel-plugin-transform-class-properties/package.json
#	packages/babel-plugin-transform-es2015-block-scoping/package.json
#	packages/babel-plugin-transform-es2015-classes/package.json
#	packages/babel-plugin-transform-es2015-modules-commonjs/package.json
#	packages/babel-plugin-transform-es2015-modules-systemjs/package.json
#	packages/babel-plugin-transform-es2015-modules-umd/package.json
#	packages/babel-plugin-transform-es2015-parameters/package.json
#	packages/babel-plugin-transform-react-jsx/package.json
#	packages/babel-register/package.json
#	packages/babel-template/package.json
#	packages/babel-traverse/package.json
#	packages/babel/package.json
2017-02-14 12:46:23 +01:00
Logan Smyth
11cf0e0b50 Revert lerna again 2017-02-13 18:18:45 -08:00
Logan Smyth
9cae61911d v6.23.1 2017-02-13 18:18:17 -08:00
Logan Smyth
454933ef76 Revert "Rewrite Hub as interface #5047" (#5306) 2017-02-13 18:15:50 -08:00
Logan Smyth
48709e9fa4 Revert change that lerna force-committed. 2017-02-13 17:20:18 -08:00
Logan Smyth
48573f1fb4 v6.23.0 2017-02-13 17:14:12 -08:00
Logan Smyth
24400c5b66 Update babel-types README from script. 2017-02-13 15:00:37 -08:00
Logan Smyth
cc5750d151 Add CHANGELOG for 6.23.0 [skip ci] (#5304) 2017-02-13 14:57:26 -08:00
Logan Smyth
e1fee21529 Add charset so tests work with convert-source-map@>1.4 (#5302) 2017-02-13 14:37:41 -08:00
Logan Smyth
1c1e9c764b Revert "Upgrade lerna to current beta." (#5303) 2017-02-13 14:20:10 -08:00
Logan Smyth
8a28c07d20 Upgrade lerna to current beta. (#5300) 2017-02-13 14:01:57 -08:00
Brian Ng
6522a255d9 Add greenkeeperio-bot to mention-bot blacklist (#5301) [skip ci] 2017-02-13 16:56:12 -05:00
Ben Alpert
14d3c2e256 Avoid adding unnecessary closure for block scoping (#5246)
When you write

```
for (const x of l) {
  setTimeout(() => x);
}
```

we need to add a closure because the variable is meant to be block-scoped and recreated each time the block runs. We do this.

However, we also add the closure when no loop is present. This isn't necessary, because if no loop is present then each piece of code runs at most once. I changed the transform to only add a closure if a variable is referenced from within a loop.
2017-02-13 13:46:00 -08:00
Yongxu Ren
2985597d40 Rewrite Hub as interface #5047 (#5050)
* Rewrite Hub as interface #5047

* Update index.js
2017-02-13 12:49:10 -08:00
Justin Ridgewell
ca45904a45 Fix loose for-of with label (#5298) 2017-02-13 10:30:36 -05:00
Samuel Reed
2aa2de8c6f feature: Support pure expressions in transform-react-constant-elements (#4812) 2017-02-12 20:02:38 -08:00
Logan Smyth
4edcd02965 Fix linting error 2017-02-12 18:48:07 -08:00
Samuel Reed
f4e3dfee74 Fix PathHoister hoisting before bindings. (#5153)
Fixes #5149 and enables a few additional safe hoists.
2017-02-12 18:35:08 -08:00
Samuel Reed
eb91bd831c Fix PathHoister hoisting JSX member expressions on "this". (#5143)
The PathHoister ignored member references on "this", causing it
to potentially hoist an expression above its function scope.

This patch tells the hoister to watch for "this", and if seen,
mark the nearest non-arrow function scope as the upper limit
for hoistng.

This fixes #4397 and is an alternative to #4787.
2017-02-12 18:34:07 -08:00
Daniel Tschinder
d2ccc6ae22 Fix test 2017-02-12 15:39:52 +01:00
Daniel Tschinder
09c1f069f9 Fix test 2017-02-12 15:38:11 +01:00
Brian Ng
57aaceaae7 Update contributing with more test info [skip ci] (#355) 2017-02-12 13:45:23 +01:00
Daniel Tschinder
d88befdd30
Merge branch 'master' into 7.0
# Conflicts:
#	src/parser/index.js
2017-02-12 13:32:06 +01:00
Daniel Tschinder
1cca7000d1 Reintroduce Variance node (#333)
* Reintroduce Variance node

* Optimize code and coverage

tt.plusMin can only be + or - so no need to have an elseif
2017-02-12 13:28:14 +01:00
Charles Pick
cd3f14921e Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) 2017-02-12 13:14:35 +01:00
Daniel Tschinder
fac13290d7 Estree compatibility as plugin (#277)
* Initial estree support for ClassMethod

* Handle literals for estree

* Fix regex

* correct output of regexp and regenerate test

* Add tests for validation stuff with estree plugin

* Parse Properties correctly

This also refactors how babylon parses obj properties in general
so that this logic can be more easily extended.

* Run all throws-tests a second time with estree plugin

* Fix all throw tests

* Remove rebase conflict

* Correctly set kind

This ensures state.inMethod gets propagated correctly

* Add computed: false to methods with ident async

* Implement directive field on Directives

* Test invalid directives

* more tests
2017-02-12 12:48:41 +01:00