56 Commits

Author SHA1 Message Date
Logan Smyth
db28c18458 Disallow nested '.env' blocks since they are useless. 2017-11-24 17:45:27 -08: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
Henry Zhu
691f90a774 Scoped: change test imports to @babel/ [skip ci] 2017-10-16 22:49:56 -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
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
2b88e079ef Only transform this/use strict if a module. 2017-09-20 10:19:35 -07:00
Mateusz Burzyński
4519f95a29 Fixed buildExternalHelpers tool for var and module output types (#6260) 2017-09-19 14:44:40 -04:00
Daniel Tschinder
b3372a572d Remove whitespace generation (#5833)
* Remove whitespace generation and rely on default printing

Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines

* Fix a few more fixtures
2017-06-27 21:57:02 -05:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Logan Smyth
2b86d353d6 Restrict Babel's plugins/presets to a single target. (#5547) 2017-04-17 11:45:49 -07:00
Logan Smyth
d7e10a3adc Misc refactoring of OptionManager. 2017-04-10 10:01:01 -07:00
Logan Smyth
878a7c5fdb Add tests to test the plugin ordering. (#5571) 2017-03-31 18:52:58 -07:00
Henry Zhu
3d74dc044f fix ci 2017-03-27 17:26:39 -04:00
Henry Zhu
67253c5d27 babelrc false to relevant files 2017-03-27 17:19:02 -04:00
Logan Smyth
12a2124d16 Move the deeply nested option logic to a toplevel folder. 2017-03-17 00:03:58 -07:00
Logan Smyth
6c4810cea5 Move Plugin class to be part of config loading, independent of File. 2017-03-17 00:03:58 -07:00
Logan Smyth
39c862c195 Make only/ignore relative to cwd/config file and move only/ignore checking all to core. (#5487)
* Make only/ignore relative to cwd/config file and move only/ignore checking all to core.
2017-03-16 23:22:43 -07:00
Logan Smyth
4f72232ca9 Move option parsing to babel-cli. 2017-03-13 11:06:46 -07:00
Logan Smyth
305165eda4 Remove Logger usage from options processing. 2017-03-09 16:13:38 -08:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Daniel Tschinder
87ca6150ae [7.0] Remove bc code from preset handling and preset-es2015 (#5128)
* Remove bc code from preset handling and preset-es2015

* Add more tests

* Only allow functions for presets

* Fix lint
2017-02-22 14:58:01 +01:00
Henry Zhu
9083bd6283 Merge branch 'master' into 7.0 2017-02-09 18:36:02 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Jordan Jones
1742035a98 [7.0] Fixes #5108, browser.js and browser.js test removed (#5124)
* Fixes #5108, browser.js and browser.js test removed

* Moved api/node.js to index.js and adjusted associated file references
2017-01-19 22:43:11 -05:00
Sergey Rubanov
292c3ca206 Refactor test packages to use ES modules instead of CJS (#5138) 2017-01-16 11:25:04 -05:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Richard Macklin
4ea1007645 Remove unneeded tests
Previously these were testing the logic that is now encapsulated in
getPossiblePresetNames and tested in a unit test
2016-10-16 11:07:16 -07:00
Richard Macklin
e24f07dfda Extract resolvePreset method to babel-core public API
This encapsulates the logic for turning an acceptable preset name into
the absolute path for that preset. It can be used to preprocess a
presets list to map each preset to its absolute path, which is necessary
if `babel.transform` is going to be executed on a file outside the
directory subtree where the presets are installed.

This adds a getPossiblePresetNames helper encapsulating the logic for
what preset names we should try to resolve, and the resolvePreset method
just calls this helper and actually resolves them.
2016-10-16 11:06:47 -07:00
Richard Macklin
f4389a1886 Extract resolvePlugin method to babel-core public API
This encapsulates the logic for turning an acceptable plugin name into
the absolute path for that plugin. It can be used to preprocess a
plugins list to map each plugin to its absolute path, which is necessary
if `babel.transform` is going to be executed on a file outside the
directory subtree where the plugins are installed.

This adds a getPossiblePluginNames helper encapsulating the logic for
what plugin names we should try to resolve, and the resolvePlugin method
just calls this helper and actually resolves them.
2016-10-16 10:52:13 -07:00
Andrew Levine
9f8ab29213 Change usage of "suite"/"test" in unit-tests to "describe"/"it" (#4734)
Fixes #4733
2016-10-15 18:45:35 -04:00
Andrew Levine
c0038221d7 Run ESLint on test files, and fix lint errors in test files (#4732) 2016-10-15 18:27:48 -04:00
Henry Zhu
b2eb5eca6f babel-core: add options for different parser/generator (#3561)
* babel-core: add options for different parser/generator

* test for experiemental plugins, other babylon options

* fix passing options into parser

* Fix when no code is provided

* fixup tests

* fix tests again

* use filename and fallback to cwd
2016-09-27 09:09:31 -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
Sebastian McKenzie
07b3dc18a0 Add wrapPluginVisitorMethod option to allow introspection and metrics tracking of plugins (#3659) 2016-08-20 10:36:52 -04:00
Jordan Scales
ca27cf135d Revert "Merge pull request #3641 from babel/guy-fieri" (#3646)
This reverts commit 033681af8941d9678961f985c13e500c3c70f337, reversing
changes made to a2d66c0fc8ee58e82be3efd59173803e66dee3e0.

I brought you into this world, and I can take you out.
2016-08-15 11:35:39 -04:00
James Kyle
10f4546fef Remove unnecessary import 2016-08-08 17:34:01 -07:00
James Kyle
f36d07d303 Fixes from PR comments 2016-08-08 17:32:58 -07:00
Jesse McCarthy
ff044bbb0f Use more ideal mocha hooks (#3446)
* setup() instead of manual before().
* suiteTeardown() instead of afterEach().
2016-05-19 08:26:59 -04:00
Amjad Masad
f6ff14624f localize side-effectful test 2016-03-16 18:13:40 -07:00
Amjad Masad
fd7b1c3386 don't rely on scope to get the type alias 2016-03-10 12:13:05 -08:00
Henry Zhu
9182fcd71b make a test for #3303 2016-02-04 10:54:14 -05:00
Sebastian McKenzie
35e8250b57 add a top level analyze method for path marking sugar 2016-02-03 21:29:47 +00:00
Dmitry Soshnikov
845a4fa557 Pass per preset: Use full function systax in test for old Node versions 2016-01-21 15:14:42 -08:00
Dmitry Soshnikov
e2486b5f71 Pass per preset: added unit test 2016-01-21 14:54:40 -08:00
Sebastian McKenzie
884252b90f increase test coverage 2015-11-10 14:26:40 -08:00
Sebastian McKenzie
a55f210c7f fix buildExternalHelpers whitelist not including underscored helpers - fixes #2940 2015-11-10 03:40:35 -08:00
Sebastian McKenzie
dd76272fb1 fix source map merging - closes #2522, fixes #2336 2015-11-03 14:24:36 +00:00