13320 Commits

Author SHA1 Message Date
Daniel Tschinder
9a0dd4e001 Fix jsx-source to not fail without filename (#6239) 2017-09-16 02:44:48 -04:00
Brian Ng
583a875d22 Add core-js stubs for parseFloat and parseInt to babel-polyfill (#6256) 2017-09-16 02:43:35 -04:00
Brian Ng
5f5ad940ed Bump regenerator-runtime version in babel-polyfill (#6255) 2017-09-16 02:42:46 -04:00
Logan Smyth
f35cf8185b Change usage of flag that was renamed. 2017-09-15 11:43:08 -07:00
Brian Ng
7f390b0282 Make terminator paren comment check more strict (#5651) 2017-09-15 11:06:24 -07:00
Henry Zhu
4df30fc300 7.0.0-beta.23 2017-09-14 20:38:17 -04:00
Henry Zhu
bf93be47c2 Merge pull request #6244 from loganfsmyth/remove-strict-toggling-wildcard-interop
Remove strict toggling wildcard interop
2017-09-14 11:19:46 -04:00
Brian Ng
cdb34c3aa2 Add support for new.target transform (#414) 2017-09-14 11:06:53 -04:00
Logan Smyth
3c93189fce Remove useless stict toggle from strict transform. 2017-09-13 23:30:41 -07:00
Logan Smyth
b6ae55153c Misc documentation fix. 2017-09-13 23:30:41 -07:00
Logan Smyth
2801bfe35c Remove 'strict:false' directive behavior. Use 'strictMode:false'. 2017-09-13 23:30:41 -07:00
Logan Smyth
637bba542a Remove interop toggling behavior of 'strict'. 2017-09-13 23:30:40 -07:00
Logan Smyth
c65742602b Add some docs for why template literals use a chain of .concat() calls. 2017-09-13 13:42:20 -07:00
Logan Smyth
18f77b3aa9 Merge pull request #6238 from loganfsmyth/reexport-name-priority
Named exports should always take priority over star exports
2017-09-13 13:33:50 -07:00
Stephen Scott
f3fe5001e6 Flesh out readme (#410) 2017-09-13 12:29:30 -05:00
Maël Nison
0ea295e83b Make sure that export * from does not overwrite named exports. 2017-09-12 22:32:09 -07:00
Logan Smyth
634c750558 Ensure helpers that reference globals continue to reference the globals properly. 2017-09-12 22:15:16 -07:00
Logan Smyth
158e9fbfd7 Represent helpers as simple modules. 2017-09-12 22:15:16 -07:00
Sven SAULEAU
0c5fae2faa Make sure source type is module when parsing .mjs (#5700)
* feat: force source type module for mjs extension

* style: fix lint
2017-09-12 20:59:00 -07:00
Logan Smyth
7179136401 Ensure the AMD/UMD loaders all have params for each import to avoid lazy-loading (#6237) 2017-09-12 20:13:16 -07:00
Maël Nison
5bb6a83fa8 Add new tests for export * from with other names. 2017-09-12 19:51:48 -07:00
Logan Smyth
5006c81b77 Apply the new module transform the the babel-runtime helper files. 2017-09-12 17:51:52 -07:00
Logan Smyth
1e750a945c Convert CommonJS to use new shared implementation. 2017-09-12 17:17:41 -07:00
Logan Smyth
f17d30692c Convert AMD to use new shared implementation. 2017-09-12 17:17:41 -07:00
Logan Smyth
95e08b6d2a Convert UMD to use new implementation of module logic. 2017-09-12 17:17:41 -07:00
Logan Smyth
47a254025a Return a unique identifier node for each use. 2017-09-12 17:17:41 -07:00
Logan Smyth
20679979fc Remove the unused 'scope' param from 'traverse.hasType'. 2017-09-12 16:48:05 -07:00
Henry Zhu
feed22c822 2.0.0-beta.0 2017-09-12 09:40:53 -04:00
Henry Zhu
a381f9b5f0 update to beta.0 (#413) 2017-09-12 09:40:35 -04:00
Henry Zhu
1cdacf85ae update types readme [skip ci] 2017-09-11 23:04:12 -04:00
Henry Zhu
1c13250807 v7.0.0-beta.0 v7.0.0-beta.0 2017-09-11 23:01:41 -04:00
Laurin Quast
8742012b5e Add --keep-file-extension option to babel-cli (#6221)
* Add --keep-module-extension option to babel-cli

* Rename keep-module-extension option to keep-file-extension; Change option to preserve all file extensions
2017-09-11 18:06:44 -04:00
Justin Ridgewell
4daf11528c Return inserted/replaced paths (#5710)
* Return inserted/replaced paths

This gives `Path`’s replacement and insertion methods a consistent
return value: the inserted/replaced paths.

Before, they could return `undefined`, a `node`, or a the current path
inside an array. It was kinda pointless.  But now they always return an
array of paths, which is useful for solving
https://github.com/babel/babel/pull/4935#discussion_r96151368.

* Return inserted nodes and not BlockStatement

Addded test for bug #4363

* Cleanups

- `#replaceWith` will now return the current path if it's the same node
- `#insertAfter` and `#insertBefore` use public Path APIs now
- Makes container insertion faster (single splice call)
- Use public APIs in container insertion
- Replacing a statement with an expression returns the expression's path
- Replacing an expression with multiple statements returns the inserted
  closure's body's paths.
2017-09-11 16:07:04 -04:00
Mateusz Burzyński
c47258d68c Annotating transformed classes with #__PURE__ comment (#6209) 2017-09-11 11:18:37 -04:00
Ben Newman
c4f6a7a06f Add failing test case for object rest after array rest, and fix it. (#6213)
* Add failing test case for object rest after array rest.

Discovered while upgrading https://github.com/meteor/babel to Babel 7.

The error is:

  1) babel-plugin-transform-object-rest-spread/object rest with array rest:
     TypeError: /Users/ben/dev/babel/packages/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/actual.js: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got null
      at Object.validate (packages/babel-types/lib/definitions/index.js:73:13)
      at validate (packages/babel-types/lib/index.js:460:9)
      at Object.builder (packages/babel-types/lib/index.js:428:7)
      at Object.RestElement (packages/babel-plugin-transform-object-rest-spread/lib/index.js:157:41)
      at NodePath._call (packages/babel-traverse/lib/path/context.js:53:20)
      at NodePath.call (packages/babel-traverse/lib/path/context.js:40:17)
      at NodePath.visit (packages/babel-traverse/lib/path/context.js:84:12)
      ...

* Fix object rest following array rest. (#6213)

* Avoid treating array ...rest elements as object ...rest properties.

* Also avoid treating ...rest parameters as object ...rest properties.

Returning early if the parent was an ArrayPattern was not quite enough,
since a RestElement can appear as a parameter in a Function as well.

* Move RestElement parent check earlier in visitor method.
2017-09-11 11:16:14 -04:00
Sven SAULEAU
1341e4163b fix(preset-es2015): pass loose option (#6224) 2017-09-11 10:37:18 -04:00
Sven SAULEAU
3bd142ba8a Merge pull request #716 from babel/rollup
Bump rollup
2017-09-10 09:36:52 +02:00
Lukas Geiger
b6467a68ca Add option to define output directory relative to the input (#5421)
* Fix output directory if filename is given

* Add test for relative output path

* Add option to define output dir relative to input

* Add tests for --copy-files

* Test error handling for wrong arguments
2017-09-09 20:38:06 -04:00
Daniel Tschinder
5565e1b406 Correctly requeue CallExpression in AMD transform (#5497)
* Correctly requeue the define()-CallExpression

* Use pushContainer
2017-09-09 20:33:35 -04:00
Ruben Verborgh
6560a29c36 Redeclaring a variable counts as a modification (#6219)
* Redeclaring a variable counts as a modification.

Fixes #6217.

* Remove "existing" logic from Binding.

Was added in #5745, but no longer triggered since 6536e605a.
2017-09-08 23:02:26 -04:00
Justin Ridgewell
4e612058c0 Do not fix linting errors in precommit hooks (#6218)
It's just damn annoying. Supersedes #5908.
2017-09-08 19:52:49 -04:00
Brian Ng
b8544de9a8
Bump rollup 2017-09-08 10:00:59 -05:00
Brian Ng
e8c533ba68 Merge pull request #715 from nicolo-ribaudo/makePredicate-comment
Remove outdated code
2017-09-08 09:56:16 -05:00
Nicolò Ribaudo
b97c534b32
Remove outdated imports
They were not needed since c4fb3fe742c61ee2dd0ab1b1197a254d3c9f6a55
because now each files declare a new class
instead of adding method to the existing one.
2017-09-08 15:24:46 +02:00
Nicolò Ribaudo
ef31a148a6
Remove outdated comment
The described code was removed in 5f1c3c3b8de7b6f450d4a6b005e689c3f04477b0 (2 years ago!)
2017-09-08 12:59:22 +02:00
Nicolò Ribaudo
4e7961dcf8 Use /bin/bash instead of /bin/sh in scripts
`/bin/sh` isn't always an alias of `/bin/bash`, so bash-specific syntax broke the scripts.
(like 777a9ae6e4/scripts/_get-test-directories.sh (L7))
2017-09-07 17:19:40 -07:00
Karl Cheng
65bea96544 Add support for class private methods (#703)
* Add support for class private methods

This commit adds parser support for the TC39 Stage 2 Private Methods
proposal.

This commit also changes "key" in ClassPrivateProperty from an
Identifier to a PrivateName, as well as disallowing #constructor as a
valid private field name.

* Add tests for string literal get/set/async

These should be treated as regular methods and not special get/set/async
behaviour.

* Add tests for class private methods

This also removes a test from the Test262 whitelist that failed before
the changes for private methods support and now passes.

* Modify class private prop tests for PrivateName

* Add class private prop tests for #constructor

* Fix existing ASI test case failure
2017-09-06 18:09:12 -04:00
greenkeeper[bot]
b65b5a2f1c Update flow-bin to the latest version 🚀 (#714)
* chore(package): update flow-bin to version 0.54.1

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile
2017-09-06 13:56:26 -04:00
Henry Zhu
bbac1ebe45 2.0.0-alpha.20 2017-09-06 11:36:30 -04:00
Henry Zhu
7c70b27b53 add basic example [skip ci] (#409) 2017-09-06 00:03:06 -04:00