3001 Commits

Author SHA1 Message Date
Henry Zhu
58da50aace simplify register test (#6391) 2017-10-16 11:09:11 -04:00
Mateusz Burzyński
1215db2dd3 Fixed es2015-template-literals dependencies 2017-10-15 18:05:05 +02:00
Henry Zhu
94da889ab7 v7.0.0-beta.3 2017-10-15 09:12:00 -04:00
Sven SAULEAU
0951720a81 Merge pull request #6481 from nicolo-ribaudo/fn-bind-dupl-nodes-6458
Don't insert duplicated nodes when transforming function bind
2017-10-14 15:49:55 +02:00
Nicolò Ribaudo
4a4c2f37bd Don't insert duplicated nodes when transforming function bind
Fixes #6458
2017-10-13 22:49:13 +02:00
Qantas94Heavy
5f285c1034 Evaluate computed class props only once (#6240) (#6466)
Previously, computed class properties would be evaluated every time a
new instance of the class was created. This means the property name
may have changed between different instances, as well as potential side
effects.

This commit fixes this by storing the computed value in a separate
variable.
2017-10-13 12:19:48 +02:00
aardito2
bfa167cc21 Add additional tests for ignore/only (#5647) 2017-10-12 20:20:07 -05:00
Brian Ng
be58de2b62 Use no-undefined-identifier eslint rule in packages (#6457) 2017-10-11 01:11:48 -04:00
Anton Rusinov
fcdfc61bdb Move plugin processing to top of plugins (#6381)
* centralize plugin options

* Centralize plugins options

- move more options to the top
- move validations that depend on options to the top

* use isLoose option

* Move more validations to the top

* Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top

* fix eslint errors

* remove unused parameter

* set default systemGlobal value

* Revert "Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top"

This reverts commit b3855302d17fa19d8acb4c8accab3680c8d2710e.

* Revert "Move more validations to the top"

This reverts commit e5861d8a034ff8f553391f55654f753bcf428a5d.

* fix allowMutablePropsOnTags option usage

* improve naming

* change Contructor definition for sake of consistency

* move allowMutablePropsOnTags validation to the top

* add missing !
2017-10-10 00:51:34 -04:00
Logan Smyth
d89063bb32 Ensure that tests run with the monorepo's version of babel-core (#6454) 2017-10-10 00:29:23 -04:00
Mateusz Burzyński
e52f6caa18 Drop old compatibility if statement targeting babel@6.15 and earlier (#6451) 2017-10-09 13:49:06 -04:00
Logan Smyth
7d6b15bba9 Regenerate types with scripts. 2017-10-08 22:31:31 -04:00
Henry Zhu
35646f15a4 reomve unused packages, unused file 2017-10-07 08:51:38 -04:00
Logan Smyth
d511cfc0e2 Bit more refactoring from last PR. 2017-10-05 22:33:10 -04:00
Logan Smyth
b3331c0217 Ensure that the options object always exists. 2017-10-05 22:04:09 -04:00
Logan Smyth
ca4460c0b8 Standardize on {}|void instead of ?{} options. 2017-10-05 22:04:08 -04:00
Logan Smyth
597f1a12cf Refactor loaded descriptors to allow mutation of options. 2017-10-05 21:58:36 -04:00
Logan Smyth
e01ac56b1c Simplify descriptor loading. 2017-10-05 21:52:05 -04:00
Logan Smyth
1e12bb6a23 Add more types around descriptor processing. 2017-10-05 21:52:05 -04:00
Brian Ng
38355d9230
Tweak babel-preset-env for monorepo 2017-10-05 17:35:16 -05:00
Henry Zhu
714456f191 update regenerator to latest [skip ci] 2017-10-05 10:57:36 -04:00
Logan Smyth
70a5b77943 Move babel-standalone's build scripts to the repo root. (#6383) 2017-10-05 10:44:56 -04:00
William
36d8a13f4d Fix catch error on do expression and add tests (#6372)
Fixes #6331
2017-10-04 18:19:54 +02:00
Diogo Franco
02d0b74d37 Extend babel-template to work as a template tag (#5001)
Supports:

```js
// these all should produce "code;" when generated
template`code;`();
template`${0}`(t.identifier('code'));
template`${'code'}`({ code: t.identifier('code') });
template`${t.identifier('code')}`()
template({})`code`();
```
2017-10-04 13:07:02 +09:00
Logan Smyth
93c3c147d6 Upgrade selfhosted compilation to beta.2 (Take 2) (#6382)
* Avoid bug in current version of typeof-symbol transform.

* Selfhost Babel on most recent beta release.
2017-10-03 17:04:30 -07:00
Logan Smyth
5ea54f6cac Fix "module" external helpers output (#6377)
* Move namespace init.

* Move call to helper generation.

* Generate named module exports properly.

* Ensure that helper names are valid identifiers.
2017-10-03 13:58:47 -07:00
Mateusz Burzyński
68182bd69f Fixed reusing node in destructuring plugin, which caused caching issue in helper-module-transforms (#6374) 2017-10-03 15:25:41 -04:00
Henry Zhu
91cde0148d note about .ts extension in the preset [skip ci] (#6365) 2017-10-02 17:42:56 -04:00
Nicolò Ribaudo
18dcdc958b export foo -> module.exports = foo in runtime helers (#6366) 2017-10-02 17:40:55 -04:00
Logan Smyth
35312dc3d2 Track options on the plugin instance to avoid array pair usage. 2017-10-02 14:15:40 -07:00
Logan Smyth
f9bac2a358 Implement caching of plugins/presets/options 2017-10-02 14:09:59 -07:00
Logan Smyth
f02e6847cf Add browser versions of the transform files. 2017-10-02 13:55:37 -07:00
Logan Smyth
eae76e5b89 Break apart the File class into multiple files and add type definitions. 2017-10-02 13:55:37 -07:00
Logan Smyth
c1df126b83 Remove wrap function and calculate code frames earlier. 2017-10-02 13:48:02 -07:00
Henry Zhu
4a8137c6b4 Merge pull request #6335 from jridgewell/pipeline
Pipeline operator
2017-10-02 16:32:15 -04:00
Nicolò Ribaudo
db6626718f Document babel helpers (#6364) [skip ci] 2017-10-02 16:29:49 -04:00
Justin Ridgewell
73fba55c9f Requeueing sometimes has wrong scope (#6351)
This prevents a requeued path from inheriting a totally wrong scope later on. I can't find exactly where this is happening, but either way a path should only inherit scope from it's ancestors.
2017-10-02 15:26:10 -04:00
Nicolò Ribaudo
977c72250a Add support for helper dependencies (#6254)
* Add support for helpers dependencies.

They are used like this:

    helpers.main = defineHelper(`
        import dep from "dependency";
        export default function main() { return dependency; }
    `);

    helpers.dependency = defineHelper(`ì
        export default function dep() { return 0; }
    `);

* Clone import references

* Don't make test helpers name depend on the order the tests are run
2017-10-02 10:10:52 -07:00
Brian Ng
9cd4716cb4 Add --include-dotfiles option to babel-cli (#6232) 2017-10-02 08:55:53 -05:00
Henry Zhu
6816b26994 Merge pull request #6356 from JeromeFitz/babel-messages-inline
Remove babel-messages and inline the usages
2017-09-30 23:25:06 -04:00
Mateusz Burzyński
d8d35ac0c4 Annotating taggedTemplateLiteral calls as #__PURE__ (#6327) 2017-09-30 17:30:44 -04:00
Brian Ng
789ce386ed Bump prettier (#6355) 2017-09-30 09:53:52 -04:00
JeromeFitz
ae168edcfa Remove babel-messages (#6347), continuation of #6352
package.json "babel-messages" removed:
- babel-core
- babel-helper-replace-supers
- babel-plugin-transform-es2015-classes
- babel-traverse

"messages" remove from:
- babel-plugin-check-es2015-constants/src/index.js
- babel-plugin-transform-es2015-for-of/src/index.js

export "babel-messages" removed from:
- babel-core/src/index.js

import "babel-messages" removed from:
- babel-generator/src/index.js
- babel-helper-replace-supers/src/index.js
- babel-traverse/src/index.js
- babel-traverse/src/scope/index.js
- babel-traverse/src/visitors.js

package "babel-messages" removed completely.

💯️ All tests pass.
2017-09-30 09:31:53 -04:00
Abhilash Singh
6230855b71 unshiftContainer seems to incorrectly handle function params #6150 (#6354) 2017-09-30 09:14:51 -04:00
rouzbeh84
aaeebfaf00 inlines babel-messages on the following files:
option-manager.js... /babel-core/src/config/
 build-external-helpers.js... /packages/babel-core/src/tools/
 index.js... /packages/babel-generator/src
2017-09-30 02:19:32 -07:00
Justin Ridgewell
0e432f0e0d Remove debug closures (#6349)
God, can you imagine how many useless closures this was creating?
2017-09-29 21:31:43 -04:00
Justin Ridgewell
e58409b144 Indirect eval 2017-09-29 19:01:18 -04:00
Justin Ridgewell
4b440110a1 Optimize 0 param arrow 2017-09-29 19:01:18 -04:00
Justin Ridgewell
60335ce1ad Ensure left is evaluated before right 2017-09-29 19:01:18 -04:00
Gilbert
81496ab7b1 Pipeline operator 2017-09-29 19:01:18 -04:00