24 Commits

Author SHA1 Message Date
Nicolò Ribaudo
43aa7e262c
Don't throw when destructuring into a var named as an import (#10628) 2019-11-04 22:50:36 +01:00
Corey Farrell
f31c72f310 Fix handling of class property value this in module transforms. (#9857)
Prevent module transforms from rewriting `this` to `void 0` when found in the values of private class properties.  Add tests to prevent regressions.
2019-04-15 22:45:10 +02:00
Andrew Anikin
123fdfd314 Fix lazy option of babel-plugin-transform-modules-commonjs (#9802)
* Fix lazy mode of babel-plugin-transform-modules-commonjs (#9447)

* Update output snapshots for lazy mode of babel-plugin-transform-modules-commonjs (#9447)
2019-04-01 07:59:12 +02:00
Daniel Tschinder
f4eec5ca79
Add new flag that indicates if a module has exports (#9171) 2018-12-12 21:24:44 -08:00
Yongxu Ren
0fd3da110d Rewrite Hub as interface #5047 2018-08-20 19:30:29 +02:00
Logan Smyth
935533cff3
Ensure that the wildcard interop is used with re-export + default. (#8316) 2018-07-14 12:49:31 -07:00
Willa Wang
73f8059ea0 Fix typo in rewrite-live-references.js (#7896) [skip ci] 2018-05-09 20:30:02 -04:00
Logan Smyth
c662c2ada2
Use strict namespace behavior for mjs files. (#7545) 2018-03-15 13:27:01 -07:00
Logan Smyth
62c1046249
Avoid re-traversing inserted references to the namespace binding. (#7418) 2018-02-22 23:54:29 -08:00
Logan Smyth
e732ee0c5b
Preserve import binding locations during module rewriting (#7378)
* Only wrap import references that need it.

* Preserve the import binding location for sourcemaps.

* Add tests.
2018-02-14 10:17:27 -08:00
Mateusz Burzyński
4d164bd8e6
Added babel-helper-split-export-declaration (#7313) 2018-02-13 16:44:05 +01:00
Nicolò Ribaudo
63ae923987 Add t.cloneNode and deprecate t.clone and t.cloneDeep (#7149) 2018-01-29 22:59:06 +01:00
Logan Smyth
53826aaaa0 Expose a 'lazy' option for the CommonJS transform. 2017-12-17 18:42:35 -08:00
Logan Smyth
b900a3e5c2 Consistently return AST nodes. 2017-12-17 18:33:47 -08:00
Artem Yavorsky
0a2a37c31f Fix export from assignment order for loose mode. (#6863)
* Consider reexports for bindingKindLookup.

* Update test cases according to reexports change

* Fix order for assign reexports.

* void 0 assignation to module keys only for loose mode.

* Create buildReexportsFromMeta helper.

* Update umd/amd fixtures.

* Refactor reexports build.

* Hoist template for reexports.

* Use map as a second argument of Array.from.

* Remove unnecessary export.
2017-11-29 11:58:29 -08:00
Brian Ng
d81cca3b5f Add additional support for loose mode in helper-module-transforms (#6742) 2017-11-05 20:54:14 -05:00
Logan Smyth
f230497d08 Use literal-based templates for more stuff. 2017-10-18 13:58:48 -07:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Logan Smyth
9dfcf0f116 Split the simple-access transforms out of the module transform into a general helper. 2017-09-26 15:43:51 -07:00
Logan Smyth
ec9754bc40 Implement a new utility module for injecting module imports. 2017-09-26 11:28:56 -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
Logan Smyth
72da5e1d02 Quick fix for default import that also uses names. (#6282) 2017-09-21 22:26:42 -07:00
Logan Smyth
2b88e079ef Only transform this/use strict if a module. 2017-09-20 10:19:35 -07:00
Henry Zhu
5b9112c794 babel-helper-modules -> babel-helper-module-transforms since package taken [skip ci] 2017-09-19 16:20:03 -04:00