1016 Commits

Author SHA1 Message Date
Sergey Rubanov
d0b42d4313 Update babel-core browserify fixture (#5164) 2017-01-20 10:29:44 +01:00
Jordan Jones
1742035a98 [7.0] Fixes #5108, browser.js and browser.js test removed (#5124)
* Fixes #5108, browser.js and browser.js test removed

* Moved api/node.js to index.js and adjusted associated file references
2017-01-19 22:43:11 -05:00
Sergey Rubanov
3a5ce620c8 [7.0] Deprecate babel-core/register.js (#5132)
* Deprecate babel-core/register.js

* add error when using `babel-core/register`
2017-01-19 22:22:45 -05:00
Henry Zhu
368485828f v6.22.1 2017-01-19 22:12:53 -05:00
Henry Zhu
b06763f1a3 force update core/cli 2017-01-19 22:09:37 -05:00
Henry Zhu
e9fc38bcd3 v6.22.0 2017-01-19 19:33:22 -05:00
Brian Ng
8c35b320d3 Bump eslint-config-babel and fix lint (#5129) 2017-01-17 10:51:16 +01:00
Sergey Rubanov
292c3ca206 Refactor test packages to use ES modules instead of CJS (#5138) 2017-01-16 11:25:04 -05:00
Logan Smyth
87c201fa47 Merge pull request #5043 from zertosh/no-lodash-is
Replace "lodash/is*" and "lodash/each" with native equivalents
2017-01-15 14:22:24 -08:00
Mark Wubben
20c9dca798 Document babelrc option (#5101)
The core package accepts a babelrc option, which if set to false stops
the transforms from using .babelrc and .babelignore files. Document
this option and remove the --no-babelrc CLI flag, referring to the CLI
documentation instead.

[skip ci]
2017-01-15 16:04:23 -06:00
Andres Suarez
658f13e030 Replace uses of "lodash/each" with native equivalents 2017-01-15 13:54:54 -08:00
Andres Suarez
2bee765e6b Replace lodash is* with equivalent typeof check 2017-01-15 13:53:58 -08:00
Brian Ng
47bb77d352 Update babel-core options in README (#5114)
* Add wrapPluginVisitorMethod option to babel-core README [skip ci]

* fix typo

* alpha-sort options

* add note about introspection [skip ci]
2017-01-14 16:01:52 -05:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Sven SAULEAU
1672982873 fix: require debug directly instead of debug/node 2016-12-21 18:09:58 +01:00
Logan Smyth
ce0c620a9f Merge pull request #4729 from rmacklin/add-resolvePlugin-and-resolvePreset
Add resolvePlugin and resolvePreset methods to babel-core API
2016-12-20 08:42:27 -08:00
Sven SAULEAU
9d76f0b2de [skip ci] update README 2016-12-17 16:37:45 +01:00
Sven SAULEAU
3ef8e61d72 [skip ci] update babel-core's README 2016-12-17 12:41:49 +01:00
Henry Zhu
77d9e3e5c4 v6.21.0 2016-12-16 16:55:53 -05:00
Henry Zhu
a73115f401 update core [skip ci] 2016-12-16 16:49:58 -05:00
Henry Zhu
608e77e389 v6.20.0 2016-12-08 18:25:39 -05:00
Henry Zhu
16a05166b2 v6.20.0 changelog [skip ci] (#4971)
* v6.20.0 changelog [skip ci]
* remove old license since rewrite [skip ci]
2016-12-08 18:17:33 -05:00
Sven SAULEAU
455d888ce8 update package documentation (#4948) [skip ci] 2016-12-06 14:24:52 -05:00
Sven SAULEAU
351c1d3b4f Update README [skip ci] (#4938) 2016-12-05 13:36:31 -05:00
Henry Zhu
e86f62b304 README: add --save-dev [skip ci]
Closes gh-4910
2016-11-29 08:40:27 -05:00
Sven SAULEAU
2311b5b53a README: remove dollar in sh snippets [skip ci] 2016-11-29 08:39:23 -05:00
Daniel Tschinder
1d9e509df2 Fix eslint (#4897)
* Fix eslint call

* Fix linting errors
2016-11-26 11:24:38 -05:00
Henry Zhu
cd041541b8 Fix bug + Generate test fixtures if no expected.js (#4858) 2016-11-17 17:53:46 -05:00
Henry Zhu
7b64a9d914 v6.18.2 2016-11-01 17:30:53 -04:00
Henry Zhu
1a974e58d0 v6.18.1 2016-11-01 17:17:16 -04:00
Diogo Franco
35b795ce54 Fix Valid example to be actually valid (#4773)
* Fix Valid example to be actually valid

* Rename 'pluginName' to 'presetName' in the example
2016-10-25 11:27:20 +02:00
Henry Zhu
12f9cd0826 v6.18.0 2016-10-24 17:18:36 -04:00
Moti Zilberman
6bc10b5573 Support ObjectExpression in static path evaluation (#4746) 2016-10-17 18:55:02 -04: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
Richard Macklin
6ec93d782b Extract resolveFromPossibleNames to remove duplicated logic
"DRY"s the duplicated algorithm in resolvePlugin and resolvePreset
2016-10-16 11:18:43 -07:00
Richard Macklin
4ea1007645 Remove unneeded tests
Previously these were testing the logic that is now encapsulated in
getPossiblePresetNames and tested in a unit test
2016-10-16 11:07:16 -07:00
Richard Macklin
e24f07dfda Extract resolvePreset method to babel-core public API
This encapsulates the logic for turning an acceptable preset name into
the absolute path for that preset. It can be used to preprocess a
presets list to map each preset to its absolute path, which is necessary
if `babel.transform` is going to be executed on a file outside the
directory subtree where the presets are installed.

This adds a getPossiblePresetNames helper encapsulating the logic for
what preset names we should try to resolve, and the resolvePreset method
just calls this helper and actually resolves them.
2016-10-16 11:06:47 -07:00
Richard Macklin
f4389a1886 Extract resolvePlugin method to babel-core public API
This encapsulates the logic for turning an acceptable plugin name into
the absolute path for that plugin. It can be used to preprocess a
plugins list to map each plugin to its absolute path, which is necessary
if `babel.transform` is going to be executed on a file outside the
directory subtree where the plugins are installed.

This adds a getPossiblePluginNames helper encapsulating the logic for
what plugin names we should try to resolve, and the resolvePlugin method
just calls this helper and actually resolves them.
2016-10-16 10:52:13 -07: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
Moti Zilberman
2827d660fc Make special case for class property initializers in shadow-functions (#4502) 2016-10-14 15:21:11 -04:00
Henry Zhu
71790aace0 update eslint-config, fixes, add commands (#4721)
* update eslint-config, fixes, add commands

* switch plugin
2016-10-13 21:37:07 +02: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
Eric Rozell
c2387f0444 fix(shouldIgnore): filename normalization should be platform sensitive (#4631)
* fix(shouldIgnore): filename normalization should be platform sensitive

shouldIgnore normalizes the path of the filename prior to running any "only" regexes or functions. The normalization uses "slash", which has some undesirable special cases for non-ASCII characters and longer paths. Changing the normalization behavior to always replace path separators.

There is no real need to add additional tests, because the tests are not run in an environment where path.sep !== '/'.

* Minor style fix to use double quotes.

* Remove conditional for regex replace to keep consistent behavior.

* whitespace [skip ci]
2016-10-11 16:02:50 -04:00
Kai Cataldo
27ee74ea14 Better error messaging when preset options are given without a corresponding preset (#4685) 2016-10-11 16:56:53 +02:00
Brian Ng
0aa3ac2bb5 Update babel parser options (#4688)
* Update babel parser options
2016-10-07 14:30:47 -04:00
Sebastiaan Deckers
7977c9249e Babel API example (#4675) [skip ci]
Just a minor fix. I'm new to Babel's API and this tripped me up. Seems like it happened to others before (e.g. #2859). Guessing this came from an earlier `var babel = require('babel-core')` which does work.
2016-10-05 09:50:11 -04:00
Daniel Tschinder
fc54264f70 update json5 to version 0.5.0 (#4649) 2016-10-04 08:32:32 -04:00
Daniel Tschinder
e0dbb1e770 Inline shebang-regex (#4650) 2016-10-03 20:58:26 -04:00