Logan Smyth
7179136401
Ensure the AMD/UMD loaders all have params for each import to avoid lazy-loading ( #6237 )
2017-09-12 20:13:16 -07:00
Logan Smyth
1e750a945c
Convert CommonJS to use new shared implementation.
2017-09-12 17:17:41 -07:00
Noah Lemen
2db0c3ad1d
linting: disallow t.identifier("undefined") in plugins ( #6096 )
...
* add new custom eslint rule, replace remaining t.identifier("undefined") with buildUndefinedNode(), update tests
* change no-undefined-identifier reporting descriptor
2017-08-24 15:43:01 -04:00
Teddy Katz
13d931c417
Don't insert the same node into the AST multiple times (fixes babel/babili#556) ( #6054 )
2017-08-04 19:00:29 -04:00
Henry Zhu
577173cc02
fix export when array destructuring exported value with hole
2017-08-04 11:53:49 -04:00
Justin Ridgewell
827c70e015
Support exporting deep destructuring ( #5953 )
2017-07-18 14:07:09 -05:00
Josh Johnston
bc29145465
Fix 5768 (to 7.0 branch) ( #5891 )
2017-06-27 20:04:23 -04:00
Brian Ng
e4b35f680d
Run prettier
2017-06-27 12:15:00 -05:00
Artem Yavorsky
ddba7ba89f
Add destructuring case for modules-commonjs.
2017-06-26 14:33:58 +03:00
Logan Smyth
14584c218c
Kill the "shadow-functions.js" internal plugin in favor of an explicit helper ( #5677 )
...
* Handle arrow function processing via shared API rather than default plugin.
* Fix a few small PR comments.
* Preserve existing spec arrow 'this' rewrites, and support spec in subclass constructors.
2017-05-05 13:27:18 -07:00
Robert Jackson
0d1edb9811
Add noInterop option to babel-plugin-transform-es2015-modules-commonjs.
...
The intent of this option is to toggle module interop behavior. When `true`
no `interopRequireXXX` helper invocations will be emitted.
2017-03-06 19:51:35 -05:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Logan Smyth
4ee385e96c
Avoid usage of exports/module.exports/require().
2017-02-21 16:52:42 -08:00
Logan Smyth
b845f2b69d
Re-enable the max-len ESLint rule. ( #5265 )
2017-02-04 11:07:15 -05:00
Matthew Stewart
d4790888a3
Limit export node default assignment stack size #4323
...
Signed-off-by: Matthew Stewart <mattdste@gmail.com>
2017-01-28 12:51:37 -05:00
Brian Ng
8c35b320d3
Bump eslint-config-babel and fix lint ( #5129 )
2017-01-17 10:51:16 +01:00
Henry Zhu
672adba9a1
enable prefer const ( #5113 )
2017-01-14 09:48:52 -05:00
Andrew Levine
de46827be7
Handle remapping of JSXIdentifier to MemberExpression in CommonJS transform. Closes #3728 ( #4763 )
2016-10-24 10:23:43 -04:00
Logan Smyth
819cde936c
Merge pull request #4511 from motiz88/fix-4462
...
Fix UpdateExpression handling in es2015-modules-commonjs, resolve #4462
2016-09-25 14:16:53 -07:00
Kai Cataldo
1db8c02d05
Remove duplicate default error ( #4543 )
...
* Revert "Throw error for multiple exports default (#3518 )"
This reverts commit aa51dd4a3dbb956d8b619d884acf40194d5ffac8.
* Fix export default tests
2016-09-22 12:00:18 -04:00
Daniel Tschinder
cbbc1c7333
fix default exported classes without a name ( #4518 )
...
* fix default exported classes without a name
This correctly requeues class without name so the es3 transform can
transform the default keyword.
* Replace phabricator issue number with github
2016-09-17 22:50:54 -04:00
Moti Zilberman
43e0cfb08d
Fix UpdateExpression handling in es2015-modules-commonjs, resolve #4462
2016-09-13 19:06:52 +03:00
Kai Cataldo
aa51dd4a3d
Throw error for multiple exports default ( #3518 )
...
Fixes https://phabricator.babeljs.io/T7242
2016-08-16 13:21:00 -04:00
Henry Zhu
253918c30f
Fix buildExportAll to account for commonjs/amd/systemjs ( #3591 )
...
* Fix buildExportAll to account for commonjs/amd
If the re-exported module was generated with Babel and it is a commonjs or amd module and so is the current module, this will result in an attempt to redefine the __esModule property, which throws a runtime error.
* Add test: don't overwrite __esModule on re-export
(Failing.)
* fixup tests
* Add fix for systemjs
2016-07-23 13:21:07 -04:00
Logan Smyth
2ba27c73d7
Allow empty 'export {};' statements - fixes T7439
2016-06-18 12:41:44 -07:00
Amjad Masad
46ebd90acb
Test and fix export statement sourcemap
2016-03-08 13:47:02 -08:00
Amjad Masad
108838c66c
Copy source location to require statement for sourcemap generation
2016-03-08 13:38:24 -08:00
Amjad Masad
3667527d04
Revert "Remove flow"
...
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Amjad Masad
3744aefb4f
Merge pull request #3391 from benjamn/fix-buildExportAll
...
Make buildExportAll generate pure ES5 code.
2016-03-02 18:50:47 -08:00
Sam Goldman
2827ff6b01
Remove flow
2016-03-01 22:33:30 -08:00
Ben Newman
9acd33b93a
Make buildExportAll generate pure ES5 code.
...
The untransformed `let` keyword causes problems for older parsers. I
understand using `let` instead of `var` ensures each getter function has
its own binding for the KEY variable, but the same can be accomplished
(with less code) using a `.forEach` callback function, and this way
there's no need to worry about generating a unique name for the `key`
variable.
2016-03-02 00:08:55 -05:00
Logan Smyth
4561732bce
Revert .requeue changes made in earlier ES3 fixes.
2016-02-29 23:55:47 -08:00
Logan Smyth
0a0407be41
Re-queue remapped imports so they are re-traversed - fixes T6863
2016-02-22 22:54:28 -08:00
Logan Smyth
01003b954a
Re-queue nodes inserted with .replaceWith and centralize logic - fixes T2817
2016-02-22 22:44:03 -08:00
Sebastian McKenzie
5b89849f43
Switch to klint, fix some lint rules
2016-02-14 23:25:14 +00:00
Erik Desjardins
4142003bbd
Hoist initial exports.foo = undefined and __esModule declarations above hoisted async functions
2016-02-03 12:11:11 -05:00
59naga
c509847588
Fix T6953,T2541 export-from statement renamed default issue
...
- Use `interopRequireDefault` helper if local name is default.
Via 59naga/babel-plugin-add-module-exports#20
2016-01-20 02:54:54 +09:00
Sebastian McKenzie
f1ef0ff5e9
Merge pull request #3118 from benjamn/import-hoisting
...
Add test of import hoisting that fails when the runtime transform is used.
2016-01-19 02:20:17 +00:00
Ben Newman
e1ec9ef985
Make require declarations inherit ._blockHoist values from imports.
...
This commit fixes the failing test I introduced in pull request #3118 .
2016-01-12 18:01:31 -05:00
kpdecker
3791491b79
Strip location information from import remaps
...
Fixes https://phabricator.babeljs.io/T6851
2015-12-18 01:36:24 -06:00
Sebastian McKenzie
688dcec6a3
fix queueing of nested paths being pushed onto the priority queue
2015-11-13 03:37:15 -08:00
Sebastian McKenzie
51143beab2
add allowTopLevelThis option to babel-plugin-transform-es2015-modules-commonjs
2015-11-05 11:29:39 +00:00
Sebastian McKenzie
e62a00df50
rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
2015-11-03 01:19:35 +00:00
Sebastian McKenzie
79f39c3be1
add strict mode plugin to module transforms
2015-10-30 04:52:29 +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