319 Commits

Author SHA1 Message Date
Henry Zhu
690d6465d8 v7.0.0-beta.5 2017-10-30 16:55:46 -04:00
Henry Zhu
38f984f956 v7.0.0-beta.4 2017-10-30 14:33:56 -04:00
Henry Zhu
96c380899b update types [skip ci] 2017-10-30 12:35:08 -04:00
Jakub Beneš
04d2c030be Add a 'throwIfNamespace' option for JSX transform (#6563)
* Added tests for ifThrowNamespace flag

* JSX transformator could work with XMLNamespaces (ifThrowNamespace flag)

* Use template literal instead

* Attempt to reword the message

* Added docs

* Reworded docs

* Reworded docs

* Fixed missing space in error message
2017-10-28 20:44:15 -04:00
Henry Zhu
962128c0f0
Update to babylon v7 beta.30 (#6587) 2017-10-28 20:01:52 -04:00
Mauro Bringolf
2311ddbe67 Add transform to rename variables that are ES3 reserved words (#6479)
* Initial version

* Replace .includes with .indexOf and better node set to visit

* Alphabetically sort es3 reserved words and make difference helper for readability

* Fix second Array.include error that was not polyfilled

* Move es3 keywords into separate babel-types helper and use in all es3 transforms

* Reference local plugin build directly for tests

* Try relative import for babel-types

* Update to scoped package name and beta 3

* Fix unscoped package import

* Replace local plugin reference with proper plugin name
2017-10-18 15:00:58 -07:00
Logan Smyth
191624d800 Add a new utility for traversing the AST. 2017-10-18 13:55:14 -07:00
Brian Ng
72d1a72122
Update babel-types docs and lib/types [skip ci] 2017-10-18 09:43:54 -05:00
Lucas Azzola
99be60b53d Implement transform for nullish-coalescing operator (#6483)
* Implement transform for nullish-coalescing operator

* Update example output

* Switch from BinaryExpression to LogicalExpression

* Address review comments

- Use generateUidIdentifierBasedOnNode
- Inline "??"
- Clone ref node
- Move "??" to LogicalExpression in babel-types

* Fix reference to @babel/helper-plugin-test-runner

* Fix reference to @babel/plugin-syntax-nullish-coalescing-operator

* Don't use parent scope

* Remove .vscode from .gitignore, change 'lib/index.js' to 'lib'

* Ensure `document.all ?? 0 === document.all`

* Fix note and copy to an inline comment
2017-10-18 03:10:05 -04:00
Mateusz Burzyński
859ea4b175 Scoped: updated numerous docs with scoped packages change [skip ci] 2017-10-16 22:49:57 -04:00
Henry Zhu
c0a958098f Scoped: update readme headers to @babel/ [skip ci] 2017-10-16 22:49:57 -04:00
Brian Ng
645bf56838 Scoped: rename installation instructions for presets [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
691f90a774 Scoped: change test imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
8e5e27577a Scoped: update package.json dependencies to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Henry Zhu
1cd564bd16 Scoped: rename package names to @babel/ [skip ci] 2017-10-16 22:49:01 -04:00
Henry Zhu
279f55cd9b update to babylon beta.29 2017-10-16 20:10:55 -05:00
Henry Zhu
94da889ab7 v7.0.0-beta.3 2017-10-15 09:12:00 -04:00
Logan Smyth
7d6b15bba9 Regenerate types with scripts. 2017-10-08 22:31:31 -04:00
Gilbert
81496ab7b1 Pipeline operator 2017-09-29 19:01:18 -04:00
Justin Ridgewell
23f98a753a Add throw expressions (#6325)
* Add throw expressions

Stage 2 proposal: https://github.com/tc39/proposal-throw-expressions

* Update babylon

* Add to stage 2
2017-09-27 16:15:44 -04:00
Henry Zhu
70547efcc1 v7.0.0-beta.2 2017-09-26 11:14:41 -04:00
Henry Zhu
195745f25f update types readme [skip ci] 2017-09-26 11:06:03 -04:00
Henry Zhu
314bd31b85 update generator/babel-types printing, babylon (#6306)
* update generator printing, babylon [skip ci]

* Update babel-types for TS node types
2017-09-26 10:01:55 -04:00
Mateusz Burzyński
413ffe6639 Extracted babel-helper-annotate-as-pure (#6267) 2017-09-25 17:40:51 +02:00
Logan Smyth
fec79e358c Ensure that Program nodes have a sourceType. 2017-09-19 14:50:42 -07:00
Henry Zhu
23121d2bd3 v7.0.0-beta.1 2017-09-19 16:24:07 -04:00
Henry Zhu
1cdacf85ae update types readme [skip ci] 2017-09-11 23:04:12 -04:00
Henry Zhu
1c13250807 v7.0.0-beta.0 2017-09-11 23:01:41 -04:00
Daniel Tschinder
44f6ff5e85 Update prettier, eslint + plugins, flow, husky and lint-staged (#6183) 2017-08-31 22:56:29 +02:00
Henry Zhu
b82b65a31e v7.0.0-alpha.20 2017-08-30 15:02:49 -04:00
Henry Zhu
0a4f1b0a6e update babylon beta.22 (#6167) 2017-08-29 17:53:29 -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
Nicolò Ribaudo
4577bd1b7c TypeParameterInstantiation params can be "Flow" nodes, not "FlowType" (#6140) 2017-08-22 23:11:02 -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
Andy
a74b307752 babel-types: Add missing field, fix incorrect definitions (#6083)
* babel-types: Add missing field, fix incorrect definitions

* Regenerate babel-types readme
2017-08-09 16:56:19 -04:00
Boopathi Rajaa
ab76cb6b53 Fix scope of catch block (#5980)
* Fix scope of catch block

* Throw error on Duplicate variable declaration

* Update test
2017-08-08 16:26:29 -04:00
Henry Zhu
79f4956948 v7.0.0-alpha.19 2017-08-07 18:21:08 -04:00
Henry Zhu
a1debae8f0 babylon beta.19 (#6053) 2017-08-04 14:46:12 -04:00
Henry Zhu
79c6814d65 v7.0.0-alpha.18 2017-08-03 18:20:36 -04:00
Henry Zhu
d479673074 prepublish [skip ci] 2017-08-03 18:18:36 -04:00
Sarup Banskota
75808a2d14 Prevent getFunctionParent from returning Program (#5923) 2017-08-02 16:30:33 -05:00
jbrown215
4e9a25e34a Flow opaque type aliases (#5990) 2017-08-02 16:30:19 -05:00
Brian Ng
21eeed8a8c Fix generate interfaces script (#6031)
* Fix typo in TSPropertySignature type definition

* Sort fields in generate-interfaces script
2017-08-01 14:38:46 -04:00
Andy
1563221171 babel-types: Have NewExpression inherit from CallExpression (#6019) 2017-07-26 17:53:23 -04:00
Henry Zhu
9322fd0458 v7.0.0-alpha.17 2017-07-26 08:38:44 -04:00
Henry Zhu
f01438e9b1 update devdeps to latest, update babylon (#6012)
* temporary flow strip measure
2017-07-26 07:57:49 -04:00
Henry Zhu
7f1cd44d60 v7.0.0-alpha.16 2017-07-25 17:35:35 -04:00
Henry Zhu
2841945095 temporarily rename function-sent pkg to 2 (#6011) [skip ci]
* update readme [skip ci]

* rename to sent2 until we get the package [skip ci]
2017-07-25 17:30:31 -04:00
Andy
248743e6c5 babel-types: Add TypeScript definitions (#5856)
* babel-types: Add TypeScript definitions

* Add missing builders

* Allow arrow function to have "generator"

* Replace link to resolved issue with comment

* Re-add 'generator' to functionCommon
2017-07-25 11:42:25 -04:00