521 Commits

Author SHA1 Message Date
Logan Smyth
4a5d551370 Set babelrc:false on config load for more consistent loading. 2017-11-09 12:26:40 -08:00
Logan Smyth
2bfa2eb5cd Apply option defaults when transforming, not up front. 2017-11-09 12:20:52 -08:00
Logan Smyth
fc7fcfac0a Expose a clear API for plugins to override the parser/generator. 2017-11-09 10:34:12 -08:00
Logan Smyth
52d337e4d9 Move plugin object validation into plugin file. 2017-11-09 10:24:04 -08:00
Logan Smyth
98969b8a73
Standardize on Sync suffix for sync APIs (with backward-compat) (#6780) 2017-11-09 10:22:51 -08:00
Logan Smyth
4d7d4605b6 Centralize parserOpts and generatorOpts normalization. 2017-11-08 17:06:01 -08:00
Logan Smyth
39119f88e7 Pass explicit options list to babel-code-frame 2017-11-08 17:00:02 -08:00
Logan Smyth
6684986372 Expose an official API to access the current filename. 2017-11-08 16:48:25 -08:00
Logan Smyth
82513465ee Pass an explicit whitelist of options down into babel-generator. 2017-11-08 16:41:33 -08:00
Logan Smyth
9e2828322e
Merge pull request #6556 from loganfsmyth/early-validation
Strictly validate Babel's options to centralize Flow refinement of datatype
2017-11-02 16:24:36 -07:00
Daniel Tschinder
3b540e3f5a
Integrate babylon into babel workflow 2017-11-01 23:26:51 +01:00
Logan Smyth
1d6cbd8dce Standardize descriptor creation. 2017-10-25 15:55:58 -07:00
Logan Smyth
fed2a14da1 Fail if there are cycles in config files. 2017-10-25 15:55:58 -07:00
Logan Smyth
0f31ce5686 Disallow 'null' as a general blank option placeholder. 2017-10-25 15:55:58 -07:00
Logan Smyth
64abf75d1f Perform option validation up front to avoid repeating assertions. 2017-10-25 15:55:58 -07:00
Logan Smyth
3673fbbd52 Refactor config item processing. 2017-10-25 15:55:58 -07:00
Logan Smyth
14901aa74f Remove the .loc from config items. 2017-10-25 15:55:57 -07:00
Logan Smyth
a25942bda9 Remove unused suppressDeprecationMessages option. 2017-10-25 15:55:57 -07:00
Logan Smyth
107648cd0b Remove unused 'mode' option. 2017-10-25 15:55:57 -07:00
Logan Smyth
0a2a0bb254 Remove the relative babel-core option. 2017-10-25 15:55:57 -07:00
Borales
416e9aba39 Providing File.has method for core/transformation package 2017-10-22 00:45:40 +02:00
Alex Jover
39d05da3ed fix(babel-core): add missing extension to package.json dependency (#6524) 2017-10-21 11:46:10 +02:00
Nicolò Ribaudo
d2af56bcae Fix helpers dependencies loading 2017-10-19 00:37:09 +02:00
Robert Rossmann
e6d44fd68e babel-core: Pass the right err to callback in transformFile() (#6503) 2017-10-18 14:14:35 -07:00
Logan Smyth
1b4307205e Limit file-based plugins/presets to only exporting functions. (#6494) 2017-10-18 10:17:45 -07:00
Logan Smyth
445b252bc4 Simplify dirname option in plugins/presets? (#6436) 2017-10-18 08:59:32 -07:00
James Kyle
5c47929983 Export File from babel-core again 2017-10-18 12:28:56 +11:00
Mateusz Burzyński
859ea4b175 Scoped: updated numerous docs with scoped packages change [skip ci] 2017-10-16 22:49:57 -04:00
Henry Zhu
696df10f51 Scoped: update more babel- to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -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
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
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
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