Satyajit Sahoo
7ae6e1e5a0
Add /*#__PURE__*/ annotatiotion for babel-plugin-async-to-generator. Fixes #6572
2017-11-12 18:31:48 +05:30
Logan Smyth
2bfa2eb5cd
Apply option defaults when transforming, not up front.
2017-11-09 12:20:52 -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
Henry Zhu
9ac326b075
remove es20xx prefixes from plugins and rename folders ( #6575 )
2017-10-28 20:43:15 -04: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
1b4307205e
Limit file-based plugins/presets to only exporting functions. ( #6494 )
2017-10-18 10:17:45 -07:00
Mateusz Burzyński
47fa189053
Scoped: update more babel- to @babel/ [skip ci]
2017-10-16 22:49:56 -04:00
Henry Zhu
691f90a774
Scoped: change test imports to @babel/ [skip ci]
2017-10-16 22:49:56 -04:00
aardito2
bfa167cc21
Add additional tests for ignore/only ( #5647 )
2017-10-12 20:20:07 -05: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
eae76e5b89
Break apart the File class into multiple files and add type definitions.
2017-10-02 13:55:37 -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
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
fc448ca8f2
Flatten, process, and cache incoming options by key.
2017-09-27 11:20:27 -07:00
Logan Smyth
5eda451fb8
Remove the unused '.addImports' API from 'babel-core'.
2017-09-26 11:28:57 -07: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
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
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
Logan Smyth
1e750a945c
Convert CommonJS to use new shared implementation.
2017-09-12 17:17:41 -07:00
Mateusz Burzyński
c47258d68c
Annotating transformed classes with #__PURE__ comment ( #6209 )
2017-09-11 11:18:37 -04:00
Mateusz Burzyński
fffa604023
Fixed regenerator related fixtures
2017-08-16 10:02:33 +02:00
Henry Zhu
0f823beeb1
Newlines in fixtures ( #6044 )
...
* write newlines for fixtures
* rerun fixtures
2017-08-02 15:35:29 -04:00
chocolateboy
605adc922d
allow PluginPass.file.addImport to create empty import statements ( #6022 )
...
* allow PluginPass.file.addImport to create empty import statements; fixes #6021
omitting addImport's second argument creates an import statement with an
empty `specifiers` array i.e. an empty import statement:
plugin:
Program (path, { file }) {
file.addImport('foo-bar/register')
}
output:
import "foo-bar/register";
2017-07-28 12:37:00 -04:00
Peeyush Kushwaha
4a35243118
Non string computed keys in object-rest-spread ( #5757 )
2017-07-25 09:46:52 -05:00
Justin Ridgewell
63204ae51e
Remove maybePopFromStatements ( #5945 )
...
It prevented you from pushing into the `params` of a function.
```js
fnpath.pushContainer("params", t.identifier("memo"))
```
2017-07-18 14:55:33 -04:00
Brian Ng
58ec149c52
Fix some unneeded semis in test fixtures ( #5892 )
2017-06-27 22:15:10 -05: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
Henry Zhu
bd9e1860d0
for-of optimization on arrays/known functions that return arrays ( #4747 )
2017-06-26 16:47:39 -04:00
Peeyush Kushwaha
ee389384bc
Update regenerator test relying on wrong semantics
...
Broken by fix to switch statements in block scoping
2017-05-25 13:51:13 +05:30
Steven Hargrove
d5aa6d3ff8
Fix for #4943 "Calling an async function with default parameter as function for arguments checking handled synchonous" ( #5688 )
...
* moved applying arguments inside new Promise handler block
* updated test fixture to reflect change
* corrected the apply to use correct scope and arguments
* added regression test for issue #4943 , added async-to-generator/async-default-arguments test
* added regression test for issue #4943
* switched back to using arrow function, since now pointing to v7 release base branch
* simplified async-to-generator regression test for issue #4943 , imrproved change to self/arguments refs by using arrow function on returned promise
* updated text fixtures
* removed es2015 preset usage from issue #4943 regression exec test
* added use strict to test fixture
* added use strict to test fixture
* added destructing transform to test options
* removed use strict from exec test
* added parameters & destructing transforms to test
2017-05-03 21:44:41 -07:00
Logan Smyth
d1d812edff
Fix a regression from adding negation support in #5625 . ( #5641 )
2017-04-17 18:13:37 -07:00
Logan Smyth
2b86d353d6
Restrict Babel's plugins/presets to a single target. ( #5547 )
2017-04-17 11:45:49 -07:00
Logan Smyth
c59e9f5f0e
Merge pull request #5608 from loganfsmyth/config-cache
...
Cache configs based on mtime and allow .babelrc.js functions
2017-04-17 11:43:31 -07:00
Logan Smyth
1c078e5a76
Add tests for caching API and .babelrc.js functions.
2017-04-17 11:20:34 -07:00
Logan Smyth
ad250ef10a
Merge pull request #5602 from loganfsmyth/option-manager-cleanup
...
Refactor OptionManager to be a short class with a bunch of pure helper functions.
2017-04-14 14:25:45 -07:00
Logan Smyth
d1c954b36f
Allow negation of ignore and only patterns. ( #5625 )
2017-04-12 11:10:33 -07:00
Logan Smyth
d7e10a3adc
Misc refactoring of OptionManager.
2017-04-10 10:01:01 -07:00
Logan Smyth
75847306fd
Expose passes as a first-class output of OptionManager.
2017-04-10 10:01:01 -07:00
Logan Smyth
258e82ca13
Expose a function rather than a class from option-manager.
2017-04-10 10:01:01 -07:00