88 Commits

Author SHA1 Message Date
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Sarup Banskota
9b05b0df5c Include node 8.0 to travis config & update tests (#5807)
* Remove node 7 and introduce node 8 in travis config

Progress on #5804

* Run yarn install with node 8

Progress on #5804

* Remove expose_debug_as from tests; replace with expose_gc_as

Fixes #5804

* Remove dashed options since they aren't listed

* Revert "Remove dashed options since they aren't listed"

This reverts commit f826167e320ee85331e09ac63b5674401cac6236.
2017-06-08 18:50:42 +02:00
Logan Smyth
fa23b662c2 Add empty .babelrc for CLI tests. 2017-03-27 14:46:39 -07:00
Henry Zhu
3d74dc044f fix ci 2017-03-27 17:26:39 -04:00
Brian Ng
c687b703ae Ensure babel-cli tests compare generated output with out-files (#5205) 2017-03-23 12:06:56 -04:00
Logan Smyth
39c862c195 Make only/ignore relative to cwd/config file and move only/ignore checking all to core. (#5487)
* Make only/ignore relative to cwd/config file and move only/ignore checking all to core.
2017-03-16 23:22:43 -07:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
JeongHoon Byun (aka Outsider)
2de4b08c51 Add test for passing arguments to babel-node (#5163) (#5342) 2017-02-21 22:14:26 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Logan Smyth
a98c9ae9dc Merge pull request #4790 from peterm0x/master
fixes invalid line offsets in merged sourcemaps
2017-01-15 14:36:33 -08:00
Andres Suarez
85b3aec747 Use native or lodash util module where full "lodash" is required 2017-01-15 13:35:00 -08:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Peter Mikula
fad6483aac fixes invalid line offsets in merged sourcemaps 2016-10-28 21:36:40 +03:00
Simen Bekkhus
9c2794dc85 Replace path-exists with fs.existsSync (#4731)
It's not deprecated anymore, see nodejs/node#8364
2016-10-17 14:31:49 -04:00
Andrew Levine
9f8ab29213 Change usage of "suite"/"test" in unit-tests to "describe"/"it" (#4734)
Fixes #4733
2016-10-15 18:45:35 -04:00
Andrew Levine
c0038221d7 Run ESLint on test files, and fix lint errors in test files (#4732) 2016-10-15 18:27:48 -04:00
Moti Zilberman
76de1cc8a4 Update tests for changed error messages in Babylon (#4727)
Depends on babel/babylon#172.
2016-10-14 16:25:56 -04:00
Daniel Tschinder
1dca51f8ab Enable babel for tests (#4564)
* Enable babel for tests

This enables babel for tests by using a mocha compiler
It uses the babel config from package.json
Transformed OptionsManager test to es2015 to see if it works
Removed the 5s timeout from cli tests, as the default timeout is already 10s, this should probably fix the timouts on travis that we had in babylon
Also run the cli tests on travis, they were disabled if istanbul active, but istanbul is always active on travis so we were never running this tests.

* ignore scripts directory

* only register for tests

* Set only flag correctly
2016-10-12 10:56:50 +02:00
Henry Zhu
fc2b3cb465 Fixes T2299: Prevent REPL from printing implicit 'use strict' (#4562)
* Fixes T2299: Prevent REPL from printing implicit 'use strict'

* Test for T2299

* make fixes
2016-09-25 23:29:37 -04:00
Logan Smyth
46eb99b18b Use the real sourcemap API and handle input sourcemaps - fixes T7259 (#3456) 2016-09-20 13:39:01 -04:00
Daniel Tschinder
ff78fb19f7 Only set options in cli if different from default (#4507)
* CLI: Only set options if different from default 

Currently default values (like comments: true) will be set always for the transform.
This behaviour dos not allow for setting this options from babelrc as the default would always have precedence.

* Add new tests for comments
Also ensure that the babelrc in the fixture folder is copied over to the
working directory during tests
2016-09-13 08:25:08 -04:00
Daniel Tschinder
993f887240 Test for ignore with starting slash (#4509) 2016-09-12 22:48:06 +02:00
Sebastian McKenzie
4a19661346 Generate names field for identifiers to get correct names mappings (#3658) 2016-08-16 13:43:55 -04:00
Daniel Tschinder
88eec4b852 Support all variations of v8Flags (#3578)
This adds support for specifying v8Flags with dashes. Previously only underscores
were allowed.
Also allows specifying values for v8Flags in the from --flag=value, which was not supported till now.
Also add --inspect support.
2016-07-18 10:36:03 -04: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
Logan Smyth
81e6d4147d Map the end of block statement nodes to the end of their original location - fixes T7258 2016-04-11 01:54:41 -07:00
Logan Smyth
76bb1dffaa Track sourcemap location on a stack - fixes T7255 2016-04-11 01:54:40 -07:00
Logan Smyth
d221e21102 Handle mappings with no source when using CLI file. 2016-04-07 09:34:43 -07:00
Sebastian McKenzie
65a4c8f4a4 Merge branch 'source-map-reenter' of https://github.com/kpdecker/babel into kpdecker-source-map-reenter
Conflicts:
	packages/babel-generator/src/printer.js
2016-01-18 18:36:57 +00:00
Amjad Masad
0d8e5a9e86 Fix over-parenthesizing of function expressions 2015-12-24 14:55:51 -08:00
kpdecker
94e7e4da8e Update source map handling to be reentrant
Rather than repeating the original location when we exit a node, we need to restore the previous parent’s original line location, since the source map format denotes the start location.
2015-12-18 01:11:32 -06:00
kpdecker
9b79fbcdf5 Avoid emitting duplicate source map entries 2015-12-18 00:57:48 -06: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
b12866db86 extract out mocha fixtures and resolve utils 2015-07-25 03:54:48 +01:00
Sebastian McKenzie
2d5d1ceb5c t 2015-07-13 16:34:43 +01:00
Sebastian McKenzie
a226641631 more architectural changes 2015-07-11 20:56:26 +01:00
Sebastian McKenzie
fedf894904 Begin transition of Babel to a more scalable architecture, async flow to allow for RPC and better build system for multiple packages 2015-07-11 12:39:54 +01:00