13320 Commits

Author SHA1 Message Date
Maxime Thirouin
90f3f9049f babel-register: update source-map-support to latest (#4577)
This allows in some case when you use other modules that use this source-map-support lib to get only a single version at the root of node_modules. For example, this can prevent issues when requiring using webpack Banner plugin (compiled code is not always requiring dependencies as you would expect).
2016-09-27 14:55:35 +02:00
Daniel Tschinder
50d2c5e930 Update CONTRIBUTING.md 2016-09-27 10:46:03 +02:00
Henry Zhu
afbe3997a8 babel-code-frame: add options for linesBefore, linesAfter (#4561)
* babel-code-frame: add options for linesBefore, linesAfter

* add example, use list of keywords

* a [skip ci]

* Update index.js
2016-09-26 16:12:35 -04:00
Moti Zilberman
03d772c2ec Computed class properties (#4500)
* Support computed class property names (#4499)

** Depends on babel/babylon#121 **

* `babel-types`: Add `computed` field to `ClassProperty`

* `babel-plugin-transform-class-properties`: handle computed property names correctly

* `babel-generator`: add tests for class properties (computed/literal, static/instance)

* doc: Update babel-types with ClassProperty.computed

* chore(package): update babylon to v6.11.0

* babel-types: move ClassProperty.computed to be last builder arg
2016-09-26 17:46:00 +02:00
Micha Reiser
a81a0d0f84 Fix fileName options passed to babylon (#4570)
The filename options used by babylon is called `sourceFilename` and not `filename`. Therefore the option should be adjusted to be called `sourceFilename`.
2016-09-26 16:31:05 +02:00
Daniel Tschinder
4115bcb97d Fix travis 2016-09-26 10:05:16 +02:00
Henry Zhu
fc2b3cb465 Fixes T2299: Prevent REPL from printing implicit 'use strict' (#4562)
* Fixes T2299: Prevent REPL from printing implicit 'use strict'

* Test for T2299

* make fixes
2016-09-25 23:29:37 -04:00
Daniel Tschinder
702259d483 Only exit if the TRAVIS_COMMIT_RANGE is not empty (#4565) 2016-09-25 23:29:13 -04:00
Logan Smyth
819cde936c Merge pull request #4511 from motiz88/fix-4462
Fix UpdateExpression handling in es2015-modules-commonjs, resolve #4462
2016-09-25 14:16:53 -07:00
Justin Ridgewell
c2ed9de7fb Flip default parameter template (#4515)
* Flip default parameter template

YMMV, I saved ~10b on a 2kb library. Not noticeable at the small scale, by why not do it anyway?

I've (unscientifically) found that flipping the default parameter conditional yields better gzip results. I think this is due to the slightly longer string it can now repeatedly match:

```js
// old
var param = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]
--------------------------------------------------------------^

// new
var param = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
------------------------------------------------------------------------^
```

Though it's entirely likely gzip will also choose up to the index of the arguments if you many default parameters at different indexes.

* Update tests
2016-09-25 14:05:53 -07:00
Logan Smyth
08b45ca853 Merge pull request #4534 from BoomTownROI/master
Fix issue with minified libraries and code coverage
2016-09-25 13:59:43 -07:00
Kay J
4dcc981d6a Removed unnecessary 'return' statements. (#3653)
* Removed unnecessary 'return' statements.

Returning a 'Promise' value in 'promise.then()' makes promise chains.
Used memory and promises are not garbage collected
until finishing 'helpers.asyncToGenerator'.

* Update test
2016-09-25 13:57:59 -07:00
Logan Smyth
66a4aec1f9 Merge pull request #4566 from loganfsmyth/fix-3695
Allow presets to be ES6 default exports.
2016-09-25 12:52:42 -07:00
Justin Johansson
bae59470da Upgraded all babel-preset-xxxs but babel-preset-es2015 to export syntax 2016-09-25 12:27:32 -07:00
Logan Smyth
ef794198e9 Allow presets to be ES6 exports. 2016-09-25 11:41:43 -07:00
Justin Johansson
e16a1657ab Align all babel-preset-xxx packages dir structures with status quo 2016-09-25 11:41:43 -07:00
Daniel Tschinder
c2d2702cf9 Fix destructuring evaluation with call expressions (#4552)
* Fix destructuring evaluation with call expressions

Do not optimize destructions with callExpressions, as the call
might change the value of a variable that we are assigning to.

Fixes #4054

* Also deopt on member expressions

members expressions might be getters who have side effects
2016-09-24 19:08:53 -04:00
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
44d44a20f9 changelog update 2016-09-23 00:51:29 -04:00
Henry Zhu
a1c0ef220a Don't build on *.md change [skip ci] 2016-09-23 00:50:36 -04:00
Henry Zhu
6ce192d883 6.11.2 changelog [skip ci] 2016-09-23 00:49:06 -04:00
Henry Zhu
fbd3f6a183 6.11.2 2016-09-23 00:44:36 -04:00
Henry Zhu
1d04d12794 Don't do the duplicate check if not an identifier (#140) 2016-09-23 00:44:13 -04:00
Henry Zhu
d7533e899f Internal: cancel build with only .md changes (#4547) 2016-09-22 17:59:47 -04:00
Daniel Tschinder
101e9e5636 Fix styling 2016-09-22 22:31:30 +02:00
Daniel Tschinder
4b11aad516 6.11.1 (#138)
* Update CHANGELOG.md

* Update CHANGELOG.md
2016-09-22 22:30:41 +02:00
Henry Zhu
8a544542db 6.11.1 2016-09-22 16:01:02 -04:00
Daniel Tschinder
952d50faf9 Make exportIdentifiers and array so that base object properties are not accounted (#137) 2016-09-22 16:00:39 -04:00
Henry Zhu
3210bbbce0 6.11.0 2016-09-22 14:08:21 -04:00
Henry Zhu
b1584cac6a link to example pr [skip ci] 2016-09-22 14:05:20 -04:00
Henry Zhu
0ca8f167c7 6.11.0 changelog [skip ci] (#136)
* 6.11.0 changelog [skip ci]

* add examples [skip ci]
2016-09-22 14:03:44 -04:00
Moti Zilberman
774e6b446b Rephrase "assigning/binding to rvalue" errors to include context (#119) (#123)
* Rephrase "assigning/binding to rvalue" error messages with context (#119)

* Fix code style in parser/lval.js

* istanbul ignore some unused branches in parser/lval.js

* Fix code style again in parser/lval.js
2016-09-22 12:02:20 -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
Kai Cataldo
650e33376a Disallow duplicate named exports (#107)
fixes #69
2016-09-22 10:20:47 -04:00
Moti Zilberman
4e1fbd48d5 Add support for computed class property names (#120) (#121) 2016-09-21 21:24:59 -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
Dan Harper
b68918e377 fix static falling through in declare class Flow AST (#135) 2016-09-21 00:17:55 -04: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
Daniel Tschinder
9cb73d8e96 fix call to this.parseMaybeAssign with correct arguments (#133) 2016-09-20 09:42:14 -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
Rob Landers
c5504c4807 Update context.js
Fix queue size
2016-09-19 15:12:33 -04:00
Daniel Tschinder
8d2fdb1515 let travis handle depth 2016-09-19 20:39:06 +02:00
Henry Zhu
374908611c add semver note to changelog [skip ci] (#131)
* add semver note to changelog [skip ci]

* fix [skip ci]
2016-09-19 11:40:37 -04:00