17 Commits

Author SHA1 Message Date
Nicolò Ribaudo
cb404e4776 Add targets and browserslist* options to @babel/core (#12189) 2021-02-21 17:09:43 +01:00
Huáng Jùnliàng
7fb6048e7c
test: add tests on {parser,generator}Override (#12740) 2021-02-02 23:18:41 -05:00
Justin Ridgewell
a5bc48661b
Isolated exec tests (#11531)
* Run exec tests in fresh contexts

* Reevaluate modules in every context

* Cache module code when running tests

* Eliminate weakmap accesses as much as possible

* Remove old multiline usage

* Using bundled polyfill to significantly increase performance

The individual requires for each file were the part that was sooooo slow.

* Drop LRU cache size

* Fixes

* Fix test

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-08-10 18:57:48 -04:00
Huáng Jùnliàng
dcf7d89b8e fix: remove filename annotation in buildCodeFrameError (#10539) 2019-10-14 18:19:55 +02:00
Huáng Jùnliàng
298c9a6c33 Add filename to transform error (#10511)
* polish: use “unknown” as a default filename in buildCodeFrameError

* feat: add filename to transform error

* fix: incorrect warning message

* fix: add filename to generate phrase error message

* address review comment from Nicolò
2019-10-01 17:19:29 +02:00
Deven Bansod
f3f0197890 Migrate babel-core tests to use jest-expect (#7513)
* Used codemods at: https://gist.github.com/devenbansod/03c5cff857661e076cbec72fcb2e7eb3 along with some manual intervention and review
2018-03-10 11:40:28 +01:00
Tim Seckinger
c3f6f7fe28 fix buildCodeFrameError empty code frames 2018-01-03 13:53:15 +11:00
Logan Smyth
5eda451fb8 Remove the unused '.addImports' API from 'babel-core'. 2017-09-26 11:28:57 -07: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
Logan Smyth
4f72232ca9 Move option parsing to babel-cli. 2017-03-13 11:06:46 -07:00
Amjad Masad
12fac9cadf Inference recursion bug 2015-12-15 19:56:27 -08:00
Amjad Masad
036e90e9cc Fix bug with evaluating an expression in it's own binding 2015-12-06 07:56:17 -08:00
Amjad Masad
35e575cf93 Print a block when encountering consequents that are if statements 2015-11-17 19:07:20 -08:00
Amjad Masad
507557c48e Add failing test 2015-11-17 18:45:35 -08:00
Amjad Masad
352a604fe2 Make sure the test fails 2015-11-11 12:07:23 -08:00
Sebastian McKenzie
9616e4b06c remove use of template literals in plugin regression exec test for unsupported environments 2015-11-08 05:33:13 -08:00
Amjad Masad
8e2aae7e05 Introduce new tests for plugins 2015-11-06 15:14:20 -08:00