2258 Commits

Author SHA1 Message Date
Justin Ridgewell
ca45904a45 Fix loose for-of with label (#5298) 2017-02-13 10:30:36 -05:00
Samuel Reed
2aa2de8c6f feature: Support pure expressions in transform-react-constant-elements (#4812) 2017-02-12 20:02:38 -08:00
Logan Smyth
4edcd02965 Fix linting error 2017-02-12 18:48:07 -08:00
Samuel Reed
f4e3dfee74 Fix PathHoister hoisting before bindings. (#5153)
Fixes #5149 and enables a few additional safe hoists.
2017-02-12 18:35:08 -08:00
Samuel Reed
eb91bd831c Fix PathHoister hoisting JSX member expressions on "this". (#5143)
The PathHoister ignored member references on "this", causing it
to potentially hoist an expression above its function scope.

This patch tells the hoister to watch for "this", and if seen,
mark the nearest non-arrow function scope as the upper limit
for hoistng.

This fixes #4397 and is an alternative to #4787.
2017-02-12 18:34:07 -08:00
james kyle
75ac320cf7 Add new flow preset (#5288) 2017-02-09 16:45:38 -08:00
Brian Ng
6da9bb83df Prevent multiple return statements in a loop when replacing expressions (#5030) 2017-02-09 13:06:41 -08:00
jwbay
1a325ce5d5 codegen performance: use trim-right instead of lodash/trimEnd (#5255) 2017-02-09 13:04:42 -08:00
Sven SAULEAU
fb0a91b750 Fix TypeError with babel-register's cache (#5260) 2017-02-08 15:24:23 -05:00
Boopathi Rajaa
f8ffe03e79 Deopt evaluation of undefined with a local binding. Fix #5204 (#5206) 2017-02-08 10:37:14 -05:00
Mark Jones
5c5262437e Add definition of stage 3 (#5253) [skip ci] 2017-02-08 10:25:43 -05:00
Mark Jones
64e7d76b6b Added info about stage 2 (#5252) [skip ci] 2017-02-08 10:25:10 -05:00
Mark Jones
01eabd0d34 Add background for stage 1 (#5251) [skip ci] 2017-02-08 10:23:54 -05:00
Jimmy Jia
9de923258c Don't transpile ES7 symbol properties (#5195) 2017-02-07 11:19:14 -05:00
Vicente Jr Yuchitcho
1ba4a3fe5d Add path sibling traversal methods (#5230)
* getPrevSibling
* getNextSibling
* getAllNextSiblings
* getAllPrevSiblings
2017-02-07 11:17:50 -05:00
Łukasz Lityński
badce969da Fix confusing comment (#5272) (#5273) 2017-02-06 16:17:26 -08:00
Ben Alpert
ff8a10e52f Add option to block-scoping to slow on throw code (#5236)
The let/const plugin can add closures where you don't expect them. This is undesirable in some perf-sensitive projects (ex: React). I added an option that throws whenever the plugin adds a function (as opposed to simply renaming variables when converting to var).
2017-02-06 13:50:56 -05:00
Christina
6ee7bf6df5 checks if babel is installed globally and displays correct cli message (#5258)
* checks if babel is installed globally and displays correct cli message - fixes #5228

* recommend local installation and fix lint errors

* uses babel-cli vs babel

* switch back to babel

* use process.cwd() to determine if globally executed

* checks for /node_module/.bin/babel

* compare execPath and module execution path to determine global or local installation

* Move the babel/cli.js into a 'src' so the 'const's are compiled Node < 6.
2017-02-06 10:30:56 -08:00
Erik Desjardins
e9d7757433 Emit parens for await (but not yield) of ternary expressions (#5270) 2017-02-06 09:06:48 -08:00
Andres Suarez
8c3392f058 Remove uses of lodash/compact (#5181) 2017-02-04 13:01:45 -08:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
StyMaar
283d9cbb9e Fix broken repository link in package.json (#5248) [skip ci] 2017-01-31 09:27:07 -05:00
Brian Ng
160bd3924b Normalize options sections in docs [skip ci] (#5244) 2017-01-31 08:46:01 -05:00
Matthew Stewart
d4790888a3 Limit export node default assignment stack size #4323
Signed-off-by: Matthew Stewart <mattdste@gmail.com>
2017-01-28 12:51:37 -05:00
Fabian Finke
a97be35984 Add example to spread README [skip ci] (#5227) 2017-01-27 13:39:39 +01:00
Sven SAULEAU
446b4a7dbd docs: remove link to REPL (#5216) 2017-01-26 14:50:23 -06:00
Thomas Roch
a52265c79e docs: fix do expressions JSX example (#5214) [skip ci] 2017-01-26 11:04:56 -05:00
Sven SAULEAU
931cee7ab8 docs: [skip ci] update README (#5212) 2017-01-26 08:00:23 -05:00
Sven SAULEAU
aa7817bafb transform-regenerator README pt2 (#5203)
* docs: [skip ci] remove comments in JSON

* docs: [skip ci] nit remove duplicated babelrc
2017-01-24 15:32:18 +01:00
Sven SAULEAU
7fe59c38fe docs: [skip ci] update README (#5202) 2017-01-24 08:23:35 -06:00
Sven SAULEAU
2a1db1c250 docs: [skip ci] update README (#5200) 2017-01-24 08:00:31 -06:00
Brian Ng
b69dc51be0 Fix missing parens when function expressions is tag (#5193) 2017-01-23 08:45:57 -08:00
Sven SAULEAU
c638985aca docs: [skip ci] update README (#5194) 2017-01-23 10:48:35 -05:00
Logan Smyth
7de9fa07fb v6.22.2 2017-01-19 22:03:27 -08:00
Logan Smyth
6528fe105e Break out of argument processing properly. 2017-01-19 21:47:11 -08: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
Jason Aslakson
ef25bebfa8 fix issue #5012 - Cannot read property 'declarations' of null (#5019)
- temporary fix
2017-01-19 21:36:18 -05:00
Henry Zhu
e9fc38bcd3 v6.22.0 2017-01-19 19:33:22 -05:00
Henry Zhu
4106dd3db1 Revert "Run Babel's unittests in a custom sandbox." 2017-01-19 18:43:50 -05:00
Erik Desjardins
bca170ad79 Avoid duplicating impure expressions in object rest destructuring (#5151)
* avoid duplicating impure initializers in object rest destructuring

* reuse existing VariableDeclarations in object rest destructuring, to fix two issues:

1. inserting an additional VariableDeclaration after the current one may change order of operations, which is unsafe if a future VariableDeclarator refers to a destructured variable.

2. The entire VariableDeclaration is removed when all properties are rest properties, indiscriminately removing other variables
2017-01-18 21:32:44 -05:00
Toru Kobayashi
3871236723 transform-react-constant-elements hoists Composite Components (#5137) [skip ci] 2017-01-17 14:47:04 -05:00
Logan Smyth
c76b8eec82 Run Babel's unittests in a custom sandbox. (#5135) 2017-01-17 14:46:23 -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
e863790e7e Fix linting error from merged PR. 2017-01-15 15:29:26 -08:00
Logan Smyth
c5fb56e66c Bump out chokidar dependency for the new awaitWriteFinish option. 2017-01-15 14:45:48 -08:00
Logan Smyth
40746f3dcb Merge pull request #3698 from hayeah/master
Watch mode should wait for file write. (T7411)
2017-01-15 14:44:45 -08: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
Logan Smyth
7200626021 Merge pull request #5088 from christophehurpeau/fix-issue-4851
fix: plugin-transform-object-rest-spread param with default value
2017-01-15 14:27:56 -08:00