11286 Commits

Author SHA1 Message Date
Daniel Tschinder
c8992e4155
Enforce Prettier defaults + also format .babelrc and .json (#7499)
* .prettierrc: full configuration for Prettier

This way, contributors using different-from-default settings will still
use the correct prettier settings

* Makefile: also lint .babelrc.js

* Makefile: also prettify .json files

* Exclude package.json files and correct build dir

* Add more default options to prettierrc and load it in cli

This avoids prettier looking up the config for each file

* Format json

* Update prettier and eslint and reformat codebase

* Remove obsolete file

* Add comment
2018-03-06 11:40:36 +01:00
Raja Sekar
50b9fbb570 empty src dir error fix - fixes #7375 2018-03-05 17:46:38 -08:00
Daniel Tschinder
5d615dd198 Disallow setters to have RestElement (#7498) 2018-03-05 18:03:59 -06:00
Daniel Tschinder
eb2a0b0fcd Raise minimum version for debug to only allow secure version. (#7495) 2018-03-05 20:12:56 +01:00
Nicolò Ribaudo
a86d311986 Reuse the assertThisInitialized helper in possibleConstructorReturn (#7493) 2018-03-05 08:11:16 -08:00
Daniel Tschinder
a340a2614f
Fix reseting modules in jest and config (#7494)
* Fix reseting modules in jest and config

we have lib folders inside the source folders which should not be ignored.

* Add codemods lib folder

* Support mjs

* improve ignore pattern
2018-03-05 16:04:29 +01:00
Daniel Tschinder
f9857ca6ba Docs: Use namespace packages in all links (#7496)
preset-env and babylon were still linking to spearate repos
2018-03-05 08:49:27 -06:00
Daniel Tschinder
f43bf7fcd5
Enable babel-register tests again (#7487) 2018-03-05 10:47:00 +01:00
Gvozd
653318b7e4 Always transform for-await in async functions. (#7446)
for-await was transformed in @babel/helper-remap-async-to-generator, which was
called by @babel/plugin-transform-async-to-generator and
@babel/plugin-proposal-async-generator-functions. This prevented for-await
statements in async functions to be transpiled if the
transform-async-to-generator plugin was't enabled.
2018-03-05 09:30:25 +01:00
K Sashi Kumar
d187c26748 Spec Violation: Fix var initializer in for-in loop (#7392) 2018-03-04 16:18:32 -08:00
Kevin Ji
fc64ab5725 eslint: Rename to .json, mark as root config - fixes #7433 2018-03-04 16:00:41 -08:00
Nicolò Ribaudo
5cd8b5b7f0 Add eslint plugin to disallow t.clone and t.cloneDeep (#7191)
* Add eslint plugin to disallow `t.clone` and `t.cloneDeep`

* Make it better and add flow

* Other cases

* Superpowers

* Fix
2018-03-04 15:47:11 -08:00
Nicolò Ribaudo
a328b6ad1a Arrow functions and methods' params are binding identifiers (#6770) 2018-03-04 15:19:48 -08:00
Logan Smyth
15a80f0df8
Merge pull request #7490 from loganfsmyth/sourcetype-helpful-errors
Give helpful errors if the wrong sourceType is detected
2018-03-04 15:03:49 -08:00
Logan Smyth
a4795408b4
Allow plugins to assert that a specific babel version has loaded the plugin. (#7450) 2018-03-04 14:36:54 -08:00
Logan Smyth
5f6e3122a0 Give users helpful feedback if they are detected as using the wrong sourceType. 2018-03-04 14:12:37 -08:00
Logan Smyth
7f8f4e86dc
Merge pull request #7484 from loganfsmyth/test-input-mjs
Require tests to use input.mjs for modules, and output.js/.mjs based on active transforms
2018-03-04 14:06:07 -08:00
Logan Smyth
5c3092d86f Expand .raise() to allow more options. 2018-03-04 13:38:12 -08:00
Logan Smyth
7cc00cce0d Require output fixture extension to match sourceType output. 2018-03-04 13:31:33 -08:00
Logan Smyth
beb99dfda1 Rename test fixtures using module syntax to .mjs files. 2018-03-04 13:31:32 -08:00
Logan Smyth
5f9539e9cc Rework the testrunner to pass the input filename only. 2018-03-04 13:28:25 -08:00
Logan Smyth
aa669ef902 Fix an issue with new update-expression tests. 2018-03-04 13:25:31 -08:00
Marvin Hagemeister
c92e8be612 Generating correct assignments for live bindings updated with UpdateExpressions (#7489)
Fixes #7488
2018-03-04 20:46:33 +01:00
K Sashi Kumar
ab1e295c74 [Doc] Remove build-babylon from contributing (#7474) [skip ci] 2018-03-04 19:55:25 +01:00
K Sashi Kumar
ae0df86340 Remove broken check in checkFunctionNameAndParams (#7473) 2018-03-04 16:34:16 +01:00
Deven Bansod
41bf66bca2 Migrate babel-code-frame tests to use expect (#7485)
* Replace `assert.equal` calls with appropriate `expect` calls
* Work-in-progress: Currently targeting only `babel-code-frame` tests
2018-03-04 11:39:12 +01:00
Logan Smyth
212058148c
Require users to pass a filename, or specify --no-babelrc when using CLI with stdin. (#7461) 2018-03-03 12:29:11 -08:00
Daniel Tschinder
785131d8e6
Also run coverage with node: current (#7479) 2018-03-03 18:45:34 +01:00
Mauro Bringolf
81532103da Contributing docs: Add caveat about direct subdirectories and exec tests (#7482) [skip Ci]
* Add caveat about direct subdirectories and exec tests

* Fix _only_ typo
2018-03-03 18:01:29 +01:00
Michał Pierzchała
cc6e739f15 Add a brief summary to CLI's build output (#7439)
* feat(babel-cli): add a brief summary to build output

* address feedback

* further adjustments

* Use quiet output as default, add --verbose

* fix tests

* remove verbose alias
2018-03-03 13:29:26 +01:00
Daniel Tschinder
3e95830646
Migrate to jest (#7455) 2018-03-03 10:58:19 +01:00
Orta
53208d6998 Another iteration on the TS plugin readme (#7469) 2018-03-02 22:39:18 -06:00
Orta
fdfbd9a6f7 Update README for Babel TypeScript Plugin (#7443) 2018-03-01 08:46:54 -06:00
Daniel Tschinder
007f8d19b3 Remove unused dependencies (#7454)
Replace util.promisify with node internal version
2018-02-28 10:59:28 -05:00
Daniel Tschinder
586ba35950 Update to circleci v2 (#7451) 2018-02-28 10:58:47 -05:00
Daniel Tschinder
1a454f666c Install peerDependencies and remove unused async dependency (#7453) 2018-02-28 10:58:33 -05:00
Logan Smyth
a07f96ce3f
Merge pull request #7449 from loganfsmyth/env-enhancement
Centralize the plugin/preset and config APIs into one place
2018-02-28 01:03:35 -08:00
Logan Smyth
2c3eb3096f Expand the '.env()' API call with more flexibility. 2018-02-27 18:48:24 -08:00
Logan Smyth
148e6dfc26 Centralize the plugin/configuration API object. 2018-02-27 18:48:24 -08:00
Logan Smyth
ddd40bf5c7
Rely entirely on sourceType for module vs script differentiation. (#7417) 2018-02-27 18:11:13 -08:00
Logan Smyth
bf8b25289b
Merge pull request #7436 from loganfsmyth/less-upfront-work
Default to `ast:false` and do less work when loading core
2018-02-27 18:03:53 -08:00
Logan Smyth
b19b7fd2cf Fix PR comments. 2018-02-27 17:46:17 -08:00
Guy Bedford
f004972625 Ensure babel-preset-env targets input object is not mutated (#7438) 2018-02-27 08:46:24 -06:00
Yuta Hiroto
5459c75d64 Fix CONTRIBUTING.md (#7441) 2018-02-27 08:45:28 -06:00
Logan Smyth
8e3e6e0a88 Require AST output to be opt-in, rather than opt-out. 2018-02-26 18:44:59 -08:00
Logan Smyth
d4a8c7672c Avoid using lodash during config loading, for require() performance. 2018-02-26 18:44:58 -08:00
Logan Smyth
600106b9cb Lazy-initialize external helper template. 2018-02-26 18:44:57 -08:00
Logan Smyth
dffcef785a Lazy-initialize helper templates. 2018-02-26 18:18:57 -08:00
Logan Smyth
cb4f4f4d5f Ensure that typechecking artifacts are built up front for watch. 2018-02-25 21:38:11 -08:00
Logan Smyth
7ff4a73916
Upgrade flow to 0.66 and fix a few minor errors. (#7431) 2018-02-25 19:22:23 -08:00