2097 Commits

Author SHA1 Message Date
Daniel Tschinder
1d9e509df2 Fix eslint (#4897)
* Fix eslint call

* Fix linting errors
2016-11-26 11:24:38 -05:00
Henry Zhu
9d0518b715 Readme updates from babel.github.io [skip ci] (#4884) 2016-11-22 14:17:17 -05:00
Boopathi Rajaa
7e020272c1 Fix path.evaluate for references before declarations (#4875) 2016-11-20 22:44:56 -05:00
Brian Ng
3a27f49c57 Fix identation with empty leading ObjectTypeProperty (#4862) 2016-11-19 10:47:41 -05:00
Henry Zhu
19bb830c50 use *, add test for assign-expression in parameter (#4865) 2016-11-19 10:45:00 -05:00
Henry Zhu
cd041541b8 Fix bug + Generate test fixtures if no expected.js (#4858) 2016-11-17 17:53:46 -05:00
Nikolai Tillmann
efefe828f9 Preserve null in babel-types' clone and deepClone. (#4853)
* Preserve null in babel-types' clone and deepClone.
* Also respect undefined when cloning.
* Updating last test to reflect original test case "[,0]"
2016-11-17 08:52:04 -05:00
Henry Zhu
754a6ed8c0 v6.19.0 2016-11-16 11:15:30 -05:00
Henry Zhu
54dc01440b add jsonCompatibleStrings option [skip ci] 2016-11-15 16:53:33 -05:00
Henry Zhu
4462d59acd refactor: switch ancestory/descendant logic [skip ci]
- Ref https://github.com/babel/babel/pull/4836#discussion_r88118790 @jridgewell
2016-11-15 16:41:08 -05:00
Boopathi Rajaa
55a47a8819 Add path utilities isAncestor and isDescendant (#4836)
* Add path utilities isAncestor and isDescendant

* Create ancestry.js
2016-11-15 16:36:45 -05:00
Moti Zilberman
f8ddd80f96 Greater spec compliance for class properties (#4544)
* Desugar class properties to Object.defineProperty per spec
* Define uninitialized static class properties with value=undefined
* Make class-properties increased spec compliance opt-in (spec: true)
2016-11-15 16:35:51 -05:00
Juriy Zaytsev
cf3a38fb40 Add jsonCompatibleStrings option to generator (#4827) 2016-11-15 15:03:41 -05:00
Henry Zhu
8475b6ec02 fix lint 2016-11-15 14:51:26 -05:00
Sam Pepose
db85bdc3fc Added flowCommaSeparator option for object types (#3547) 2016-11-15 14:43:42 -05:00
Henry Zhu
6a6ec8785b Start babel-types tests, add isNodesEquivalent (#3553) 2016-11-15 14:24:20 -05:00
Henry Zhu
5e0508d57c object rest - fix when destructuring in variables/parameters (#4755)
* object rest - fix when destructuring in variables/parameters

* fixes + ExportNamedDeclaration support

* Account for CatchClause

* support ForXStatement

* support assignment expression? + PR fixes
2016-11-15 11:31:03 -05:00
Shine Wang
5075f3cb6f Bug fix for printing minified literals (#4830)
* Fixed minified literal generator: now prints the shorter of `raw` and `value`.
2016-11-15 10:50:57 -05:00
Boopathi Rajaa
dbc1371ba9 Add clearCache and clearPath as separate APIs under traverse (#4835) 2016-11-15 10:48:59 -05:00
Henry Zhu
d0c884b9d4 Merge pull request #4789 from guybedford/system-dynamic-import
Support import() as contextual import in system module format
2016-11-14 18:00:06 -05:00
Henry Zhu
62ae3c7ee8 Fix system transformer to ensure consistent modules iteration (#4832)
* include test for number specifiers

* use ordered modules array over object properties
2016-11-14 13:17:54 -05:00
lion
862b387ad7 👕 Fix crlf to lf (#4837) 2016-11-13 21:42:08 +01:00
guybedford
76702a3a57 use ordered modules array over object properties 2016-11-11 17:48:14 +02:00
guybedford
bd251f236b include test for number specifiers 2016-11-11 17:48:13 +02:00
guybedford
d8c83bba52 make syntax-dynamic-import optional 2016-11-11 10:15:31 +02:00
guybedford
d62403753c babel-plugin-syntax-dynamic-import as a dependency of babel-plugin-transform-es2015-modules-systemjs 2016-11-11 09:57:44 +02:00
guybedford
11a2f07692 support import() as contextual import in system module format 2016-11-11 09:57:44 +02:00
Samuel Reed
5678e61c0f fix binding kind of destructured variables. (#4813)
Fixes #4516 and any other code that hoists into a scope
where function params are destructured.
2016-11-08 13:51:54 -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
Henry Zhu
9681b530e9 Allow relative paths in babelrc options in options.json (#4797) 2016-11-01 16:58:28 -04:00
Justin Ridgewell
15eeeb6559 Fix line endings (#4793) 2016-10-28 23:44:00 -04:00
Henry Zhu
e1ac315653 fix readme [skip ci] 2016-10-26 17:34:00 -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
46e15d9557 v6.18.0 for babel-runtime [skip ci] 2016-10-24 18:46:56 -04:00
Henry Zhu
12f9cd0826 v6.18.0 2016-10-24 17:18:36 -04:00
Henry Zhu
aae09a27d6 update readme [skip ci] 2016-10-24 16:04:45 -04:00
Andrew Levine
555ee0cb51 Don't treat JSXIdentifier in JSXMemberExpression as HTML tag. Closes #4027 (#4765) 2016-10-24 10:42:50 -04:00
Andrew Levine
de46827be7 Handle remapping of JSXIdentifier to MemberExpression in CommonJS transform. Closes #3728 (#4763) 2016-10-24 10:23:43 -04:00
Moti Zilberman
fd4667e649 Increase test coverage (#4742)
* Add tests for path type inferers

* Add test for babel-types.valueToNode

* Add tests for babel-types.toKeyAlias

* Add tests for babel-types.toStatement

* Add tests for babel-types.toExpression

* Lint fixes in babel-traverse/test/inference
2016-10-23 10:51:09 +02:00
Juriy Zaytsev
beda884f41 Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel (#4758)
* Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel

* generateUid: account for labels again
2016-10-21 17:19:59 -04:00
Sam Goldman
7bb430aeea Add variance node type and generate property variance annotations (#4697)
* Add variance node type and generate property variance annotations

babel/babylon#161 adds parsing support for property variance
annotations. This PR adds the necessary node type for the new Variance
node and generate support for all the positions where variance can now
appear.

* Variance is no longer a separate node type

This diff also adds tests to class properties and to the
flow-strip-types transform.

* Add test + fix for edge case with variance and class proeprties
2016-10-21 16:05:36 -04:00
Moti Zilberman
6bc10b5573 Support ObjectExpression in static path evaluation (#4746) 2016-10-17 18:55:02 -04:00
Daniel Tschinder
d9dd32860a Fix replacing for-of if inside label (#4736)
This replaces the label instead of the for-of itself as we already
integrate the label in the replacement nodes.
Fixes #3858
2016-10-17 17:27:13 -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
Brian Ng
dfe896dd54 Avoid unnecessary +0 in transform-es2015-parameters (#4738) 2016-10-17 17:09:55 +02:00
Jordan Gensler
391e5bd813 [import()] Initial support for dynamic-import (#4699)
* [import()] Initial support for function-like import

* [import()] Renaming import-functions to dynamic-import

* [stage-2] Fixing lint error

* add to package.json
2016-10-17 11:02:00 -04:00
Moti Zilberman
b8eeddf960 Automatically generate missing expected.js fixtures (#4735)
This is much like Babylon's existing behavior around `expected.json`. The equivalent of babel/babylon#188 is already applied here, to guard against silent failure (and a potential false positive) if a test is accidentally committed without its expected.js.
2016-10-17 16:39:32 +02: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