50 Commits

Author SHA1 Message Date
Logan Smyth
90bebe7186 Pass the caller.name option in Babel's own callers. 2018-08-20 10:27:54 -07:00
Logan Smyth
c4f67bfa57 Leave it to users to clear the require cache if they want to. 2018-07-14 12:48:58 -07:00
Logan Smyth
a955efa3e3
Ensure that calling register fully resets the state. (#7930) 2018-05-14 23:04:56 -07:00
Justin Ridgewell
2afe9404fe
Use Object Spread Syntax (#7777)
* Use Object Spread Syntax

* Nits
2018-04-23 21:44:27 -04:00
Logan Smyth
1dbed5f458 Have @babel/register explicitly skip re-entrant plugins/presets. 2018-03-25 14:22:32 -07:00
Logan Smyth
9e4dd861ee Ensure that sourceMapSupport is installed in all branches. 2018-03-25 12:50:35 -07:00
Logan Smyth
a99e9614a6 Resolve the babel-register working directory up front. 2018-02-22 18:48:36 -08:00
Logan Smyth
cfb830b5bd Overwrite instead of merging babel-register options. 2018-02-22 18:43:47 -08:00
Henry Zhu
82b6ee734b
Revert "make babel injectable in babel-register" 2018-01-30 12:39:38 -05:00
Jan Potoms
b0d8c62d1c Fix issue where babel was retained 2018-01-25 10:18:02 +01:00
Jan Potoms
0e570eceb2 make babel injectable in babel-register 2018-01-25 08:16:34 +01:00
John-David Dalton
330f9006a7 Add cache.clear() to clear the data reference when cache option is false. 2017-11-10 14:00:55 -08:00
Logan Smyth
4a5d551370 Set babelrc:false on config load for more consistent loading. 2017-11-09 12:26:40 -08:00
Amin Marashi
83cd3fb2c9 Lazy-install sourceMapSupport (#6651)
* Install sourceMapSupport only when sourceMaps are requested

* Add tests for sourceMapSupport

* Fix sourceMap position for tests

* Fix gen_error file

* fix the test descriptions

* Refactor install sourceMap support

* Run sourceMapSupport only once

* Handle cases where sourceMaps is undefined
2017-11-09 12:20:26 -08:00
Logan Smyth
11d8e0555f Avoid mutating the passed-in options for babel-register (#6542) 2017-10-23 15:49:10 -07:00
Mateusz Burzyński
47fa189053 Scoped: update more babel- to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Logan Smyth
bd734f03fb Make babel-register 7.x backward-compatible with 6.x. (#6268) 2017-09-19 09:52:57 -07:00
Logan Smyth
d6ba4d0a24 Only compile files inside the cwd in babel-register. (#5590) 2017-09-02 01:07:26 -04:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Patrick Williams
48de6b32de use find-cache-dir for babel-register cache (#5669) 2017-04-27 16:14:59 -04:00
Daniel Tschinder
fce92fa1ad Switch to pirates for babel-register. (#3670)
* Switch to pirates for babel-register.

Pirates is a simple module that enables easy require hooking. It makes sure that your require hook works properly. It also makes the implimentation of babel-register a lot simpler.

For more on pirates: http://ariporad.link/piratesjs

* Use modified version of pirates.

* Switch back to stable version

* Initial tests for babel-register

* Fix tests to work in new test env

* Fix for new ignore behaviour

* Update pirates to 3.0.1
2017-04-24 00:25:44 +02:00
Logan Smyth
9155c613cb Change babel-register default ignore to cwd content. (#5583) 2017-04-04 14:47:49 -07:00
Logan Smyth
a498371005 Ensure the ignore regex is consistent and initialized fully. (#5534) 2017-03-23 17:44:03 -04:00
Patrick Williams
b2c977a1b0 Seperate version env cache files (#5411) 2017-03-22 16:29:29 -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
Sven SAULEAU
d328af0aec
feat: export env getter 2017-03-11 20:40:23 +01:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Sven SAULEAU
fb0a91b750 Fix TypeError with babel-register's cache (#5260) 2017-02-08 15:24:23 -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
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
Joakim
aa0aada8ad Forcing source-map-support module into node environment, so its not tricked by jsdom (#4607) 2016-09-29 17:01:31 +02:00
Daniel Tschinder
71dff8c834 Allow overwritting of sourceRoot (#3685)
Also replaces lodash/extend with Object.assign
2016-09-03 12:12:34 -04:00
Daniel Tschinder
ea69362249 set sourceRoot in babel-register transform (#3608) 2016-08-18 22:42:57 +02:00
Henry Zhu
7ee2381955 Revert "Correct source map paths for babel-register." (#3599) 2016-07-26 18:07:29 -04:00
Rolf Timmermans
c8bd9e3ffb Correct source map paths for babel-register. (#3523) 2016-07-22 11:11:31 -04:00
Thomas Grainger
a289dfbbab The config name is sourceMaps not sourceMap (#3588) 2016-07-21 10:10:58 +02: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
9843c87573 Fix block statement code style. (#3493) 2016-05-02 21:15:37 -04:00
Amjad Masad
2fbe28cc88 Remove remaining @flow annotations 2016-03-03 15:10:59 -08:00
Amjad Masad
12ee11a0a4 Revert "Remove Flow annotations and pragmas"
This reverts commit 4252244d06b225ab26a02d52c04f9940a3e4d6a2.
2016-03-03 15:03:55 -08:00
Sam Goldman
4252244d06 Remove Flow annotations and pragmas 2016-02-28 13:18:57 -10:00
Logan Smyth
8c910d6a4c Merge config options into list after babelrc options - fixes T7079 2016-02-10 21:18:27 -08:00
Sebastian McKenzie
bc2f84f371 Fix API change that e7187faea64b64d65a17c57d6578903f1fff27d6 introduced that wasn't changed in babel-register. Also use an object rather than a long ass list of arguments. 2016-02-08 02:17:09 +00:00
jongleberry
37dbf7c5ed babel register cache: make sure the cache file's directory exists 2016-01-04 14:28:38 -08:00
Logan Smyth
2bb01c6373 Disable babelrc processing on the already-processed configuration - fixes T6690 2015-11-28 23:54:01 -08:00
Sebastian McKenzie
8fd543edae make base option plugin/preset resolving happen relative to the input filename 2015-11-18 20:31:59 -08: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
3076063d47 move babel/register into a separate package 2015-11-08 04:05:13 -08:00