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 033681af89 , reversing
changes made to a2d66c0fc8 .
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
Sebastian McKenzie
a639bffcd6
clean up auxiliaryComment
2015-11-03 02:46:00 +00:00
Sebastian McKenzie
2bdc222c0b
wWhen merging options, take precedence over the current array - fixes #2648
2015-11-02 19:21:24 +00:00
Sebastian McKenzie
bfef4fa46a
fix transform locations in tests
2015-10-31 20:52:36 +00:00
Sebastian McKenzie
ae7d5367f1
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
3720174a32
update tests to reflect new whitelist by default model
2015-09-05 20:02:36 +01:00
Sebastian McKenzie
3ef9bffcc2
split up babel core into multiple modules
2015-08-11 17:40:59 +01:00