9032 Commits

Author SHA1 Message Date
Justin Ridgewell
3e487f89ab Don't merge test options. (#6157)
* Don't merge test options.

Particularly, I don't want `lodash/merge` to merge my specific plugins
with the general test plugins. It led to odd behavior where I could
enable a loose transform in my specific test, just to have it overridden
by the test fixture's general options.

* Need options
2017-08-28 13:36:03 -06:00
Noah Lemen
40805894c5 default to spec mode for template literal transform (#6098)
* spec/loose/default switch for template literal transform, update/re-org tests

* update readme

* flip if statements

* consolidate else/if

* readme wording modification, updates to examples
2017-08-28 12:57:09 -06:00
Henry Zhu
95dd16aeeb Merge pull request #6159 from jridgewell/pr/3701
Allow native Symbols as computed property names
2017-08-28 12:50:10 -06:00
Justin Ridgewell
ac6eda2709 Class instance properties define their own context (#6158) 2017-08-28 12:47:17 -06:00
Artem Yavorsky
7af44fce75 Merge pull request #401 from yuzhakovvv/feature/add-types-to-npmignore
Add `lib/types.js` to .npmignore
2017-08-27 15:14:19 +03:00
Oliver Don
960151c876 Fix #4840: Alias class prototype for methods in loose mode (#5560)
* Fix #4840: Alias class prototype for methods in loose mode

* Cleanup
2017-08-26 21:15:45 -04:00
Justin Ridgewell
7795750862 Tests 2017-08-25 22:52:17 -04:00
Adam Miller
2d8fdf3045 Allow native Symbols as computed property names (#6705)
The for-in loop in helpers.defineEnumerableProperties doesn't iterate over Symbols.
If Object.getOwnPropertySymbols exists, include the discovered values when defining properties.
2017-08-25 22:33:51 -04:00
Justin Ridgewell
a70cda812c Remove old test 2017-08-25 19:52:15 -04:00
Justin Ridgewell
4b297907d1 Move fix into #checkBlockScopedCollisions 2017-08-25 19:23:11 -04:00
Moti Zilberman
48c114169f Move up check for binding kind "local"
This puts the check before the call to `checkBlockScopedCollisions`.
Fixes #4946.
2017-08-25 19:21:38 -04:00
Moti Zilberman
68786c4f0f Add test for issue #4946 2017-08-25 19:21:38 -04:00
Moti Zilberman
1ef5871300 Add tests for #5491 and related cases
The two function expression tests would fail before 6705de7. The
function declaration test was not a failing case but is added here for
completeness.
2017-08-25 19:21:38 -04:00
Moti Zilberman
c3e8715010 Mask existing "local" bindings when registering new binding
Fixes #5491.
2017-08-25 19:21:38 -04:00
Mauro Bringolf
d8b4073536 Consistent const violations (#6100)
* Changed updateExpression to report itself as violation instead of its argument

* Update getBindingIdentifiers to work with forXStatement and return proper node as violation

* Updated unaryExpression violation to be consistent with changes.
2017-08-24 21:19:02 -04:00
Mateusz Burzyński
3c4f19a28d Adjusted Object Rest/Spread tests to use only allowed syntax from the latest spec (#6102) 2017-08-24 15:50:43 -04:00
Noah Lemen
2db0c3ad1d linting: disallow t.identifier("undefined") in plugins (#6096)
* add new custom eslint rule, replace remaining t.identifier("undefined") with buildUndefinedNode(), update tests

* change no-undefined-identifier reporting descriptor
2017-08-24 15:43:01 -04:00
Sven SAULEAU
f0e49dceb5 Merge pull request #400 from devdevil666/feature/license
Change license year
2017-08-24 09:20:18 +02:00
Nikita Yuzhakov
93ebb58e28 Add 'lib/types.js' to .npmignore 2017-08-23 19:08:23 +03:00
Evgeniy
0507c067f4 Change license 2017-08-23 18:48:21 +03:00
Nicolò Ribaudo
4577bd1b7c TypeParameterInstantiation params can be "Flow" nodes, not "FlowType" (#6140) 2017-08-22 23:11:02 -04:00
Daniel Lo Nigro
93cf26abca Fix babel-standalone for realz (#6137)
* Fix babel-standalone

* Fix infinite loop in Makefile (oops)

* Override Node.js module resolution to handle babel-core
2017-08-22 13:46:30 -07:00
Astha Sharma
62c22c7b5d Removed the deprecated jsx pragma detection code (#6145)
* Removed the deprecated jsx pragma detection code and the concerned tests that included jsx-pragma

* Removed extra tests

* Restored packages/babel-plugin-transform-react-jsx/test/fixtures/react/honor-custom-jsx-pragma-option/
2017-08-22 15:29:06 -04:00
Bryan Wain
63baaa7148 add --config-file option to CLI to pass in .babelrc location (#6133) 2017-08-22 13:58:24 -04:00
Justin Ridgewell
7e726a81e6 Complete export transform split (#6139)
They were each transforming the other's syntax (including namespace
transform would transform default, too, and vice-versa).
2017-08-21 14:15:40 -04:00
Ramiro Silveyra d'Avila
9e4e64dac9 Remove Flow support in React preset (#6118) 2017-08-21 10:48:18 -04:00
Daniel Lo Nigro
3569cb9922 Allow nightly Yarn builds to be used (#6138)
* Allow nightly Yarn builds to be used

Fixes:
```
C:\src\babel (fix-it-fix-it-fix-it-fix-it) (babel)
λ yarn
yarn install v1.0.0-20170811.1240
[1/5] Validating package.json...
error babel@: The engine "yarn" is incompatible with this module. Expected version ">=0.27.5".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
```

* Use Yarn 0.28.4 to fix build
2017-08-20 16:19:17 -07:00
Sangboak Lee
c6a094a9d2 Split export extensions into 2 different plugins, update stage presets (#6080) 2017-08-19 09:35:40 -04:00
[mediba] Satoshi Takeda
879bd8f850 Fix README. rename Babili to babel-minify [skip ci] (#397) 2017-08-17 21:02:56 -05:00
Henry Zhu
cee4cde53e v6.26.0 v6.26.0 2017-08-16 11:54:08 -04:00
Henry Zhu
aa330999d0 update changelog 2017-08-16 11:39:05 -04:00
Henry Zhu
5749276d7e update deps 2017-08-16 10:21:19 -04:00
Henry Zhu
7b30f77954 Merge pull request #6111 from modosc/update-regenerator
Update regenerator
2017-08-16 10:17:59 -04:00
Anup
6ab3b4c0e3 Add 'configurable' property to class fields (#6123) 2017-08-16 10:12:38 -04:00
Henry Zhu
70ab2e0620 Merge pull request #6113 from Andarist/fix/regenerator-fixtures
Fix/regenerator fixtures
2017-08-16 10:11:24 -04:00
Sven SAULEAU
0d16499fc0 Merge pull request #6124 from uxter/patch-1
Update README.md
2017-08-16 15:30:51 +02:00
Sven SAULEAU
77bbe20352 fix: [skip ci] split babel config 2017-08-16 15:30:16 +02:00
Vasiliy Shilov
bd569433c4 Update README.md: A semicolon is required after a class property. 2017-08-16 16:18:39 +03:00
Mateusz Burzyński
fffa604023 Fixed regenerator related fixtures 2017-08-16 10:02:33 +02:00
Ben Newman
e08ff8e650 Update regenerator-runtime to version 0.11.0. 2017-08-16 10:02:33 +02:00
Ben Newman
b660f61b92 Update regenerator-transform to version 0.10.0. 2017-08-16 10:02:33 +02:00
Sven SAULEAU
5fb282f73f Merge pull request #6121 from maurobringolf/babel-website-link
Update babel/website link
2017-08-16 08:56:09 +02:00
Mauro Bringolf
7cc5580c71 Update babel/website link 2017-08-16 08:41:48 +02:00
Brian Ng
2eaff3d01c Fix rest-member-expression-optimisation fixture (#6116) 2017-08-15 21:34:09 -04:00
Piotr Kowalski
b684699f79
Typo in name of most famous language [skip ci] 2017-08-15 19:35:41 -05:00
jbrown215
f4716dc816 Backport #6031 (#6112)
* Backport #6031

* Backport #6031

* Rebase on master, rerun scripts

* Update flowconfig
2017-08-15 17:42:01 -04:00
Henry Zhu
d375d80001 6.26.0 changelog [skip ci] 2017-08-15 17:06:16 -04:00
Henry Zhu
98824e7cb7 backport the fix #6052 [skip ci] 2017-08-15 17:01:25 -04:00
jbrown215
c28465e03e Flow opaque type 6.x backport (#6081)
* Flow opaque type backport

* Add tests for strip types, comments, and babel-generator

* Fix failing tests, run scripts

* Bump babylon to 6.18.0
2017-08-15 16:44:15 -04:00
Justin Ridgewell
4ca686b7be Fix relative execution location introspection (#5741)
So, I was reading the new Flow type strictness and noticed
https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/
Specifically, I wondered whether the `sum_all` example would copy the
arguments into an array, then loop over. Sadly, it does.

```js
function sum_all(...rest) {
  let ret = 0;
  for (let i = 0; i < rest.length; i++) { ret += rest[i]; }
  return ret;
}

// output
function sum_all() {
  var ret = 0;
  for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
    rest[_key] = arguments[_key];
  }
  for (var i = 0; i < rest.length; i++) { ret += rest[i]; }
  return ret;
}
```

But then I noticed if I changed `let i = 0` to `let i: number = 0`, it
worked directly on `arguments`. That lead me down a rabbit hole to
`Path#_guessExecutionStatusRelativeTo`. When tracing through, the last
comparison made no sense to me. It was trying to find the index of
`"init"` in a list of `["declarations"]` and `"body"` in `["directives",
"body"]`. Red flags and such.

But it makes sense when you're trying to compare the visitor order of
the common ancestor path. Then we're trying to find `"init"` in a list
of `["init", "test", "update", "body"]`. Oh, and there's `"body"` in
there too! And now we know the `ForStatement`'s `init` is executed
before the `body`.
2017-08-14 22:22:18 -04:00