30 Commits

Author SHA1 Message Date
Bogdan Savluk
4108524856
Update prettier to v2 (#11579)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-07 22:21:33 +02:00
Huáng Jùnliàng
4bf36e64da
Create File class for babel helpers (#10575)
* add test

* fix: pass File to helper traverser

* pass babel.File to helpers.ensure
2020-03-17 09:58:46 +01:00
Logan Smyth
600106b9cb Lazy-initialize external helper template. 2018-02-26 18:44:57 -08:00
Nicolò Ribaudo
63ae923987 Add t.cloneNode and deprecate t.clone and t.cloneDeep (#7149) 2018-01-29 22:59:06 +01:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Logan Smyth
5ea54f6cac Fix "module" external helpers output (#6377)
* Move namespace init.

* Move call to helper generation.

* Generate named module exports properly.

* Ensure that helper names are valid identifiers.
2017-10-03 13:58:47 -07:00
Nicolò Ribaudo
977c72250a Add support for helper dependencies (#6254)
* Add support for helpers dependencies.

They are used like this:

    helpers.main = defineHelper(`
        import dep from "dependency";
        export default function main() { return dependency; }
    `);

    helpers.dependency = defineHelper(`ì
        export default function dep() { return 0; }
    `);

* Clone import references

* Don't make test helpers name depend on the order the tests are run
2017-10-02 10:10:52 -07:00
rouzbeh84
aaeebfaf00 inlines babel-messages on the following files:
option-manager.js... /babel-core/src/config/
 build-external-helpers.js... /packages/babel-core/src/tools/
 index.js... /packages/babel-generator/src
2017-09-30 02:19:32 -07:00
Mateusz Burzyński
4519f95a29 Fixed buildExternalHelpers tool for var and module output types (#6260) 2017-09-19 14:44:40 -04:00
Logan Smyth
158e9fbfd7 Represent helpers as simple modules. 2017-09-12 22:15:16 -07:00
Mateusz Burzyński
76161e0a73 Added new outputType - module - for build-external-helpers tool. Should help with tree-shaking story. It's strongly influenced by how the helpers are transformed by rollup-plugin-babel. (#5916) 2017-08-31 23:44:24 -04:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Andres Suarez
658f13e030 Replace uses of "lodash/each" with native equivalents 2017-01-15 13:54:54 -08:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Jordan Klassen
dc1f40540d Upgrade to lodash 4 (#3315)
* Upgrade to lodash 4

* Fix incorrect require in babel-runtime/scripts

* Replace cloneDeep with cloneDeepWith where applicable
2016-05-13 17:15:14 -04:00
Amjad Masad
3667527d04 Revert "Remove flow"
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Sam Goldman
2827ff6b01 Remove flow 2016-03-01 22:33:30 -08:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00: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
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
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
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
227ed5638a add flow type annotations 2015-09-23 16:10:44 +01:00
Sebastian McKenzie
c99a179401 var -> let 2015-09-18 18:45:55 +01:00
Sebastian McKenzie
15f73b4fc3 remove noisy comments/documentation 2015-09-01 04:56:03 +01:00
Sebastian McKenzie
3ef9bffcc2 split up babel core into multiple modules 2015-08-11 17:40:59 +01:00