102 Commits

Author SHA1 Message Date
Sam Goldman
5167d001c5 Remove @noflow as well 2016-02-28 13:25:36 -10:00
Sam Goldman
4252244d06 Remove Flow annotations and pragmas 2016-02-28 13:18:57 -10:00
Henry Zhu
6425c47537 Show a better error when trying to use a babel 5 plugin 2016-02-17 20:31:49 -05:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00:00
Logan Smyth
8c910d6a4c Merge config options into list after babelrc options - fixes T7079 2016-02-10 21:18:27 -08:00
Sebastian McKenzie
bc2f84f371 Fix API change that e7187faea64b64d65a17c57d6578903f1fff27d6 introduced that wasn't changed in babel-register. Also use an object rather than a long ass list of arguments. 2016-02-08 02:17:09 +00:00
Henry Zhu
807e190728 Merge pull request #3186 from hzoo/add-some-flow
add some more flow types
2016-02-04 11:10:02 -05:00
Henry Zhu
c2d7e95e1a add some more flow types 2016-02-04 11:07:03 -05:00
Henry Zhu
26cd517932 Merge pull request #3303 from BlackGlory/patch-1
Throw a TypeError when falsy value found in plugins
2016-02-04 10:50:38 -05:00
Sebastian McKenzie
35e8250b57 add a top level analyze method for path marking sugar 2016-02-03 21:29:47 +00:00
CrocoDillon
1ba81153a7 Use this.options.babelrc instead of opts.babelrc 2016-01-30 12:11:33 -05:00
BlackGlory
6ca20c5540 Throw a TypeError when falsy value found in plugins 2016-01-24 14:38:46 +08:00
Dmitry Soshnikov
e7187faea6 Pass per preset: merge nested preset sub-options into preset 2016-01-20 13:36:27 -08:00
Dmitry Soshnikov
3f1353d01f [RFC] Pass per preset
This introduces "pass per preset" feature, spawting a new traversal for each preset in case if the `passPerPreset` is `true` (default is `false`). This gives opportunity to define "before" and "after" presets, mimicking a similar feature from Babel 5. A rationally for this is to make plugins as short as possible, and handled only needed nodes, not afrading potential collisions in case if presets are merged.
2016-01-18 21:00:37 -08:00
Henry Zhu
51dfd2237e Internal: temporarily remove flow types
- Will need to investigate the issue regarding eslint/babel-eslint.
2016-01-17 17:14:57 -05:00
Marshall Roch
8b55f4dfc2 Upgrade to flow 0.20.0 2015-12-17 12:49:48 -08:00
Steven Luscher
603bb64db0 Clarify description of comments config.
It doesn't mean anything for “strip/output” to be “on.”
2015-12-17 10:36:10 -08:00
Amjad Masad
cb03a98b65 Add minified format option
As a follow up from #3145 we agreed to add a new format that is a
superset of the compact format option. Do things that are considered
dangerous. e.g. not printing semicolons, or print literal values
as opposed to raw values.
2015-12-09 17:34:23 -08:00
Henry Zhu
d06cfe63c2 eslint: add space-after-keywords 2015-12-06 11:30:07 -05:00
Andrew Bradley
9c27f1e86a Fixes the wrong source path being passed to SourceMapConsumer#generatedPositionFor
`generatedPositionFor` accepts a position in one of the sourcemap's *input* source files. Therefore the `source` path
should be one of the sourcemap's input `sources`, not the output `file`.
2015-11-24 16:10:10 -05:00
Andrew Bradley
bbec2114ce Fixes T2864
- Drops input mappings that cannot be mapped through Babel's sourcemap
- For example, Babel's sourcemap does not have mappings for leading comments, so any mapping from an input sourcemap for those leading comments must be dropped from the merged sourcemap
2015-11-24 16:07:37 -05:00
Sebastian McKenzie
45d4e50b39 add resolution dirname to unknown plugin/preset error message 2015-11-19 14:01:38 -08:00
Sebastian McKenzie
8fd543edae make base option plugin/preset resolving happen relative to the input filename 2015-11-18 20:31:59 -08:00
Sebastian McKenzie
ba68bd255e add package.json dirname to mergeOptions - closes #3093 2015-11-17 22:58:24 -08:00
Daniel Lo Nigro
0076204f80 Fix Flow.
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.

Closes #3064
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
5cb326a7f6 add aliases to plugins that are where they were first specified for performance 2015-11-13 16:54:47 -08:00
Sebastian McKenzie
00d3f8f7d3 Merge pull request #3022 from tadeuzagallo/patch-1
Fix the source maps merging
2015-11-12 22:53:05 -08:00
Sebastian McKenzie
d4a351fc87 add config check to package.json babel reading 2015-11-12 14:16:40 -08:00
Tadeu Zagallo
5412c4d6be Fix the source maps merging
In the current state, when the inputSourceMap has multiple sources, all the generated source map will point to the first file. Use the mapping's source instead.
2015-11-12 18:18:41 +00:00
Sebastian McKenzie
fe5aff09a4 fix remaining babel helper issues 2015-11-11 22:45:50 -08:00
Sebastian McKenzie
74a1b7fce6 make helper names more predictable - fixes #2986 2015-11-11 20:57:56 -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
5f40b53dee abstract out test runner into a module, move traceur and esnext tests to babel-preset-es2015, clean up and make existing tests more consistent 2015-11-08 21:58:01 -08:00
Sebastian McKenzie
52363ab8d8 remove err.stack hack 2015-11-08 06:56:18 -08:00
Sebastian McKenzie
defa9e1b09 change template literal to normal string 2015-11-08 06:23:30 -08:00
Sebastian McKenzie
6c2cc17d1d fix GLOBAL_VISITOR_PROPS usage 2015-11-08 06:14:23 -08:00
Sebastian McKenzie
c8901cf98d cherry-pick and fix merge conflicts in #2695 - closes #2695 2015-11-08 06:08:18 -08:00
Sebastian McKenzie
e40c93791c disallow plugins creating catch-all enter/exit handlers - closes #2906 2015-11-08 06:02:57 -08:00
Sebastian McKenzie
3076063d47 move babel/register into a separate package 2015-11-08 04:05:13 -08:00
Sebastian McKenzie
b6807021a8 perform esModule plugin normalisation in the normalisePlugin method rather than only doing it for string plugins 2015-11-08 02:47:22 -08:00
Sebastian McKenzie
bcfe582fef remove json files in favor of just plain js files 2015-11-04 00:00:08 +00:00
Sebastian McKenzie
dd76272fb1 fix source map merging - closes #2522, fixes #2336 2015-11-03 14:24:36 +00:00
Sebastian McKenzie
8ffc7012cc autoclear cache when it gets too big - fixes #2678 2015-11-03 10:57:32 +00:00
Sebastian McKenzie
a639bffcd6 clean up auxiliaryComment 2015-11-03 02:46:00 +00:00
Sebastian McKenzie
336be752f8 remove state arg from pre and post plugin hooks 2015-11-03 01:19:52 +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
7a3fef26fa update tests 2015-11-02 07:11:12 +00:00
Sebastian McKenzie
41ccee89c9 fix runtime plugin helper generation - fixes #2726 2015-11-02 06:56:36 +00:00
Sebastian McKenzie
9fe9a1e76e ensure there's a newline after prepended original shebang - fixes #2719 2015-11-02 05:25:12 +00:00