7238 Commits

Author SHA1 Message Date
Daniel Tschinder
a83262026f Remove unused dependency babel-register (#4560) 2016-09-24 11:46:08 -04:00
Henry Zhu
ca7c48ff28 fix travis docs check (#4556) 2016-09-24 10:11:52 -04:00
Daniel Tschinder
d6f4d85284 Do not include babel-register in every test (#3669)
This is not necessary
2016-09-24 14:51:01 +02:00
Henry Zhu
d7533e899f Internal: cancel build with only .md changes (#4547) 2016-09-22 17:59:47 -04:00
Kai Cataldo
1db8c02d05 Remove duplicate default error (#4543)
* Revert "Throw error for multiple exports default (#3518)"

This reverts commit aa51dd4a3dbb956d8b619d884acf40194d5ffac8.

* Fix export default tests
2016-09-22 12:00:18 -04:00
Henry Zhu
c07919bc9b Add support for preset organization shortcuts (#4542)
* add support for @org shortcats, fixes #4362

* add shortcut test

* fixes
2016-09-21 16:44:13 -04:00
Kai Cataldo
f3a6e4b0ae Fix tests with duplicate named exports (#4538)
* Fix babel-plugin-transform-flow-strip-types tests

* Fix babel-plugin-transform-es2015-modules-umd tests

* Fix babel-generator tests

* Fix babel-plugin-transform-es2015-modules-systemjs tests

* Fix babel-plugin-transform-es2015-modules-commonjs tests

* Fix babel-plugin-transform-es2015-modules-amd tests
2016-09-21 10:52:59 +02:00
Henry Zhu
a793107bf3 fix lint 2016-09-20 14:04:15 -04:00
Logan Smyth
46eb99b18b Use the real sourcemap API and handle input sourcemaps - fixes T7259 (#3456) 2016-09-20 13:39:01 -04:00
Alberto Piai
8f6d4ae5cf Fix typeof Symbol.prototype (#3686)
* formatting

* fix `typeof Symbol.prototype`

Babel uses a helper function to return the correct value for `typeof
obj` when obj is a Symbol and support for Symbol has been polyfilled.

This function assumes that `obj.constructor === Symbol` implies `typeof
obj === 'symbol'`.

This isn't true when obj is `Symbol.prototype`. In that case (REPL from
node 6, the same holds in Firefox):

```
> Symbol.prototype.constructor === Symbol
true
> typeof Symbol.prototype
'object'
>
```

AFAICS, that's the only case where the assumption doesn't hold.

The test added by this patch fails only on node 0.10, as 0.12 already
has a native implementation of Symbol and the polyfill code doesn't run.

This caused a problem in core-js when it's compiled with babel (the
issue was isolated by @skozin here:
https://github.com/zloirock/core-js/issues/189#issuecomment-209864582).
2016-09-20 12:19:09 -04:00
Basil Hosmer
cb4b2b0744 flow plugin: generate exact object type annotations (#3702) 2016-09-20 11:10:55 +02:00
Dan Harper
fa7321f978 add tests for other module formats, from #4524 (#4532) 2016-09-20 11:04:07 +02:00
Dan Harper
f859830e54 Fix: export default arrows with function naming (#4524) 2016-09-19 21:58:37 -04:00
Moti Zilberman
e64d86c1eb If loading a preset fails, show its name/path (#4506) (#4517) 2016-09-17 23:01:08 -04:00
Daniel Tschinder
cbbc1c7333 fix default exported classes without a name (#4518)
* fix default exported classes without a name

This correctly requeues class without name so the es3 transform can
transform the default keyword.

* Replace phabricator issue number with github
2016-09-17 22:50:54 -04:00
Daniel Tschinder
590ad4d24f Replace phabricator tickets with github ones in code comments (#4519) 2016-09-17 22:50:02 -04:00
Brian Donovan
ec34e5acc7 Remove unused thisReference argument to getSuperProperty. (#4520) 2016-09-17 22:47:52 -04:00
Daniel Tschinder
1fce4cb42a Fix striping of typeParameters from arrow functions (#4521)
the typeParameters field was missing in the visitors and therefore
never visited by babel-traverse

Fixes #4483
2016-09-17 22:46:45 -04:00
Daniel Tschinder
de975b9660 Use plain js to do the pre/postpublish for the polyfill (#3694)
* Use plain js to do the pre/postpublish for the polyfill

* remove dist on clean [skip ci]
2016-09-13 09:09:11 -04:00
Daniel Tschinder
ff78fb19f7 Only set options in cli if different from default (#4507)
* CLI: Only set options if different from default 

Currently default values (like comments: true) will be set always for the transform.
This behaviour dos not allow for setting this options from babelrc as the default would always have precedence.

* Add new tests for comments
Also ensure that the babelrc in the fixture folder is copied over to the
working directory during tests
2016-09-13 08:25:08 -04:00
Daniel Tschinder
993f887240 Test for ignore with starting slash (#4509) 2016-09-12 22:48:06 +02:00
Andy Kant
5e9e659a7f Support custom ports for V8 Inspector (#4508) 2016-09-12 21:00:02 +02:00
Dan Harper
41f2bbc104 Flow: Fix generating arrow functions with param (#4504)
* transform-flow-comments, single arrow param support #4503

* further tests for printing single arrow func param flow code

* cleanup
2016-09-12 08:27:49 -04:00
Timothy Gu
5249b9d809 Remove ES2015 tests than do not parse in ES2016 (#4501)
These tests are originally from Traceur, which does not fully support
ES2016.

See babel/babylon#106 for a rationale why these code blocks are not
valid ES2016.
2016-09-11 21:58:38 -04:00
Henry Zhu
d2d34ba8e7 object rest spread useBuiltIns option (#4491)
* feat(transform-object-rest-spread): add polyfill=false option to avoid extends helper

* object-rest-spread: add useBuiltIns option

* add test for invalid option
2016-09-09 18:38:50 -04:00
Henry Zhu
3d93a2ab9c circle.yml: use later version of 0.10 2016-09-09 18:38:02 -04:00
Henry Zhu
7041e0b46f add example of a test that requires throwing an error [skip ci] 2016-09-09 18:09:52 -04:00
Mathias Bynens
b9919bdc48 babel-generator: Ensure ASCII-safe output for string literals (#4478)
Ref. #4477.
2016-09-08 18:04:52 -04:00
Henry Zhu
e5b9c92d3d mention the redirect url [skip ci] 2016-09-08 12:08:44 -04:00
Henry Zhu
2b4e49dd64 Docs: github issues [skip ci] 2016-09-07 17:14:55 -04:00
Daniel Tschinder
a1b46f1640 Issue and PR templates (#3690) [skip ci]
* Create PULL_REQUEST_TEMPLATE.md

* Create ISSUE_TEMPLATE.md

* Use label names in PR template

* Update ISSUE_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Update ISSUE_TEMPLATE.md
2016-09-07 16:37:49 -04:00
Henry Zhu
1445dadb23 Remove unused regenerator deps (#3703) 2016-09-07 11:24:57 -04:00
Daniel Tschinder
71dff8c834 Allow overwritting of sourceRoot (#3685)
Also replaces lodash/extend with Object.assign
2016-09-03 12:12:34 -04:00
Greenkeeper
460714b126 chore(package): update flow-bin to version 0.32.0 (#3697) [skip ci]
https://greenkeeper.io/
2016-09-03 12:04:01 -04:00
Henry Zhu
e5961592c4 babel-code-frame: babel-runtime not necessary (#3699) 2016-09-03 12:03:34 -04:00
Bo Borgerson
8f790ceeed Satisfy the "space-infix-ops" eslint rule (#3696)
Future proofing against https://github.com/babel/eslint-config-babel/pull/1.

Only one violation, even without enforcement!
2016-09-02 18:50:03 -04:00
Henry Zhu
d81e154aca remove kcheck, unused devDeps (#3693)
remove unused packages (devDeps)
2016-09-02 08:44:39 -04:00
Greenkeeper
2664c1658d chore(package): update shelljs to version 0.7.4 (#3681)
https://greenkeeper.io/
2016-09-01 23:56:35 +02:00
Henry Zhu
6d7417ba1b Update babel-types docs, contributing, babel-cli [skip ci]
Closes gh-3684
2016-09-01 16:15:32 -04:00
Henry Zhu
b3dca4fb5a v6.15.0 2016-09-01 11:03:06 -04:00
Henry Zhu
13d76e98d6 v6.15.0 changelog [skip ci] (#3691)
* v6.15.0 changelog [skip ci]

* add [skip ci]

* add [skip ci]
2016-09-01 10:54:41 -04:00
Ben Briggs
c94abcc170 Add support for preserving comments in babel-template. (#3689)
* Add support for preserving comments in babel-template.

* Add an API section to babel-template.
2016-09-01 10:50:25 -04:00
Ryan Biwer
23ea626241 Fix block scope remapping (fixes T7525) (#3662) 2016-09-01 10:48:32 -04:00
Boopathi Rajaa
953dd1df48 Fix toExpression converting arrow functions to function expressions without block body (#3687) 2016-08-31 17:01:59 -04:00
Henry Zhu
174e44f656 fix broken test from old PR 2016-08-31 14:55:38 -04:00
Boopathi Rajaa
477a72a975 Fix bug undefined reference for export declaration (#3629)
+ (Fix https://phabricator.babeljs.io/T7534)
+ Export declaration class/function/var ids now add the export
declaration path as the referenced one.
2016-08-31 14:42:33 -04:00
Stanislav Sysoev
33da726638 Not null check in babel-helper-builder-binary-assignment-operator-visitor (#3647)
Fix: T7537 — https://phabricator.babeljs.io/T7537

When transforming super call in class constructor, part of ast is replaced using method "replaceWithMultiple" here:
https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-classes/src/vanilla.js#L379

It leads to removing the node (replacing it with null) here:
https://github.com/babel/babel/blob/master/packages/babel-traverse/src/path/replacement.js#L51

But parent ExpressionsStatement is still untouched and when it reaches visitor generated in here
https://github.com/babel/babel/blob/master/packages/babel-helper-builder-binary-assignment-operator-visitor/src/index.js#L18

It blows up because expression is null from previous visitors.
2016-08-31 14:41:49 -04:00
Dan Abramov
4ac0df00f1 Add an option for custom runtime (#3612) 2016-08-31 13:59:43 -04:00
Logan Smyth
288e956699 Merge pull request #3676 from loganfsmyth/non-circular-types
Remove the cycle from babel-types/babel-traverse.
2016-08-31 10:20:41 -07:00
Logan Smyth
a0ca5ed61e Remove the cycle from babel-types/babel-traverse. 2016-08-29 19:13:19 -07:00