930 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Gilbert
81496ab7b1 Pipeline operator 2017-09-29 19:01:18 -04:00
Logan Smyth
828aec757a Merge pull request #6326 from loganfsmyth/preserve-config-identity
Preserve object identity when loading config, for improved future caching.
2017-09-29 15:36:03 -07:00
Logan Smyth
a390a92d6a Remove unused helpers prop. 2017-09-29 15:17:12 -07:00
Logan Smyth
f20f8b164f Remove unused module metadata collection. 2017-09-29 15:17:11 -07:00
Logan Smyth
3bac67b4b9 Remove the resolveModuleSource options. 2017-09-29 15:17:11 -07:00
Logan Smyth
8339e036bf Remove babel.analyse and surrounding helpers. 2017-09-29 15:17:11 -07:00
Logan Smyth
655d1cc91b Remove unused 'usedHelpers' property. 2017-09-29 15:17:10 -07:00
Logan Smyth
455cb5b8d8 Remove unused file properties. 2017-09-29 11:43:23 -07:00
Logan Smyth
c8835cbbee Remove unnecessary Store subclass. 2017-09-29 11:05:57 -07:00
Logan Smyth
1938f490b3 Move pipeline file to index. 2017-09-29 11:02:23 -07:00
Logan Smyth
048a5b8021 Reenable Flow in option-manager 2017-09-27 16:37:45 -07:00
Justin Ridgewell
23f98a753a Add throw expressions (#6325)
* Add throw expressions

Stage 2 proposal: https://github.com/tc39/proposal-throw-expressions

* Update babylon

* Add to stage 2
2017-09-27 16:15:44 -04:00
Logan Smyth
fc448ca8f2 Flatten, process, and cache incoming options by key. 2017-09-27 11:20:27 -07:00
Logan Smyth
a599c49436 Centralize call to getEnv(). 2017-09-26 22:29:48 -07:00
Logan Smyth
7455e58270 Reuse config file merge. 2017-09-26 22:29:34 -07:00
Logan Smyth
9a4b764bde Centralize config processing in class. 2017-09-26 22:29:32 -07:00
Logan Smyth
2d7cda4d28 Remove unnecessary function. 2017-09-26 22:28:56 -07:00
Logan Smyth
073a0dc823 Split the ignore logic into its own helper class. 2017-09-26 22:28:56 -07:00
Logan Smyth
14ace422c3 Fix two small typoes. 2017-09-26 15:38:55 -07:00
Logan Smyth
5eda451fb8 Remove the unused '.addImports' API from 'babel-core'. 2017-09-26 11:28:57 -07:00
Logan Smyth
ec9754bc40 Implement a new utility module for injecting module imports. 2017-09-26 11:28:56 -07:00
Henry Zhu
70547efcc1 v7.0.0-beta.2 2017-09-26 11:14:41 -04:00
Logan Smyth
5a2a5fb411 Move template object creation from core into the template transform. (#6307)
* Move template object creation into the template transform.

* use shorthand [skip ci]
2017-09-26 10:33:18 -04:00
Logan Smyth
0379060f8a addMapping method call missing name parameter (#6310)
in mergeSourceMap, addMapping method call missing name parameter
2017-09-26 10:24:19 -04:00
Henry Zhu
314bd31b85 update generator/babel-types printing, babylon (#6306)
* update generator printing, babylon [skip ci]

* Update babel-types for TS node types
2017-09-26 10:01:55 -04:00
Logan Smyth
b115ea5da7 Merge pull request #6280 from loganfsmyth/only-transform-modules
Only transform 'this'->'undefined' and inject 'use strict' if module statements are present
2017-09-23 11:24:52 -07:00
Mateusz Burzyński
9159323b1e Skip adding explicit undefined for let declarations when it is not ne… (#6288) 2017-09-21 22:26:08 -07:00
Mateusz Burzyński
88b7983e4f Fixed asyncToGenerator helper using arrow function (#6289) 2017-09-21 17:09:43 -07:00
Logan Smyth
2b88e079ef Only transform this/use strict if a module. 2017-09-20 10:19:35 -07:00
Henry Zhu
23121d2bd3 v7.0.0-beta.1 2017-09-19 16:24:07 -04:00
Henry Zhu
57584268cd move out syntax plugins to babel/babel-archive, they don't need to be updated (#6229) 2017-09-19 15:19:13 -04:00
Mateusz Burzyński
4519f95a29 Fixed buildExternalHelpers tool for var and module output types (#6260) 2017-09-19 14:44:40 -04:00
Ajay Narain Mathur
3cdb7d7f0f added instanceOf plugin to preset es2015 (#6257)
* added instanceOf plugin to preset es2015

* fixed test cases
2017-09-17 17:33:42 -04: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