Compare commits

..

3284 Commits

Author SHA1 Message Date
Sebastian McKenzie
4e969d3d92 v5.1.9 2015-04-14 08:30:54 -07:00
Sebastian McKenzie
0bca1de285 add 5.1.9 changelog 2015-04-14 08:29:31 -07:00
Sebastian McKenzie
3a5bd06a7e fix proeprty method assignment wrapper generator template 2015-04-14 08:28:02 -07:00
Sebastian McKenzie
66a908aaa7 Mark function token as able to start an expression 2015-04-14 08:18:06 -07:00
Sebastian McKenzie
cd0ed08237 Revert "delegate to babel-cli/babel-core if it's available #1244"
This reverts commit dd84b554e6.
2015-04-14 08:02:02 -07:00
Sebastian McKenzie
dd84b554e6 delegate to babel-cli/babel-core if it's available #1244 2015-04-14 07:53:29 -07:00
Sebastian McKenzie
b51411f090 Merge branch 'master' of github.com:babel/babel 2015-04-14 07:39:52 -07:00
Sebastian McKenzie
4cc843ded3 set hoisted to true for react constant elements optimisation 2015-04-14 07:39:44 -07:00
Sebastian McKenzie
47d253c732 set passModuleArg when handling default export specifiers in amd module formatter - fixes #1260 2015-04-14 07:39:34 -07:00
Sebastian McKenzie
09901274ab Merge pull request #1257 from zloirock/master
Update NATIVE_TYPE_NAMES
2015-04-14 07:28:00 -07:00
rock
35196e20c7 Update NATIVE_TYPE_NAMES 2015-04-14 18:24:13 +06:00
Sebastian McKenzie
35af771a29 Merge branch 'master' of github.com:babel/babel 2015-04-13 21:57:04 -07:00
Sebastian McKenzie
dee80caa09 move export reassignment to exit handler - fixes #1255 2015-04-13 21:56:55 -07:00
Sebastian McKenzie
46b7cc0a72 assorted minor cleanup of variables 2015-04-13 21:56:37 -07:00
Sebastian McKenzie
3b189e22b7 Merge pull request #1256 from jayphelps/fix-writable
class properties with an undefined value are now correctly writable
2015-04-13 21:52:46 -07:00
Jay Phelps
6ca565d7fb class properties with an undefined value are now correctly writable 2015-04-13 20:53:05 -07:00
Sebastian McKenzie
64f5480f96 fix pattern LHS error messages 2015-04-13 16:45:30 -07:00
Sebastian McKenzie
828fdc8769 make illegal LHS pattern error messages more user friendly 2015-04-13 16:40:13 -07:00
Sebastian McKenzie
6763c4415e make parenthesized array patterns illegal - cc @michaelficarra 2015-04-13 16:16:57 -07:00
Sebastian McKenzie
fb30e79e03 5.1.8 2015-04-13 15:46:45 -07:00
Sebastian McKenzie
85fb4304b0 v5.1.8 2015-04-13 15:45:46 -07:00
Sebastian McKenzie
c2da77d7ec only make parenthesized object patterns illegal - fixes #1254, ref jshint/jshint#2269 2015-04-13 15:44:54 -07:00
Sebastian McKenzie
c54c3d3c15 5.1.7 2015-04-13 15:44:02 -07:00
Sebastian McKenzie
2a7c954155 v5.1.7 2015-04-13 14:59:56 -07:00
Sebastian McKenzie
3fb7f7c7cc add 5.1.6-5.1.7 changelog 2015-04-13 14:56:33 -07:00
Sebastian McKenzie
c4b2818336 remove useless kind on import declarations 2015-04-13 14:55:46 -07:00
Sebastian McKenzie
061561bfd8 add proper ecmaVersion and sourceType to parse api 2015-04-13 14:55:37 -07:00
Sebastian McKenzie
d4944d606b 5.1.6 2015-04-13 14:29:21 -07:00
Sebastian McKenzie
736b689c3b v5.1.6 2015-04-13 14:27:09 -07:00
Sebastian McKenzie
e12b377014 don't fall back to runtime catch all on locally declared variables 2015-04-13 14:26:06 -07:00
Sebastian McKenzie
5fd5b815ab fix whitespace in resolveRc 2015-04-13 14:25:47 -07:00
Sebastian McKenzie
92db8312f6 add parse api 2015-04-13 14:25:37 -07:00
Sebastian McKenzie
e080fe547d 5.1.5 2015-04-13 11:59:47 -07:00
Sebastian McKenzie
b967ecf063 v5.1.5 2015-04-13 11:58:58 -07:00
Sebastian McKenzie
365b7285d2 bump core-js version 2015-04-13 11:58:09 -07:00
Sebastian McKenzie
a40d532b0e 5.1.4 2015-04-13 09:38:21 -07:00
Sebastian McKenzie
0487bf911d v5.1.4 2015-04-13 09:36:21 -07:00
Sebastian McKenzie
57c72d1cd0 fix syntax error in runtime definitions 2015-04-13 09:35:35 -07:00
Sebastian McKenzie
335bdffec2 add missing Reflect methods to runtime transformer #1248 2015-04-13 09:34:45 -07:00
Sebastian McKenzie
e1d76a1dfe 5.1.3 2015-04-13 09:25:37 -07:00
Sebastian McKenzie
a4845323a2 v5.1.3 2015-04-13 09:24:00 -07:00
Sebastian McKenzie
792951b489 add 5.1.3 changelog 2015-04-13 09:23:12 -07:00
Sebastian McKenzie
5adda836af don't do TCO on generators and async functions - fixes #1251 2015-04-13 09:21:59 -07:00
Sebastian McKenzie
4c2c3098c3 Merge branch 'master' of github.com:babel/babel 2015-04-13 09:20:36 -07:00
Sebastian McKenzie
087c714098 simplify runtime transformer traversal and add a catch-all - fixes #1248 2015-04-13 09:20:28 -07:00
Sebastian McKenzie
5a33e4fe05 Merge pull request #1245 from deepsweet/travis-cache
let Travis cache node_modules
2015-04-13 08:29:59 -07:00
Sebastian McKenzie
5f8667eaa7 make parsing of decorators stateless - fixes shuhei/babel-angular2-app#4 2015-04-13 08:26:51 -07:00
Sebastian McKenzie
31b4468514 switch to vanilla regenerator - closes #1247, closes #1123 2015-04-13 08:08:00 -07:00
Kir Belevich
2be9678bbe let Travis cache node_modules 2015-04-13 17:54:50 +07:00
Sebastian McKenzie
b5210877cf 5.1.2 2015-04-13 00:54:00 -07:00
Sebastian McKenzie
658dde768e v5.1.2 2015-04-13 00:52:43 -07:00
Sebastian McKenzie
8df1d81ca4 fix iterable runtime name 2015-04-13 00:51:50 -07:00
Sebastian McKenzie
a505e4a121 aAdd getIterator and isIterable to babel-runtime build script - fixes #1243 2015-04-13 00:48:19 -07:00
Sebastian McKenzie
71eafdcac7 5.1.1 2015-04-13 00:14:47 -07:00
Sebastian McKenzie
65060b0c97 v5.1.1 2015-04-13 00:13:52 -07:00
Sebastian McKenzie
09883962f1 add item to 5.1.0 changelog 2015-04-13 00:13:05 -07:00
Sebastian McKenzie
1583262807 add missing runtime symbol definitions - fixes #1242 2015-04-13 00:12:59 -07:00
Sebastian McKenzie
04c7cd5c0c add note to 5.1.0 changelog 2015-04-12 21:29:29 -07:00
Sebastian McKenzie
3f6969f4f8 5.1.0 2015-04-12 21:23:21 -07:00
Sebastian McKenzie
23db842cb8 v5.1.0 2015-04-12 21:22:25 -07:00
Sebastian McKenzie
41c82e00f9 add 5.1.0 changelog 2015-04-12 21:21:35 -07:00
Sebastian McKenzie
766099e783 5.0.13 2015-04-12 21:21:31 -07:00
Sebastian McKenzie
53bc54b3b2 v5.0.13 2015-04-12 21:14:12 -07:00
Sebastian McKenzie
bb70f37123 Merge branch 'master' of github.com:babel/babel 2015-04-12 20:59:26 -07:00
Sebastian McKenzie
8a0317132e deopt array unpack optimisation on member expressions - fixes #1241 2015-04-12 20:59:17 -07:00
Sebastian McKenzie
f598c70841 Merge pull request #1215 from AluisioASG/es7-trailing-function-commas
ES7 trailing function commas
2015-04-12 19:17:02 -07:00
Sebastian McKenzie
61b57ea055 rejigger decorator alias 2015-04-12 19:10:22 -07:00
Sebastian McKenzie
a971ad7fd2 Merge branch 'master' of github.com:babel/babel 2015-04-12 19:07:19 -07:00
Sebastian McKenzie
27b6f804ce clean up class decorators #1185 2015-04-12 19:06:59 -07:00
Sebastian McKenzie
8ab79f3a72 Merge pull request #1240 from JaRail/master
Fix broken dead-code-removal case.
2015-04-12 18:58:45 -07:00
James Railton
0c2bf2f5a2 Fix broken dead-code-removal case.
The "test" local variable was removed with path work. The last dead-code-removal check used this var. By reintroducing the local var, the unknown variable reference is fixed.
2015-04-12 18:52:37 -07:00
Sebastian McKenzie
7e1a4be085 add use strict header to decorators test 2015-04-12 09:09:26 -07:00
Sebastian McKenzie
bbc951dfe1 fix decorators order - thanks to some random japanese tweet i translated... 2015-04-12 09:05:46 -07:00
Sebastian McKenzie
b3e4aefe12 update runtime transformer to not use $for module - cc @zloirock 2015-04-12 09:00:32 -07:00
Sebastian McKenzie
26b5174dfa add descriptor for all class properties - fixes #1235 2015-04-12 08:53:01 -07:00
Sebastian McKenzie
652d3c7320 move eval and arguments identifier handling to nameMethod helper 2015-04-11 20:51:01 -07:00
Sebastian McKenzie
edc2cd320c don't consider eval and arguments valid identifiers - fixes #1232 2015-04-11 20:45:44 -07:00
Sebastian McKenzie
274a6e01dc add support for inheriting from statically inlined native constructors - closes #1172 2015-04-11 19:47:11 -07:00
Sebastian McKenzie
3561efdb86 update runtime transformer to modular core-js - fixes #1206 2015-04-11 19:07:39 -07:00
Sebastian McKenzie
1a30f1aafc fix regression with completion records for assignment expressions - fixes #1204 2015-04-11 18:13:47 -07:00
Sebastian McKenzie
e362512af3 switch to my branch of regenerator - #1123, fixes #1015 2015-04-11 17:59:14 -07:00
Sebastian McKenzie
cf5d2429b4 add support for replacement of for inits with statements - fixes #1217 2015-04-11 17:40:12 -07:00
Sebastian McKenzie
72098036b2 remove useless this from lodash map 2015-04-11 17:39:50 -07:00
Sebastian McKenzie
7905f48280 clean up dynamic imports, disable hoisting in system module formatter when **any** dynamic imports are included - fixes #1219 2015-04-11 17:22:48 -07:00
Sebastian McKenzie
aba2d1c23c fix loop constants test error message 2015-04-11 16:50:08 -07:00
Sebastian McKenzie
5326e0543d fix scope tracking for constants in loop heads - fixes #1229 2015-04-11 16:39:18 -07:00
Sebastian McKenzie
1360c93e4b fix enumerable property position in test 2015-04-11 16:35:19 -07:00
Sebastian McKenzie
235cbc18cf Merge branch 'master' of github.com:babel/babel 2015-04-11 16:31:11 -07:00
Sebastian McKenzie
98c5255b91 add support for object literal decorators - fixes #1154 2015-04-11 16:30:55 -07:00
Sebastian McKenzie
2a9777cc20 add solo helpers
# Conflicts:
#	src/babel/transformation/file/index.js
2015-04-11 14:33:56 -07:00
Sebastian McKenzie
1cfca745a4 Merge pull request #1228 from Hermanya/patch-1
Update README.md
2015-04-11 08:52:30 -07:00
Herman Starikov
a3459deecf Update README.md 2015-04-11 11:52:01 -04:00
Sebastian McKenzie
070152f6c1 parse await expression as a unary instead of an assignment - fixes #1225 2015-04-10 15:23:11 -07:00
Sebastian McKenzie
719fdf5ca1 set canBeArrow to true when parsing async functions 2015-04-10 13:51:30 -07:00
Sebastian McKenzie
f2460c6173 update to latest acorn 2015-04-10 13:44:50 -07:00
Sebastian McKenzie
155c640409 remove null regex check - fixes #1222 2015-04-10 13:44:41 -07:00
Sebastian McKenzie
7de4718b27 Merge branch 'master' of github.com:babel/babel 2015-04-09 14:58:41 -07:00
Sebastian McKenzie
4e6aed0408 don't shadow default parameter scope iife and instead just apply the this and arguments - fixes #1128 2015-04-09 14:58:33 -07:00
Brian Donovan
3be8ccf68d Prevent this command from failing during CI. 2015-04-09 14:49:45 -07:00
Sebastian McKenzie
704b31f44f use path basename as non-default import fallback - fixes #1207 2015-04-09 14:36:00 -07:00
Sebastian McKenzie
1a9f193841 Merge pull request #1216 from leebyron/update-deps
Update package dependencies
2015-04-09 13:50:23 -07:00
Lee Byron
7ff67589a7 Update package dependencies
Babel currently relies on some older versions of some dependencies. When using babel alongside other projects which use similar dependencies, this can cause npm to install multiple versions of these or to result in Babel loading a version of a dependency it doesn't claim to support.

This was mostly clean, though esutils did have a minor API change.
2015-04-09 13:38:20 -07:00
Brian Donovan
80f109efeb Ensure arrow function bodies are wrapped in parens if needed.
Closes #1214.
2015-04-09 11:50:52 -07:00
Brian Donovan
77c72bb5a6 Unlink global babel before bootstrapping to make it idempotent. 2015-04-09 09:55:48 -07:00
Aluísio Augusto Silva Gonçalves
6c5e0e6590 Add Acorn tests for trailing function commas 2015-04-09 13:35:48 -03:00
Sebastian McKenzie
83324b977d Merge branch 'master' of github.com:babel/babel
# Conflicts:
#	packages/babel-cli/package.json
2015-04-09 06:46:26 -07:00
Sebastian McKenzie
5feab11d3f Merge pull request #1212 from paulmillr/patch-2
Update to stable chokidar.
2015-04-09 06:45:58 -07:00
Sebastian McKenzie
7b4172ce7b remove chokidar from root package.json 2015-04-09 06:45:48 -07:00
Paul Miller
84439384c0 Update to stable chokidar. 2015-04-09 16:45:30 +03:00
Sebastian McKenzie
c9e7c306cc don't emit tokens when doing a lookahead 2015-04-09 06:44:16 -07:00
Sebastian McKenzie
1e398e45ff 5.0.12 2015-04-09 06:44:06 -07:00
Sebastian McKenzie
475324c4b5 Update to stable chokidar. 2015-04-09 06:43:58 -07:00
Sebastian McKenzie
407daf4bac Merge pull request #1205 from suryagaddipati/patch-1
Fix typo
2015-04-08 16:00:32 -07:00
Surya Gaddipati
4155590cd8 Fix typo 2015-04-08 18:00:03 -05:00
Sebastian McKenzie
0be6fd7abe Merge pull request #1203 from sindresorhus/modularize-userhome
modularize `user-home`
2015-04-08 09:49:03 -07:00
Sindre Sorhus
cf51bf1395 modularize user-home
No reason Babel should have to care about the intricacies of this.

This module is already used by `bower`, `eslint`, `yo`, etc.
2015-04-08 22:59:16 +07:00
Sebastian McKenzie
06a31c419a v5.0.12 2015-04-08 08:55:02 -07:00
Sebastian McKenzie
da566110c0 add 5.0.12 changelog 2015-04-08 08:53:40 -07:00
Sebastian McKenzie
c12c4a5c39 don't touch function name containers when remapping modules - fixes #1160 2015-04-08 08:52:53 -07:00
Sebastian McKenzie
d114349890 5.0.11 2015-04-08 08:15:15 -07:00
Sebastian McKenzie
8d6ae0e1eb v5.0.11 2015-04-08 08:14:28 -07:00
Sebastian McKenzie
cb8b47ee2f add missing curly brace to regression test 2015-04-08 08:13:33 -07:00
Sebastian McKenzie
daf24c5c59 add 5.0.10 changelog 2015-04-08 08:12:33 -07:00
Sebastian McKenzie
cdb2784e75 add #1199 regression test 2015-04-08 08:11:01 -07:00
Sebastian McKenzie
93feabb82e fix forOf loop inheritance - fixes #1169 2015-04-08 08:10:53 -07:00
Sebastian McKenzie
982c142bf6 Merge branch 'master' of github.com:babel/babel 2015-04-08 07:47:52 -07:00
Sebastian McKenzie
de5520a94f disable scope caching 2015-04-08 07:42:04 -07:00
Sebastian McKenzie
c239d06f10 fix MetaProperty generation 2015-04-08 07:41:56 -07:00
Sebastian McKenzie
a5fed376d8 Merge pull request #1191 from zertosh/babelrc-comments
Strip out comments before parsing babelrc
2015-04-07 18:09:07 -07:00
Sebastian McKenzie
e99fd77d89 downgrade and fix mocha version - fixes #1196 2015-04-07 18:07:23 -07:00
Sebastian McKenzie
1374863b9c 5.0.10 2015-04-07 18:06:52 -07:00
Andres Suarez
e88c28f88b Strip out comments before parsing babelrc 2015-04-07 18:50:01 -04:00
Sebastian McKenzie
7a0fd26f56 v5.0.10 2015-04-07 13:04:25 -07:00
Sebastian McKenzie
17583e4807 fix decrators modules test 2015-04-07 13:03:41 -07:00
Sebastian McKenzie
37dd5137ff don't modules reassign _ignoreModulesRemap assignments 2015-04-07 13:02:28 -07:00
Sebastian McKenzie
24fced406e Merge branch 'master' of github.com:babel/babel 2015-04-07 09:55:11 -07:00
Sebastian McKenzie
0ab1362893 don't reassign decorated classes - fixes #1167 2015-04-07 09:54:14 -07:00
Sebastian McKenzie
96506f4249 5.0.9 2015-04-07 09:20:40 -07:00
Sebastian McKenzie
ed747f88bd Merge pull request #1185 from Dignifiedquire/class-decorators-scope
Take 2: Fix class decorator scoping.
2015-04-07 08:49:56 -07:00
dignifiedquire
3987545b4f Ensure correct scope for decorated classes. 2015-04-07 14:57:15 +02:00
dignifiedquire
148aa3f96d Use a functionExpression with class decorators. Fixes #1161. 2015-04-07 14:16:48 +02:00
Sebastian McKenzie
0cb5a7c91e Revert "Use a functionExpression with class decorators. Fixes #1161."
This reverts commit f8d56d9612.
2015-04-07 04:40:39 -07:00
Sebastian McKenzie
fc34d5a9b0 Merge pull request #1184 from Dignifiedquire/class-decorators
Use a functionExpression with class decorators. Fixes #1161.
2015-04-07 03:39:59 -07:00
dignifiedquire
f8d56d9612 Use a functionExpression with class decorators. Fixes #1161. 2015-04-07 12:11:49 +02:00
Brian Donovan
737be0e95e Merge pull request #1173 from alawatthe/patch-1
Fixed path for mocha tests in CONTRIBUTING.md
2015-04-06 09:56:31 -07:00
Alexander Zeilmann
26e2b392e8 Fixed path for mocha tests 2015-04-06 18:38:33 +02:00
Sebastian McKenzie
708cdfb993 v5.0.9 2015-04-06 06:28:58 -07:00
Sebastian McKenzie
8cb3aabefa add 5.0.9 changelog 2015-04-06 06:26:11 -07:00
Sebastian McKenzie
4a87b35d20 fix function name self referencing test 2015-04-06 06:23:46 -07:00
Sebastian McKenzie
543554b258 flow tests style nit 2015-04-06 06:20:09 -07:00
Sebastian McKenzie
afd95cf663 add #1168 regression test 2015-04-06 06:20:05 -07:00
Sebastian McKenzie
87ce4b9cd8 fix order of parameter type annotation parsing - fixes #1168 2015-04-06 06:19:13 -07:00
Sebastian McKenzie
6b76f26ed8 use module id if available for umd global name - fixes #1166 2015-04-06 06:14:09 -07:00
Sebastian McKenzie
c2776e63ae rename umd module variable name - fixes #1166 2015-04-06 06:13:43 -07:00
Sebastian McKenzie
3f2fe363d1 Merge pull request #1163 from chocolateboy/babel_node_print_fix
babel-node --print: don't mangle percent characters (%)
2015-04-06 06:06:21 -07:00
Sebastian McKenzie
8de28098f4 Merge pull request #1170 from alawatthe/master
Replaced FUNCTION_ID by FUNCTION_KEY - fixes #1164
2015-04-06 06:02:49 -07:00
Aluísio Augusto Silva Gonçalves
584532cc2c [ES7] Trailing comma in function parameter list
Currenly a stage 1 proposal.
See https://github.com/jeffmo/es-trailing-function-commas.
2015-04-06 09:10:44 -03:00
alawatthe
9a28f3fdb1 Replaced FUNCTION_ID by FUNCTION_KEY - fixes #1164 2015-04-06 10:53:41 +02:00
chocolateboy
88941b3270 babel-node --print: don't mangle percent characters (%)
This applies the babel fix in #528 to babel-node.

before:

    $ babel-node --print --eval '"%%"'
    '%'

after:

    $ babel-node --print --eval '"%%"'
    '%%'
2015-04-05 06:26:29 +01:00
Sebastian McKenzie
3a768db2bf fix missing this in acorn parseExprAtom 2015-04-05 03:26:41 +10:00
Sebastian McKenzie
320a39f4c4 fix computed properties in es7 object rest/spread - thanks @AluisioASG! 2015-04-05 02:52:14 +10:00
Sebastian McKenzie
dc98ac7c93 5.0.8 2015-04-04 17:09:35 +11:00
Sebastian McKenzie
6e456f0ec1 v5.0.8 2015-04-04 17:05:47 +11:00
Sebastian McKenzie
793090628d fix #1157 regression test 2015-04-04 17:03:54 +11:00
Sebastian McKenzie
9ed251cb08 add 5.0.8 changelog 2015-04-04 17:02:50 +11:00
Sebastian McKenzie
480fa7f4e0 add regression test for #1157 2015-04-04 16:59:29 +11:00
Sebastian McKenzie
3e642dfa1b Merge pull request #1157 from jayphelps/patch-1
[BUGFIX] Check whether `value` key is in descriptor instead of checking truthy value
2015-04-04 16:57:57 +11:00
Jay Phelps
d9cbce1862 [BUGFIX] checking whether value key is in descriptor instead of checking if value is truthy since !!0 === false
class Foo {
  static bar = 0;
}

Foo.bar++;
// Cannot assign to read only property 'bar' of function
2015-04-03 22:49:34 -07:00
Sebastian McKenzie
4bd19da3c2 fix tests, better block scoped collisions 2015-04-04 14:17:26 +11:00
Sebastian McKenzie
7c710a0378 move var scope collector to before block - fixes #1153 2015-04-04 14:09:34 +11:00
Sebastian McKenzie
56335409d3 stop constructor verification traversal on FunctionDeclaration/FunctionExpression - fixes #1155 2015-04-04 14:01:26 +11:00
Sebastian McKenzie
91d78afc67 update 5.0.7 changelog 2015-04-04 05:32:32 +11:00
Sebastian McKenzie
54c6339f20 5.0.7 2015-04-04 04:51:24 +11:00
Sebastian McKenzie
fdcf64265e v5.0.7 2015-04-04 04:49:31 +11:00
Sebastian McKenzie
ffdfb491eb disable identifier resolution - fixes #1149 2015-04-04 04:46:49 +11:00
Sebastian McKenzie
eedd431f2b remove HOMEPATH from register cache home resolution 2015-04-04 04:40:10 +11:00
Sebastian McKenzie
db9ed0235f finally fix cli tests 2015-04-04 04:39:28 +11:00
Sebastian McKenzie
6c98d39937 grr, debugging travis builds is hard 2015-04-04 04:01:35 +11:00
Sebastian McKenzie
20651df3ce try and fix babel cli bootstrap 2015-04-04 03:47:47 +11:00
Sebastian McKenzie
f3155919fe shift USERPROFILE over in home resolution in babel/register - fixes #1148 2015-04-04 03:46:07 +11:00
Sebastian McKenzie
0ac8330899 remove bable-core in babel-cli bootstrap 2015-04-04 03:40:01 +11:00
Sebastian McKenzie
67201e9698 add ignore/only option to cli 2015-04-04 03:31:19 +11:00
Sebastian McKenzie
c715d96e46 wrap non-arrays/strings/falsys in an array in util.list - fixes babel/babelify#69 2015-04-04 02:40:09 +11:00
Sebastian McKenzie
b7a08100a6 add default live bindings to common module formatter 2015-04-04 01:56:58 +11:00
Sebastian McKenzie
5f91ee8a1a 5.0.6 2015-04-03 23:15:34 +11:00
Sebastian McKenzie
bc1abb5103 v5.0.6 2015-04-03 23:13:43 +11:00
Sebastian McKenzie
4b9207e5df add 5.0.6 changelog 2015-04-03 23:12:10 +11:00
Sebastian McKenzie
e847f3685f should only throw an error for colliding param bindings for let and const 2015-04-03 23:11:04 +11:00
Sebastian McKenzie
d64c2c0c45 turn internalRemap into a null inherited object, fixes a nasty bug where module import live bindings would return a function if they referenced a method on Object.prototype (eg. toString) 2015-04-03 23:10:09 +11:00
Sebastian McKenzie
76d0fb4ba6 5.0.5 2015-04-03 22:44:16 +11:00
Sebastian McKenzie
0f33b7bfbc v5.0.5 2015-04-03 22:42:50 +11:00
Sebastian McKenzie
630224e504 add 5.0.5 changelog 2015-04-03 22:41:06 +11:00
Sebastian McKenzie
62980ab6b4 Merge branch 'master' of github.com:babel/babel
t push
2015-04-03 22:38:28 +11:00
Sebastian McKenzie
d34480b42b add support for arrays to util.list - fixes #["foo", "bar"] 2015-04-03 22:38:08 +11:00
Sebastian McKenzie
306de2edbf Merge pull request #1144 from tricknotes/fix-for-browserify
Update core-js to ^0.8.1
2015-04-03 22:23:48 +11:00
Ryunosuke SATO
c33e84730d Update core-js to ^0.8.1
This version fixes the error for some environments that
has no `setTimeout`/`setInterval`.
2015-04-03 18:38:33 +09:00
Sebastian McKenzie
20f28aba64 5.0.4 2015-04-03 15:34:20 +11:00
Sebastian McKenzie
9c312607d1 Merge branch 'master' of github.com:babel/babel 2015-04-03 15:33:27 +11:00
Sebastian McKenzie
33659711c3 Merge pull request #1142 from cesarandreu/add-babel-readme
Add README.md to babel-cli
2015-04-03 15:33:00 +11:00
Sebastian McKenzie
b154af48a7 Merge branch 'master' of github.com:babel/babel 2015-04-03 15:32:52 +11:00
Cesar Andreu
bad877946f Add README.md to babel-cli 2015-04-02 21:31:47 -07:00
Sebastian McKenzie
dff3751e7f v5.0.4 2015-04-03 15:31:08 +11:00
Sebastian McKenzie
23038dcfff Merge pull request #1141 from fkling/patch-1
Update SO link in README.md
2015-04-03 15:30:47 +11:00
Felix Kling
7c7a7ee17f Update README.md
The SO link currently points to https://github.com/babel/babel/blob/master/stackoverflow.com, which is incorrect. After this change it points to the list of babeljs questions.
2015-04-02 21:29:56 -07:00
Sebastian McKenzie
9f467ef7c0 5.0.3 2015-04-03 15:29:16 +11:00
Sebastian McKenzie
a52f9ab346 add 5.0.4 changelog 2015-04-03 15:29:11 +11:00
Sebastian McKenzie
5ccbed585b Merge pull request #1140 from cesarandreu/patch-2
Avoid searching .babelrc if breakConfig is set
2015-04-03 15:27:24 +11:00
Sebastian McKenzie
f7c7da7526 v5.0.3 2015-04-03 15:24:47 +11:00
Cesar Andreu
ed58c80c64 Avoid searching .babelrc if breakConfig is set 2015-04-02 21:24:06 -07:00
Sebastian McKenzie
d7fb9f67df t push
make publish
Merge branch 'master' of github.com:babel/babel
2015-04-03 15:23:03 +11:00
Sebastian McKenzie
eef6002324 add 5.0.3 changelog 2015-04-03 15:22:36 +11:00
Sebastian McKenzie
32bcf4c3a5 Merge pull request #1139 from cesarandreu/patch-3
Add breakConfig to options.json
2015-04-03 15:19:41 +11:00
Sebastian McKenzie
86060cb0ce switch back to global uid registry - fixes #1136 2015-04-03 15:18:04 +11:00
Cesar Andreu
66a836d435 breakConfig should be hiddebn 2015-04-02 21:14:26 -07:00
Cesar Andreu
ecc14c2a31 Add breakConfig to options.json 2015-04-02 21:09:56 -07:00
Sebastian McKenzie
7e9b60fba5 turn into absolute location if not for rc resolution - fixes #1137 2015-04-03 15:03:00 +11:00
Sebastian McKenzie
313f1e755a 5.0.2 2015-04-03 06:55:53 +11:00
Sebastian McKenzie
8c7ef0a2c9 v5.0.2 2015-04-03 06:53:46 +11:00
Sebastian McKenzie
8f79010b16 add regression test for #1130 2015-04-03 06:52:23 +11:00
Sebastian McKenzie
022e6f26aa fix not being able to call non-writable methods - fixes #1133 2015-04-03 06:52:17 +11:00
Sebastian McKenzie
138fa6c9f8 add 5.0.1 changelog 2015-04-03 06:52:02 +11:00
Sebastian McKenzie
c07704cc80 remove parentPath existence check 2015-04-03 06:48:46 +11:00
Sebastian McKenzie
bf811ea34a 5.0.1 2015-04-03 06:47:47 +11:00
Sebastian McKenzie
8af3ea1c43 fix duplicate declaration regression - fixes #1130 2015-04-03 06:47:41 +11:00
Sebastian McKenzie
5fbe147a5e v5.0.1 2015-04-03 05:49:16 +11:00
Sebastian McKenzie
a9e214b1db fix build cli script 2015-04-03 05:48:02 +11:00
Sebastian McKenzie
6812fca7a9 v5.0.0 2015-04-03 05:36:47 +11:00
Sebastian McKenzie
ebc42f5ce0 add setInterval and setTimeout noop to browserify test pending a new core-js patch release 2015-04-03 04:53:13 +11:00
Sebastian McKenzie
b12a97ddd6 rename returnUsedHelpers to metadataUsedHelpers 2015-04-03 04:50:19 +11:00
Sebastian McKenzie
e8daad38a7 remove beta tag from npm publish 2015-04-03 04:39:45 +11:00
Sebastian McKenzie
c6c0bc07e2 fix empty whitelist in build-external-helpers - fixes #1129 2015-04-03 04:39:39 +11:00
Sebastian McKenzie
c60f3f0e34 fix runtime transformer and update tests 2015-04-03 02:56:32 +11:00
Sebastian McKenzie
07078138f3 update to core-js 0.8.0 2015-04-03 02:37:02 +11:00
Sebastian McKenzie
cb0026edfe fix plugin api 2015-04-03 01:53:25 +11:00
Sebastian McKenzie
ab55ec4ea2 fix afterPlugins variable 2015-04-03 00:33:54 +11:00
Sebastian McKenzie
e164123ce9 remove packages README 2015-04-03 00:33:48 +11:00
Sebastian McKenzie
f42bacf4f6 fix syntax error in File 2015-04-03 00:02:13 +11:00
Sebastian McKenzie
46adb07d41 add plugin api - closes #987 2015-04-02 23:49:24 +11:00
Sebastian McKenzie
e10bdf7c5b add try-catch to util.resolveRelative 2015-04-02 23:44:29 +11:00
Sebastian McKenzie
83eea2acc7 add babel-cli init to bootstrap 2015-04-02 23:34:28 +11:00
Sebastian McKenzie
8bdd4cc559 fix babel-external-helpers path in Makefile 2015-04-02 23:16:01 +11:00
Sebastian McKenzie
15d31b5608 move babel cli into separate folder #1097 2015-04-02 23:12:05 +11:00
Sebastian McKenzie
9ed6a7b650 simplify dynamic imports 2015-04-02 22:03:57 +11:00
Sebastian McKenzie
01a2aa7dd1 support multiple export specifier remapping 2015-04-02 20:25:05 +11:00
Sebastian McKenzie
33fde5f143 update 5.0.0 changelog 2015-04-02 20:09:29 +11:00
Sebastian McKenzie
682c775a97 fix babel-node require test to reflect import hoisting 2015-04-02 19:34:21 +11:00
Sebastian McKenzie
4846b89931 export options in browser api 2015-04-02 19:28:18 +11:00
Sebastian McKenzie
25312396a5 add live binding support to modules - fixes #1117, fixes #1057, closes #1118 2015-04-02 19:28:11 +11:00
Sebastian McKenzie
cfff7aa6fb simplfy function name inference wrapper - closes #1002 2015-04-02 02:37:00 +11:00
Sebastian McKenzie
f88a4147a6 traceur upstream sync 2015-04-02 02:21:12 +11:00
Sebastian McKenzie
3c343adf33 add support for super update and assignment expressions - fixes #426 2015-04-02 02:21:04 +11:00
Sebastian McKenzie
269587cde5 hoist block iife to avoid creating a new one for each loop iteration 2015-04-02 00:58:01 +11:00
Sebastian McKenzie
121ba8c381 fix loop block scoping, check for exact reference when doing closure detection - fixes #973 2015-04-02 00:04:10 +11:00
Sebastian McKenzie
563a427b69 add ludicrous transformer 2015-04-01 23:23:09 +11:00
Sebastian McKenzie
658164a0d2 fix booleanString compact option 2015-04-01 23:21:32 +11:00
Sebastian McKenzie
135ba84abb fix es7 export extensions compound list 2015-04-01 23:21:16 +11:00
Sebastian McKenzie
76573093bd add umd globals export - fixes #375 2015-04-01 23:02:03 +11:00
Sebastian McKenzie
22b88487ee remove use strict directive from react test 2015-04-01 14:12:11 +11:00
Sebastian McKenzie
3686951dc1 5.0.0-beta4 2015-04-01 14:07:41 +11:00
Sebastian McKenzie
f43ca32ff5 move es6 tail call test 2015-04-01 14:07:32 +11:00
Sebastian McKenzie
424a59a856 dont coerce jsx expression containers - fixes #1126 2015-04-01 14:07:26 +11:00
Sebastian McKenzie
5f159853d5 fix paramless async calls 2015-04-01 13:57:59 +11:00
Sebastian McKenzie
f9c56c6dd7 properly export acorn 2015-04-01 13:51:15 +11:00
Sebastian McKenzie
613e77cd50 v5.0.0-beta4 2015-04-01 00:46:35 +11:00
Sebastian McKenzie
27c97aab34 reneable seting of type annotations 2015-04-01 00:44:54 +11:00
Sebastian McKenzie
ad857dddd1 add verification check to deprecation 2015-04-01 00:39:20 +11:00
Sebastian McKenzie
d9762e9049 expose options 2015-04-01 00:39:12 +11:00
Sebastian McKenzie
088846a347 Merge branch 'master' of github.com:babel/babel 2015-03-31 23:47:55 +11:00
Sebastian McKenzie
7fc28cb63f move deprecation check down 2015-03-31 23:47:40 +11:00
Sebastian McKenzie
3323e0f3a5 add descriptions to remaining options 2015-03-31 23:39:02 +11:00
Sebastian McKenzie
8c09a2198a fix es7.exportExtensions stage 2015-03-31 23:38:51 +11:00
Sebastian McKenzie
eeb5b8d0c3 add es1.ludicrous transformer skeleton 2015-03-31 23:38:40 +11:00
Sebastian McKenzie
19e8274e79 make it abundantly clear in the readme that the issue tracker is not for support and questions. i'm spread thin enough and don't need to be doing support for everyone, i wish i could but sadly i can't :( 2015-03-31 23:38:16 +11:00
Sebastian McKenzie
6353abfd1b move remapAssignments to init method in the module formatter - fixes #1124 2015-03-31 19:28:42 +11:00
Sebastian McKenzie
ee14770a5c fix variable declaration semicolons in for loops 2015-03-31 10:44:31 +11:00
Sebastian McKenzie
d3b9b7251e remove 6to5 binaries 2015-03-31 10:44:10 +11:00
Sebastian McKenzie
3f7f89a6b9 make babel.json filename hidden - #1093 2015-03-31 05:27:22 +11:00
Sebastian McKenzie
7476b8c6a3 don't coerce compiled sibling children to a single literal - @spicyj 2015-03-31 03:49:41 +11:00
Sebastian McKenzie
1ef41b6f32 optimisation.react.inlineElements: move children into props and leave children out if the element has none - @spicyj 2015-03-31 03:31:27 +11:00
Sebastian McKenzie
6bc2bfce7d rename runtimeES3 transformer to es3.runtime 2015-03-31 02:34:32 +11:00
Sebastian McKenzie
153e81261c inherit string quotes - fixes #991 2015-03-31 02:09:56 +11:00
Sebastian McKenzie
b8f2a27e90 take export default specifiers into consideration in t.isSpecifierDefault 2015-03-31 01:41:04 +11:00
Sebastian McKenzie
2f25c3bd17 use users home directory to store babel/register cache - fixes #1093 2015-03-31 01:40:53 +11:00
Sebastian McKenzie
59e07b65dd downgrade core-js 2015-03-31 01:34:38 +11:00
Sebastian McKenzie
769f7fb81d update runtime tests 2015-03-31 01:30:51 +11:00
Sebastian McKenzie
7895857624 remove dead tests 2015-03-31 01:27:48 +11:00
Sebastian McKenzie
80fed5f395 take into consideration default export specifiers in common module formatter - fixes #1071 2015-03-31 01:27:43 +11:00
Sebastian McKenzie
1c7fabdd6d add runtimeES3 transformer 2015-03-31 01:20:14 +11:00
Sebastian McKenzie
12f8fa229d remove redundant spec.functionName tests 2015-03-30 21:49:58 +11:00
Sebastian McKenzie
c6546264d2 split up spec.functionName tests 2015-03-30 21:46:08 +11:00
Sebastian McKenzie
86cc5875cf re-enable shit safari test #1121 2015-03-30 21:46:01 +11:00
Sebastian McKenzie
9ea999b261 clean up class property initializers, handle scope collisions in constructors 2015-03-30 20:32:14 +11:00
Sebastian McKenzie
f81e841283 don't block hoist in system module formatter when runtime transformer is enabled - #1105 2015-03-30 18:24:44 +11:00
Sebastian McKenzie
c14ffb8319 Merge branch 'guybedford-system-unhoist-generators' into experimental 2015-03-30 18:16:44 +11:00
Sebastian McKenzie
b9f4fe86f1 merge 2015-03-30 18:16:28 +11:00
Sebastian McKenzie
56ada634b4 Merge pull request #1112 from ben-ng/patch-1
Incorrect package path
2015-03-30 18:13:37 +11:00
Sebastian McKenzie
c4d68897b3 rename own binding inside constructor if it collides with our class reference - fixes #1077 2015-03-30 18:06:59 +11:00
Sebastian McKenzie
1641caedc4 retain binding values on iteration if reassigned - fixes #1078 2015-03-30 18:02:21 +11:00
Sebastian McKenzie
3d6e722fc7 fix es6.spec.blockScoping transformer reference 2015-03-30 16:58:51 +11:00
Sebastian McKenzie
253493a43f fix es6.blockScopingTDZ transformer filename 2015-03-30 16:55:20 +11:00
Sebastian McKenzie
66471f044a add deprecation alais for es6.blockScopingTDZ 2015-03-30 16:53:46 +11:00
Sebastian McKenzie
5fa227eb73 fix module names for amd/umd tests 2015-03-30 16:53:06 +11:00
Sebastian McKenzie
f3b50f0bb9 rename es6.blockScopingTDZ to es6.spec.blockScoping 2015-03-30 16:52:58 +11:00
Sebastian McKenzie
92bba76bd5 fix test fixture transformer folder names 2015-03-30 16:44:55 +11:00
Sebastian McKenzie
46462e3e69 add optional scope parameter to TraversalPath#hoist 2015-03-30 16:41:29 +11:00
Sebastian McKenzie
bc155f956c add es6.spec.templateLiterals transformer and rename es6.symbols to es6.spec.symbols 2015-03-30 16:41:13 +11:00
Sebastian McKenzie
dc1ba58705 fix experimental arg in babel-node 2015-03-30 07:34:51 +11:00
Sebastian McKenzie
99e274921f remove experimental option in favor of a stage option 2015-03-30 07:30:37 +11:00
Sebastian McKenzie
862bd6d92a use kebab case instead of camelcase for no cli options 2015-03-30 06:43:23 +11:00
Sebastian McKenzie
46d991e3e9 add nonStandard option - @stefanpenner 2015-03-30 06:41:55 +11:00
Sebastian McKenzie
8e1b6df970 properly handle export default shorthand, also consider export default foo; and export { foo as default } to be equivalent 2015-03-30 06:31:41 +11:00
Sebastian McKenzie
f9c8d7d1fd fix incorrect interpreation of export default shorthand, update to new ast definitions - #1091 2015-03-30 06:08:37 +11:00
Sebastian McKenzie
eb2f61e43f add class property initializer and decorator parser tests 2015-03-30 03:52:39 +11:00
Sebastian McKenzie
afe8792ba4 fix names for export declaration generation tests 2015-03-30 03:38:24 +11:00
Sebastian McKenzie
42a2430d2c add support for export extensions https://github.com/leebyron/ecmascript-more-export-from - closes #1091 2015-03-30 03:38:14 +11:00
Sebastian McKenzie
c4d260231b fix optimisation.react.constantElements test fixture names 2015-03-30 01:22:59 +11:00
Sebastian McKenzie
ca5daca5dd add optimisation.react.constantElements transformer - facebook/react#3228 2015-03-30 01:22:45 +11:00
Sebastian McKenzie
3952eefd01 remove some dead code 2015-03-30 00:18:37 +11:00
Sebastian McKenzie
52c6fe2bc1 add a path hoisting mechanism that will hoist a node to it's highest compatible scope, a compatible scope is considered to be one where all references inside can be resolved to, also adds an optimisation.react.constantElements transformer that uses this to much success facebook/react#3226 2015-03-30 00:16:19 +11:00
Sebastian McKenzie
6a698f7ae4 move class property code gen to classes file 2015-03-29 19:31:02 +11:00
Sebastian McKenzie
2b0c07c2e7 only push the initializer function if required 2015-03-29 19:30:53 +11:00
Sebastian McKenzie
e27e7facac add decorator tests 2015-03-29 19:30:41 +11:00
Sebastian McKenzie
0dd32e7d9c fix class decorator methods 2015-03-29 19:30:34 +11:00
Sebastian McKenzie
286ae68da2 make constants and module imports synonymous - closes #954 2015-03-29 17:36:23 +11:00
Sebastian McKenzie
e26f994075 add existence check when merging source map - fixes #1111 2015-03-29 17:17:43 +11:00
Sebastian McKenzie
94f005e324 clean up flow object type property semicolons 2015-03-29 17:14:46 +11:00
Sebastian McKenzie
93e37aaaf1 inherit comments from class method 2015-03-29 17:09:03 +11:00
Sebastian McKenzie
e4db93f6a5 fix flow test range end of object property nodes 2015-03-29 17:05:14 +11:00
Sebastian McKenzie
c9243e8e97 fixes #1114
- The visitor keys for `ObjectTypeAnnotation`s were incorrect so those nodes weren't being traversed so comments weren't attached for them.
 - The type parser wasn't eating the semicolons for the nodes so the `end` location of each of the type properties wasn't accurate which threw off the code generation newline algorithm.
 - Type properties hadn't been given the `UserWhitespacable` alias.
2015-03-29 16:44:36 +11:00
Sebastian McKenzie
bbba374783 5.0.0-beta3 2015-03-29 16:10:17 +11:00
Sebastian McKenzie
7d95fddbed add do expression definition to ast-types - fixes #1113 2015-03-29 16:10:07 +11:00
Ben
617ed09227 Incorrect package path
I'm pretty sure that this is a mistake, since the path doesn't exist relative to this file. Is it supposed to point to the babel-core package.json like this?
2015-03-28 15:32:07 -04:00
Sebastian McKenzie
6d7887cfe2 v5.0.0-beta3 2015-03-29 01:52:30 +11:00
Sebastian McKenzie
b8e9171aaa start on changelog 2015-03-29 01:50:54 +11:00
Sebastian McKenzie
22118c0be0 add Immutable alias keys 2015-03-29 01:50:45 +11:00
Sebastian McKenzie
3754f7615f make insertBefore functionality the same as insertBefore in traversal path and add getStatementParent method 2015-03-29 01:50:36 +11:00
Sebastian McKenzie
b54901018b Merge pull request #1108 from ArrestedDevelopment/jsxpragma-option
JSX Transformer: Add 'jsxPragma' option
2015-03-28 22:17:18 +11:00
ArrestedDevelopment
121b9ca063 Add tests for JSX Pragma option 2015-03-28 02:20:01 -06:00
ArrestedDevelopment
4988a27b6c JSX Transformer: Add 'jsxPragma' option 2015-03-28 01:41:16 -06:00
Sebastian McKenzie
e0297e08b8 Merge pull request #1103 from joliss/makefile
Disable parallelism in Makefile
2015-03-28 08:39:08 +11:00
Sebastian McKenzie
79005d2f03 Merge pull request #1102 from joliss/npmignore
Prefix all npmignored files with "/"
2015-03-28 08:38:56 +11:00
Sebastian McKenzie
5cce8c32a4 Merge pull request #1101 from joliss/make-clean
Delete lib directory on `make clean`
2015-03-28 08:38:37 +11:00
Sebastian McKenzie
95b1accddc Merge pull request #1104 from joliss/travis
Re-enable experimental branch on Travis
2015-03-28 08:38:26 +11:00
Jo Liss
6149e6325f Re-enable experimental branch on Travis 2015-03-27 21:34:38 +00:00
Jo Liss
4c9d4d0378 Disable parallelism in Makefile
When MAKEFLAGS=-j2 is set in the environment, `make test-travis` can fail
surprisingly, because targets are executed in parallel.
2015-03-27 21:28:07 +00:00
Jo Liss
2e599bef4f Prefix all npmignored files with "/"
This in particular stops lib/acorn/src from being incorrectly matched by "src".
2015-03-27 21:02:28 +00:00
Jo Liss
885da177f9 Delete lib directory on make clean 2015-03-27 20:52:00 +00:00
Sebastian McKenzie
463112517f 5.0.0-beta2 2015-03-28 05:48:27 +11:00
Sebastian McKenzie
8f10dc5c39 v5.0.0-beta2 2015-03-28 05:46:57 +11:00
Sebastian McKenzie
0f99bbe293 fix test tmp directory gitignore 2015-03-28 05:45:46 +11:00
Sebastian McKenzie
0a5d2c098f add tag beta to publish scripts 2015-03-28 05:45:37 +11:00
Sebastian McKenzie
dcf4381e26 5.0.0-beta1 2015-03-28 05:45:22 +11:00
Sebastian McKenzie
543582ef47 fix helper filename in build-runtime script 2015-03-28 05:42:55 +11:00
Sebastian McKenzie
a4db58ccaa v5.0.0-beta1 2015-03-28 05:40:16 +11:00
Sebastian McKenzie
d3971e0874 move es6.arrowFunctions transformer up 2015-03-28 05:38:31 +11:00
Sebastian McKenzie
ad98186afc remove redundant semicolons from export declarations 2015-03-28 05:38:22 +11:00
Sebastian McKenzie
df251fbfff fix test paths to reflect new test directory structure 2015-03-28 05:38:12 +11:00
Sebastian McKenzie
dfbcf95b0e disable sourcemap stdin tests 2015-03-28 05:37:55 +11:00
Sebastian McKenzie
07646475d9 fix spread binding with the wrong context 2015-03-28 05:37:38 +11:00
Sebastian McKenzie
9bc67c28e3 fix path api usage in es6.forOf 2015-03-28 05:37:15 +11:00
Sebastian McKenzie
c2990d3548 add array cache to es6.destructuring to avoid running toArray multiple times 2015-03-28 05:37:06 +11:00
Sebastian McKenzie
803f8a3bbc fix paths in api test 2015-03-28 04:38:26 +11:00
Sebastian McKenzie
ee6efee4f8 disable es6 do expressions and decorators tests 2015-03-28 04:37:30 +11:00
Sebastian McKenzie
3f144e6e74 ensure that nodes are only traversed once per context 2015-03-28 04:34:05 +11:00
Sebastian McKenzie
afedfe15ae fix external helper build script to reflect filename schema changes 2015-03-28 04:08:02 +11:00
Sebastian McKenzie
b522294d3c fix helper slice filename 2015-03-28 04:07:44 +11:00
Sebastian McKenzie
954af72476 update various tests to reflect the new architecture 2015-03-28 04:00:20 +11:00
Sebastian McKenzie
de42a6f796 add existence check for child and parent when inheriting comments 2015-03-28 04:00:02 +11:00
Sebastian McKenzie
06a58f228c add TraversalPath#replaceInline, fix traversal path not updating sibling keys correctly 2015-03-28 03:59:51 +11:00
Sebastian McKenzie
7a44576c26 cache rc json 2015-03-28 03:59:14 +11:00
Sebastian McKenzie
eaa3865427 remove es7.classProperties check from parser 2015-03-28 03:59:01 +11:00
Sebastian McKenzie
b83907cc67 restructure testing infrastructure to be more modular 2015-03-28 01:21:48 +11:00
Sebastian McKenzie
a3620a58f8 add externalHelpers to source maps tests 2015-03-28 00:26:11 +11:00
Sebastian McKenzie
67a12f03fa use replaceWithNodes rather than replace in es6.forOf transformer 2015-03-28 00:26:04 +11:00
Sebastian McKenzie
c49871d33c stylistic changes to tests 2015-03-28 00:25:45 +11:00
Sebastian McKenzie
c828688d21 add existence check to t.inherits 2015-03-28 00:23:07 +11:00
Sebastian McKenzie
bd052aea50 inherit first replacement node from the current node 2015-03-28 00:22:59 +11:00
Sebastian McKenzie
ed74ccaa7d add support for decorators before class exports 2015-03-28 00:22:38 +11:00
Sebastian McKenzie
f3c9551b75 add MetaProperty visitor keys 2015-03-28 00:22:18 +11:00
Sebastian McKenzie
710a7f882d add loose mode for es6.spread and es6.destructuring that assumes all values are arrays - emberjs/ember.js#10730 2015-03-28 00:21:37 +11:00
Sebastian McKenzie
902ebd3fe7 switch back helpers to Array.isArray 2015-03-28 00:21:15 +11:00
Sebastian McKenzie
23c20cc47c inherit from the user constructor properly 2015-03-26 01:02:47 +11:00
Sebastian McKenzie
9b627ace5d impose a strict API for traversal paths and ensure AST doesn't have holes mid-transform 2015-03-26 01:02:30 +11:00
Sebastian McKenzie
4fa17341f5 add support for object expressions and patterns to scope.generateUidBasedOnNode 2015-03-26 01:00:32 +11:00
Sebastian McKenzie
1e019c0f16 realign alias keys data 2015-03-26 01:00:12 +11:00
Sebastian McKenzie
ce25ebacbf only coerce the right side in template literal implosion 2015-03-26 00:59:58 +11:00
Sebastian McKenzie
daecec2a86 better parsing of decorators - support class expressions 2015-03-26 00:58:38 +11:00
Sebastian McKenzie
238f9c2e7e call resolveModuleSource on dynamic imports - fixes #1085 2015-03-26 00:50:58 +11:00
Sebastian McKenzie
bc5f2b9be6 add param to list of duplicate declaration kinds - fixes #1084 2015-03-26 00:48:17 +11:00
Sebastian McKenzie
5390715705 update tests to latest experimental changes 2015-03-25 20:20:51 +11:00
Sebastian McKenzie
aa1333123c Merge branch 'master' into experimental
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2015-03-25 14:17:46 +11:00
Sebastian McKenzie
048f9acc55 Merge pull request #1081 from babel/fix-tco-binding-clearing
Clear bindings immediately inside the TCO loop.
2015-03-25 14:16:46 +11:00
Brian Donovan
ed6421876a Clear bindings immediately inside the TCO loop.
We have to ensure that this happens before any potentially-hoisted
declarations from default parameters.

Closes #1080.
2015-03-24 20:15:54 -07:00
Sebastian McKenzie
e60c9fba6a better node injection mechanics that handle statement lists 2015-03-24 04:37:56 +11:00
Sebastian McKenzie
902db03e96 add loose mode to template literals 2015-03-24 03:34:42 +11:00
Sebastian McKenzie
de88b28988 add class property initializers, add more TraversalPath flexibility with additional node injection method 2015-03-24 03:34:34 +11:00
Sebastian McKenzie
0ee230d13c coerce template literal expressions to strings - fixes #1065 2015-03-23 22:04:40 +11:00
Sebastian McKenzie
c12cfe3ed0 make method definitions with expression bodies illegal - fixes #1066 2015-03-23 20:24:32 +11:00
Sebastian McKenzie
1376f2f18f move helper templates to a separate namespace 2015-03-23 17:26:54 +11:00
Sebastian McKenzie
972c621f59 remove template literals from bin 2015-03-23 17:26:31 +11:00
Sebastian McKenzie
5c41a33e41 save register cache on tick instead of sigint - fixes #1062 2015-03-23 17:26:08 +11:00
Sebastian McKenzie
bc6d01d6fc enable strict mode on babel-node eval flag - fixes #1060 2015-03-23 16:53:03 +11:00
Sebastian McKenzie
01463faf36 remove apply-constructor helper from es6.spread transformer - fixes #1052 2015-03-23 16:51:14 +11:00
Sebastian McKenzie
b234603e24 add callDelegate transformation helper - fixes #1064 2015-03-23 16:47:17 +11:00
Sebastian McKenzie
ca79fff0c4 remove acorn compiled source 2015-03-22 04:09:18 +11:00
Sebastian McKenzie
3c8f3cb521 update couple tests to reflect new statement explosion 2015-03-22 04:08:55 +11:00
Sebastian McKenzie
c9974a42ea remove legacy react metadata 2015-03-22 04:08:45 +11:00
Sebastian McKenzie
a87f6f6fdd clean up statement to expression explosion 2015-03-22 04:08:35 +11:00
Sebastian McKenzie
3d28ce7903 git ignore entire lib folder 2015-03-22 04:07:53 +11:00
Sebastian McKenzie
e04ecc79c7 add support for class decorators 2015-03-22 04:07:38 +11:00
Sebastian McKenzie
3e26511fb2 remove ShadowFunctionExpression 2015-03-22 04:07:00 +11:00
Sebastian McKenzie
9c3493e02f add do expressions 2015-03-22 04:06:15 +11:00
Sebastian McKenzie
a14e979897 use module syntax for strict module formatters 2015-03-21 15:27:32 +11:00
Sebastian McKenzie
a4ce653bed update tests to reflect fixed destructuring behaviour and statement to expression explosion 2015-03-21 15:27:13 +11:00
Sebastian McKenzie
70d068226a add ability to explode a list of statements when trying to replace an expression - damn this is powerful and allows some SUPER cool scenarios 2015-03-21 15:26:55 +11:00
Sebastian McKenzie
30b1c0154d update to modular acorn 2015-03-21 15:25:32 +11:00
Sebastian McKenzie
a602873281 update to latest acorn, better array shortcuts, don't add code frame to error message 2015-03-20 20:05:29 +11:00
Sebastian McKenzie
c8b88182f6 fix bin tests 2015-03-20 20:03:49 +11:00
Sebastian McKenzie
64f1c114c1 fix modules generation logic and remove dead node types 2015-03-19 03:17:28 +11:00
Sebastian McKenzie
4ac1a856ae fix remaining issues in estree port 2015-03-19 02:59:44 +11:00
Sebastian McKenzie
0e68b6ca11 add highlightErrors option to parser options 2015-03-19 02:59:30 +11:00
Sebastian McKenzie
2dccc8c919 more estree updates - finish flow parsing 2015-03-19 01:48:44 +11:00
Sebastian McKenzie
fdea18a289 properly support iterators in sliced-to-array helper... 2015-03-19 01:47:19 +11:00
Sebastian McKenzie
c3bdecbd25 move arrow functions transformer to before function names 2015-03-19 01:46:53 +11:00
Sebastian McKenzie
ee63fb52b7 check whitelist for existence rather than length - #1044 2015-03-19 01:46:10 +11:00
Sebastian McKenzie
8575392606 4.7.16 2015-03-18 23:37:24 +11:00
Sebastian McKenzie
d28583bea1 v4.7.16 2015-03-18 23:36:04 +11:00
Sebastian McKenzie
b166f35218 add typed arrays to native types list - #1043 2015-03-18 23:34:37 +11:00
Sebastian McKenzie
0914378bba add 4.7.16 changelog 2015-03-18 23:34:26 +11:00
Sebastian McKenzie
660d764390 remove loop check when aliasing breaks, continues etc - fixes #1051 2015-03-18 23:31:11 +11:00
Sebastian McKenzie
27206d6b7c add complete list of native constructors 2015-03-18 23:27:14 +11:00
Sebastian McKenzie
34dc56b435 Merge branch 'master' into experimental
# Conflicts:
#	src/babel/transformation/transformers/es7/abstract-references.js
#	src/babel/transformation/transformers/playground/mallet-operator.js
#	src/babel/transformation/transformers/playground/memoization-operator.js
#	src/babel/types/index.js
2015-03-18 19:18:25 +11:00
Sebastian McKenzie
d919d7837c 4.7.15 2015-03-18 19:17:07 +11:00
Sebastian McKenzie
b49cf4e779 v4.7.15 2015-03-18 19:16:01 +11:00
Sebastian McKenzie
e30dd7042b fix constructor spreading of collections #1043 2015-03-18 19:14:23 +11:00
Sebastian McKenzie
16d8d928e8 4.7.14 2015-03-18 19:14:02 +11:00
Sebastian McKenzie
4966028397 v4.7.14 2015-03-18 19:11:21 +11:00
Sebastian McKenzie
82e04fffac add 4.7.14 changelog 2015-03-18 19:08:53 +11:00
Sebastian McKenzie
a46313903d deprecate abstract references and remaining playground features 2015-03-18 19:08:05 +11:00
Sebastian McKenzie
68340b1288 add Promise to the list of native types - fixes #1043 2015-03-18 19:06:34 +11:00
Sebastian McKenzie
6a1b33b443 more updates to estree and new acorn 2015-03-18 19:02:15 +11:00
Sebastian McKenzie
df7524d909 update babel dev dependency and use for-of in sliced-to-array helper - fixes #1047 2015-03-18 19:01:58 +11:00
Sebastian McKenzie
2c39d406d1 move acorn into vendor 2015-03-18 19:01:30 +11:00
Sebastian McKenzie
2ff1a5d98b Merge branch 'master' into experimental
# Conflicts:
#	src/babel/transformation/transformers/internal/strict.js
2015-03-17 12:14:32 +11:00
Sebastian McKenzie
7f9fe4af15 4.7.13 2015-03-17 12:12:51 +11:00
Sebastian McKenzie
977290c7e4 v4.7.13 2015-03-17 12:11:26 +11:00
Sebastian McKenzie
ebbdb95278 add 4.7.13 changelog 2015-03-17 12:09:16 +11:00
Sebastian McKenzie
9b586c7587 add support for left side patterns in assignment pattern destructuring - fixes #1037 2015-03-17 12:03:13 +11:00
Brian Donovan
4b5ba6c8c6 Add a test for the this-spread fix in 976e8c1.
Addresses #1033.
2015-03-17 11:31:09 +11:00
Sebastian McKenzie
67efb1b427 ignore this expressions in Scope#generateTempBasedOnNode - fixes #1033 2015-03-17 11:31:00 +11:00
Sebastian McKenzie
bc9c1ab61e handle comments and use strict directives better - fixes #1030 2015-03-17 11:30:30 +11:00
Sebastian McKenzie
65ffe07551 remove react test option 2015-03-17 11:26:28 +11:00
Sebastian McKenzie
b606cc79ca remove class playground property initializer tests 2015-03-17 11:26:18 +11:00
Sebastian McKenzie
0e7fd0741d inject transformer parser plugins 2015-03-17 11:26:06 +11:00
Sebastian McKenzie
276cafaae1 Merge branch 'master' of github.com:babel/babel 2015-03-17 02:45:36 +11:00
Sebastian McKenzie
4f00de50d6 remove playground code gen, remove react metadata, start update of modules to estree 2015-03-17 02:45:16 +11:00
Brian Donovan
b07341a1f7 Add a note about using the --grep option to focus test runs. 2015-03-16 08:45:05 -07:00
Sebastian McKenzie
ec526f9224 embed acorn 2015-03-17 02:44:05 +11:00
Brian Donovan
76301a7713 Fix grammar. 2015-03-16 08:43:45 -07:00
Brian Donovan
67ac91815b Add a test for the this-spread fix in 976e8c1.
Addresses #1033.
2015-03-16 08:40:32 -07:00
Sebastian McKenzie
976e8c1cfd ignore this expressions in Scope#generateTempBasedOnNode - fixes #1033 2015-03-17 02:20:54 +11:00
Sebastian McKenzie
4d965b0f46 consolidate transformer metadata, remove abstract references, make react transformer optional 2015-03-16 19:26:50 +11:00
Sebastian McKenzie
b495370740 only compile babel folder in src 2015-03-16 19:25:58 +11:00
Sebastian McKenzie
b1c5915ed3 remove playground 2015-03-16 16:56:24 +11:00
Sebastian McKenzie
d94bb2e048 handle comments and use strict directives better - fixes #1030 2015-03-16 13:07:28 +11:00
Sebastian McKenzie
25fa10e592 fix syntax errors 2015-03-16 02:00:19 +11:00
Sebastian McKenzie
8d3a7acbd1 add symbol check to defineProperty helper - fixes #1010 2015-03-16 02:00:10 +11:00
Sebastian McKenzie
29d33dd31a Merge branch 'master' of github.com:babel/babel 2015-03-16 01:52:14 +11:00
Sebastian McKenzie
4afd0f553e Merge branch 'experimental'
# Conflicts:
#	src/babel/transformation/transformers/playground/method-binding.js
2015-03-16 01:51:52 +11:00
Sebastian McKenzie
1fb877e9f5 add highlightErrors option - fixes #837 2015-03-16 01:50:37 +11:00
Sebastian McKenzie
866d3a8eab move file into a separate folder 2015-03-16 01:45:08 +11:00
Sebastian McKenzie
76e1f0dd9f add babelrc to vendor 2015-03-16 01:44:17 +11:00
Sebastian McKenzie
1bbe52a022 split up module class declarations - fixes #1021 2015-03-16 01:44:10 +11:00
Sebastian McKenzie
cc0f43813c small style fixes 2015-03-16 01:26:26 +11:00
Sebastian McKenzie
b13b4bbfba add buildPass File check in preperation for plugin api 2015-03-16 01:25:59 +11:00
Sebastian McKenzie
1c6ac0a07a designate all playground and es7 transformers as optional 2015-03-16 01:25:25 +11:00
Sebastian McKenzie
5a319fd553 automate option generation 2015-03-16 01:23:57 +11:00
Sebastian McKenzie
a8cedf813b Revert "remove es7.abstractReferences, playground.methodBinding and playground.objectGetterMemoisation"
This reverts commit f4ce216d1c.
2015-03-16 01:02:35 +11:00
Sebastian McKenzie
9f037fa75e Merge pull request #1025 from thejameskyle/tjk/fix-flag
Correct --gdbjit v8 flag
2015-03-15 18:41:36 +11:00
James Kyle
8681a78618 Correct --gdbjit v8 flag 2015-03-15 00:39:48 -07:00
Sebastian McKenzie
2d72d423b3 Merge pull request #1024 from thejameskyle/tjk/1020-v8-flags
Add all v8 flags (node & iojs)
2015-03-15 18:35:19 +11:00
James Kyle
280964eafe Add all v8 flags (node & iojs). Fixes #1020 2015-03-15 00:33:39 -07:00
Sebastian McKenzie
5ee9b3c37e remove irrelevant test 2015-03-14 04:50:46 +11:00
Sebastian McKenzie
9676056f08 add note about member expression resolution 2015-03-14 04:50:23 +11:00
Sebastian McKenzie
080a844457 rename "reassigned" to "constant" to reflect purpose of the property better 2015-03-14 04:44:51 +11:00
Sebastian McKenzie
1f9f57a2a6 use paths in replace supers helper 2015-03-14 03:58:18 +11:00
Sebastian McKenzie
056b7fc634 hoist uids to their parent function 2015-03-14 03:58:02 +11:00
Sebastian McKenzie
547ecc2f73 update tests to reflect new for-of behaviour 2015-03-14 03:57:53 +11:00
Sebastian McKenzie
a1ab8fa0c1 remove playground.memoisationOperator deprecation message 2015-03-14 03:57:39 +11:00
Sebastian McKenzie
9e61a307d4 fix scope traversal 2015-03-14 03:34:02 +11:00
Sebastian McKenzie
d4d18f4230 Merge branch 'experimental' of github.com:babel/babel into experimental
# Conflicts:
#	src/babel/transformation/transformers/playground/object-getter-memoization.js
#	src/babel/traversal/path/index.js
#	src/babel/traversal/scope.js
2015-03-14 03:10:17 +11:00
Sebastian McKenzie
f4ce216d1c remove es7.abstractReferences, playground.methodBinding and playground.objectGetterMemoisation 2015-03-14 03:00:41 +11:00
Sebastian McKenzie
d71c72de3c 4.7.12 2015-03-14 02:39:09 +11:00
Sebastian McKenzie
b1c21b8d4d v4.7.12 2015-03-14 02:37:30 +11:00
Sebastian McKenzie
e9b0005cf5 deprecate playground.methodBinding 2015-03-14 02:35:10 +11:00
Sebastian McKenzie
63bac550cd Merge branch 'master' into experimental
# Conflicts:
#	src/babel/transformation/transformers/es6/for-of.js
#	src/babel/transformation/transformers/playground/object-getter-memoization.js
2015-03-14 02:34:03 +11:00
Sebastian McKenzie
d0b6aa9882 4.7.11 2015-03-14 02:30:59 +11:00
Sebastian McKenzie
0e877acfdf v4.7.11 2015-03-14 02:29:42 +11:00
Sebastian McKenzie
b670ee18df fix unicode regex test 2015-03-14 02:28:32 +11:00
Sebastian McKenzie
24807120bf fix unicode regexes stripping their unicode flag before being passed on two regexpu - fixes #1009 2015-03-14 02:26:20 +11:00
Sebastian McKenzie
33f7c0b67e rejigger regex flag pulling 2015-03-14 02:12:13 +11:00
Sebastian McKenzie
c23b47f796 4.7.10 2015-03-14 02:02:06 +11:00
Sebastian McKenzie
2871d8a710 v4.7.10 2015-03-14 01:57:26 +11:00
Sebastian McKenzie
3172b5de5d Merge branch 'master' of github.com:babel/babel 2015-03-14 01:53:15 +11:00
Sebastian McKenzie
2c05303813 deprecate some playground transformers 2015-03-14 01:52:59 +11:00
Sebastian McKenzie
75dda10057 add 4.7.10 changelog 2015-03-14 01:52:51 +11:00
Sebastian McKenzie
12664c6cd6 start migration of core from nodes to paths 2015-03-14 01:48:46 +11:00
Sebastian McKenzie
581f70c803 Merge pull request #1013 from Rich-Harris/patch-1
fix inputSourceMap option
2015-03-14 01:47:55 +11:00
Rich Harris
a00d2c33d8 fix inputSourceMap option
See #827 - it looks like `opts.inputSourceMap` is the wrong way round, babel should only use an input sourcemap if the `inputSourceMap` option is *not* `false`
2015-03-13 10:46:50 -04:00
Sebastian McKenzie
c906bd3edc start migration of core from nodes to paths 2015-03-14 01:00:02 +11:00
Sebastian McKenzie
27fc574e9f 4.7.9 2015-03-13 13:33:50 +11:00
Sebastian McKenzie
a3b1fcc79c v4.7.9 2015-03-13 13:30:14 +11:00
Sebastian McKenzie
491cb26c1f remove console.log 2015-03-13 13:29:13 +11:00
Sebastian McKenzie
7c3d052714 add 4.7.9 changelog 2015-03-13 13:27:40 +11:00
Sebastian McKenzie
4971d0c7f0 fix labeled nested for ofs - fixes #996 2015-03-13 13:25:37 +11:00
Sebastian McKenzie
eb4922b1ec update acorn-babel 2015-03-13 13:25:19 +11:00
Sebastian McKenzie
bb26183b44 set inputSourceMap to null by default 2015-03-13 13:14:17 +11:00
Sebastian McKenzie
4b066f7f1b add input sourcemap false option #827 2015-03-13 13:12:38 +11:00
Sebastian McKenzie
41a8257005 various cleanup, remove redundant whitespace, realign object keys etc 2015-03-13 01:09:04 +11:00
Sebastian McKenzie
b44ba25d11 separate binding logic from scope to a binding class, move binding type resolution to the path so it can be used on any expression - #653 2015-03-13 01:08:46 +11:00
Sebastian McKenzie
40a111abbf always resolve rc for absolute filenames 2015-03-13 01:07:33 +11:00
Sebastian McKenzie
9cff51915d switch scope tracking to a path based system 2015-03-12 14:35:55 +11:00
Sebastian McKenzie
3cd110a7c9 fix block scoping break switch collision - fixes #998 2015-03-12 14:35:30 +11:00
Sebastian McKenzie
a7f9e035a4 infer computed literal function names - fixes #993 2015-03-12 14:13:24 +11:00
Sebastian McKenzie
146b9e6708 4.7.8 2015-03-11 10:17:09 +11:00
Sebastian McKenzie
0953c48620 v4.7.8 2015-03-11 07:49:54 +11:00
Sebastian McKenzie
056b90831d manually define each property in computed class helper - fixes #984 2015-03-11 07:45:29 +11:00
Sebastian McKenzie
8ba276b209 4.7.7 2015-03-11 01:25:41 +11:00
Sebastian McKenzie
8eaa9d29e3 v4.7.7 2015-03-11 01:20:34 +11:00
Sebastian McKenzie
6212791356 fix types API exposure - babel/babel-eslint#8 2015-03-11 01:14:36 +11:00
Sebastian McKenzie
d436d32d82 4.7.6 2015-03-11 00:13:03 +11:00
Sebastian McKenzie
2a29f70bba v4.7.6 2015-03-11 00:11:35 +11:00
Sebastian McKenzie
6ccb8957bd add 4.7.6 changelog 2015-03-11 00:09:52 +11:00
Sebastian McKenzie
dc45415ee0 hoist esModule to the top 2015-03-11 00:08:06 +11:00
Sebastian McKenzie
98ca541fde restructure types 2015-03-11 00:04:06 +11:00
Sebastian McKenzie
8328f638c2 add support for if and block statements to t.toSequenceExpression 2015-03-10 17:20:26 +11:00
Sebastian McKenzie
5586ce280f move build-external-helpers to tools 2015-03-10 17:20:14 +11:00
Sebastian McKenzie
0ca71f5e15 add transformation logger 2015-03-10 17:19:51 +11:00
Sebastian McKenzie
212776e220 remove detection 2015-03-10 17:19:35 +11:00
Sebastian McKenzie
4a95a9ec8f remove duplicate insert_final_newline 2015-03-10 17:19:23 +11:00
Sebastian McKenzie
45953ffc8a 4.7.5 2015-03-10 13:39:04 +11:00
Sebastian McKenzie
9c79290bb2 v4.7.5 2015-03-10 13:20:20 +11:00
Sebastian McKenzie
cfdf6b7385 add 4.7.5 changelog 2015-03-10 13:12:19 +11:00
Sebastian McKenzie
907e0e0f86 drop support for node 0.10 to save travis some unnecessary cycles <3 2015-03-10 13:11:06 +11:00
Sebastian McKenzie
f3bd9cbcb8 use a different helper if a class contains class methods to avoid non-enumerability and delegation to es6.properties.computed transformer - fixes #984, closes #986 2015-03-10 13:04:02 +11:00
Sebastian McKenzie
3bd14f9e07 add babel version to register hook cache key 2015-03-10 13:03:22 +11:00
Sebastian McKenzie
102b4b3d1e remove redundant break wrapping in for-of - fixes #985 2015-03-10 12:14:21 +11:00
Sebastian McKenzie
6564f1ff76 4.7.4 2015-03-10 06:13:37 +11:00
Sebastian McKenzie
58d7a5e069 more versatile scope pushing 2015-03-10 06:13:32 +11:00
Sebastian McKenzie
f5db53cebe remove core-js library from babel-runtime 2015-03-10 06:13:16 +11:00
Sebastian McKenzie
2da010fcae clean up #982 2015-03-10 06:11:55 +11:00
Sebastian McKenzie
52b99bdf93 Merge pull request #982 from tricknotes/error-stack
Ignore assignment to Error#stack if it is readonly property
2015-03-10 06:09:03 +11:00
Ryunosuke SATO
9d7e953451 Ignore assignment to Error#stack if it is readonly property
`Error#stack` may be an readonly property in some environments
such as PhantomJS 1.9.2 and Safari 7.0.
2015-03-10 04:05:53 +09:00
Sebastian McKenzie
b1252b865b v4.7.4 2015-03-10 03:29:47 +11:00
Sebastian McKenzie
068b1341d9 fix erroneous whitespace 2015-03-10 03:28:36 +11:00
Sebastian McKenzie
20eb143915 remove Number from the list of valid runtime constructors - fixes #981 2015-03-10 03:27:13 +11:00
Sebastian McKenzie
1302a86bf2 scope -> scopable class alias key 2015-03-10 03:22:55 +11:00
Sebastian McKenzie
b7831f1d7b prepend mocha command with node 2015-03-10 03:15:31 +11:00
Sebastian McKenzie
e46cabb21f remove code coverage from travis make task 2015-03-10 03:12:50 +11:00
Sebastian McKenzie
fff06a047e Revert "delegate node path removal to after call"
This reverts commit 5e0236d9a7.
2015-03-10 02:50:43 +11:00
Sebastian McKenzie
6b0320fc83 disable test262 tests by default 2015-03-10 02:34:35 +11:00
Sebastian McKenzie
5dde63fa0a more elaborate tests for #980 2015-03-10 02:13:00 +11:00
Sebastian McKenzie
672118149a hoist all directives - fixes #980 2015-03-10 01:53:51 +11:00
Sebastian McKenzie
5e0236d9a7 delegate node path removal to after call 2015-03-10 01:44:58 +11:00
Sebastian McKenzie
5101664e7d update 4.7.4 changelog 2015-03-10 01:44:44 +11:00
Sebastian McKenzie
2d684a06d3 update changelog version to 4.7.4 2015-03-10 01:23:24 +11:00
Sebastian McKenzie
e31bad8f42 add 4.7.3 changelog 2015-03-10 01:17:14 +11:00
Sebastian McKenzie
644b4373fc rewrite named function expressions in async function transformers - fixes #979 2015-03-10 01:16:38 +11:00
Sebastian McKenzie
62f37c1e62 fix util.booleanify 2015-03-10 01:10:58 +11:00
Sebastian McKenzie
fc0e89463b use flow types for annotations - goodbye JSDoc! 2015-03-10 00:35:52 +11:00
Sebastian McKenzie
56b6a795a4 remove path.refreshScope until i'm more confident on it's functionality so it doesn't break peopls stuff 2015-03-09 23:09:22 +11:00
Sebastian McKenzie
17b34a2959 dynamic scope tracking, toot toot - fixes #957 2015-03-09 22:07:05 +11:00
Sebastian McKenzie
c4da0253c5 move flattenable keys to types 2015-03-09 16:55:00 +11:00
Sebastian McKenzie
5f2df40f6d consistent whitespace in patch 2015-03-09 16:54:50 +11:00
Sebastian McKenzie
7d20a9b882 add traversal path todos 2015-03-09 16:54:41 +11:00
Sebastian McKenzie
ee0ac9f149 use spread in messages 2015-03-09 16:54:30 +11:00
Sebastian McKenzie
c5d3f42d8a alias core-js/library in babel-runtime - closes #965 2015-03-09 16:54:19 +11:00
Sebastian McKenzie
d162919a53 update symols transformer name 2015-03-09 03:39:30 +11:00
Sebastian McKenzie
d1f712344d add istanbul auxiliary comment task to makefile 2015-03-09 03:38:39 +11:00
Sebastian McKenzie
e985912b54 add Binary node cleanup 2015-03-09 03:38:27 +11:00
Sebastian McKenzie
97a21e4a34 update spec.typeofSymbol references to es6.symbols 2015-03-09 03:38:13 +11:00
Sebastian McKenzie
d8fb7812f7 more utility.removeConsole tests 2015-03-09 03:37:42 +11:00
Sebastian McKenzie
bfe63f5885 rename spec.typeofSymbol transformer to es6.symbols 2015-03-09 03:37:26 +11:00
Sebastian McKenzie
44ca6873a3 add super to contextVariables 2015-03-09 03:37:05 +11:00
Sebastian McKenzie
2f66ea7338 4.7.3 2015-03-08 04:33:50 +11:00
Sebastian McKenzie
70967cf53c v4.7.3 2015-03-08 04:32:46 +11:00
Sebastian McKenzie
dc117a74ae both -> inline - thanks @dkieks 2015-03-08 04:29:48 +11:00
Sebastian McKenzie
b0f32a822d pass file.addImport a name instead of an identifier 2015-03-08 04:10:53 +11:00
Sebastian McKenzie
fd99ea1749 Merge branch 'master' of github.com:babel/babel 2015-03-08 04:05:44 +11:00
Sebastian McKenzie
572129542d fallback to current parentPath if none was provided 2015-03-08 04:04:48 +11:00
Sebastian McKenzie
6f53980bfc move runtime helpers to separate modules - babel/ember-cli-babel#24 2015-03-08 04:04:40 +11:00
Sebastian McKenzie
348af1990d Merge pull request #972 from neVERberleRfellerER/node-external-helpers-tests
add tests for babel-external-helpers
2015-03-08 03:50:28 +11:00
Ondrej Kraus
bd5f350728 add tests for babel-external-helpers 2015-03-07 17:46:40 +01:00
Sebastian McKenzie
958fa282f4 4.7.2 2015-03-08 03:12:09 +11:00
Sebastian McKenzie
31e6b18346 v4.7.2 2015-03-08 03:09:43 +11:00
Sebastian McKenzie
d17ac92a3f fix changelog version 2015-03-08 03:06:46 +11:00
Sebastian McKenzie
188bcb70f7 add 4.7.1 changelog 2015-03-08 03:03:17 +11:00
Sebastian McKenzie
b8bd11a0e7 fix incorrect builder reference 2015-03-08 03:02:19 +11:00
Sebastian McKenzie
45bc74efe7 use a lookup table instead of an if - #945 2015-03-08 02:57:37 +11:00
Sebastian McKenzie
7eb169a894 Merge pull request #945 from neVERberleRfellerER/helper-globals-fix
Add choice of output format to babel-external-helpers
2015-03-08 02:56:30 +11:00
Sebastian McKenzie
eed4f312d8 add sourceMap both option - closes #966 2015-03-08 02:54:23 +11:00
Sebastian McKenzie
44e4dc970f more es6 2015-03-08 02:52:23 +11:00
Sebastian McKenzie
5d32432e67 split up export variable declarations - fixes #939, fixes #964 2015-03-08 02:52:10 +11:00
Sebastian McKenzie
9c9af6dbbd add utility.removeClass tests and move parentPath setting to setContext - fixes #967 2015-03-08 02:49:58 +11:00
Sebastian McKenzie
70cd650e10 remove dead t.isFalsyExpression and ignore private properties in t.cloneDeep - fixes #962 2015-03-08 02:45:14 +11:00
Sebastian McKenzie
c7bb00d58d ignore case breaks - fixes #963 2015-03-07 17:41:56 +11:00
Ondrej Kraus
623be068c4 add unsupportedOutputType to messages.js 2015-03-07 01:53:34 +01:00
Ondrej Kraus
71f5c9791d replace switch with if-else chain 2015-03-07 01:50:50 +01:00
Ondrej Kraus
3e6e86d073 order template keys by length 2015-03-07 01:50:49 +01:00
Ondrej Kraus
a0fb398ca2 add possibility to select format of external helpers 2015-03-07 01:50:49 +01:00
Ondrej Kraus
71b9f19e6a change to normal UMD (fixes bug with leaking variable in AMD mode) 2015-03-07 01:50:48 +01:00
Ondrej Kraus
c45ce58f0c stop assigning to global in generated helpers code 2015-03-07 01:50:48 +01:00
Sebastian McKenzie
d32f587e3c expose dynamicImports when es6.modules is blacklisted babel/ember-cli-babel#24 2015-03-07 03:31:24 +11:00
Sebastian McKenzie
9e1874ba89 4.7.1 2015-03-07 03:31:05 +11:00
Sebastian McKenzie
35fdc5c5d8 v4.7.1 2015-03-07 02:52:17 +11:00
Sebastian McKenzie
a4035fc257 use convert-source-map package - closes #960 2015-03-07 02:46:15 +11:00
Sebastian McKenzie
42e3dc7a70 inherit all options from input source map 2015-03-07 02:28:33 +11:00
Sebastian McKenzie
cdccf24515 4.7.0 2015-03-07 02:04:58 +11:00
Sebastian McKenzie
c8cd5c108b v4.7.0 2015-03-07 01:59:02 +11:00
Sebastian McKenzie
2b95b876e1 return only constructor if class was a named class with only a constructor/no constructor 2015-03-07 01:50:34 +11:00
Sebastian McKenzie
f801772fc2 add inputSourceMap option - fixes #827, related babel/babel-loader#35 2015-03-07 01:50:07 +11:00
Sebastian McKenzie
8ad678e5bc make it illegal to have a rest on a setter 2015-03-07 01:32:03 +11:00
Sebastian McKenzie
35c49dbef7 merge validation transformers 2015-03-07 01:25:44 +11:00
Sebastian McKenzie
119314df74 update traceur 2015-03-07 01:25:37 +11:00
Sebastian McKenzie
51e336b037 class declarations also have a lexical self binding 2015-03-07 01:25:18 +11:00
Sebastian McKenzie
7d446807a9 remove rogue console.log 2015-03-06 23:40:30 +11:00
Sebastian McKenzie
8afdeaf557 replicate module environment in babel-node -e - closes #695, fixes #592 2015-03-06 23:39:49 +11:00
Sebastian McKenzie
4df50954a2 use instance indexOf instead of lodash - #951 2015-03-06 23:31:11 +11:00
Sebastian McKenzie
70b6317865 Merge pull request #951 from neVERberleRfellerER/babel-node-args-fix
add possiblity of passing colliding user arguments by separating them with --
2015-03-06 23:30:31 +11:00
Sebastian McKenzie
5ebdc44297 remove babel-runtime version check to node api 2015-03-06 23:20:48 +11:00
Sebastian McKenzie
a4659fd239 add reference checks for module specifiers - fixes #956 2015-03-06 23:19:26 +11:00
Sebastian McKenzie
19bfa4a35b add debug message for travis... 2015-03-06 23:15:20 +11:00
Sebastian McKenzie
f7fff7d35e add alternate to list of STATEMENT_OR_BLOCK_KEYS - fixes #955 2015-03-06 23:13:03 +11:00
Sebastian McKenzie
130e0ebe6b better classes, more spec compliant and nicer output - fixes #952 2015-03-06 23:08:10 +11:00
Sebastian McKenzie
69c836fc8d Merge branch 'master' of github.com:babel/babel 2015-03-06 02:27:15 +11:00
Sebastian McKenzie
f62a3ef394 further develop ast paths that represent a single location in the ast as an abstraction around a node-parent relationship 2015-03-06 02:26:04 +11:00
Sebastian McKenzie
7a6e568940 clean up classes output 2015-03-06 02:25:24 +11:00
Sebastian McKenzie
65998c3437 add error message for incompatible babel-runtime versions 2015-03-06 02:23:30 +11:00
Ondrej Kraus
160de340b0 add possiblity of passing user arguments by separating them with --
Now, when user arguments have names colliding with node arguments,
they can be separated by -- and will be parsed correctly.
2015-03-05 14:35:53 +01:00
Sebastian McKenzie
76ca40f698 Merge pull request #944 from sindresorhus/modularize-tofastproperties
modularize `util.toFastProperties()`
2015-03-05 01:10:26 +11:00
Sindre Sorhus
01ed824b5c modularize util.toFastProperties()
https://github.com/sindresorhus/to-fast-properties
2015-03-04 21:02:36 +08:00
Sebastian McKenzie
6b0dbc4486 bump regenerator-babel 2015-03-04 23:29:37 +11:00
Sebastian McKenzie
2648268f30 add contextVariables to scope 2015-03-04 22:54:00 +11:00
Sebastian McKenzie
8cf5bf7037 add filename arg to resolveModuleSource option 2015-03-04 22:53:50 +11:00
Sebastian McKenzie
60961bc3ff bump ast-types - fixes #930 2015-03-04 22:53:38 +11:00
Sebastian McKenzie
df16bc17e7 clean up formatting of system module formatter 2015-03-04 22:52:44 +11:00
Sebastian McKenzie
5337ab5a08 statically bind super references in object expressions - fixes #943 2015-03-04 22:52:07 +11:00
Sebastian McKenzie
2eaeebcce4 inherit from class constructor block statement - fixes #937 2015-03-03 23:38:11 +11:00
Sebastian McKenzie
ad71010144 4.6.6 2015-03-03 22:44:44 +11:00
Sebastian McKenzie
864169c1eb v4.6.6 2015-03-03 22:43:06 +11:00
Sebastian McKenzie
930d7f9aa6 add 4.6.6 changelog 2015-03-03 22:38:20 +11:00
Sebastian McKenzie
ed40ec03d1 more es6, template literals and modules 2015-03-03 22:31:49 +11:00
Sebastian McKenzie
73062ae240 take into consideration non-identifier nodes in es6.blockScopingTDZ transformer, also turn default and parameters into lets instead of vars - fixes #929 2015-03-03 22:30:52 +11:00
Sebastian McKenzie
bafa3e0d4c add missing is - fixes #931 - thanks @neVERberleRfellerER 2015-03-03 10:38:18 +11:00
Sebastian McKenzie
f3d2b2bb81 Merge branch 'master' of github.com:babel/babel 2015-03-03 09:49:35 +11:00
Sebastian McKenzie
a74b67d4eb Merge pull request #932 from hzoo/more-es6
More es6
2015-03-03 09:49:29 +11:00
Sebastian McKenzie
625416862f remove no es6 syntax line from contributing.md 2015-03-03 09:49:20 +11:00
Sebastian McKenzie
8dda8838ba check for body existence before length in dead code elimination transformer - fixes #931 2015-03-03 09:37:52 +11:00
Henry Zhu
96d3a25213 use more es6 concise methods 2015-03-02 10:34:30 -05:00
Sebastian McKenzie
727208f376 4.6.5 2015-03-02 22:55:36 +11:00
Sebastian McKenzie
1b046a6ecb v4.6.5 2015-03-02 22:54:35 +11:00
Sebastian McKenzie
3b8ed0d401 add 4.6.5 changelog 2015-03-02 22:51:21 +11:00
Sebastian McKenzie
d4c98d7738 add transformer aliases 2015-03-02 22:47:00 +11:00
Sebastian McKenzie
4e44af819f fix rogue strict reference 2015-03-02 22:45:21 +11:00
Sebastian McKenzie
a65acd73ca fix rogue useStrict transformer references 2015-03-02 22:41:55 +11:00
Sebastian McKenzie
b7cb2bcb7b rename useStrict transformer to strict 2015-03-02 22:37:51 +11:00
Sebastian McKenzie
5ac4dc0541 don't evaluate ArrayExpressions 2015-03-02 17:16:10 +11:00
Sebastian McKenzie
99ddd02b0a change Function export to avoid messing with istanbul 2015-03-02 15:38:43 +11:00
Sebastian McKenzie
19cfee14fd 4.6.4 2015-03-02 15:38:31 +11:00
Sebastian McKenzie
fea487bf91 v4.6.4 2015-03-02 15:34:10 +11:00
Sebastian McKenzie
ff2cbd5a2e Merge branch 'master' of github.com:babel/babel 2015-03-02 15:30:30 +11:00
Sebastian McKenzie
12e01f9e71 remove optional property on function params - fixes #927 2015-03-02 15:30:05 +11:00
Sebastian McKenzie
f62436909d Merge pull request #923 from mathiasbynens/patch-4
Explicitly update the regexpu dependency to v1.1.2
2015-03-02 11:32:27 +11:00
Mathias Bynens
e42c1adeb6 Explicitly update the regexpu dependency to v1.1.2 2015-03-01 18:50:17 +01:00
Sebastian McKenzie
e30dbbab94 properly replace labels in spec for of transformer - fixes #913, closes #914 2015-03-02 01:41:13 +11:00
Sebastian McKenzie
e3daa28e60 rename minification tests to utility 2015-03-02 01:28:34 +11:00
Sebastian McKenzie
9e5d94126c add base type tests 2015-03-02 01:28:17 +11:00
Sebastian McKenzie
95798bee0b add t.valueToNode 2015-03-02 01:28:10 +11:00
Sebastian McKenzie
63f25ab038 check parent for variable collisions when remapping closurified block scopes - fixes #915, closes #922 2015-03-02 01:27:58 +11:00
Sebastian McKenzie
27a8f2d2ea rename broke property to confident in t.evaluate 2015-03-01 18:16:27 +11:00
Sebastian McKenzie
78434bb404 add t.evaluate method 2015-03-01 17:01:46 +11:00
Sebastian McKenzie
82833a8901 update 4.6.3 changelog 2015-03-01 13:45:09 +11:00
Sebastian McKenzie
93d5288d71 4.6.3 2015-03-01 11:05:33 +11:00
Sebastian McKenzie
5d3074b460 v4.6.3 2015-03-01 11:03:55 +11:00
Sebastian McKenzie
a57475abc9 better rest param member expression deopt 2015-03-01 11:01:06 +11:00
Sebastian McKenzie
09e68d8d46 v4.6.2 2015-03-01 10:12:43 +11:00
Sebastian McKenzie
ee850c3aeb merge fix for #917 with #918 2015-03-01 10:09:03 +11:00
Sebastian McKenzie
ff5a149cec Merge branch 'master' of github.com:babel/babel
# Conflicts:
#	src/babel/transformation/transformers/es6/parameters.rest.js
2015-03-01 10:04:52 +11:00
Sebastian McKenzie
957118fb41 delay rest optimisation, deopt on unoptimisable references - fixes #918 2015-03-01 10:04:16 +11:00
Sebastian McKenzie
e7ad0a9741 Merge pull request #919 from neVERberleRfellerER/rest-args-optimization-fix
fix rest optimization in arrow functions
2015-03-01 09:38:00 +11:00
Ondrej Kraus
24f4b041c7 fix rest optimization in arrow functions and add advanced test 2015-02-28 23:28:21 +01:00
Sebastian McKenzie
4c77d04b56 more es6 modules 2015-03-01 01:01:51 +11:00
Sebastian McKenzie
e945f0d10f add support for outputting flow types - fixes #665 2015-03-01 00:32:36 +11:00
Sebastian McKenzie
fb04b2561f copy over files in watch mode 2015-02-28 21:39:40 +11:00
Sebastian McKenzie
a4f8b41507 4.6.1 2015-02-28 11:56:46 +11:00
Sebastian McKenzie
1fb6018e9c v4.6.1 2015-02-28 11:55:47 +11:00
Sebastian McKenzie
bca233d22c add 4.6.1 changelog 2015-02-28 11:52:21 +11:00
Sebastian McKenzie
c78703e194 blacklist regenerator from templates directory - fixes #912 2015-02-28 11:47:18 +11:00
Sebastian McKenzie
43fdbe3d6c fix whitespace 2015-02-28 11:31:43 +11:00
Sebastian McKenzie
8650ca7d55 properly expose util - fixes #52 2015-02-28 11:24:51 +11:00
Sebastian McKenzie
3a0c226a34 upgrade babel 2015-02-28 00:31:35 +11:00
Sebastian McKenzie
73e8bdd048 update 4.6.0 changelog 2015-02-28 00:31:28 +11:00
Sebastian McKenzie
e7c52a734e 4.6.0 2015-02-27 21:14:20 +11:00
Sebastian McKenzie
5a81b02569 v4.6.0 2015-02-27 21:09:17 +11:00
Sebastian McKenzie
999baf2888 fix regex tests 2015-02-27 21:01:13 +11:00
Sebastian McKenzie
70b25e8942 add sticky regex desugaring #904 2015-02-27 20:51:48 +11:00
Sebastian McKenzie
2ddbd4eecc fix es for of break test expected 2015-02-27 20:33:42 +11:00
Sebastian McKenzie
7520807df3 move eslint out of the core into a separate plugin 2015-02-27 16:30:53 +11:00
Sebastian McKenzie
974b71bcc3 flesh out eslint support 2015-02-27 16:11:47 +11:00
Sebastian McKenzie
0aee3c06ec add noCheckAst option to enforce newline test 2015-02-27 15:45:09 +11:00
Sebastian McKenzie
a4382580fc ignore user whitespace when splitting up module declaration - fixes #906 2015-02-27 15:25:13 +11:00
Sebastian McKenzie
166b2eda87 remove rogue export in node api 2015-02-27 15:08:01 +11:00
Sebastian McKenzie
83c23d266f add eslint with an acorn-babel compatibility layer, yay! coming soon to a production release near you 2015-02-27 13:17:22 +11:00
Sebastian McKenzie
a9db70b60d close iterators on abrupt completion - google/traceur-compiler#1773 #838 2015-02-27 11:44:13 +11:00
Sebastian McKenzie
5d90c442cb fix es6 rest parameters transformer comment 2015-02-26 23:25:48 +11:00
Sebastian McKenzie
32606ddb93 remove linting mention from contributing guide 2015-02-26 22:34:54 +11:00
Sebastian McKenzie
330f6910c6 remove unnecessary exception catch and process.exit - fixes #901 2015-02-26 22:33:36 +11:00
Sebastian McKenzie
4ca8a0e6e2 bump browserify 2015-02-26 21:41:15 +11:00
Sebastian McKenzie
f097ddeac3 bump source-map dependency 2015-02-26 21:39:54 +11:00
Sebastian McKenzie
1eb53dd13a add try-catch to bin watching compilation - fixes #901 2015-02-26 21:28:54 +11:00
Sebastian McKenzie
75b5f32e7a make js-tokens version fixed - explanation in #900 2015-02-26 21:15:54 +11:00
Sebastian McKenzie
f753cf4845 Merge pull request #900 from lydell/js-tokens-1.0
Upgrade to js-tokens@1.0.0
2015-02-26 21:13:55 +11:00
Simon Lydell
9a569f64da Upgrade to js-tokens@1.0.0
This commit also adds syntax highlighting for `null`, `false` and `true`.
2015-02-26 11:11:23 +01:00
Sebastian McKenzie
8efeae80af remove export function Function 2015-02-26 20:39:30 +11:00
Sebastian McKenzie
4df9cf6c05 add missing transform import and change babel import to a wildcard 2015-02-26 20:26:08 +11:00
Sebastian McKenzie
7729cb4b68 start using es6 modules 2015-02-26 20:13:00 +11:00
Sebastian McKenzie
307ffcd107 correctly get old extension handler in registerExtension 2015-02-26 16:00:06 +11:00
Sebastian McKenzie
751557aef1 make #889 more efficient and flexible 2015-02-26 15:24:12 +11:00
Sebastian McKenzie
3f146b54ff Merge branch 'master' of github.com:6to5/6to5 2015-02-26 15:04:21 +11:00
Sebastian McKenzie
19a173c622 Merge pull request #899 from xjamundx/patch-1
feat(6to5/register) don't override uncaughtException handler
2015-02-26 15:04:02 +11:00
Sebastian McKenzie
89bcb307a2 Merge pull request #889 from neVERberleRfellerER/rest-args-optimization-v2
Add rest parameters optimization
2015-02-26 15:03:51 +11:00
Sebastian McKenzie
ded1e02da7 move buildHelpers require down a slot 2015-02-26 13:06:15 +11:00
Sebastian McKenzie
564ba67190 4.5.5 2015-02-26 13:06:08 +11:00
Sebastian McKenzie
00c964ed19 v4.5.5 2015-02-26 13:03:02 +11:00
Sebastian McKenzie
3ab88e02c7 delete from require.extensions when old extension handler is undefined 2015-02-26 12:58:01 +11:00
Sebastian McKenzie
bb2fc830eb use some spreads 2015-02-26 12:57:43 +11:00
Sebastian McKenzie
c6a542fd1d finish remaining class conversion 2015-02-26 12:34:05 +11:00
Sebastian McKenzie
553eb2d45e more classes! 2015-02-26 12:19:28 +11:00
Ondrej Kraus
b5f3c3f4cc stop traversal when it is clear that optimization is impossible 2015-02-26 02:05:26 +01:00
Ondrej Kraus
5d83638583 set literal MemberExpression as computed in rest array destructuring 2015-02-26 01:22:00 +01:00
Sebastian McKenzie
f7186980e5 add external helpers test #898 2015-02-26 09:24:28 +11:00
Sebastian McKenzie
0eaaaa503e 4.5.4 2015-02-26 09:24:10 +11:00
Sebastian McKenzie
51dff364db v4.5.4 2015-02-26 09:21:55 +11:00
Sebastian McKenzie
dc6129eb6a fix helper whitelist in build script 2015-02-26 09:19:49 +11:00
Sebastian McKenzie
5b84b9c867 4.5.3 2015-02-26 09:11:15 +11:00
Sebastian McKenzie
04c3027f4d v4.5.3 2015-02-26 09:10:31 +11:00
Sebastian McKenzie
95e2345b19 move whitelist detection up to before the key is camelcased 2015-02-26 09:08:39 +11:00
Sebastian McKenzie
eafb02be31 4.5.2 2015-02-26 09:08:17 +11:00
Sebastian McKenzie
b91997354c v4.5.2 2015-02-26 09:04:05 +11:00
Sebastian McKenzie
4b8039a00c add 4.5.2 changelog 2015-02-26 09:00:37 +11:00
Sebastian McKenzie
0a0931dc2e add access to helpers used by the current file and allow a helper whitelist to be passed to buildHelpers - closes #898 2015-02-26 08:59:07 +11:00
Jamund Ferguson
24ace3c8c2 feat(6to5/register) don't override uncaughtException handler
Maybe we could do this by default or even make it configurable?
2015-02-25 13:51:26 -08:00
Sebastian McKenzie
372c06eb80 bump acorn-babel 2015-02-26 08:32:27 +11:00
Sebastian McKenzie
b8121ed4d0 Merge branch 'master' of github.com:6to5/6to5 2015-02-26 08:21:49 +11:00
Sebastian McKenzie
1f79445ee5 shim in function arity when proxying named functions - fixes #896 2015-02-26 08:21:37 +11:00
Sebastian McKenzie
cb46ca60af Merge pull request #894 from josh/travis-test-full-build
Test full `make build` on Travis
2015-02-26 08:05:24 +11:00
Joshua Peek
24c0c7679f Test full make build on travis 2015-02-25 10:23:42 -06:00
Ondrej Kraus
687b0f3180 remove unused function argument 2015-02-25 15:38:32 +01:00
Ondrej Kraus
e6855b974b update tests 2015-02-25 15:30:22 +01:00
Ondrej Kraus
a808742c19 remove strict-mode specific optimizations due to unsolvable ambiguities 2015-02-25 15:24:45 +01:00
Sebastian McKenzie
d7ec337567 move spec.functionName transformer to below validation transformers 2015-02-26 01:00:35 +11:00
Sebastian McKenzie
845f1ce65e remove linting since we're too bleeding edge :'( 2015-02-26 01:00:24 +11:00
Ondrej Kraus
c3f4091b6d replace for-of with with for for performance reasons 2015-02-25 14:41:20 +01:00
Ondrej Kraus
edb880f87c add tests 2015-02-25 14:26:28 +01:00
Ondrej Kraus
e8741daee3 use some ES6 to simplify code 2015-02-25 14:13:15 +01:00
Sebastian McKenzie
88563a0c26 add additional newline to alias functions transformer 2015-02-26 00:05:33 +11:00
Sebastian McKenzie
ccd7a6560c simplify README 2015-02-26 00:05:21 +11:00
Sebastian McKenzie
c340597fdb remove docs directory 2015-02-26 00:04:59 +11:00
Sebastian McKenzie
e498358125 classes... i just... no words 2015-02-25 23:47:01 +11:00
Ondrej Kraus
c5913564f8 replace quotes to conform to coding style 2015-02-25 13:34:18 +01:00
Ondrej Kraus
662bddbaca simplify optimization code 2015-02-25 13:34:17 +01:00
Ondrej Kraus
8f540dfff3 call non-strict mode optimizer before strict mode one to simplify literals 2015-02-25 13:34:17 +01:00
Ondrej Kraus
1265bc5a92 add better optimization when strictMode transformer is enabled 2015-02-25 13:34:15 +01:00
Ondrej Kraus
e677c72d58 add patterns support 2015-02-25 13:34:15 +01:00
Ondrej Kraus
8ca854156a simplify and optimize local binding handling 2015-02-25 13:34:14 +01:00
Ondrej Kraus
81ae656358 remove unused function 2015-02-25 13:34:13 +01:00
Ondrej Kraus
f2981b7e95 replace direct node type checking with helper functions 2015-02-25 13:34:12 +01:00
Ondrej Kraus
99b2e00d33 add rest parameters optimization 2015-02-25 13:34:11 +01:00
Sebastian McKenzie
25232d3141 use the mallet operator this is actually amazing i think i'm going to cry 2015-02-25 23:34:04 +11:00
Sebastian McKenzie
5b9878451a use strict BE GONE 2015-02-25 23:07:49 +11:00
Sebastian McKenzie
23d6fb6bb1 concise methods oh my god this is so good 2015-02-25 23:06:57 +11:00
Sebastian McKenzie
8d1b5c8ccb BOLD TEXT ALL UP IN THIS 2015-02-25 23:06:48 +11:00
Sebastian McKenzie
10bd7d1b91 4.5.1 2015-02-25 22:57:59 +11:00
Sebastian McKenzie
f5d9636353 v4.5.1 2015-02-25 22:55:50 +11:00
Sebastian McKenzie
a7f713ef5a remove jscs since it doesn't like arrow functions :( 2015-02-25 22:53:54 +11:00
Sebastian McKenzie
ba11069b1c utilise arrow functions omfg i love ES6 holy shit 2015-02-25 22:52:22 +11:00
Sebastian McKenzie
c13f8a3f50 update contributing guide 2015-02-25 22:43:40 +11:00
Sebastian McKenzie
339bd2b6d9 self-host #443 2015-02-25 22:36:23 +11:00
Sebastian McKenzie
a2843a5cb8 4.5.0 2015-02-25 22:03:38 +11:00
Sebastian McKenzie
c31832439a v4.5.0 2015-02-25 22:02:23 +11:00
Sebastian McKenzie
b7f19221a9 fix rc json error message 2015-02-25 22:00:32 +11:00
Sebastian McKenzie
46a37f4672 fix linting errors 2015-02-25 21:59:59 +11:00
Sebastian McKenzie
cfe2c19a02 fix linting errors 2015-02-25 21:57:49 +11:00
Sebastian McKenzie
649d91ef25 add 4.5.0 changelog 2015-02-25 21:56:23 +11:00
Sebastian McKenzie
4d72bffa30 add --copy-files bin/babel flag 2015-02-25 21:56:19 +11:00
Sebastian McKenzie
5889233adc rejigger path traversal class for es6ification 2015-02-25 21:50:40 +11:00
Sebastian McKenzie
7bb98352df add .babelrc - fixes #351 2015-02-25 21:49:48 +11:00
Sebastian McKenzie
12ebeed7c6 add missing extension to umd-strict formatter... - fixes #890 2015-02-25 19:10:20 +11:00
Sebastian McKenzie
7d87e52377 rejigger strict directives transformer logic so they're included in the body before module formatters are ran - @jayphelps 2015-02-25 17:20:23 +11:00
Sebastian McKenzie
2bab285970 temporarily disable own binding identification in nameMethod helper - fixes #871 2015-02-25 11:07:51 +11:00
Sebastian McKenzie
00651e671e don't copy over non-compilable files - fixes #888 2015-02-25 10:59:26 +11:00
Sebastian McKenzie
37588a6ceb 4.4.6 2015-02-24 22:17:46 +11:00
Sebastian McKenzie
a45d6960da v4.4.6 2015-02-24 22:17:12 +11:00
Sebastian McKenzie
b13aa41a75 fixing linting error 2015-02-24 22:15:27 +11:00
Sebastian McKenzie
20a4ed6140 add 4.4.6 changelog 2015-02-24 22:14:34 +11:00
Sebastian McKenzie
c256e060b3 Merge branch 'master' of github.com:6to5/6to5 2015-02-24 22:11:33 +11:00
Sebastian McKenzie
bef315efd6 fix up JSXElement alias keys 2015-02-24 22:11:25 +11:00
Sebastian McKenzie
2ec5390b63 bump core-js 2015-02-24 22:11:18 +11:00
Sebastian McKenzie
f4c9dd8768 Merge pull request #881 from sindresorhus/bump-chalk
bump `chalk`
2015-02-24 22:06:05 +11:00
Sindre Sorhus
510c7a3e60 bump chalk
https://github.com/sindresorhus/chalk/releases/tag/v1.0.0
2015-02-24 16:03:00 +07:00
Sebastian McKenzie
3ce9508a1c bump core-js @zloirock 2015-02-24 14:16:29 +11:00
Sebastian McKenzie
717ef280f7 clean up #870 2015-02-24 11:20:04 +11:00
Sebastian McKenzie
8c5e7cf272 Merge pull request #870 from neVERberleRfellerER/fix-extends-anon-class
fix extends with empty anonymous base class
2015-02-24 11:18:18 +11:00
Ondrej Kraus
811a843be9 add tests for extends of anonymous classes 2015-02-24 01:01:05 +01:00
Ondrej Kraus
b7c297bb89 remove anonymous class constructor name in specific case
Name of anonymous class constructor is not needed when it contains
exactly one method that is not construtor, because constructor
will be assigned to variable in closure.
2015-02-24 01:01:02 +01:00
Sebastian McKenzie
b7342ef4ea move es6.arrowFunctions transformer - fixes #874 2015-02-24 10:31:11 +11:00
Sebastian McKenzie
1a899f5e77 move attribute whitespace handling to JSXAttribute enter - fixes #872 2015-02-24 09:48:10 +11:00
Sebastian McKenzie
f2eb1643c0 throw deprecation error for @jsx React.DOM usage and crawl all comments for pragmas - fixes #876 2015-02-24 09:38:16 +11:00
neVERberleRfellerER
9621d1bbeb remove unnecessary derived class constructor name 2015-02-23 17:39:42 +01:00
Ondrej Kraus
3cf7b2b761 add name to constructor of extended anonymous class 2015-02-23 17:19:41 +01:00
Sebastian McKenzie
ae8b1e242b remove illegal left for of test 2015-02-23 21:36:42 +11:00
Sebastian McKenzie
eea48f866d allow MemberExpressions in for-of head 2015-02-23 21:31:57 +11:00
Sebastian McKenzie
84d2d7b7d4 add 4.4.5 changelog 2015-02-23 11:11:24 +11:00
Sebastian McKenzie
ea30a619dd bump regenerator-babel 2015-02-23 11:11:19 +11:00
Sebastian McKenzie
87a201db22 4.4.5 2015-02-22 23:27:02 +11:00
Sebastian McKenzie
bcc86c47bc v4.4.5 2015-02-22 23:26:01 +11:00
Sebastian McKenzie
b6df9b583b 4.4.4 2015-02-22 23:23:38 +11:00
Sebastian McKenzie
52ea7b5f59 always use closure wrap - fixes #864 2015-02-22 23:23:34 +11:00
Sebastian McKenzie
7bff8239a1 v4.4.4 2015-02-22 22:50:02 +11:00
Sebastian McKenzie
04d79c1740 fix array unpacking test 2015-02-22 22:46:27 +11:00
Sebastian McKenzie
e387da7c2b upgrade acorn-babel 2015-02-22 22:42:17 +11:00
Sebastian McKenzie
53cf453480 add 4.4.4 changelog 2015-02-22 22:40:18 +11:00
Sebastian McKenzie
341528ee4a fix linting errors 2015-02-22 22:37:51 +11:00
Sebastian McKenzie
5f6808ba92 don't transform flow module nodes 2015-02-22 22:35:47 +11:00
Sebastian McKenzie
0b2f1fedcb don't unpack array when the pattern contains more elements than the corresponding array expression 2015-02-22 22:35:38 +11:00
Sebastian McKenzie
c3c94f0a4a fix options argument to vm.runInThisContext 2015-02-22 22:35:04 +11:00
Sebastian McKenzie
f2d60aab9e optimise named functions depending on whether they contain an assignment/reference - #861 2015-02-22 21:35:08 +11:00
Sebastian McKenzie
ab6bb35a4f make line-numbers and js-tokens versions fixed 2015-02-22 20:55:09 +11:00
Sebastian McKenzie
e11b943514 revert to old named function wrapper - fixes #861 2015-02-22 20:54:47 +11:00
Sebastian McKenzie
b44a6eb297 remove is-keyword-js in favor of esutils #856 2015-02-22 10:51:27 +11:00
Sebastian McKenzie
f3288ddb1f Merge branch 'lydell-error-syntax-highlighting' 2015-02-22 10:49:30 +11:00
Simon Lydell
476aa44a90 improve syntax highlighting in error messages
- Support hexadecimal, octal and binary number literals, template strings, and
  tokenize everything more robustly in general.
- Tokens spanning over several lines (such as multiline strings and comments) no
  longer leak their color into the line number gutter.
- The color scheme is preserved.
- The line numbers are now right-aligned instead of left-aligned, since that's
  how practically every editor does it.
- Superfluos space in the line number gutter has been removed.
2015-02-21 21:20:52 +01:00
Sebastian McKenzie
c5589e9336 Merge pull request #853 from meandmycode/master
build: ensure bootstrap works on windows
2015-02-21 21:43:49 +11:00
Stephen Taylor
404eb2f972 build: ensure bootstrap works on windows 2015-02-21 10:17:28 +00:00
Sebastian McKenzie
366257915e advise users to visit the gitter room before creating an issue in the readme 2015-02-21 19:17:48 +11:00
Sebastian McKenzie
e0cd9bdbe3 4.4.3 2015-02-21 19:14:26 +11:00
Sebastian McKenzie
39854dc088 v4.4.3 2015-02-21 18:13:10 +11:00
Sebastian McKenzie
81132aa942 add 4.4.3 changelog 2015-02-21 18:08:32 +11:00
Sebastian McKenzie
5ba2e6254b check if iterator has a return method before calling it when breaking in a for...of - #838 2015-02-21 18:00:43 +11:00
Sebastian McKenzie
61ea720637 don't traverse into replacement breaks in for-of transformer - thanks @zloirock 2015-02-21 17:55:38 +11:00
Sebastian McKenzie
55357a331d rename selfContained transformer to runtime 2015-02-21 17:20:59 +11:00
Sebastian McKenzie
5deaeba3a0 4.4.2 2015-02-21 14:31:52 +11:00
Sebastian McKenzie
a38ae381e2 v4.4.2 2015-02-21 14:31:07 +11:00
Sebastian McKenzie
9a2e56f003 add moduleId option for specifying a custom module id 2015-02-21 14:29:26 +11:00
Sebastian McKenzie
5bc78b0237 4.4.1 2015-02-21 14:23:36 +11:00
Sebastian McKenzie
c5af8b8694 v4.4.1 2015-02-21 14:23:04 +11:00
Sebastian McKenzie
c637575cab remove tail-call template 2015-02-21 14:21:31 +11:00
Sebastian McKenzie
bc8d49c95c v4.4.0 2015-02-21 14:20:37 +11:00
Sebastian McKenzie
59ff0fd9a9 remove redundant esnext test 2015-02-21 14:18:53 +11:00
Sebastian McKenzie
b1f794eb84 fix linting errors 2015-02-21 14:16:02 +11:00
Sebastian McKenzie
79ab92b5d4 add 4.4.0 changelog 2015-02-21 14:14:50 +11:00
Sebastian McKenzie
f6512b45d5 coerce inferred function name to a valid identifier 2015-02-21 14:11:18 +11:00
Sebastian McKenzie
8065c981dc add iterator.return to for-of breaks - fixes #838 2015-02-21 13:31:14 +11:00
Sebastian McKenzie
7927aa2e18 make use strict directive stateless - fixes #828 2015-02-21 13:06:02 +11:00
Sebastian McKenzie
35bd510930 make react JSX transformer more generic and allow JSX comments - closes #841 2015-02-21 12:53:09 +11:00
Sebastian McKenzie
74186241f9 fix linting errors 2015-02-21 12:41:11 +11:00
Sebastian McKenzie
1effa72a33 remove format options but move compact option to main options 2015-02-21 12:41:03 +11:00
Sebastian McKenzie
b03a806d7c don't append a newline to the last switchcase 2015-02-21 12:27:38 +11:00
Sebastian McKenzie
6220fd9fc3 better control flow for tco continuation - fixes #850 and fixes #822 2015-02-21 12:27:24 +11:00
Sebastian McKenzie
8d92a75190 remove whitespace from the end of the last newline and improve newlines for switches 2015-02-21 03:22:44 +11:00
Sebastian McKenzie
60a7e40140 add website/docs issues reference to the readme 2015-02-21 02:24:28 +11:00
Sebastian McKenzie
299e462a29 unpack array rest elements when given a right hand array expression 2015-02-21 02:09:07 +11:00
Sebastian McKenzie
62556f6102 finish code generator revamp, output is now much nicer and liberal with it's use of newlines 2015-02-20 23:24:11 +11:00
Sebastian McKenzie
f2c5accab3 add getModuleName option - fixes #844 2015-02-20 23:23:50 +11:00
Sebastian McKenzie
15f1978cae Merge branch 'master' of github.com:6to5/6to5 2015-02-20 11:35:46 +11:00
Sebastian McKenzie
710ff548cb improve whitespace handling of code generator, reduce the use of lookaheads, add max newlines of 2 and better newline insertion for generated nodes 2015-02-20 11:35:27 +11:00
Sebastian McKenzie
fbb19fc656 clean up type alias keys 2015-02-20 11:34:43 +11:00
Sebastian McKenzie
e87ef80bc5 add back named methods for classes and add param binding check to spec.functionName transformer 2015-02-20 11:34:00 +11:00
Sebastian McKenzie
aca750e881 Merge pull request #839 from raganwald/patch-1
Links the babel logo in the readme to the home page
2015-02-20 08:00:26 +11:00
Reg Braithwaite
672e55082c link the babel logo in the readme to the home page 2015-02-19 15:46:35 -05:00
Sebastian McKenzie
a49f746700 add end_of_line = lf to editorconfig 2015-02-19 22:00:24 +11:00
Sebastian McKenzie
83cd3bef92 clean up destructuring transformer and optimise array destructuring - closes #749 2015-02-19 19:16:27 +11:00
Sebastian McKenzie
5e4a008a06 make code generator deopt on input >100KB 2015-02-19 10:48:08 +11:00
Sebastian McKenzie
1594efbc20 remove unused whitespace option 2015-02-19 10:47:51 +11:00
Sebastian McKenzie
002be9a05c enable spec.functionName by default 2015-02-19 10:47:44 +11:00
Sebastian McKenzie
8e06db8f7d remove minify binary 2015-02-19 10:47:08 +11:00
Sebastian McKenzie
b1238a1746 Merge branch 'master' of github.com:6to5/6to5 2015-02-19 10:46:47 +11:00
Ingvar Stepanyan
0874f390ff Add explicit return at the end of tail-recursive function.
Issue #822.
2015-02-18 14:44:47 +02:00
Sebastian McKenzie
eeff4ac9d1 add support for a string literal constructor name 2015-02-18 15:06:18 +11:00
Sebastian McKenzie
8f0ffc7302 4.3.0 2015-02-18 15:05:56 +11:00
Sebastian McKenzie
bb19649af8 v4.3.0 2015-02-18 13:15:45 +11:00
Sebastian McKenzie
692262df1b fix linting errors 2015-02-18 13:14:06 +11:00
Sebastian McKenzie
067047da34 update commonStandard tests to commonStrict 2015-02-18 13:10:25 +11:00
Sebastian McKenzie
1c5d169b1e 4.2.1 2015-02-18 13:08:36 +11:00
Sebastian McKenzie
3f82b4ec72 remove commonStandard module formatter and make it the default behaviour of all the strict module formatters 2015-02-18 13:08:25 +11:00
Sebastian McKenzie
9c6e632021 Merge pull request #785 from babel/fn-name
Set Function.name for funcs in variables and properties as per spec.
2015-02-18 11:49:52 +11:00
Sebastian McKenzie
45553f1fb7 v4.2.1 2015-02-18 11:37:47 +11:00
Sebastian McKenzie
f228edbb84 add auxiliary comment to let scoping closure flow control - fixes #819 2015-02-18 11:35:57 +11:00
Sebastian McKenzie
64e657e53d 4.2.0 2015-02-18 11:33:58 +11:00
Sebastian McKenzie
36423f2e78 v4.2.0 2015-02-18 11:28:53 +11:00
Sebastian McKenzie
06eaba5ad1 add 4.2.0 changelog 2015-02-18 11:26:46 +11:00
Sebastian McKenzie
7e8cd2ca8a i'm a terrible spellerer #777 2015-02-18 11:24:51 +11:00
Sebastian McKenzie
2541dcf960 bump acorn 2015-02-18 10:25:59 +11:00
Sebastian McKenzie
5d45e1475c Merge branch 'master' of github.com:6to5/6to5 2015-02-18 10:22:33 +11:00
Sebastian McKenzie
9964de9b2f remove redundant unknown transformer error message 2015-02-18 10:22:07 +11:00
Sebastian McKenzie
5b75b11628 add error message to use of eval(); and enable strict mode on the parser 2015-02-18 10:21:57 +11:00
Sebastian McKenzie
1890fb5bd3 add loose mode to __esModule 2015-02-18 10:21:32 +11:00
Sebastian McKenzie
df20b3df5a Merge pull request #815 from kolodny/iojs-test
add iojs to travis
2015-02-18 08:46:38 +11:00
Moshe Kolodny
56e74dfd10 add iojs to travis 2015-02-17 13:31:45 -05:00
Sebastian McKenzie
513d05143a 4.1.1 2015-02-18 00:01:55 +11:00
Sebastian McKenzie
84068943dd v4.1.1 2015-02-18 00:01:18 +11:00
Sebastian McKenzie
d3c75378ec v4.1.0 2015-02-17 23:59:38 +11:00
Sebastian McKenzie
ffe058bf69 add BABEL_CACHE_PATH and BABEL_DISABLE_CACHE environment variables 2015-02-17 23:06:19 +11:00
Sebastian McKenzie
765d95cd6f Merge branch 'master' of github.com:6to5/6to5 2015-02-17 16:57:26 +11:00
Sebastian McKenzie
33e82222ca remove 0.11 from travis.yml - #813, #807 2015-02-17 16:56:28 +11:00
Sebastian McKenzie
82d1c29696 Merge pull request #812 from sindresorhus/modularize-shebang-regex
modularize `SHEBANG_REGEX`
2015-02-17 16:33:12 +11:00
Sindre Sorhus
211c9802a5 modularize SHEBANG_REGEX
https://github.com/sindresorhus/shebang-regex
2015-02-17 12:26:36 +07:00
Sebastian McKenzie
f5a81e71bd Merge pull request #811 from sindresorhus/drop-helpers-clone
drop `helpers/clone`
2015-02-17 15:55:51 +11:00
Sindre Sorhus
4ea7a864fa drop helpers/clone
it's misleading as it doesn't actually do a deepClone, not even a clone
2015-02-17 11:42:24 +07:00
Sebastian McKenzie
d645659770 Merge pull request #810 from sindresorhus/modularize-normalisePathSeparator
modularize `normalisePathSeparator`
2015-02-17 15:24:06 +11:00
Sindre Sorhus
75ec9c8f2c modularize normalisePathSeparator
https://github.com/sindresorhus/slash
2015-02-17 11:19:12 +07:00
Sebastian McKenzie
3bffdc2be0 Merge pull request #809 from sindresorhus/modularize-isinteger
modularize `util.isInteger`
2015-02-17 15:12:18 +11:00
Sindre Sorhus
820db09613 modularize util.isInteger
https://github.com/parshap/js-is-integer
2015-02-17 11:10:00 +07:00
Sebastian McKenzie
f24ae6feab Merge pull request #808 from sindresorhus/modularize-trimright
modularize `util.trimRight`
2015-02-17 14:54:11 +11:00
Sindre Sorhus
5b09114b85 modularize util.trimRight
https://github.com/sindresorhus/trim-right
2015-02-17 10:51:02 +07:00
Sebastian McKenzie
28c948e5ea Merge pull request #806 from sindresorhus/modularize-isabsolute
modularize `util.isAbsolute`
2015-02-17 14:29:26 +11:00
Sindre Sorhus
bbf5a8f4aa modularize util.isAbsolute
by using a polyfill of the Node 0.12 `path.isAbsolute()` method

https://github.com/sindresorhus/path-is-absolute
2015-02-17 10:17:04 +07:00
Sebastian McKenzie
5f2865883b Merge branch 'master' of github.com:6to5/6to5 2015-02-17 14:09:49 +11:00
Sebastian McKenzie
c8433f950d fix 4.0.2 changelog... 2015-02-17 14:09:09 +11:00
Sebastian McKenzie
9135e700c6 Merge pull request #805 from sindresorhus/modularize-repeat
modularize `util.repeat`
2015-02-17 13:28:49 +11:00
Sindre Sorhus
eb17568c94 modularize util.repeat
https://github.com/sindresorhus/repeating
2015-02-17 09:25:00 +07:00
Sebastian McKenzie
407ff1e4a0 add 4.0.2 changelog 2015-02-17 13:12:31 +11:00
Sebastian McKenzie
fbaaf63c49 4.0.2 2015-02-17 13:11:15 +11:00
Sebastian McKenzie
f93daa3ca5 v4.0.2 2015-02-17 13:10:18 +11:00
Sebastian McKenzie
7fc1d04f9b Merge branch 'master' of github.com:6to5/6to5 2015-02-17 13:07:35 +11:00
Sebastian McKenzie
d6a34f02ca upgrade regenerator-babel #803 2015-02-17 13:07:22 +11:00
Sebastian McKenzie
fc3cb099c5 Merge pull request #802 from sindresorhus/sourcemapcomment
modularize the `sourceMapToComment` method
2015-02-17 12:49:12 +11:00
Sindre Sorhus
fc663d54fa modularize the sourceMapToComment method
https://github.com/sindresorhus/source-map-to-comment
2015-02-17 08:46:23 +07:00
Sebastian McKenzie
bf2418db66 set loose property assignments to computed if it's a literal 2015-02-17 10:45:24 +11:00
Sebastian McKenzie
5bd75db0b6 update setter validation error message 2015-02-17 09:34:45 +11:00
Sebastian McKenzie
13b3335a67 Merge pull request #800 from sindresorhus/remove-unused-deps
remove unused dependencies
2015-02-17 09:26:17 +11:00
Sindre Sorhus
4987f9e668 remove unused dependencies 2015-02-17 05:23:50 +07:00
Sebastian McKenzie
e585aa6bed use ranges for devDependencies 2015-02-17 09:23:48 +11:00
Sebastian McKenzie
d6c7be760b update settersInvalidParamLength error message - closes #797 2015-02-17 09:17:06 +11:00
Sebastian McKenzie
a19321ea69 update dependency ranges 2015-02-17 09:13:23 +11:00
Sebastian McKenzie
73fc1ac64e Merge pull request #794 from sindresorhus/bump-deps
bump dependencies
2015-02-17 09:11:10 +11:00
Sindre Sorhus
1d14764471 bump dependencies
The only breaking change is 599dd668fd and it doesn't affect `babel` since it doesn't use that property.
2015-02-17 05:02:32 +07:00
Sebastian McKenzie
e336ecd9cc Merge pull request #792 from sindresorhus/remove-moot-dep
Remove `supports-color` dependency as it's available in `chalk`
2015-02-17 08:53:42 +11:00
Sebastian McKenzie
5737a96f9f Merge pull request #793 from sindresorhus/levenshtein
Use `leven` module for levenshtein distance
2015-02-17 08:53:02 +11:00
Sebastian McKenzie
d7d4ec54cd Merge pull request #796 from richgilbank/babel-rename-makefile
Fix leftover `to5`
2015-02-17 08:49:18 +11:00
Rich Gilbank
98056e26af Update Makefile 2015-02-16 11:52:20 -05:00
Sindre Sorhus
afd07c9172 Use leven module for levenshtein distance
https://github.com/sindresorhus/leven

No point in bundling code like this.

Leven is also the fastest one: https://github.com/sindresorhus/leven#benchmark
2015-02-16 22:36:20 +07:00
Sindre Sorhus
af785126bf Remove supports-color dependency as it's available in chalk 2015-02-16 22:28:51 +07:00
Sebastian McKenzie
39c5849604 Merge branch 'master' of github.com:6to5/6to5 2015-02-16 14:37:08 +11:00
Sebastian McKenzie
1b6e465317 add email to license 2015-02-16 14:36:57 +11:00
Ingvar Stepanyan
17e65cc772 Set Function.name for funcs in variables and properties as per spec.
Implements correct Function.name for cases like following:
 * `var x = function () { ... }`
 * `var obj = {prop: function () { ... }}`
2015-02-15 23:43:17 +02:00
Sebastian McKenzie
15dff73cc8 Merge pull request #783 from mathiasbynens/patch-3
Update to regexpu v1.1.1
2015-02-16 03:05:59 +11:00
Mathias Bynens
186a15b3ce Update to regexpu v1.1.1 2015-02-15 17:05:35 +01:00
Sebastian McKenzie
610e52d767 4.0.1 2015-02-16 01:12:13 +11:00
Sebastian McKenzie
b0467fcb6d v4.0.1 2015-02-16 01:11:46 +11:00
Sebastian McKenzie
05be131647 rename bin tests to reflect new babel name 2015-02-16 01:08:26 +11:00
Sebastian McKenzie
f2300a5463 Revert "don't push array pattern uid if it's a local variable"
This reverts commit 86acc99fb3.
2015-02-16 01:06:14 +11:00
Sebastian McKenzie
86acc99fb3 don't push array pattern uid if it's a local variable 2015-02-16 01:01:42 +11:00
Sebastian McKenzie
21909cee76 rename runtime CLI flag to externalHelpers 2015-02-16 01:01:29 +11:00
Sebastian McKenzie
c97b53b52d fix 6to5 changelog 2015-02-16 01:01:14 +11:00
Sebastian McKenzie
c5e01146fd update rogue 6to5 occurences to babel 2015-02-15 20:39:46 +11:00
Sebastian McKenzie
010ff3ec31 reset transformer deprecation keys 2015-02-15 20:29:48 +11:00
Sebastian McKenzie
17532bfd82 update to 4.0.0 2015-02-15 19:54:14 +11:00
Sebastian McKenzie
545e9499c3 update readme to reflect babel name change 2015-02-15 19:54:08 +11:00
Sebastian McKenzie
02046c5448 rename runtime option to externalHelpers 2015-02-15 19:53:59 +11:00
Sebastian McKenzie
1d34d03ac8 rename to babel 2015-02-15 18:09:05 +11:00
Sebastian McKenzie
e05aed0394 support all loops when adding declarations - #779 2015-02-15 10:27:56 +11:00
Sebastian McKenzie
2d3b595a8b 3.6.5 2015-02-15 10:26:52 +11:00
Sebastian McKenzie
8f0b7683a1 v3.6.5 2015-02-14 23:05:13 +11:00
Sebastian McKenzie
f0d2cbb055 update 3.6.5 changelog 2015-02-14 22:57:57 +11:00
Sebastian McKenzie
602c5e0ca0 upgrade core-js 2015-02-14 22:56:49 +11:00
Sebastian McKenzie
2a2dff0eaf remap head variables when a closure is required in blockScoping transformer - fixes #763 2015-02-14 20:21:34 +11:00
Sebastian McKenzie
e1151e08c9 register default globals as bindings 2015-02-14 19:08:41 +11:00
Sebastian McKenzie
84f54ca3c7 rename defaultDeclarations to globals 2015-02-14 19:08:02 +11:00
Sebastian McKenzie
5fb793b75f add validation.react transformer 2015-02-14 19:07:54 +11:00
Sebastian McKenzie
1adc9bfc70 use t.buildMatchMemberExpression in selfContained transformer 2015-02-14 19:07:46 +11:00
Sebastian McKenzie
3649fad485 ensureBlock on if statements with expression return statements - fixes #764 2015-02-14 19:07:23 +11:00
Sebastian McKenzie
0e1743738e add auxilary comment option to prepend to helpers - #777 2015-02-14 16:53:41 +11:00
Sebastian McKenzie
6ad16302cd update 3.6.3 changelog 2015-02-14 13:29:57 +11:00
Sebastian McKenzie
4b6b7af332 3.6.4 2015-02-14 13:29:52 +11:00
Sebastian McKenzie
55dfb423ee v3.6.4 2015-02-14 13:26:59 +11:00
Sebastian McKenzie
9d1bc4817d fix flow module type stripping 2015-02-14 13:24:39 +11:00
Sebastian McKenzie
fc8666e7a4 3.6.3 2015-02-14 13:22:18 +11:00
Sebastian McKenzie
07b6881d67 add support for flow type casts and module types 2015-02-14 13:22:13 +11:00
Sebastian McKenzie
1f208a06db v3.6.3 2015-02-14 13:01:17 +11:00
Sebastian McKenzie
b5c9c84542 update bin/6to5 tests to reflect new source location 2015-02-14 12:59:31 +11:00
Sebastian McKenzie
492555bb4e fix linting errors 2015-02-14 12:54:44 +11:00
Sebastian McKenzie
53d88c0f63 upgrade acorn-6to5 2015-02-14 12:53:54 +11:00
Sebastian McKenzie
8a5da57162 use default property on 6to5-runtime modules - fixes #774 2015-02-14 00:59:34 +11:00
Sebastian McKenzie
1627e2f47e use sourceFileName instead of sourceMapName - fixes #775 2015-02-14 00:44:32 +11:00
Sebastian McKenzie
e195d6ca55 use relative location when generating the sourceMapName in bin/6to5 for directories - fixes #775 2015-02-13 23:08:47 +11:00
Sebastian McKenzie
71d5d4fb2c remove MemberExpression from binding identifier collection 2015-02-13 21:10:23 +11:00
Sebastian McKenzie
dfe13cda0d 3.6.2 2015-02-13 21:08:14 +11:00
Sebastian McKenzie
a4c6660d21 v3.6.2 2015-02-13 21:07:45 +11:00
Sebastian McKenzie
9676666e7c 3.6.1 2015-02-13 21:05:56 +11:00
Sebastian McKenzie
388133642d add support for UnaryExpression to getBindingIdentifiers and add it as a reassignment in the scope tracking 2015-02-13 21:05:52 +11:00
Sebastian McKenzie
23b5eeb72f use Symbol.iterator in for symbol detection and add the conversion of it to the selfContained transformer - @zloirock 2015-02-13 21:05:21 +11:00
Sebastian McKenzie
db36c3a7c2 v3.6.1 2015-02-13 20:50:37 +11:00
Sebastian McKenzie
e841b88cbc fix 6to5-node test collisions 2015-02-13 20:48:52 +11:00
Sebastian McKenzie
3d874f2479 update sliceToArray helper, again... 2015-02-13 20:45:43 +11:00
Sebastian McKenzie
228719102a update sliceToArray tests 2015-02-13 20:39:37 +11:00
Sebastian McKenzie
c6ce1a248c better slicedToArray helper 2015-02-13 20:38:28 +11:00
Sebastian McKenzie
ba9b85f64b only use functions returnType if it hasn't been reassigned 2015-02-13 20:36:43 +11:00
Sebastian McKenzie
56c868efee fix incorrect generateUid references in File 2015-02-13 18:27:53 +11:00
Sebastian McKenzie
1f3c3832ba fix linting errors 2015-02-13 18:25:34 +11:00
Sebastian McKenzie
3b04a8c648 fix linting errors 2015-02-13 18:24:24 +11:00
Sebastian McKenzie
2270057b54 add 3.6.1 changelog 2015-02-13 18:23:46 +11:00
Sebastian McKenzie
c3206aa9a4 move File::generateUid to Scope and add return type inferrence 2015-02-13 18:21:28 +11:00
Sebastian McKenzie
1912d1b26a remove ExportSpecifier from t.getBindingIdentifiers as it has none 2015-02-13 18:19:27 +11:00
Sebastian McKenzie
9208e7e594 update common standard import test 2015-02-13 17:47:46 +11:00
Sebastian McKenzie
ce332b3384 fix module binding resolution - fixes #762 2015-02-13 17:37:35 +11:00
Sebastian McKenzie
a567531f77 ignore member expressions in constants transformer - fixes #770 2015-02-13 17:18:42 +11:00
Sebastian McKenzie
9cce72def0 update tests that use the toSlicedArray helper 2015-02-13 17:04:18 +11:00
Sebastian McKenzie
2d8581c6dc Merge branch 'master' of github.com:6to5/6to5
Conflicts:
	lib/6to5/transformation/transformers/minification/dead-code-elimination.js
2015-02-13 16:54:09 +11:00
Sebastian McKenzie
14a000396a add error message to the sliced-to-array helper on a non-iterable param - fixes #766 2015-02-13 16:50:03 +11:00
Sebastian McKenzie
4c41f5a22f bump acorn-6to5 and 6to5 devDependency 2015-02-13 15:09:28 +11:00
Sebastian McKenzie
6be2a6e02a add extra note to minification dead code elimination transformer 2015-02-13 15:09:17 +11:00
Sebastian McKenzie
0a4fc16ca0 add type inferrence that expires when a binding is reassigned 2015-02-13 15:08:58 +11:00
Sebastian McKenzie
25d8377411 normalise JSX attribute strings 2015-02-13 15:08:39 +11:00
Brian Donovan
14267a788d Fix a typo. 2015-02-12 19:12:09 -08:00
Sebastian McKenzie
ba5c5760b1 Merge pull request #769 from 6to5/if-truthy-minification-returns-consequent
Return the consequent if the test is truthy.
2015-02-13 14:08:32 +11:00
Brian Donovan
49904b3ab3 Fix a small grammar issue. 2015-02-12 19:07:54 -08:00
Brian Donovan
a212f035e4 Return the consequent if the test is truthy. 2015-02-12 19:06:06 -08:00
Brian Donovan
ea471a6a17 Fix a few typos. 2015-02-12 18:47:08 -08:00
Brian Donovan
f5bae0b696 Remove redundant variable. 2015-02-12 18:46:53 -08:00
Brian Donovan
9ec9e13aeb Update the jsdoc to indicate that key is optional. 2015-02-12 18:36:36 -08:00
Brian Donovan
0b042b2681 Use the posessive form of "its", not a contraction of "it is". 2015-02-12 18:36:02 -08:00
Brian Donovan
83b4d12884 Correct a jsdoc comment parameter name. 2015-02-12 18:35:35 -08:00
Brian Donovan
98d555498d Remove unused variable. 2015-02-12 18:29:14 -08:00
Sebastian McKenzie
fdc05cb977 Merge pull request #767 from 6to5/templates-should-not-recurse
Ensure that templates do not recurse.
2015-02-13 11:13:30 +11:00
Brian Donovan
928ebda5bc Ensure that templates do not recurse.
Closes #765.
2015-02-12 16:10:13 -08:00
Sebastian McKenzie
0a2003af66 3.6.0 2015-02-12 21:59:37 +11:00
Sebastian McKenzie
02392635ef v3.6.0 2015-02-12 21:57:18 +11:00
Sebastian McKenzie
298cfac7f4 fix linting errors 2015-02-12 21:55:31 +11:00
Sebastian McKenzie
476b683f0f upgrade core-js 2015-02-12 21:53:51 +11:00
Sebastian McKenzie
5c5b66df54 add 3.6.0 changelog 2015-02-12 21:53:45 +11:00
Sebastian McKenzie
e7f6572a3b track arrays to avoid turning something into an array multiple times - closes #757 2015-02-12 21:30:48 +11:00
Sebastian McKenzie
e9cfd2df3e fix toConsumableArray helper 2015-02-12 16:53:00 +11:00
Sebastian McKenzie
a425136680 allow loose = true as an alias for loose = "all" 2015-02-12 16:36:17 +11:00
Sebastian McKenzie
8d06a4301c pdate tests to reflect toConsumableArray updates 2015-02-12 16:35:55 +11:00
Sebastian McKenzie
1909a16dc7 copy over files that we can't compile when specifying a directory in bin/6to5 2015-02-12 16:35:41 +11:00
Sebastian McKenzie
3bfa1f610c add bootstrapping base 2015-02-12 16:35:04 +11:00
Sebastian McKenzie
4faf2b7730 fix namespace name 2015-02-12 16:00:54 +11:00
Sebastian McKenzie
4e5d6ee976 rice up toConsumableArray helper 2015-02-12 16:00:43 +11:00
Sebastian McKenzie
afb1ee79a1 fix autoenabling of playground/experimental when used in whitelist/optional 2015-02-12 16:00:26 +11:00
Sebastian McKenzie
efe3f30741 make minification.renameLocalVariables work 2015-02-12 07:46:34 +11:00
Sebastian McKenzie
5ff0285ba7 use space helper instead of pushing a space in IfStatement generation 2015-02-12 07:46:21 +11:00
Sebastian McKenzie
d7bea2f325 remove legacy jshint comment 2015-02-12 07:46:03 +11:00
Sebastian McKenzie
32316ad942 clean up t.is 2015-02-12 07:45:55 +11:00
Sebastian McKenzie
7953eb560e force experimental and playground flag when whitelisting/optionalising transformers 2015-02-12 07:45:50 +11:00
Sebastian McKenzie
faa10df84c add toConsumableArray helper for spread - fixes #757 2015-02-12 07:37:40 +11:00
Sebastian McKenzie
ae344aa23e recurse over and duplicate array in toArray in order to handle sparse arrays - fixes #754 2015-02-12 00:33:04 +11:00
Sebastian McKenzie
e0bfc72700 fix tail call deopt check 2015-02-11 20:16:50 +11:00
Sebastian McKenzie
bf8f80faf7 add general support for declarations to Scope::rename - closes #751 2015-02-11 20:14:41 +11:00
Sebastian McKenzie
77fa8bf01c fix isReferenced on AssignmentPattern 2015-02-11 20:14:21 +11:00
Sebastian McKenzie
34ca1ac04f delay binding reassignment to after reference replacements - #751 2015-02-11 19:48:54 +11:00
Sebastian McKenzie
85d33536e0 add deopt logging to tail call transformer 2015-02-11 15:59:15 +11:00
Sebastian McKenzie
a4932e0e0f add messages to make it easier to make error messages 2015-02-11 15:57:30 +11:00
Sebastian McKenzie
4ebd0a1e8a upgrade regenerator-6to5 2015-02-11 12:12:43 +11:00
Sebastian McKenzie
14e92e9e3f remove kexec from optionalDependencies 2015-02-11 12:00:38 +11:00
Sebastian McKenzie
13687d98ed bump regenerator-6to5 2015-02-11 11:52:16 +11:00
Sebastian McKenzie
db93c52182 opt out of tail recursion optimisation if the owner id has been reassigned - fixes #744 2015-02-11 11:27:50 +11:00
Sebastian McKenzie
56a953df64 add basic support for class property initializers - #619 2015-02-11 10:59:44 +11:00
Sebastian McKenzie
c38edbbb42 Merge branch 'master' of github.com:6to5/6to5 2015-02-11 08:29:08 +11:00
Sebastian McKenzie
017bb6427a Merge pull request #743 from chicoxyzzy/master
optimise lodash usage
2015-02-11 08:28:58 +11:00
Sebastian McKenzie
714ad40cb0 update contributing guide 2015-02-11 08:28:47 +11:00
Ingvar Stepanyan
904a72fb3a Fix rename not establishing binding. 2015-02-10 17:18:46 +02:00
chico
146835e0f1 fix broken code, lint and codestyle fixes 2015-02-10 18:16:54 +03:00
chico
79ba97872c optimise lodash usage; change contains function to includes for convenience 2015-02-10 17:40:53 +03:00
Sebastian McKenzie
897566ccb3 more reliable scope construction 2015-02-11 00:38:59 +11:00
Sebastian McKenzie
4df1b6700b remove acorn node patching 2015-02-11 00:37:59 +11:00
Sebastian McKenzie
50f903caf7 proper optional builder keys 2015-02-11 00:13:27 +11:00
Sebastian McKenzie
7b8118d8bd default newName in scope.rename to a new uid 2015-02-11 00:13:21 +11:00
Sebastian McKenzie
0c1e1e757c default optional builder keys to false 2015-02-11 00:02:51 +11:00
Sebastian McKenzie
62fa583fc1 fix linting errors 2015-02-10 23:55:11 +11:00
Sebastian McKenzie
8598000a69 restructure Scope API and internal data structure 2015-02-10 23:52:23 +11:00
Sebastian McKenzie
edc8bee38e test for falsy nodes in tail call transformer subtransform 2015-02-10 22:39:46 +11:00
Sebastian McKenzie
45b70d7fba fix bad ctrl+f Class -> ClassTransformer replacement 2015-02-10 22:39:21 +11:00
Sebastian McKenzie
49a53b26bb add scope renaming helper method - fixes #645 - @RReverser 2015-02-10 22:39:07 +11:00
Sebastian McKenzie
329b4e9d21 append Transformer to the end of transformer classes 2015-02-10 22:12:36 +11:00
Sebastian McKenzie
f1bca0013e refactor tail call transformer into a class - @RReverser 2015-02-10 22:11:22 +11:00
Sebastian McKenzie
87af83f1cb Merge pull request #742 from douglasduteil/patch-1
chore(travis): run tests on nodejs 0.12 too
2015-02-10 20:30:30 +11:00
Douglas Duteil
5156574bf2 chore(travis): run tests on nodejs 0.12 too 2015-02-10 10:29:05 +01:00
Sebastian McKenzie
ac098255be fix allowPartial in t.buildMatchMemberExpression 2015-02-10 18:34:16 +11:00
Sebastian McKenzie
47b803ef24 remove old tail call transformer 2015-02-10 18:33:51 +11:00
Sebastian McKenzie
7f61c8b65e add descriptor falsy check to defaults helper - #739 2015-02-10 18:33:29 +11:00
Sebastian McKenzie
4fa9aa63a3 Merge branch 'better-tail-recursion' 2015-02-10 18:04:05 +11:00
Sebastian McKenzie
d582c7c93a Merge pull request #739 from lukescott/defaults-fix
fix defaults helper in strict mode - #738
2015-02-10 18:00:26 +11:00
Sebastian McKenzie
6266f5b924 finish minification.removeConsoleCall transformer #740 2015-02-10 17:56:31 +11:00
Luke Scott
c6920a0e60 fix defaults helper in strict mode - #738 2015-02-09 20:38:57 -08:00
Sebastian McKenzie
825d84ba52 fix defaults helper iteration - #738 2015-02-10 13:20:19 +11:00
Sebastian McKenzie
94a0eb5b06 copy over descriptors and handle non-enumerable properties in defaults helper - fixes #738 2015-02-10 13:06:26 +11:00
Sebastian McKenzie
b6d708caf2 add SpreadProperty to t.getBindingIdentifiers - fixes #734 2015-02-10 09:04:27 +11:00
Ingvar Stepanyan
0d542b61d3 Performance improvements for TCO.
http://jsperf.com/tco/17
2015-02-09 19:00:31 +02:00
Ingvar Stepanyan
5a842ab623 Fix statement substitution in templates. 2015-02-09 17:34:59 +02:00
Sebastian McKenzie
26d4b5f2cf normalise opts.sourceRoot path - 6to5/karma-6to5-preprocessor#5 2015-02-09 23:38:54 +11:00
Sebastian McKenzie
ba0dfac53d add uid scope kind 2015-02-09 21:28:51 +11:00
Sebastian McKenzie
8a4296a948 remove binding kind from pushing bindings to the function scope, better block scoped collision logic, and track label ids as references 2015-02-09 21:21:25 +11:00
Sebastian McKenzie
478f9e028f put function params into the param kind 2015-02-09 20:16:38 +11:00
Sebastian McKenzie
c4e56894d9 ignore hoisted kind when checking for block scoped collisions 2015-02-09 20:03:59 +11:00
Sebastian McKenzie
c6f13844ed move FunctionDeclarations into a hoisted kind 2015-02-09 19:53:46 +11:00
Sebastian McKenzie
5e81653680 change function params binding kind to let 2015-02-09 19:45:03 +11:00
Sebastian McKenzie
8e2df3f1f9 add kinds to binding registration and rename declaration scope methods to bindings 2015-02-09 19:42:52 +11:00
Sebastian McKenzie
a2cc384172 move rest parameters transformer above default parameters 2015-02-09 10:59:31 +11:00
Sebastian McKenzie
d37bf292a1 rename declarationKinds to bindingKinds in scope tracker 2015-02-09 10:59:20 +11:00
Sebastian McKenzie
70eb641530 fix element name in default parameters 2015-02-09 08:46:06 +11:00
Sebastian McKenzie
f845a9b2c4 ignore binding elements when finding the last non-default param - fixes #723 2015-02-09 08:25:58 +11:00
Sebastian McKenzie
ee5cb8d9ed clean up tail call transformer 2015-02-08 22:47:50 +11:00
Sebastian McKenzie
9020a21ba2 3.5.3 2015-02-08 22:17:36 +11:00
Sebastian McKenzie
fdda013d07 v3.5.3 2015-02-08 22:17:05 +11:00
Sebastian McKenzie
64477d934d add 3.5.3 changelog 2015-02-08 22:10:00 +11:00
Sebastian McKenzie
45c507056a add back old tail call implementation 2015-02-08 22:09:41 +11:00
Sebastian McKenzie
730b96c195 3.5.2 2015-02-08 21:23:55 +11:00
Sebastian McKenzie
a185f91433 v3.5.2 2015-02-08 21:23:24 +11:00
Sebastian McKenzie
d053622802 add 3.5.2 changelog 2015-02-08 21:21:38 +11:00
Sebastian McKenzie
74d6b61973 disable es6 tail call tests 2015-02-08 21:21:32 +11:00
Sebastian McKenzie
97784c8cca comment out tailCall transformer 2015-02-08 21:19:01 +11:00
Sebastian McKenzie
812d93553a temporairly disable tailCall transformer 2015-02-08 21:17:21 +11:00
Sebastian McKenzie
d251b4cb56 3.5.1 2015-02-08 21:16:34 +11:00
Sebastian McKenzie
caf38e1962 v3.5.1 2015-02-08 21:04:05 +11:00
Sebastian McKenzie
4ccbee4639 fix linting errors 2015-02-08 20:59:48 +11:00
Sebastian McKenzie
84196a3a07 add 3.5.1 changelog 2015-02-08 20:57:58 +11:00
Ingvar Stepanyan
29361c055a Fix #718. 2015-02-08 11:56:39 +02:00
Sebastian McKenzie
4277265591 Merge branch 'master' of github.com:6to5/6to5 2015-02-08 20:40:47 +11:00
Sebastian McKenzie
812a2b315d bump acorn-6to5 2015-02-08 20:40:30 +11:00
Ingvar Stepanyan
0a1724fc3f Remove no more needed returnBlock helper. 2015-02-08 11:31:19 +02:00
Sebastian McKenzie
bcc9e016b1 only evaluate object destructuring pattern once 2015-02-08 20:23:22 +11:00
Sebastian McKenzie
4ea0175ca7 simplify set template 2015-02-08 20:23:22 +11:00
Sebastian McKenzie
799445c745 add property method assignment wrapper generator template 2015-02-08 20:23:22 +11:00
Sebastian McKenzie
481ea12999 add cleanup internal transformer 2015-02-08 20:23:22 +11:00
Sebastian McKenzie
de6b608dda add _declarations and _scopeInfo to t.inherits 2015-02-08 20:23:21 +11:00
Sebastian McKenzie
606f813822 enable traceur test suite by default 2015-02-08 20:23:21 +11:00
Sebastian McKenzie
e06c8cd106 support generators in nameMethod helper 2015-02-08 20:23:21 +11:00
Ingvar Stepanyan
9e3c67a8a2 Clean up functionChildrenVisitor a bit. 2015-02-08 10:53:09 +02:00
Ingvar Stepanyan
91362f80b1 Clean up transformations after #714.
Since now we have runtime helper, we don't need
expression -> statement conversions anymore.
2015-02-08 10:40:03 +02:00
Sebastian McKenzie
cde988f99f update 3.5.0 changelog 2015-02-08 16:53:33 +11:00
Sebastian McKenzie
9ec0854659 3.5.0 2015-02-08 16:37:13 +11:00
Sebastian McKenzie
bb17571e56 v3.5.0 2015-02-08 16:35:45 +11:00
Sebastian McKenzie
9161af58c0 fix linting errors 2015-02-08 16:32:08 +11:00
Sebastian McKenzie
e39f4e8025 update 3.5.0 changelog 2015-02-08 16:31:24 +11:00
Sebastian McKenzie
f5e9909e71 Merge pull request #716 from daliwali/master
Make `__esModule` property not enumerable
2015-02-08 16:30:26 +11:00
Sebastian McKenzie
46913fc55f add 3.5.0 changelog 2015-02-08 16:22:12 +11:00
Dali Zheng
d358a86e98 make __esModule property not enumerable 2015-02-07 21:19:11 -08:00
Sebastian McKenzie
055545980c update traceur test runner 2015-02-08 16:19:05 +11:00
Sebastian McKenzie
6fd7f9868e upgrade acorn-6to5 2015-02-08 16:18:54 +11:00
Sebastian McKenzie
e8184a9bc5 fix browser api location in browser test 2015-02-08 14:34:43 +11:00
Sebastian McKenzie
f74de3ef55 move destructuring and parameters.rest transformer to above blockScoping 2015-02-08 14:34:34 +11:00
Sebastian McKenzie
9624f8287d add checkNode to block scoped functions transformer 2015-02-08 14:34:10 +11:00
Sebastian McKenzie
e42d5a889e make destructuring in catch clauses block scoped and add support for non-variable destructuring in for-in/of heads 2015-02-08 14:33:55 +11:00
Sebastian McKenzie
4c8e6481b6 make default parameters iife invocation less serious 2015-02-08 09:54:24 +11:00
Sebastian McKenzie
0867df2691 fix ForOf block body not properly inheriting declarations 2015-02-08 09:50:12 +11:00
Sebastian McKenzie
b06f99ab30 add iife detection to non-identifier params in default parameters 2015-02-08 09:37:06 +11:00
Sebastian McKenzie
9afa3f6b58 add opts param to t.isReferencedIdentifier 2015-02-08 09:31:41 +11:00
Sebastian McKenzie
785cb4b72f allow optional transformer to be set via the whitelist 2015-02-08 09:31:30 +11:00
Sebastian McKenzie
dabe69856a add additional checks to transformers 2015-02-08 09:31:19 +11:00
Sebastian McKenzie
24e70802b5 fix block scoped tracking in functions - fixes #710 2015-02-08 09:31:04 +11:00
Sebastian McKenzie
c1ba55a52d Merge pull request #714 from RReverser/master
Added complete TCO (tail call optimization).
2015-02-08 08:55:19 +11:00
Ingvar Stepanyan
4c318166e1 Added complete TCO (tail call optimization).
Works across functions and generates simpler and faster code than #701.
Works even across files when used in conjunction with `runtime` option.

Closes #256.
2015-02-07 22:22:38 +02:00
Sebastian McKenzie
c0af67eca1 add support for super in object literals - fixes #411 2015-02-08 02:01:17 +11:00
Sebastian McKenzie
eb14f1da00 implement optional TDZ - fixes #563 2015-02-08 01:27:22 +11:00
Sebastian McKenzie
3361b81658 expose parentPath 2015-02-08 01:27:00 +11:00
Sebastian McKenzie
a15f218e9b dump code to esvalid errors 2015-02-08 01:26:46 +11:00
Sebastian McKenzie
067cf43f52 fix File::addHelper unknown helper error message 2015-02-08 00:01:26 +11:00
Sebastian McKenzie
689ce048e6 remove tail call exec test 2015-02-07 23:52:41 +11:00
Sebastian McKenzie
8a143bf957 use a template in tail call transformer - @RReverser 2015-02-07 23:52:35 +11:00
Sebastian McKenzie
9f7bcf585d remove dead TraversalContext code 2015-02-07 23:51:05 +11:00
Sebastian McKenzie
f9efd8a272 fix error message in File::addHelper 2015-02-07 23:50:56 +11:00
Sebastian McKenzie
8cd2326ff9 Merge branch 'master' of github.com:6to5/6to5 2015-02-07 23:37:51 +11:00
Sebastian McKenzie
eb1ae70bfa Merge pull request #701 from RReverser/master
Add tail recursion optimization.
2015-02-07 23:37:43 +11:00
Ingvar Stepanyan
24ef81908c Increase test timeout for Travis. 2015-02-07 14:34:23 +02:00
Ingvar Stepanyan
b53b41cef3 Provide placeholders for proper function length. 2015-02-07 14:26:03 +02:00
Sebastian McKenzie
ad245ed46a 3.4.1 2015-02-07 19:48:59 +11:00
Sebastian McKenzie
3f6199493e v3.4.1 2015-02-07 19:48:28 +11:00
Sebastian McKenzie
e06aac4783 Revert "make export { foo as default }; trigger common interop"
This reverts commit 07c7b5b419.
2015-02-07 19:40:49 +11:00
Sebastian McKenzie
6a5adfe338 update 3.4.1 changelog 2015-02-07 19:40:29 +11:00
Sebastian McKenzie
07c7b5b419 make export { foo as default }; trigger common interop 2015-02-07 19:29:59 +11:00
Sebastian McKenzie
7f985fe08a fix incorrect strict module formatter variable - fixes #706 2015-02-07 19:29:32 +11:00
Sebastian McKenzie
38f02a6429 add 3.4.1 changelog 2015-02-07 19:19:55 +11:00
Sebastian McKenzie
f943bdcac0 Merge branch 'master' of github.com:6to5/6to5 2015-02-07 19:18:29 +11:00
Sebastian McKenzie
8dc634edfc add options to require cache key - fixes #707 2015-02-07 19:18:12 +11:00
Sebastian McKenzie
05b9cf17f0 Merge pull request #708 from tricknotes/avoid-conflict
Switch short option of `--module-ids` from `-i` to `-M`
2015-02-07 19:12:22 +11:00
Ryunosuke SATO
69bbe89616 Switch short option of --module-ids from -i to -M
`-i` conflicts with `--optional` option.

```
$ bin/6to5/index.js --help | grep "\-i,"
    -i, --optional [list]        List of optional transformers to enable
    -i, --module-ids             Insert module id in modules
```
2015-02-07 16:37:38 +09:00
Sebastian McKenzie
6b49958f7c Merge branch 'master' of github.com:6to5/6to5 2015-02-07 15:59:15 +11:00
Sebastian McKenzie
e75ce94578 move reactCompat option onto an optional transformer 2015-02-07 15:59:00 +11:00
Sebastian McKenzie
f666473724 Merge pull request #705 from cesarandreu/patch-2
Add 6to5-runtime README
2015-02-07 13:54:58 +11:00
Cesar Andreu
ae817e3c9c Add 6to5-runtime README 2015-02-06 18:53:42 -08:00
Sebastian McKenzie
2e9352de14 3.4.0 2015-02-07 10:44:06 +11:00
Sebastian McKenzie
1e9e55ddef fix browser build location in makefile 2015-02-07 10:42:28 +11:00
Sebastian McKenzie
0799ed7116 v3.4.0 2015-02-07 10:41:38 +11:00
Sebastian McKenzie
5537250d4f fix linting errors 2015-02-07 10:40:01 +11:00
Sebastian McKenzie
7ada50937b add 3.4.0 changelog 2015-02-07 10:39:24 +11:00
Sebastian McKenzie
f2ae88af93 add commonStandard module formatter - fixes #675
will be merged into strict formatters in next major
TODO: rewrite all module formatters as they've gotten out of han
2015-02-07 10:31:52 +11:00
Sebastian McKenzie
726451f86f reverts d6b39bc89b 2015-02-07 09:54:18 +11:00
Sebastian McKenzie
306cfc6328 fix 3.3.12 changelog misspelling 2015-02-07 09:53:18 +11:00
Sebastian McKenzie
a051a47048 reorder types requires 2015-02-07 08:11:42 +11:00
Ingvar Stepanyan
5b2216b348 Add tail recursion optimization.
As per ES6, VMs should perform tail call optimization and prevent growth of call stack.
This adds tail call optimization for recursion case (when function has explicit name and calls itself in `return`).
Cross-function optimization is not currently performed as it's more complicated and requires value tracking.
2015-02-06 16:34:35 +02:00
Sebastian McKenzie
ad60d49611 fix bindingEquals in constants transformer 2015-02-06 23:35:19 +11:00
Sebastian McKenzie
a6d1a5a724 add bindingEquals, typeEquals, referenceEquals helper methods to Scope 2015-02-06 23:07:10 +11:00
Sebastian McKenzie
399d835285 fix linting errors 2015-02-06 23:06:54 +11:00
Sebastian McKenzie
b66367ddde change namespace of minification.propertyLiterals and minifciation.memberExpressionLiterals to es3 2015-02-06 22:42:16 +11:00
Sebastian McKenzie
37d29b7a6f clean up function scope collection - @RReverser 2015-02-06 22:04:13 +11:00
Sebastian McKenzie
1e708fb373 fix traverse test 2015-02-06 01:59:45 +11:00
Sebastian McKenzie
76ae1682a3 remove context arg in favor of this, rename TraversalIteration to TraversalPath, and remove ast handlers 2015-02-06 01:47:43 +11:00
Sebastian McKenzie
2ef0aa95c5 clean up indentation 2015-02-06 01:17:42 +11:00
Sebastian McKenzie
9cbb49c6b2 don't return the sourcemap when inline is requested - 6to5/grunt-6to5#18 2015-02-05 22:25:33 +11:00
Sebastian McKenzie
f04a734838 fix module ids shorthand arg - fixes #696 2015-02-05 22:19:39 +11:00
Sebastian McKenzie
beb5ccab25 split up traversal so it's easier to maintain and extend later on 2015-02-05 19:42:08 +11:00
Sebastian McKenzie
b8f8f24e82 add newline to es6 destructuring member expression test 2015-02-05 19:41:53 +11:00
Sebastian McKenzie
c35a007401 simplify replace supers helper 2015-02-05 19:41:37 +11:00
Sebastian McKenzie
e639c82f2f fix internal refactoring... 2015-02-05 14:08:02 +11:00
Sebastian McKenzie
f365cc1248 more internal rearchitecturing 2015-02-05 14:05:15 +11:00
Sebastian McKenzie
2b75c67448 better scope traversal inferType todo comments 2015-02-05 11:16:13 +11:00
Sebastian McKenzie
e5e9ae7e0f v3.3.12 2015-02-05 10:32:14 +11:00
Sebastian McKenzie
009422e997 add 3.3.12 changelog 2015-02-05 10:15:15 +11:00
Sebastian McKenzie
386e221a0f don't override core supported member expressions if there's a local binding 2015-02-05 09:53:12 +11:00
Sebastian McKenzie
58db94401e 3.3.11 2015-02-05 08:53:29 +11:00
Sebastian McKenzie
f9be9bab89 v3.3.11 2015-02-05 08:37:28 +11:00
Sebastian McKenzie
dc7e963c9f style fixes 2015-02-05 08:27:59 +11:00
Sebastian McKenzie
a786f39b1b 3.3.10 2015-02-04 23:26:12 +11:00
Sebastian McKenzie
95cf793df4 v3.3.10 2015-02-04 23:25:42 +11:00
Sebastian McKenzie
ea2ad96089 update 3.3.10 changelog 2015-02-04 23:24:13 +11:00
Sebastian McKenzie
4b2cf2e2c5 fix styling errors 2015-02-04 23:24:08 +11:00
Sebastian McKenzie
23b8c72e9a remove unused traverse requires 2015-02-04 23:22:26 +11:00
Sebastian McKenzie
80876a2c0a add 3.3.10 changelog 2015-02-04 23:20:53 +11:00
Sebastian McKenzie
c923010292 fix source map tests 2015-02-04 23:20:47 +11:00
Sebastian McKenzie
c84af909f7 track end of node positions for sourcemaps - fixes douglasduteil/isparta#8 2015-02-04 23:10:54 +11:00
Sebastian McKenzie
d6b39bc89b HomeObject isn't dynamic - fixes #690 2015-02-04 18:47:58 +11:00
Sebastian McKenzie
39fe737cb6 rename es7.objectSpread transformer to es7.objectRestSpread 2015-02-04 18:35:43 +11:00
Sebastian McKenzie
37ef976515 more cleanup of the destructuring transformer 2015-02-04 18:21:10 +11:00
Sebastian McKenzie
fa5a3022d4 clean up destructuring transformer 2015-02-04 17:48:27 +11:00
Sebastian McKenzie
58bed088f5 throw an error when destructuring a null or undefined value on an empty object pattern - fixes #681 2015-02-04 17:35:24 +11:00
Sebastian McKenzie
4f023e83f8 refactor traversals that have scopes to use the scope helper method 2015-02-04 13:25:23 +11:00
Sebastian McKenzie
7d950cd60a i made the javascripts faster with a transformer prepass to check what transformers actually have to be ran 2015-02-04 12:56:34 +11:00
Sebastian McKenzie
ffc9244f88 make #683 more inline with the official jsx compiler 2015-02-04 10:38:35 +11:00
Sebastian McKenzie
6ede3986c7 Merge branch 'master' of github.com:6to5/6to5 2015-02-04 10:23:29 +11:00
Sebastian McKenzie
5a81d22167 Merge pull request #683 from caseywebdev/concat-string-literals
Concatenate adjacent string literals in JSX
2015-02-04 10:22:51 +11:00
Sebastian McKenzie
2bf2e26a64 3.3.9 2015-02-04 10:15:19 +11:00
Sebastian McKenzie
ee466e90ca v3.3.9 2015-02-04 10:13:10 +11:00
Sebastian McKenzie
911e3939b9 remove class-super-constructor-call-check helper 2015-02-04 10:08:55 +11:00
Sebastian McKenzie
ca6f8e9a96 v3.3.8 2015-02-04 10:07:50 +11:00
Sebastian McKenzie
55f2cffc22 fix linting errors 2015-02-04 10:05:20 +11:00
Sebastian McKenzie
ca482b79ad add 3.3.8 changelog 2015-02-04 10:04:03 +11:00
Sebastian McKenzie
b1f0ecf244 update class super constructor inheritance tests 2015-02-04 10:03:57 +11:00
Sebastian McKenzie
36fa174901 change instance reference to this in class super constructor call template - fixes #689 2015-02-04 10:03:15 +11:00
Sebastian McKenzie
e8dc4628ae better handle spaces in IfStatement generator 2015-02-04 08:40:23 +11:00
Sebastian McKenzie
7a0dbb0203 fix node removal 2015-02-04 08:39:54 +11:00
Sebastian McKenzie
8d81a382f7 inline back the super constructor call helper - fixes #684 2015-02-04 08:39:45 +11:00
Sebastian McKenzie
86fbba08d8 add concise format option 2015-02-04 08:39:17 +11:00
Sebastian McKenzie
23c6e7e168 fix incorrect getThisReference bind - fixes #688 2015-02-04 08:26:18 +11:00
Sebastian McKenzie
c35f041091 simplify to.isFalsyExpression method 2015-02-04 08:25:40 +11:00
Sebastian McKenzie
618c6a8e67 add isLiteral to inferType 2015-02-04 08:25:15 +11:00
Sebastian McKenzie
23429f7b7f remove blank optimization 2015-02-04 08:25:00 +11:00
Sebastian McKenzie
d6052b483a add 6to5-minify to package.json 2015-02-04 08:24:53 +11:00
Sebastian McKenzie
3b3255a964 delegate removal of nodes in traversal to exitNode 2015-02-04 08:24:38 +11:00
Sebastian McKenzie
49847e70af add some minification transformers 2015-02-04 08:23:58 +11:00
Sebastian McKenzie
c228d76e44 add 6to5-minify 2015-02-04 08:23:49 +11:00
Casey Foster
2562b0c201 Concatenate adjacent string literals in JSX 2015-02-03 10:46:54 -06:00
Sebastian McKenzie
6da6bc3eb8 remove callExpression type inferrence 2015-02-03 22:32:00 +11:00
Sebastian McKenzie
bbcfc3c9f2 3.3.7 2015-02-03 22:29:09 +11:00
Sebastian McKenzie
12b1de7c9d v3.3.7 2015-02-03 22:27:37 +11:00
Sebastian McKenzie
721636f475 add 3.3.7 changelog 2015-02-03 22:25:33 +11:00
Sebastian McKenzie
4c94941ceb force .js extension when writing files to directories with 6to5 2015-02-03 22:25:27 +11:00
Sebastian McKenzie
f06535e915 rename Scope.init to Scope.crawl 2015-02-03 22:22:36 +11:00
Sebastian McKenzie
389914c427 add use-strict to valid node flags - fixes #667 2015-02-03 22:21:55 +11:00
Sebastian McKenzie
c7f5715d8e fix boolean stripping from 6to5-node - fixes #679 2015-02-03 22:21:09 +11:00
Sebastian McKenzie
29f866525e clean up scope tracking and add some simple flow type tracking and inferrence #653 2015-02-03 21:06:21 +11:00
Sebastian McKenzie
de61455a55 3.3.5 2015-02-03 21:05:36 +11:00
Sebastian McKenzie
fd579a8772 v3.3.5 2015-02-03 20:13:43 +11:00
Sebastian McKenzie
8e708906a8 fix linting errors 2015-02-03 20:11:38 +11:00
Sebastian McKenzie
b7680059c8 add 3.3.5 changelog 2015-02-03 20:09:45 +11:00
Sebastian McKenzie
239369314c more scope refactoring - fixes #676 2015-02-03 20:06:27 +11:00
Sebastian McKenzie
f2d1fc47d1 Merge branch 'master' of github.com:6to5/6to5 2015-02-03 19:55:29 +11:00
Sebastian McKenzie
aab35736c5 Merge pull request #677 from jayphelps/merica
First pass at converting identifiers/words from en-au -> en-us
2015-02-03 19:37:33 +11:00
Sebastian McKenzie
a9405e5e80 clean up scope API 2015-02-03 19:33:32 +11:00
Jay Phelps
9880990fa7 First pass at converting identifiers/words from en-au -> en-us 2015-02-03 00:08:43 -08:00
Sebastian McKenzie
6674611b26 Merge pull request #674 from johlrich/patch-1
Change getModuleName regex to only remove extenion
2015-02-03 17:54:04 +11:00
Jonathan
e92ec6aba7 Change getModuleName regex to only remove extenion
Given a names like: "some.module.js" and "some.other.module.js" the current regex in DefaultFormatter.prototype.getModuleName will overmatch and only return "some" as the module name in both cases.

Changing the . character class to \w will make sure it does not pick up additional sections and returns "some.module" and "some.other.module" for the names
2015-02-03 01:52:24 -05:00
Sebastian McKenzie
1801b725bd remove stupid jscs rules (they don't take into account reserved words ugh) and let jshint handle them 2015-02-03 15:35:44 +11:00
Sebastian McKenzie
72de8f5c9b fix class tests to reflect new call behaviour 2015-02-03 15:35:24 +11:00
Sebastian McKenzie
895d965568 fix linting errors 2015-02-03 15:17:33 +11:00
Sebastian McKenzie
3a11c7d46b as per "ES6 February 2, 2015 Draft Rev 32" "Constructors defined using class definition syntax throw when called as functions" 2015-02-03 15:16:16 +11:00
Sebastian McKenzie
92d9b3ff5f make it illegal to export a __esModule property - #673 2015-02-03 14:41:11 +11:00
Sebastian McKenzie
630f1717f0 clean up scope collision tracking and constants transformer - fixes #331 2015-02-03 13:20:52 +11:00
Sebastian McKenzie
e6e93840a6 check for scope collisions in constants transformer - fixes #331 2015-02-03 12:03:38 +11:00
Sebastian McKenzie
b2ad79cf88 rename t.getDeclarations to the WAY more reflective t.getBindingIdentifiers 2015-02-03 12:03:21 +11:00
Sebastian McKenzie
706797eb47 rename LetScoping to BlockScoping 2015-02-03 10:23:56 +11:00
Sebastian McKenzie
4163d1372a fix istanbul interop - closes #660 2015-02-03 10:23:47 +11:00
Sebastian McKenzie
4413da8d6e fix up whitespace on non empty last line JSX literals - fixes #668 2015-02-03 09:31:30 +11:00
Sebastian McKenzie
8e23d623c8 split up util.pushMutatorMap and util.buildDefineProperties 2015-02-03 09:30:52 +11:00
Sebastian McKenzie
e712c5225b use the current file basename for the displayName of export default React.createClass - 6to5/6to5-sublime#21 2015-02-02 23:48:03 +11:00
Sebastian McKenzie
8bdb723004 3.3.4 2015-02-02 21:37:11 +11:00
Sebastian McKenzie
9f912f548e v3.3.4 2015-02-02 21:36:04 +11:00
Sebastian McKenzie
41d721e372 fix source map tests 2015-02-02 21:32:45 +11:00
Sebastian McKenzie
df6ffe025c remove camelcase rule from jscs and let jshint handle it 2015-02-02 21:19:23 +11:00
Sebastian McKenzie
28b6b4af44 fix linting errors 2015-02-02 21:17:54 +11:00
Sebastian McKenzie
9e80071caa add 3.3.4 changelog 2015-02-02 21:16:53 +11:00
Sebastian McKenzie
0da4303358 remove automatic --harmony flag from 6to5-node 2015-02-02 21:14:23 +11:00
Sebastian McKenzie
83e225f30a simplify source maps, fixes weird tracking bug - fixes #658 2015-02-02 21:14:14 +11:00
Sebastian McKenzie
420505ca40 remove console.log debug 2015-02-02 21:13:40 +11:00
Sebastian McKenzie
f9a26fd903 better optimisation base 2015-02-02 20:28:34 +11:00
Sebastian McKenzie
ca0539190e add some monkeypatched istanbul interop - closes #660 2015-02-02 20:28:24 +11:00
Sebastian McKenzie
2e3226b520 fix 3.3.3 changelog sections 2015-02-02 10:55:49 +11:00
Sebastian McKenzie
7959852eeb 3.3.3 2015-02-02 10:55:43 +11:00
Sebastian McKenzie
c129eba712 v3.3.3 2015-02-02 10:52:56 +11:00
Sebastian McKenzie
0e2d7fa941 remove throw expectation on undefiend this tests 2015-02-02 10:50:29 +11:00
Sebastian McKenzie
0b33a62032 fix linting errors 2015-02-02 10:48:18 +11:00
Sebastian McKenzie
6919ed2b34 add 3.3.3 changelog 2015-02-02 10:46:44 +11:00
Sebastian McKenzie
435320e3f9 selfContainify regenerator runtime when building 6to5-runtime - fixes #659 2015-02-02 10:45:26 +11:00
Sebastian McKenzie
7b846af965 3.3.2 2015-02-02 10:45:05 +11:00
Sebastian McKenzie
18b836c16a add allowPartial option to t.buildMatchMemberExpression, fix t.isReferenced on Property nodes - fixes #656 2015-02-02 10:44:56 +11:00
Sebastian McKenzie
fb360039ce remap top level this to undefined - #562 2015-02-02 10:44:17 +11:00
Sebastian McKenzie
4763b95a0d v3.3.2 2015-02-02 01:43:47 +11:00
Sebastian McKenzie
9fe1e37ca7 fix t.buildMatchMemberExpression 2015-02-02 01:41:39 +11:00
Sebastian McKenzie
8a9aac3e68 fix linting errors 2015-02-02 01:37:27 +11:00
Sebastian McKenzie
27138abd29 simplify member expression checking, flesh out react component optimiser #653 2015-02-02 01:30:06 +11:00
Sebastian McKenzie
dcf91db475 add react component optimisation base #653 2015-02-02 00:50:25 +11:00
Sebastian McKenzie
ab63345764 3.3.1 2015-02-01 18:44:46 +11:00
Sebastian McKenzie
a35e63fb29 v3.3.1 2015-02-01 18:44:07 +11:00
Sebastian McKenzie
3fe7df9a48 fix regenerator destructuring test 2015-02-01 18:42:15 +11:00
Sebastian McKenzie
5288f3afda add 3.3.1 changelog 2015-02-01 18:33:54 +11:00
Sebastian McKenzie
25566a24f6 block hoist assignment pattern destructuring - fixes #652 2015-02-01 18:33:36 +11:00
Sebastian McKenzie
2ff6dee0ec 3.3.0 2015-02-01 16:52:23 +11:00
Sebastian McKenzie
491d1238c2 fix buildHelpers function name 2015-02-01 16:51:57 +11:00
Sebastian McKenzie
234414c2f2 v3.3.0 2015-02-01 16:49:18 +11:00
Sebastian McKenzie
3ff544bbab fix indentation detection 2015-02-01 16:47:28 +11:00
Sebastian McKenzie
416c4cbb84 fix linting errors 2015-02-01 16:44:47 +11:00
Sebastian McKenzie
db5bf1749b fix linting errors 2015-02-01 16:43:42 +11:00
Sebastian McKenzie
41349afea3 add 3.3.0 changelog 2015-02-01 16:43:05 +11:00
Sebastian McKenzie
27da6de723 add back runtime - fixes #651 2015-02-01 16:38:13 +11:00
Sebastian McKenzie
2cdb4e3343 fix linting errors 2015-02-01 16:21:13 +11:00
Sebastian McKenzie
981d3e40f8 add canRun check for playground transformers 2015-02-01 16:20:32 +11:00
Sebastian McKenzie
c7a616730c add levenshtein suggestions to undeclared variable transformer 2015-02-01 16:20:18 +11:00
Sebastian McKenzie
5aa8ece242 don't run playground transformers at all if playground isn't enabled 2015-02-01 16:19:49 +11:00
Sebastian McKenzie
8c7ba20f86 fix regenerator transformer order - fixes #617 2015-02-01 16:19:35 +11:00
Sebastian McKenzie
1cc9027fcf 3.2.1 2015-02-01 16:19:09 +11:00
Sebastian McKenzie
e63dbaa646 v3.2.1 2015-01-31 21:33:26 +11:00
Sebastian McKenzie
4a720625d9 fix linting errors 2015-01-31 21:29:44 +11:00
Sebastian McKenzie
ad428b107a add 3.2.1 changelog 2015-01-31 21:28:14 +11:00
Sebastian McKenzie
c0299320f0 avoid transforming of inner labels and propagation of maps in block scoping transformer - #644 2015-01-31 21:27:20 +11:00
Sebastian McKenzie
efaee3d5d9 remove pending tests 2015-01-31 18:11:54 +11:00
Sebastian McKenzie
12bee73070 restructure internal indexes a bit 2015-01-31 18:04:57 +11:00
Sebastian McKenzie
82c18a837d add detection skeleton #631 2015-01-31 17:59:30 +11:00
Sebastian McKenzie
fed51e8246 3.2.0 2015-01-31 17:59:08 +11:00
Sebastian McKenzie
71f17e464f update 3.2.0 changelog 2015-01-31 17:59:02 +11:00
Sebastian McKenzie
026fd7eddb v3.2.0 2015-01-31 10:15:22 +11:00
Sebastian McKenzie
456b2d3910 remove unused keys declaration in types 2015-01-31 10:12:32 +11:00
Sebastian McKenzie
4208bf3f4b add accept to valid options 6to5/gobble-6to5#2 2015-01-31 10:11:40 +11:00
Sebastian McKenzie
a81678d327 add 3.2.0 changelog 2015-01-31 10:11:19 +11:00
Sebastian McKenzie
be55f42f80 simplify Scope::has 2015-01-31 10:06:22 +11:00
Sebastian McKenzie
b1b326cf9c better self contained module tests - fixes #634 2015-01-30 22:32:21 +11:00
Sebastian McKenzie
a9ff73b4f6 use double quotes instead of single 2015-01-30 21:50:31 +11:00
Sebastian McKenzie
f5ccb9c0ba clean up types, add missing jsdoc parameters, add some descriptions 2015-01-30 21:48:32 +11:00
Sebastian McKenzie
1cbbe00b7a Merge pull request #582 from kruppel/kurt/setter-super
Support use of super inside instance setter.
2015-01-30 21:47:24 +11:00
Sebastian McKenzie
055dd5d2c3 simplify t.getDeclarations keys 2015-01-30 21:42:24 +11:00
Sebastian McKenzie
0fea437536 rename t.getIds to t.getDeclarations and remove dead code 2015-01-30 21:36:51 +11:00
Sebastian McKenzie
f325d3b065 add pattern rest parameters test 2015-01-30 21:26:45 +11:00
Sebastian McKenzie
e514660fbd we no longer have to handle labels on loops in block scoping 2015-01-30 21:26:35 +11:00
Sebastian McKenzie
a5d8144cce don't lazily check kangax compat-table exec comment 2015-01-30 21:17:35 +11:00
Sebastian McKenzie
8145840264 add istanbul config 2015-01-30 21:17:16 +11:00
Sebastian McKenzie
a02eafedfd add additional let scoping nested label tests 2015-01-30 21:07:40 +11:00
Sebastian McKenzie
3f3cd2bb3a add better support for labels in the block scoping transformer and add more let scoping tests - fixes #644 and closes #608 2015-01-30 20:51:20 +11:00
Sebastian McKenzie
503a3f2e3a ignore compat-table tests that have no code 2015-01-30 19:43:47 +11:00
Sebastian McKenzie
48a8723fdb add compat-table to make bootstrap 2015-01-30 19:39:58 +11:00
Sebastian McKenzie
92c297b1be add assertVendor test helper 2015-01-30 19:39:51 +11:00
Sebastian McKenzie
56e26378ff delay running 6to5/register in tests 2015-01-30 19:39:38 +11:00
Sebastian McKenzie
f3f69ab4fa fix scope tracking for default parameters iife 2015-01-30 19:39:20 +11:00
Sebastian McKenzie
2a488b951d remove unused variable in commonjs module formatter 2015-01-30 19:39:09 +11:00
Sebastian McKenzie
ac01caacd3 rename useStrict test to something more specific 2015-01-30 19:39:00 +11:00
Sebastian McKenzie
cbdf746474 fix block scoped functions 2015-01-30 19:38:50 +11:00
Sebastian McKenzie
ad0a1ae66d add kangax compat-table tests - fixes #606 2015-01-30 19:38:44 +11:00
Sebastian McKenzie
3b783979d8 add resolveModuleSource option - closes #471 2015-01-30 18:04:54 +11:00
Sebastian McKenzie
b2ec15accc allow test options to be plain javascript files 2015-01-30 18:04:28 +11:00
Sebastian McKenzie
3b7cfc908e use globals module instead of maintaining our own list 2015-01-30 17:17:42 +11:00
Sebastian McKenzie
010ca83d0d improved relative resolution handling for bin/6to5 - closes #643 2015-01-30 16:59:04 +11:00
Sebastian McKenzie
161c895a90 move esvalid to devDependencies 2015-01-30 16:58:38 +11:00
Sebastian McKenzie
47a45f3731 add additional react ThisExpression conversion test 2015-01-30 11:05:16 +11:00
Sebastian McKenzie
7bb3cfd932 3.1.1 2015-01-30 11:04:46 +11:00
Sebastian McKenzie
16a94a769a v3.1.1 2015-01-30 11:02:28 +11:00
Sebastian McKenzie
f7c7918efe add 3.1.1 changelog 2015-01-30 11:00:43 +11:00
Sebastian McKenzie
bf393c025f properly transform XJSIdentifier nodes referencing this into a ThisExpression - facebook/react#2927 2015-01-30 11:00:37 +11:00
Sebastian McKenzie
bbbc9c0c5e remove redundant enumerable: true property on class methods 2015-01-30 10:44:33 +11:00
Sebastian McKenzie
579db9107f fix link in 3.1.0 changelog - thanks @AluisioASG - closes #641 2015-01-30 10:42:52 +11:00
Sebastian McKenzie
d1d30e9ec9 3.1.0 2015-01-30 10:15:09 +11:00
Sebastian McKenzie
ee782f93c4 v3.1.0 2015-01-30 10:13:50 +11:00
Sebastian McKenzie
9ed6aa48a0 add esdiscuss link to class enumerability change - @thejameskyle 2015-01-30 10:11:26 +11:00
Sebastian McKenzie
ecebedd5a2 update esnext class tests 2015-01-30 10:11:11 +11:00
Sebastian McKenzie
31df576d26 make class methods nonenumerable - fixes #639 2015-01-30 10:05:17 +11:00
Sebastian McKenzie
63d6335d99 3.0.16 2015-01-30 00:18:32 +11:00
Sebastian McKenzie
9e21994c01 v3.0.16 2015-01-30 00:18:01 +11:00
Sebastian McKenzie
b8ee654ac2 update 3.0.16 changelog 2015-01-30 00:14:08 +11:00
Sebastian McKenzie
00b22b1231 don't ignore dynamic import specifiers - fixes #633 2015-01-30 00:13:37 +11:00
Sebastian McKenzie
2e589904c7 comment out detection file 2015-01-30 00:05:38 +11:00
Sebastian McKenzie
1cd475d118 add 3.0.16 changelog 2015-01-30 00:05:01 +11:00
Sebastian McKenzie
fbdea41399 comment out strictMode option until acorn-6to5 works properly 2015-01-30 00:02:25 +11:00
Sebastian McKenzie
5d720dbc43 upgrade regenerator 2015-01-30 00:01:40 +11:00
Sebastian McKenzie
3940149517 add whitespace to functions in logical expressions 2015-01-29 22:50:17 +11:00
Sebastian McKenzie
e963798067 update tests to reflect _extends helper modifications 2015-01-29 22:38:07 +11:00
Sebastian McKenzie
36acfd16ea better line break delimeter - thanks @RReverser! 2015-01-29 22:23:43 +11:00
Sebastian McKenzie
dda372f93e use either Object.assign or the extends helper 2015-01-29 21:07:51 +11:00
Sebastian McKenzie
62bc815f81 only set strictMode to true when the useStrict transformer is enabled 2015-01-29 21:07:34 +11:00
Sebastian McKenzie
4e68f94023 start adding detection base 2015-01-29 21:03:16 +11:00
Sebastian McKenzie
2687b435e0 Merge pull request #629 from stefanpenner/lodash-cleanup
cleanup: require explicit lodash modules needed
2015-01-29 16:04:47 +11:00
Stefan Penner
9ddf411f2c cleanup: require explicit lodash modules needed 2015-01-28 23:52:17 -05:00
Sebastian McKenzie
c2fc89af6c 3.0.15 2015-01-29 15:18:18 +11:00
Sebastian McKenzie
a5eda35ff4 v3.0.15 2015-01-29 15:17:08 +11:00
Sebastian McKenzie
b5e1221c54 uUse debug/node instead of debug to avoid browserify using the browser version that references window - fixes #628 2015-01-29 15:11:33 +11:00
Sebastian McKenzie
03942da57a add in support for AwaitExpression "delegation" 2015-01-29 15:11:17 +11:00
Sebastian McKenzie
e469c864bc 3.0.14 2015-01-29 12:02:05 +11:00
Sebastian McKenzie
9d50cae9fd v3.0.14 2015-01-29 12:01:11 +11:00
Sebastian McKenzie
249d749580 update asyncToGenerator tests 2015-01-29 11:58:58 +11:00
Sebastian McKenzie
ea860ac5a5 add 3.0.14 changelog 2015-01-29 11:54:42 +11:00
Sebastian McKenzie
30259f3a99 don't use a generator iterator function as this in the asyncToGenerator helper - fixes #625 2015-01-29 11:53:30 +11:00
Sebastian McKenzie
a3d7a29961 add support for using optional in 6to5-node 2015-01-29 11:52:44 +11:00
Sebastian McKenzie
8ce762846e fix 3.0.0 changelog indentation 2015-01-29 11:08:19 +11:00
Sebastian McKenzie
8092716b79 3.0.13 2015-01-29 10:44:35 +11:00
Sebastian McKenzie
b7ba54724c v3.0.13 2015-01-29 10:44:11 +11:00
Sebastian McKenzie
7f7ee41315 fix modules loose mode using modules instead of es6.modules 2015-01-29 10:42:03 +11:00
Sebastian McKenzie
b33f05bd3d 3.0.12 2015-01-29 10:41:56 +11:00
Sebastian McKenzie
1ae6eabedd v3.0.12 2015-01-29 10:15:35 +11:00
Sebastian McKenzie
973be9ad96 add noScope option to traverse.clearProperties - fixes #624 2015-01-29 10:13:29 +11:00
Sebastian McKenzie
979ce93499 add 3.0.12 changelog 2015-01-29 10:13:17 +11:00
Sebastian McKenzie
642e36c259 remove old es6.destructuring position comment - thanks @appden! 2015-01-29 09:04:01 +11:00
Sebastian McKenzie
efaf56c6de add debug messages 2015-01-29 09:03:30 +11:00
Sebastian McKenzie
a0c7950d8a 3.0.11 2015-01-29 07:43:09 +11:00
Sebastian McKenzie
f7be1b74d7 v3.0.11 2015-01-29 07:42:43 +11:00
Sebastian McKenzie
e264ac03b3 put destructuring transformer back 2015-01-29 07:40:50 +11:00
Sebastian McKenzie
425f0c5fdf add 3.0.11 changelog 2015-01-29 07:38:15 +11:00
Sebastian McKenzie
960a70287d add improved for-of loose behaviour that supports destructuring - fixes #615 2015-01-29 00:50:22 +11:00
Sebastian McKenzie
c25c33e3ee remove unnecessary ensureBlock in es6 rest parameters transformer 2015-01-29 00:06:42 +11:00
Sebastian McKenzie
d72081f82c fix codeFrame call in transformation helper 2015-01-29 00:06:24 +11:00
Sebastian McKenzie
d4debc3c85 fix regenerator tests 2015-01-29 00:06:12 +11:00
Sebastian McKenzie
7894f1a079 add regenerator parameter tests 2015-01-28 23:45:11 +11:00
Sebastian McKenzie
5ffaeb5e9f 3.0.10 2015-01-28 23:41:55 +11:00
Sebastian McKenzie
e50a7406ad move destructuring transformer to before regenerator 2015-01-28 23:41:51 +11:00
Sebastian McKenzie
962eeed252 clean up t.getIds 2015-01-28 23:41:42 +11:00
Sebastian McKenzie
2d8944fbd5 fix RestElement ast-types definition 2015-01-28 23:41:31 +11:00
Sebastian McKenzie
ddfb492ed9 v3.0.10 2015-01-28 23:14:43 +11:00
Sebastian McKenzie
3d98364adb in types.getIds make sure the declaration inside of ExportDeclaration is actually a Declaration, clean up types.isReferenced - fixes #614 2015-01-28 23:12:53 +11:00
Sebastian McKenzie
3affa543ef add yes/no comments to describe what we're actually testing for in types.isReferenced 2015-01-28 20:21:25 +11:00
Sebastian McKenzie
2a47afebde more accurate types.isReferenced comment 2015-01-28 20:09:37 +11:00
Sebastian McKenzie
f2fc6d8852 3.0.9 2015-01-28 20:09:20 +11:00
Sebastian McKenzie
28c4c18ee2 v3.0.9 2015-01-28 20:08:49 +11:00
Sebastian McKenzie
968db67d0a add in pattern support to t.isReferenced 2015-01-28 20:06:49 +11:00
Sebastian McKenzie
b22ef22e36 add missing semicolon 2015-01-28 20:03:29 +11:00
Sebastian McKenzie
044ce45d98 add 3.0.9 changelog 2015-01-28 20:02:49 +11:00
Sebastian McKenzie
69f2a0d3f1 better t.toIdentifier behaviour that doesn't camelcase on underscores - fixes #610 2015-01-28 20:01:55 +11:00
Sebastian McKenzie
4b66dcb738 more reliable t.isReferenced - fixes #610 2015-01-28 19:58:20 +11:00
Sebastian McKenzie
dfc6f1d1cf add comment explaining what the modules-split transformer does 2015-01-28 18:40:33 +11:00
Sebastian McKenzie
a64e040ac7 3.0.8 2015-01-28 18:36:45 +11:00
Sebastian McKenzie
4f9414dbb0 v3.0.8 2015-01-28 18:36:22 +11:00
Sebastian McKenzie
bc6b31efbc split up function declarations from their exports - fixes #609 2015-01-28 18:34:43 +11:00
Sebastian McKenzie
244aed1ae9 3.0.7 2015-01-28 18:20:04 +11:00
Sebastian McKenzie
4fdb2ce939 v3.0.7 2015-01-28 18:18:23 +11:00
Sebastian McKenzie
fe57eb554c add 3.0.7 changelog 2015-01-28 18:16:44 +11:00
Sebastian McKenzie
3b798943e3 upgrade core-js and use a caret, make all other dependency versions static 2015-01-28 18:15:14 +11:00
Sebastian McKenzie
4ff66a5cfc add id to a function expression scope 2015-01-28 18:14:52 +11:00
Sebastian McKenzie
5477a990bc construct null object for types.getIds 2015-01-28 18:09:38 +11:00
Sebastian McKenzie
656ca422a5 3.0.6 2015-01-28 17:52:09 +11:00
Sebastian McKenzie
7a3071a094 v3.0.6 2015-01-28 17:51:02 +11:00
Sebastian McKenzie
77361582f4 don't stop block scoped variable traversal on any scope, just skip it and fix block statement for parent delegation - fixes #605 2015-01-28 17:48:37 +11:00
Sebastian McKenzie
f585039430 3.0.5 2015-01-28 15:23:11 +11:00
Sebastian McKenzie
21dcb6037a v3.0.5 2015-01-28 15:21:38 +11:00
Sebastian McKenzie
d10d96d19a fix unused iife declaration 2015-01-28 15:19:50 +11:00
Sebastian McKenzie
64766eea44 add more reliable iife detection for default parameter independent scope 2015-01-28 15:18:50 +11:00
Sebastian McKenzie
a9e682836b 3.0.4 2015-01-28 14:52:05 +11:00
Sebastian McKenzie
f504b8d529 v3.0.4 2015-01-28 14:49:55 +11:00
Sebastian McKenzie
30b2b55c86 remove badges from readme because noone cares 2015-01-28 14:48:13 +11:00
Sebastian McKenzie
836bc3a9a4 only check for duplicates for let variables 2015-01-28 14:47:09 +11:00
Sebastian McKenzie
630bfcc6cd add 3.0.x changelogs 2015-01-28 14:44:07 +11:00
Sebastian McKenzie
117203010a don't stop block variable scope finding on first hit 2015-01-28 14:39:46 +11:00
Sebastian McKenzie
f0986fe9c7 3.0.3 2015-01-28 14:39:01 +11:00
Sebastian McKenzie
4379441277 v3.0.3 2015-01-28 14:17:26 +11:00
Sebastian McKenzie
a955af06e0 remove opts from transform output 2015-01-28 14:14:55 +11:00
Sebastian McKenzie
8f69e59f29 ignore underscored options - fixes #29 2015-01-28 14:14:33 +11:00
Sebastian McKenzie
efda5ca897 3.0.2 2015-01-28 13:59:29 +11:00
Sebastian McKenzie
8a99fd3c8d v3.0.2 2015-01-28 13:53:19 +11:00
Sebastian McKenzie
614ce4de0a add common plugin options to validOptions just to be safe 2015-01-28 13:48:45 +11:00
Sebastian McKenzie
06b2cffbfc 3.0.1 2015-01-28 13:17:54 +11:00
Sebastian McKenzie
f3dfe9571e v3.0.1 2015-01-28 13:17:34 +11:00
Sebastian McKenzie
9b9e2c4ac0 remove iojs from travis 2015-01-28 13:15:45 +11:00
Sebastian McKenzie
28e0b17a81 3.0.0 2015-01-28 13:14:05 +11:00
Sebastian McKenzie
b02f10053e fix publish-runtime task 2015-01-28 13:14:00 +11:00
Sebastian McKenzie
979dcd5330 downgrade kexec 2015-01-28 13:13:52 +11:00
Sebastian McKenzie
ff18fd37df v3.0.0 2015-01-28 13:08:55 +11:00
Sebastian McKenzie
dd56d53556 fix linting errors 2015-01-28 13:06:21 +11:00
Sebastian McKenzie
2b85045b61 split up class expressions in export default 2015-01-28 12:58:05 +11:00
Sebastian McKenzie
a1e11aba61 make explode assignable expression helper aware of declared variables so we can simplify code a lot and drop the variable declaration as evaluating it multiple times has no consequence 2015-01-28 11:50:14 +11:00
Sebastian McKenzie
946ba7a8d3 add iojs to travis 2015-01-28 11:03:00 +11:00
Sebastian McKenzie
4a94ef3aa6 add syntax highlighting to syntax error code frames 2015-01-28 11:02:54 +11:00
Sebastian McKenzie
fd45e9218c Merge branch 'master' into 3.0.0
Conflicts:
	package.json
2015-01-27 20:52:45 +11:00
Sebastian McKenzie
24d4d6d73a remove esModule flag from systemjs module formatter - fixes #599 2015-01-27 20:40:43 +11:00
Kurt Ruppel
d87b70b57e Use right side verbatim for ES6 class setter. 2015-01-26 15:55:27 -08:00
Kurt Ruppel
bbfb297d73 Support use of super inside instance setter. 2015-01-26 15:55:27 -08:00
Kurt Ruppel
9b68d08604 Add test for failing assignment to super setter. 2015-01-26 15:55:27 -08:00
Sebastian McKenzie
47b56d089f upgrade jshint and kexec 2015-01-27 07:38:14 +11:00
Sebastian McKenzie
10ede7c934 fix extends helper checking the wrong object - thanks @appden! 2015-01-27 07:38:08 +11:00
Sebastian McKenzie
344390d1b5 fix simple tests - @thejameskyle 2015-01-27 07:18:21 +11:00
Sebastian McKenzie
2869878046 use hasOwnProperty in extends helper 2015-01-27 07:16:57 +11:00
Sebastian McKenzie
2f79bee367 use either print or eval in 6to5-node - closes #591 2015-01-27 07:07:05 +11:00
Sebastian McKenzie
202d98c318 fix linting errors 2015-01-27 07:06:12 +11:00
Sebastian McKenzie
442a39359e Merge pull request #595 from 6to5/lodash
Lodash 3.0 & Regexpu 1.1
2015-01-27 06:47:55 +11:00
James Kyle
c907f8703a Fix regex transpilation test for regexpu 1.1 2015-01-26 11:44:18 -08:00
Sebastian McKenzie
6f2925ed83 remove React.__spread and use extends helper instead - fixes #594 2015-01-27 06:43:57 +11:00
Sebastian McKenzie
f256e18182 add -L arg to loose in the CLI 2015-01-27 06:40:57 +11:00
James Kyle
f9521e5599 Bump Lodash to 3.0 2015-01-26 11:39:01 -08:00
Sebastian McKenzie
41ae06f1aa Merge pull request #593 from jhorwit2/master
Upgrade core-js dependency to fix firefox issue
2015-01-27 06:34:59 +11:00
Josh Horwitz
e5613e9e0d Merge pull request #1 from jhorwit2/jhorwit2-patch-1
Updated minor version upgrade of corejs to fix firefox 20-23 issue
2015-01-26 13:38:32 -05:00
Josh Horwitz
779d14311a Updated minor version upgrade of corejs to fix firefox 20-23 issue 2015-01-26 13:38:09 -05:00
Sebastian McKenzie
971da50129 add a transformer pass class 2015-01-26 22:10:19 +11:00
Sebastian McKenzie
c49438da60 add namespaces and better structure transformation 2015-01-26 21:10:05 +11:00
Sebastian McKenzie
e4a030c916 upgrade acorn-6to5 2015-01-26 20:30:53 +11:00
Sebastian McKenzie
c72f9d894d only use GeneratorBuffer::space if it's for pretty printing so we can drop all spaces easily 2015-01-26 18:13:39 +11:00
Sebastian McKenzie
59283c1148 clean up traversal some more to make it clearer 2015-01-26 18:13:21 +11:00
Sebastian McKenzie
cfe9a4e270 add isConsequenceExpressionStatement last 2015-01-26 17:43:19 +11:00
Sebastian McKenzie
0110d18d4c clearn up traversal and fix replacement node arrays not being traversed - fixes #589 2015-01-26 17:43:11 +11:00
Sebastian McKenzie
2bd1afc5fd fix up traverse tests 2015-01-26 17:08:40 +11:00
Sebastian McKenzie
6875277375 upgrade acorn-6to5 2015-01-26 17:00:34 +11:00
Sebastian McKenzie
9b5045bb91 revert back to simpler osx-only test browser opening 2015-01-26 17:00:28 +11:00
Sebastian McKenzie
f14c0fa5d6 turn off failed test writes 2015-01-26 17:00:19 +11:00
Sebastian McKenzie
4b6203d1f4 simplify class default exports 2015-01-26 16:00:30 +11:00
Sebastian McKenzie
3db7811f00 add missing use strict declarations 2015-01-26 15:53:24 +11:00
Sebastian McKenzie
8243a34b69 change the way modules handle default exports and function declaration exports 2015-01-26 15:53:17 +11:00
Sebastian McKenzie
a821b2249b add class tests to optional async transformers 2015-01-26 15:52:39 +11:00
Sebastian McKenzie
0a851ced19 remove runtime option 2015-01-26 15:52:23 +11:00
Sebastian McKenzie
a2a1ab4c52 clean up file 2015-01-26 13:51:33 +11:00
Sebastian McKenzie
876d88c761 fix module specifier default output 2015-01-26 13:51:27 +11:00
Sebastian McKenzie
d473826a68 add window and self to valid global keys 2015-01-26 13:51:15 +11:00
Sebastian McKenzie
cfd0059fc7 fix linting errors 2015-01-26 13:51:06 +11:00
Sebastian McKenzie
b21b0e753e add back optional brackets around transformers in 6to5 --help 2015-01-26 13:50:44 +11:00
Sebastian McKenzie
5253502846 upgrade acorn-6to5 2015-01-26 12:02:58 +11:00
Sebastian McKenzie
526e743c58 fix 6to5-node blacklist 2015-01-26 12:01:03 +11:00
Sebastian McKenzie
7df0d0530f update 3.0.0 changelog 2015-01-26 11:49:05 +11:00
Sebastian McKenzie
567479787b update tests to reflect new helper compact behaviour 2015-01-26 11:48:35 +11:00
Sebastian McKenzie
59e3eb2bd1 move doDefaultExportInterop to default module formatter 2015-01-26 11:43:46 +11:00
Sebastian McKenzie
b449dbe891 make helpers compact/no newlines/comments 2015-01-26 11:43:34 +11:00
Sebastian McKenzie
c7c99efa8e add back strict module formatters 2015-01-26 10:57:06 +11:00
Sebastian McKenzie
2808bc2c90 add in custom acorn node constructor 2015-01-26 01:32:37 +11:00
Sebastian McKenzie
9b7eb2dcd8 update 3.0.0 changelog 2015-01-26 00:14:35 +11:00
Sebastian McKenzie
274b58573b change -l whitelist flag to -w in bin/6to5-node 2015-01-26 00:14:19 +11:00
Sebastian McKenzie
d7f33121c9 upgrade acorn-6to5 2015-01-26 00:14:08 +11:00
Sebastian McKenzie
75460b91d8 clean up module formatters and fix interopRequireWildcard helper 2015-01-26 00:14:04 +11:00
Sebastian McKenzie
3d355566dc avoid duplicate requires when importing modules 2015-01-25 20:39:41 +11:00
Sebastian McKenzie
a3b58edc52 only remap break/continue when inside a loop 2015-01-25 18:46:20 +11:00
Sebastian McKenzie
5c71b1a031 add base for naughty polyfill tool 2015-01-25 18:46:04 +11:00
Sebastian McKenzie
585e21a734 add whitelist and blacklist options to 6to5-node - closes #588 2015-01-25 17:26:51 +11:00
Sebastian McKenzie
a46f4f7873 upgrade acorn-6to5 2015-01-25 17:23:34 +11:00
Sebastian McKenzie
456bce1c9a rename loose modules 2015-01-25 15:46:27 +11:00
Sebastian McKenzie
d8046333c0 add test location to ast validation 2015-01-25 15:46:17 +11:00
Sebastian McKenzie
49c28d449e deprecate old transformer names 2015-01-25 15:46:04 +11:00
Sebastian McKenzie
3fdf492dcf safer common interop - closes #493 2015-01-25 14:03:25 +11:00
Sebastian McKenzie
99a4343626 use clone helper instead of lodash cloneDeep - fixes #583 2015-01-24 16:32:55 +11:00
Sebastian McKenzie
8eb3091a9d update params generator to work with new parameters 2015-01-24 16:32:37 +11:00
Sebastian McKenzie
befa221bd9 only get the basename for task names in test helper 2015-01-24 16:32:17 +11:00
Sebastian McKenzie
a954ae3a6e add breaking switch break test 2015-01-24 16:32:02 +11:00
Sebastian McKenzie
afa0a31b91 add no loopParent warning to block scoping transformer 2015-01-24 16:31:52 +11:00
Sebastian McKenzie
8a13c12738 switch rest and default parameters to new ast type 2015-01-24 16:31:43 +11:00
Sebastian McKenzie
b938e1aece rename misc transformers 2015-01-24 15:20:23 +11:00
Sebastian McKenzie
89a3206553 Merge branch 'master' into 3.0.0
Conflicts:
	CHANGELOG.md
	lib/6to5/transformation/transformers/optional-core-aliasing.js
2015-01-24 15:00:44 +11:00
Sebastian McKenzie
66e9df6b0b v2.13.7 2015-01-24 11:44:08 +11:00
Sebastian McKenzie
2fb299da22 update 2.13.7 changelog 2015-01-24 11:40:26 +11:00
Sebastian McKenzie
23d962b838 Revert "move optional async transformers down - fixes #580"
This reverts commit 9cf1c62147.
2015-01-24 11:39:50 +11:00
Sebastian McKenzie
519454c343 don't realias variables that are already declared in optional coreAliasing transformer - fixes #579 2015-01-24 11:26:51 +11:00
Sebastian McKenzie
9cf1c62147 move optional async transformers down - fixes #580 2015-01-24 11:20:56 +11:00
Sebastian McKenzie
0e6bd3ed08 v2.13.6 2015-01-24 11:13:59 +11:00
Sebastian McKenzie
95a3a02469 disable failing let scoping test 2015-01-24 11:10:18 +11:00
Sebastian McKenzie
1a0cad2ac1 add new expression as a valid conditional expression parent for parantheses insertion - fixes #578 2015-01-24 10:29:34 +11:00
Sebastian McKenzie
d78a01086d add new expression as a valid conditional expression parent for parantheses insertion - fixes #578 2015-01-24 10:29:12 +11:00
Sebastian McKenzie
3607689fbc fix tests to reflect new destructuring statement behaviour 2015-01-24 00:23:15 +11:00
Sebastian McKenzie
70ce6e0ab8 update 3.0.0 changelog 2015-01-24 00:21:21 +11:00
Sebastian McKenzie
914ef4c5f5 remove 6to5-node repl console.log 2015-01-24 00:21:15 +11:00
Sebastian McKenzie
75389b04a6 use isConsequenceExpressionStatement to correctly evaluate expressions - fixes #502 2015-01-24 00:19:48 +11:00
Sebastian McKenzie
3167d66154 add t.getLastStatements and File::isConsequenceExpressionStatement 2015-01-24 00:04:20 +11:00
Sebastian McKenzie
bd789ff032 fix bin/6to5 blacklist test 2015-01-24 00:03:32 +11:00
Sebastian McKenzie
c118c10a9d update 3.0.0 changelog 2015-01-23 23:47:16 +11:00
Sebastian McKenzie
8ed1325dfc fix RestElement argument type 2015-01-23 23:47:02 +11:00
Sebastian McKenzie
33cd9eeafd don't hoist regenerator variable declarations in system module formatter 2015-01-23 23:46:43 +11:00
Sebastian McKenzie
b280303a10 remove register opts 2015-01-23 23:46:27 +11:00
Sebastian McKenzie
0ad071af4e upgrade acorn-6to5 2015-01-23 23:46:20 +11:00
Sebastian McKenzie
a22cd72440 update to RestElement - @RReverser 2015-01-23 23:20:45 +11:00
Sebastian McKenzie
4fee58e7bc remove includeRegenerator option 2015-01-23 23:05:35 +11:00
Sebastian McKenzie
86b6904e77 fix esnext tests to reflect new super behaviour 2015-01-23 23:05:24 +11:00
Sebastian McKenzie
9f435d02f2 switch to a custom list of global keys and use object helper 2015-01-23 23:04:33 +11:00
Sebastian McKenzie
5419616063 remove optional prefixing 2015-01-23 23:03:49 +11:00
Sebastian McKenzie
5f8f9e35d7 better categorisation of transformers 2015-01-23 23:03:41 +11:00
Sebastian McKenzie
e1d2def4b1 add t.getSpecifierId that handles default specifiers 2015-01-23 23:03:04 +11:00
Sebastian McKenzie
36fef5676a add helpers 2015-01-23 23:02:48 +11:00
Sebastian McKenzie
063fec0ca6 better categorisation of transformers 2015-01-23 23:02:40 +11:00
Sebastian McKenzie
c7e4213641 update 3.0.0 changelog 2015-01-23 09:39:47 +11:00
Sebastian McKenzie
bff150f69d fix filenameRelative name and remove amdModuleIds 2015-01-23 09:39:42 +11:00
Sebastian McKenzie
dc209417e7 move internal tools from bin to tools 2015-01-23 09:39:22 +11:00
Sebastian McKenzie
fb74832594 update 3.0.0 changelog 2015-01-23 09:26:33 +11:00
Sebastian McKenzie
49cd1753e6 throw on unknown options 2015-01-23 09:26:27 +11:00
Sebastian McKenzie
36fa887be8 update XJS namespaces to JSX 2015-01-23 08:08:56 +11:00
Sebastian McKenzie
dacb187f11 upgrade acorn-6to5 2015-01-23 08:08:47 +11:00
Sebastian McKenzie
5815b17dee Merge branch 'master' into 3.0.0 2015-01-23 07:12:28 +11:00
Sebastian McKenzie
fe594dfe0c Merge pull request #572 from assaf/master
Added test case for issue #564
2015-01-23 07:12:02 +11:00
Assaf Arkin
4fe6ad43c1 Added test case for issue #564 2015-01-22 10:19:45 -08:00
Sebastian McKenzie
377212290f 6to5/polyfill can now only be required **once** 2015-01-23 00:19:30 +11:00
Sebastian McKenzie
51b6946a98 remove unlink event watching in bin/6to5 2015-01-23 00:19:19 +11:00
Sebastian McKenzie
c90904a139 put 3.0.0 changes into subsections 2015-01-22 19:24:04 +11:00
Sebastian McKenzie
8f68f62f8a add jscs 2015-01-22 19:23:56 +11:00
Sebastian McKenzie
8678917e2a add util.object that we'll use to construct objects to avoid prototype collisions 2015-01-22 18:39:31 +11:00
Sebastian McKenzie
115509653f remove strict module transformers 2015-01-22 18:39:09 +11:00
Sebastian McKenzie
f43fc08a8f remove indent option from cli 2015-01-22 18:38:21 +11:00
Sebastian McKenzie
31504a5187 add async to generator helper update note 2015-01-22 17:20:38 +11:00
Sebastian McKenzie
9bfe6e7aac add Scope::getFunctionParent method 2015-01-22 17:20:29 +11:00
Sebastian McKenzie
2e0a185db6 keep function id location in block scoped function transformer 2015-01-22 17:20:19 +11:00
Sebastian McKenzie
f63ce4ddd4 rename _letDeclars to _letDeclarators in es6 block scoping transformer 2015-01-22 17:20:05 +11:00
Sebastian McKenzie
c4fb5a5e40 more compact async to generator helper 2015-01-22 17:19:22 +11:00
Sebastian McKenzie
738203485c Merge pull request #569 from caspervonb/makefile-open
Use $BROWSER with fallbacks for opening browser tests
2015-01-22 16:05:56 +11:00
Casper Beyer
5218d07b0d Use $BROWSER with fallbacks for opening browser tests 2015-01-22 12:45:47 +08:00
Sebastian McKenzie
b9b1a44c28 support async await inside of let scoping closure wrapper - fixes #565 2015-01-22 10:53:05 +11:00
Sebastian McKenzie
c0a4e7ad55 upgrade core-js to 0.4.6 2015-01-22 10:12:24 +11:00
Sebastian McKenzie
9ed8e4a35b remove names from optional async tests 2015-01-22 10:12:11 +11:00
Sebastian McKenzie
3e2d611707 store all undeclared references on Program to better handle let scoping 2015-01-22 10:12:03 +11:00
Sebastian McKenzie
5463872926 optional async transformers should remove their ids - fixes #552 2015-01-22 08:15:35 +11:00
Sebastian McKenzie
81ff635c60 fix tests to reflect new super behaviour 2015-01-22 08:07:59 +11:00
Sebastian McKenzie
7072f64397 remove debug console.log 2015-01-22 08:07:37 +11:00
Sebastian McKenzie
418de75e77 fix bare super call being illegal in non-constructors 2015-01-22 07:54:01 +11:00
Sebastian McKenzie
bed2826e3b update 3.0.0 changelog 2015-01-22 07:52:36 +11:00
Sebastian McKenzie
f2a432531e make bare super call in non-constructors illegal 2015-01-22 07:52:31 +11:00
Sebastian McKenzie
da6c2b8d6a add illegal top level this transformer - fixes #562 2015-01-22 07:44:36 +11:00
Sebastian McKenzie
b02e28f3fd add additional 3.0.0 change notes 2015-01-22 07:38:08 +11:00
Sebastian McKenzie
da8888a350 move around transformers to work better with regenerator 2015-01-22 07:37:59 +11:00
Sebastian McKenzie
43856136d5 update tests 2015-01-22 07:37:45 +11:00
Sebastian McKenzie
589d20019f bump regenerator 2015-01-22 07:37:37 +11:00
Sebastian McKenzie
50d3599f76 upgrade regenerator-6to5 2015-01-22 07:37:26 +11:00
Sebastian McKenzie
870954c6be rewrite constants transformer 2015-01-22 07:37:18 +11:00
Sebastian McKenzie
6959e60e2c bump 6to5-runtime version 2015-01-22 01:47:19 +11:00
Sebastian McKenzie
9cdbb99eb9 fix linting errors 2015-01-22 01:47:13 +11:00
Sebastian McKenzie
48cebd5e30 rename es6.generators to regenerator 2015-01-22 01:47:07 +11:00
Sebastian McKenzie
4e829f3e1b categorise 3.0.0 changes 2015-01-22 01:46:33 +11:00
Sebastian McKenzie
7cbe914b22 update 3.0.0 changelog 2015-01-22 01:45:48 +11:00
Sebastian McKenzie
c2d61ad660 more intelligent scope tracking and insertion 2015-01-22 01:40:26 +11:00
Sebastian McKenzie
878a7ada06 better dynamic imports/data 2015-01-22 01:38:18 +11:00
Sebastian McKenzie
b7b2845160 add descriptions about why some transformers are in the position they are 2015-01-22 01:38:08 +11:00
Sebastian McKenzie
2ab4a3d362 update tests to reflect new uid behaviour 2015-01-22 01:37:50 +11:00
Sebastian McKenzie
cfd95a1398 only require imports that are necessary in selfContained 2015-01-22 01:37:28 +11:00
Sebastian McKenzie
ccdb480d44 rename traverser to visitor 2015-01-22 00:28:20 +11:00
Sebastian McKenzie
ac373a9e1c use scope for uid registry instead of a global registry 2015-01-22 00:27:45 +11:00
Sebastian McKenzie
4ce7d5a5b4 Merge branch 'guybedford-system-tests' into 3.0.0 2015-01-21 23:59:41 +11:00
Sebastian McKenzie
1e217c745b Merge branch 'system-tests' of https://github.com/guybedford/6to5 into guybedford-system-tests 2015-01-21 23:59:32 +11:00
Sebastian McKenzie
287bfc77b2 add scope file.generateUidIdentifier alias 2015-01-21 23:58:43 +11:00
Sebastian McKenzie
3205c78f01 ensure that a scope is always passed to traverse and allow scopes to have access to file 2015-01-21 23:52:12 +11:00
Sebastian McKenzie
0b6d49e421 better handling of optional transformers 2015-01-21 23:34:18 +11:00
Sebastian McKenzie
546a44d1d7 autoindentation - fixes #467 2015-01-21 23:33:57 +11:00
Sebastian McKenzie
ac891bebaa nicer unknown transformer message 2015-01-21 23:33:30 +11:00
Sebastian McKenzie
0ab4326026 Merge branch 'gaearon-traversers-3.0.0' into 3.0.0 2015-01-21 23:13:51 +11:00
Sebastian McKenzie
5fcfff23a4 Merge branch 'traversers-3.0.0' of https://github.com/gaearon/6to5 into gaearon-traversers-3.0.0 2015-01-21 23:13:43 +11:00
Sebastian McKenzie
28fe45bd1d namespace all transformer keys with their type 2015-01-21 23:12:57 +11:00
Sebastian McKenzie
f312026c23 move transformers into their corresponding type folder 2015-01-21 23:04:31 +11:00
guybedford
8023788305 add generator and variable binding tests 2015-01-21 13:58:49 +02:00
Sebastian McKenzie
0d0d89fd9c better names for property transformers 2015-01-21 22:41:55 +11:00
Sebastian McKenzie
019f2ee932 namespace default/rest parameter transformers 2015-01-21 22:40:50 +11:00
Sebastian McKenzie
8558505b65 merge comprehension transformers 2015-01-21 22:40:26 +11:00
Sebastian McKenzie
c51f8c48b6 rename let scoping transformer to block scoping 2015-01-21 22:40:17 +11:00
Dan Abramov
3d9d842a0d Extract traversers outside methods 2015-01-21 14:34:47 +03:00
Sebastian McKenzie
cfd028288f Merge branch 'master' into 3.0.0
Conflicts:
	CHANGELOG.md
	lib/6to5/transformation/transform.js
2015-01-21 17:56:34 +11:00
Sebastian McKenzie
194c080c64 v2.13.5 2015-01-21 13:37:06 +11:00
Sebastian McKenzie
4c6076e529 add 2.13.5 changelog 2015-01-21 13:35:30 +11:00
Sebastian McKenzie
df65ec08a2 support destructuring patterns in rest parameters - fixes #550 2015-01-21 13:35:24 +11:00
Sebastian McKenzie
62f11011b0 upgrade kexec - closes #551 2015-01-21 13:19:24 +11:00
Sebastian McKenzie
9385c7e4ad v2.13.4 2015-01-21 10:27:35 +11:00
Sebastian McKenzie
3c06e68cae fix default parameter node variable name 2015-01-21 10:21:27 +11:00
Sebastian McKenzie
e8810f5124 add 2.13.4 changelog 2015-01-21 10:20:13 +11:00
Sebastian McKenzie
3c258c4716 add proper ordering to function param logic - fixes #549 2015-01-21 10:17:52 +11:00
Sebastian McKenzie
193a3c167e loops should contain their child block let declarations 2015-01-20 19:33:26 +11:00
Sebastian McKenzie
4b525daf72 fix forOf scope declarations not propagating to new for loop - fixes #538 2015-01-20 19:33:05 +11:00
Sebastian McKenzie
e46f42872a add array comprehension collision test #538 2015-01-20 16:52:11 +11:00
Sebastian McKenzie
4790e4068a add for collision test #538 2015-01-20 16:52:00 +11:00
Sebastian McKenzie
26cb5d5a65 add block to for loop scope - fixes #538 2015-01-20 16:48:41 +11:00
Sebastian McKenzie
031bda61cc don't continue let scoping remapping if there are none to be remapped 2015-01-20 16:48:07 +11:00
Sebastian McKenzie
61f1fae83b remove unused template 2015-01-20 16:47:52 +11:00
Sebastian McKenzie
d911bdaf63 add AssignmentPattern support to scope tracking - fixes #537 2015-01-20 08:56:14 +11:00
Sebastian McKenzie
1859226e76 remove runtime test 2015-01-20 02:36:42 +11:00
Sebastian McKenzie
e4523de16d upgrade regenerator-6to5 2015-01-20 02:34:02 +11:00
Sebastian McKenzie
6a3829d605 remove includeRegenerator option 2015-01-20 02:31:19 +11:00
Sebastian McKenzie
437ba46889 update regenerator submodule url 2015-01-20 02:31:10 +11:00
Sebastian McKenzie
7007f7e0bb remove includeRegenerator option 2015-01-20 02:30:57 +11:00
Sebastian McKenzie
ff12a996de remove ALL check from regenerator tests 2015-01-20 02:30:49 +11:00
Sebastian McKenzie
faba02afd4 better block scoped functions 2015-01-20 02:30:41 +11:00
Sebastian McKenzie
5436e95c9a switch to regenerator-to5 2015-01-20 02:30:34 +11:00
Sebastian McKenzie
031099b58e add generator note to name method helper 2015-01-20 02:29:50 +11:00
Sebastian McKenzie
e75d1a1666 fix helper identifiers 2015-01-20 01:45:00 +11:00
Sebastian McKenzie
7f6eb3dba3 update selfContained transformer to use new File data layer 2015-01-20 01:42:43 +11:00
Sebastian McKenzie
33d2463c65 remove old runtime tests 2015-01-20 01:42:31 +11:00
Sebastian McKenzie
ab134d0919 add data abstraction layer to File 2015-01-20 01:36:00 +11:00
Sebastian McKenzie
d6412d0a1b Merge branch 'AluisioASG-scoped-es6-runtime' into 3.0.0 2015-01-20 01:34:50 +11:00
Sebastian McKenzie
9f41d6231e Merge branch 'scoped-es6-runtime' of https://github.com/AluisioASG/6to5 into AluisioASG-scoped-es6-runtime 2015-01-20 01:34:43 +11:00
Aluísio Augusto Silva Gonçalves
9d2e12dfa6 Amendments from 6to5/6to5#535 comments 2015-01-19 12:31:47 -02:00
Aluísio Augusto Silva Gonçalves
043bf13d24 Revert moving _blockHoist after regenerator
This reverts commits 81bec3e5c4 and
157f5c3304.
2015-01-19 12:24:54 -02:00
Aluísio Augusto Silva Gonçalves
3f96cf3963 Rename 6to5-runtime's helpers module to 'helpers' 2015-01-19 12:24:45 -02:00
Sebastian McKenzie
22fb346983 remove runtime option 2015-01-20 01:17:24 +11:00
Sebastian McKenzie
e7acfd7bb7 fix regenerator runtime build 2015-01-20 01:13:28 +11:00
Sebastian McKenzie
31cf740b99 fix regenerator location 2015-01-20 01:05:49 +11:00
Sebastian McKenzie
d75139a059 add 6to5-runtime build process #535 2015-01-20 00:56:09 +11:00
Sebastian McKenzie
7257e2445d Merge branch 'master' into 3.0.0
Conflicts:
	CHANGELOG.md
	lib/6to5/file.js
	lib/6to5/register.js
2015-01-20 00:36:06 +11:00
Sebastian McKenzie
f322252c36 add optional undeclared variable check transformer 2015-01-20 00:17:22 +11:00
Sebastian McKenzie
da16bf1e42 add t.isReferencedIdentifier 2015-01-20 00:17:11 +11:00
Aluísio Augusto Silva Gonçalves
157f5c3304 Remove regenerator edge case from selfContained test
Right now exporting a generator doesn't work because we hoist the
export assignment before the function expression assignment.  This
will be dealt with at another time as it is not specific to this
transformer.
2015-01-19 10:54:33 -02:00
Sebastian McKenzie
4a1addc558 better whitespace for VariableDeclarations 2015-01-19 22:09:05 +11:00
Aluísio Augusto Silva Gonçalves
e2bf61379f Add full-blown test for the selfContained transformer 2015-01-18 23:10:26 -02:00
Aluísio Augusto Silva Gonçalves
02019d4d8f Drop unnecessary dynamic import redeclaration in AMD
Instead of assigning the import a name and them declaring a new
variabled referencing that name, output the import already with
the destination name, since we know there must be no collisions
because these IDs are also generated.
2015-01-18 21:18:25 -02:00
Aluísio Augusto Silva Gonçalves
c81cc5cda0 Unify coreAliasing, externalRuntime and externalRegenerator
Merge all three transformers into the `selfContained` transformer,
as discussed in Gitter.  Name may not be final.
2015-01-18 21:15:30 -02:00
Aluísio Augusto Silva Gonçalves
8d288c01ca Import ES6 functions and helpers from 6to5-runtime
The new `6to5-runtime` packs core-js, 6to5's helpers and
the Regenerator runtime, and we're moving `coreAliasing`,
`externalRuntime` and `externalRegenerator` to use it
instead of forcing the user to depend on these packages
directly.
2015-01-18 20:39:35 -02:00
Sebastian McKenzie
857abf5024 v2.13.3 2015-01-19 09:05:37 +11:00
Sebastian McKenzie
6d67105bab add coverage and vendor to npmignore 2015-01-19 09:02:51 +11:00
Aluísio Augusto Silva Gonçalves
e2f4ca106e Merge branch 'external-regenerator-runtime' into scoped-es6-runtime 2015-01-18 20:02:48 -02:00
Aluísio Augusto Silva Gonçalves
061bbe0409 Merge branch 'external-runtime' into scoped-es6-runtime 2015-01-18 20:01:52 -02:00
Sebastian McKenzie
078b09676f v2.13.2 2015-01-19 09:00:15 +11:00
Sebastian McKenzie
b719eaf6ab add missing semicolon 2015-01-19 08:58:11 +11:00
Sebastian McKenzie
b63accca25 remove --mangle sort from uglify since it's causing issues in safari/ios 2015-01-19 08:57:43 +11:00
Sebastian McKenzie
2d41b09c3b add 2.12.3 changelog 2015-01-19 08:57:04 +11:00
Sebastian McKenzie
0b44137d1f exclude coverage folder from npm 2015-01-19 08:56:58 +11:00
Sebastian McKenzie
8d8dd5fa37 add let scoping transformer rename note 2015-01-19 08:54:26 +11:00
Sebastian McKenzie
16b7ff972c split up tdz into an optional transformer until it has a better implementation - fixes #527 2015-01-19 08:54:04 +11:00
Sebastian McKenzie
ca41612109 use process.stdin.write instead of console.log to avoid console.log sprintf - fixes #527 2015-01-19 08:53:42 +11:00
Sebastian McKenzie
8fc7af5480 properly reference method body - fixes #530 2015-01-19 08:35:01 +11:00
Aluísio Augusto Silva Gonçalves
7e6da1d368 Add tests for the externalRegenerator transformer 2015-01-18 17:33:57 -02:00
Aluísio Augusto Silva Gonçalves
d4cc8fefd1 Add transformer to import regeneratorRuntime from a module
Thanks to facebook/regenerator#167 Regenerator's runtime can be now
required as a module (though not in an easily self-containable way).
This transformer, together with `coreAliasing` and `externalRuntime`,
allows users to ditch a runtime dependency on `6to5`/`6to5-core` to
depend directly on `core-js` and `regenerator`.
2015-01-18 17:33:56 -02:00
Aluísio Augusto Silva Gonçalves
81bec3e5c4 Move the _blockHoist transformer after regenerator
Otherwise wrapped generator functions are hoisted to the top of the
scope even if we want something else to come before them.
2015-01-18 17:33:55 -02:00
Aluísio Augusto Silva Gonçalves
e985d8b25d Don't use interopRequire for dynamic imports
They don't need it at all and this also allows use of `externalRuntime`
without fear of the runtime ending up being loaded after it's used.
2015-01-18 17:31:55 -02:00
Aluísio Augusto Silva Gonçalves
84ee0efe32 Add test for externalRuntime with AMD modules 2015-01-18 17:31:54 -02:00
Aluísio Augusto Silva Gonçalves
e9a024e58a Add simple test for externalRuntime transformer
Just import a module namespace and see what happens.
2015-01-18 17:31:53 -02:00
Aluísio Augusto Silva Gonçalves
e8237910e8 Add a transformer to import the runtime from a file
The `externalRuntime` optional transformer can be used in conjunction
with the `runtime` option to import and use the runtime from a module
instead of polluting the global environment.
2015-01-18 17:31:52 -02:00
Sebastian McKenzie
1c6cb7ce40 Merge pull request #526 from tricknotes/remove-unused
Remove unused local variable
2015-01-18 22:30:24 +11:00
Ryunosuke SATO
24d6c3f488 Remove unused local variable
`hasOptional` is assigned but unused from anywhere.
2015-01-18 20:16:32 +09:00
Sebastian McKenzie
d877a04397 v2.13.1 2015-01-18 21:40:21 +11:00
Sebastian McKenzie
4844882f5e break let scoping transformer if there are no block scoped references 2015-01-18 21:37:37 +11:00
Sebastian McKenzie
a80945cfb4 ignore function declarations in TDZ detection 2015-01-18 21:33:22 +11:00
Sebastian McKenzie
6a884c58a7 add 2.13.1 changelog 2015-01-18 21:28:34 +11:00
Sebastian McKenzie
7c4701716c implement block scoping TDZ 2015-01-18 21:26:02 +11:00
Sebastian McKenzie
ecfd5fadc6 v2.13.0 2015-01-18 19:31:07 +11:00
Sebastian McKenzie
c6be5cccd7 update bin/6to5/file to new source-map api 2015-01-18 19:29:18 +11:00
Sebastian McKenzie
dd256dc3f8 add acorn-6to5 changes to 2.13.0 changelog 2015-01-18 19:26:15 +11:00
Sebastian McKenzie
622da331a6 add 2.13.0 changelog 2015-01-18 19:24:54 +11:00
Sebastian McKenzie
5a44793dcb upgrade acorn-6to5 2015-01-18 19:24:49 +11:00
Sebastian McKenzie
9c9a9b0325 make regenerator test future-proof 2015-01-18 18:51:11 +11:00
Sebastian McKenzie
2534f7f2a0 upgrade dependencies 2015-01-18 18:50:58 +11:00
Sebastian McKenzie
36a933a004 add strict mode to every file 2015-01-18 18:44:08 +11:00
Sebastian McKenzie
62c168b13c fix linting errors 2015-01-18 18:41:24 +11:00
Sebastian McKenzie
810c97d7ab actually make destructuring use the provided operator 2015-01-18 18:24:16 +11:00
Sebastian McKenzie
c2b20b18b3 make name method helper export a property method instead of a default 2015-01-18 18:24:05 +11:00
Sebastian McKenzie
309d19960f better traversal context variable names 2015-01-18 18:23:46 +11:00
Sebastian McKenzie
774cb66d9b add isBlockedScoped types helper 2015-01-18 18:23:37 +11:00
Sebastian McKenzie
d360bd5bb7 update misc tests 2015-01-18 18:23:27 +11:00
Sebastian McKenzie
74f5a73d31 update traceur 2015-01-18 18:23:14 +11:00
Sebastian McKenzie
26395a86fa add block scoped functions - fixes #514 2015-01-18 18:23:03 +11:00
Sebastian McKenzie
436c488ee3 revamp let scoping transformer - closes #510 2015-01-18 18:22:37 +11:00
Sebastian McKenzie
93d99077e5 Revert "add loose mode to spread and destructuring"
This reverts commit 95d9f59668.
2015-01-18 12:52:16 +11:00
Sebastian McKenzie
0bb52d6e3d Merge branch 'master' of github.com:6to5/6to5 2015-01-18 12:16:23 +11:00
Sebastian McKenzie
320c78b815 make let scoping collision detection much more reliable 2015-01-18 12:15:50 +11:00
Sebastian McKenzie
ddd59b94b0 upgrade acorn-6to5 2015-01-18 12:15:31 +11:00
Sebastian McKenzie
c210d64557 add loose all option 2015-01-18 12:13:08 +11:00
Sebastian McKenzie
a0f605bbab add way to automatically write expected tests 2015-01-18 12:12:58 +11:00
Sebastian McKenzie
f4b2768194 add todo note to duplicate expression 2015-01-18 12:12:32 +11:00
Sebastian McKenzie
95d9f59668 add loose mode to spread and destructuring 2015-01-18 12:12:12 +11:00
Sebastian McKenzie
c41d799b9b Merge pull request #522 from fabiomcosta/lint_fixes
Fixes lint warnings that are blocking test run
2015-01-18 10:21:12 +11:00
Fabio M. Costa
e7d4642d48 Fixes lint warnings that are blocking test run 2015-01-17 14:19:54 -08:00
Sebastian McKenzie
41949fd58b push uids to scope tracking - fixes #515 2015-01-18 02:36:37 +11:00
Sebastian McKenzie
d0dc972840 fix up formatting in traverse 2015-01-18 02:35:19 +11:00
Sebastian McKenzie
621e66e9ac add private declaration and comprehension expression support to scope tracking and id building 2015-01-18 02:35:08 +11:00
Sebastian McKenzie
529544ce0e use generateUidIdentifier instead of generateUid 2015-01-18 01:16:09 +11:00
Sebastian McKenzie
f298cd3f0f allow single idents in binary assignment operator transformer 2015-01-18 01:15:35 +11:00
Sebastian McKenzie
67029ac8e8 better helpers for assignment operators 2015-01-18 00:37:51 +11:00
Sebastian McKenzie
b54800234f clean up conditional assignment operator transformers 2015-01-17 22:56:49 +11:00
Sebastian McKenzie
ecd85f53b4 Merge pull request #516 from jridgewell/mallot
Playground Proposal: Mallet operator
2015-01-17 21:59:23 +11:00
Sebastian McKenzie
9098852897 abstract out classes super replace 2015-01-17 18:53:49 +11:00
Sebastian McKenzie
3eb4d5b466 fix up styling of #518 2015-01-17 18:53:40 +11:00
Sebastian McKenzie
ddb1c718f1 Merge pull request #518 from gaearon/perf-v8
RFC: V8-specific performance impovements
2015-01-17 18:33:35 +11:00
Sebastian McKenzie
8919873ea1 clean up react/jsx transformer 2015-01-17 18:26:14 +11:00
Sebastian McKenzie
eb9cd95d5a update for head tests 2015-01-17 17:54:04 +11:00
Sebastian McKenzie
4ec701fc44 ignore variable declarations inside loop head in newline generation - fixes #519 2015-01-17 17:44:16 +11:00
Dan Abramov
ff9511d435 Proof of concept of how traversal would look like with state parameter 2015-01-17 05:03:23 +03:00
Justin Ridgewell
ac5a6da1fa Use all falsey values 2015-01-16 19:25:28 -05:00
Justin Ridgewell
616640a128 Playground Proposal: Mallet operator
The mallet operator is similar to the current memoization operator,
except it can be used outside of just objects.

In Ruby, it’s almost the same as `a = a || b`. Note that only `nil` and
`false` are falsey in Ruby. I’ve defined it as `== null`, though that
could be changed to any JS falsey value.
2015-01-16 18:57:15 -05:00
Sebastian McKenzie
1f9ce96e43 fix rest parameter array size error in rest parameter comment 2015-01-17 10:27:01 +11:00
Sebastian McKenzie
dc6a862bec better clarification of rest parameter size construction comment 2015-01-17 10:23:53 +11:00
Dan Abramov
f9480b5280 Avoid closures when traversing 2015-01-17 00:13:39 +03:00
Dan Abramov
8dc4996547 Refactor traversal into smaller methods 2015-01-17 00:13:39 +03:00
Dan Abramov
4f01f67dd6 Avoid delete in favor of null assignment to prevent deoptimizations 2015-01-17 00:13:39 +03:00
Dan Abramov
938026abeb Use toFastProperties to speed up t.* method access 2015-01-17 00:13:38 +03:00
Sebastian McKenzie
76b8945207 v2.12.6 2015-01-16 22:52:12 +11:00
Sebastian McKenzie
e78859fae0 add 2.12.6 changelog 2015-01-16 22:49:31 +11:00
Sebastian McKenzie
d68f1e9910 add flow type generation skeleton 2015-01-16 22:47:55 +11:00
Sebastian McKenzie
20e97f2d9b add flow type visitor keys - none currently as we don't need to traverse over any of them - closes #513 2015-01-16 22:46:09 +11:00
Sebastian McKenzie
750ec7783f v2.12.5 2015-01-16 08:08:52 +11:00
Sebastian McKenzie
14ae438735 remove declarators push in let scoping 2015-01-16 08:06:38 +11:00
Sebastian McKenzie
2f8bdd7e27 add 2.12.5 changelog 2015-01-16 07:59:40 +11:00
Sebastian McKenzie
87da9fcfc5 fix let scoping for loop - closes #509 2015-01-16 07:58:14 +11:00
Sebastian McKenzie
51f6cfddca remove instanbul inclusion 2015-01-16 02:47:20 +11:00
Sebastian McKenzie
b9ad4c2773 v2.12.4 2015-01-16 02:41:23 +11:00
Sebastian McKenzie
228b3dbc34 fix linting errors 2015-01-16 02:38:45 +11:00
Sebastian McKenzie
a01802300f fix default parameters transformer for loops 2015-01-16 02:36:56 +11:00
Sebastian McKenzie
51c6a3fffc fix let scoping body not existing 2015-01-16 02:31:36 +11:00
Sebastian McKenzie
4668e1d67b fix linting errors 2015-01-16 02:29:35 +11:00
Sebastian McKenzie
75e9097e19 add 2.12.4 changelog 2015-01-16 02:29:02 +11:00
Sebastian McKenzie
0627cd94d4 turn array for ins into fors 2015-01-16 02:25:41 +11:00
Sebastian McKenzie
71879d6e8f Merge branch 'master' of github.com:6to5/6to5 2015-01-16 00:50:55 +11:00
Sebastian McKenzie
d7810cac08 add ambiguous rest parameters comment 2015-01-16 00:50:38 +11:00
Sebastian McKenzie
dc9efd21d3 Merge pull request #507 from leebyron/unused
Rm unused dependencies (pass lint)
2015-01-16 00:47:55 +11:00
Lee Byron
347e490614 Rm unused dependencies (pass lint) 2015-01-15 08:47:03 -05:00
Sebastian McKenzie
e512264be7 Merge pull request #506 from leebyron/rest
Improve performance of rest parameter.
2015-01-16 00:43:56 +11:00
Lee Byron
9624663e60 Improve performance of rest parameter.
Rather than initing an empty array and filling, create an array of the correct size up-front. Minor gain on chromium, but considerably (~5x) faster in spidermonkey/firefox.
2015-01-15 08:41:53 -05:00
Sebastian McKenzie
3cf8a6df01 rename replaceInstanceSuperReferences to replaceSuperReferences in classes transformer and add breaks on method definitions 2015-01-15 23:08:28 +11:00
Sebastian McKenzie
88eacecd72 clarify traceur ignore tests 2015-01-15 23:08:06 +11:00
Sebastian McKenzie
fcd3c9ce65 remove register blacklist tests 2015-01-15 23:07:52 +11:00
Sebastian McKenzie
1733bac3bb move chokidar to top 2015-01-15 23:07:46 +11:00
Sebastian McKenzie
21cd063274 Merge pull request #503 from shinnn/output-file-sync
Use output-file-sync instead of mkdirp
2015-01-15 20:32:48 +11:00
Shinnosuke Watanabe
db5750643a use output-file-sync instead of mkdirp
https://github.com/shinnn/output-file-sync
2015-01-15 18:29:40 +09:00
Sebastian McKenzie
60dae7a88d add build comprehension helper 2015-01-15 20:13:24 +11:00
Sebastian McKenzie
790c924b54 abstract out build comprehension helper 2015-01-15 20:13:16 +11:00
Sebastian McKenzie
50d7a46c7f abstract away remap async to generator helper 2015-01-15 20:09:50 +11:00
Sebastian McKenzie
6f7da38957 abstract out named method helper 2015-01-15 20:07:32 +11:00
Sebastian McKenzie
80764c214a add rest parameter comments 2015-01-15 19:52:53 +11:00
Sebastian McKenzie
55054e45da Revert "Improve performance of rest parameter."
This reverts commit e5463cc2a9.
2015-01-15 19:34:33 +11:00
Sebastian McKenzie
060aa5ba0b fix rest parameter check in types.isReferenced 2015-01-15 19:29:54 +11:00
Sebastian McKenzie
688d619bfe add identifier check to class id inheritance 2015-01-15 19:29:54 +11:00
Sebastian McKenzie
6db7fce543 fix computed member expressions in playground memoization 2015-01-15 19:29:54 +11:00
Sebastian McKenzie
41ff1d4ace upgrade acorn-6to5 2015-01-15 19:29:54 +11:00
Sebastian McKenzie
1c6eeba2e9 Merge pull request #499 from leebyron/rest
Improve performance of rest parameter.
2015-01-15 19:28:32 +11:00
Sebastian McKenzie
488b719fde Merge pull request #494 from gaearon/perf-2
Performance impovements
2015-01-15 19:28:04 +11:00
Sebastian McKenzie
af32080287 Merge pull request #498 from leebyron/patch-1
Update CONTRIBUTING.md
2015-01-15 19:27:07 +11:00
Sebastian McKenzie
4c1cd13536 Merge pull request #501 from shinnn/package-json
Update repository info and homepage URL
2015-01-15 14:36:39 +11:00
Dan Abramov
1002cf7796 Avoid Node allocations by making prototype call statics 2015-01-15 04:18:18 +03:00
Shinnosuke Watanabe
081dd33e73 Update repository info and homepage URL
* link to https://6to5.org
* use user/repo style
2015-01-15 10:07:54 +09:00
Sebastian McKenzie
bd9dc4f15d Merge pull request #500 from shinnn/container-based-build
Use container-based infrastructure on Travis CI
2015-01-15 12:01:33 +11:00
Shinnosuke Watanabe
c7ba566ad6 Use container-based infrastructure on Travis CI
http://docs.travis-ci.com/user/workers/container-based-infrastructure/
2015-01-15 09:55:10 +09:00
Dan Abramov
a1b326a0ab Use object lookup instead of array 2015-01-15 03:51:22 +03:00
Dan Abramov
a452f781b8 Slightly refactor and add explanations for optimized functions 2015-01-15 03:39:24 +03:00
Lee Byron
e5463cc2a9 Improve performance of rest parameter.
Rather than initing an empty array and filling, create an array of the correct size up-front. Minor gain on chromium, but considerably (~5x) faster in spidermonkey/firefox.
2015-01-14 19:08:14 -05:00
Lee Byron
7d732ef503 Update CONTRIBUTING.md 2015-01-14 19:01:53 -05:00
Lee Byron
25cb0c6344 Update CONTRIBUTING.md
Explain git init submodules step when checking out
2015-01-14 18:23:49 -05:00
Sebastian McKenzie
45a52bf478 Merge pull request #496 from swirlycheetah/master
Expand upon the contributing guidelines
2015-01-15 09:41:12 +11:00
Chris Wheatley
a14f971b8a add further commands required for workflow 2015-01-14 22:25:20 +00:00
Chris Wheatley
da65500545 expand upon the contributing guidelines 2015-01-14 22:11:46 +00:00
Dan Abramov
58a91ee9e9 Optimize node type lookup 2015-01-14 23:01:58 +03:00
Dan Abramov
19eaa181a5 Speed up common case where consumer moves only forward 2015-01-14 20:02:40 +03:00
Dan Abramov
c7c90acf3f Store ranges instead of line indexes for performance 2015-01-14 19:14:47 +03:00
Dan Abramov
c6f3a55c03 Refactor buffer for clarity and avoid regex for performance 2015-01-14 19:14:47 +03:00
Sebastian McKenzie
e01b7d288f v2.12.3 2015-01-15 02:29:44 +11:00
Sebastian McKenzie
98c0e185b8 add missing semicolon 2015-01-15 02:27:45 +11:00
Sebastian McKenzie
bf66d78210 add 2.12.3 changelog 2015-01-15 02:27:17 +11:00
Sebastian McKenzie
b60eca0a76 better typeof symbol transformer 2015-01-15 02:24:32 +11:00
Sebastian McKenzie
44f06c0b4c instance and static class method names 2015-01-15 02:24:23 +11:00
Sebastian McKenzie
6c5606b7e8 call transformer methods on traverse context 2015-01-15 02:24:05 +11:00
Sebastian McKenzie
07ddfbeb5d remove pointless prototypeProperties helper call 2015-01-15 01:20:06 +11:00
Sebastian McKenzie
87b890c172 fix parentheses deletion not support multilines - fixes #490 2015-01-15 01:14:49 +11:00
Sebastian McKenzie
245fcfe110 move mutator map checking to after loose test 2015-01-15 01:09:13 +11:00
Sebastian McKenzie
bb19f24923 remove roadrunner from 6to5-node 2015-01-15 01:08:12 +11:00
Sebastian McKenzie
4744719040 v2.12.2 2015-01-14 18:48:29 +11:00
Sebastian McKenzie
a3b814a897 fix default parameters closure scope 2015-01-14 18:46:36 +11:00
Sebastian McKenzie
f5f17f0ccb ignore function params, rest and catch clauses - webpack/webpack#688 2015-01-14 18:39:07 +11:00
Sebastian McKenzie
f6a2acdfb1 v2.12.1 2015-01-14 18:06:51 +11:00
Sebastian McKenzie
e8dba2ad1e add 2.12.1 changelog 2015-01-14 18:05:11 +11:00
Sebastian McKenzie
8ce5c5b608 add jsx to possible extensions 2015-01-14 18:04:14 +11:00
Sebastian McKenzie
0cbcbc60de allow imports and exports everywhere in loose mode 2015-01-14 15:21:45 +11:00
Sebastian McKenzie
f33cd7184f add jsx to possible extensions 2015-01-14 15:09:15 +11:00
Sebastian McKenzie
59d6400eb9 remove ignoreRegex fallback 2015-01-14 15:06:12 +11:00
Sebastian McKenzie
5c575ebf8f remove fast transformer backwards compatibility 2015-01-14 14:58:15 +11:00
Sebastian McKenzie
274205bccd Merge branch 'master' into 3.0.0
Conflicts:
	CHANGELOG.md
	package.json
2015-01-14 14:56:55 +11:00
Sebastian McKenzie
e85c9b633a enable require hook cache by default - shove it into into a temp directory - don't cache require resolutions 2015-01-14 14:55:30 +11:00
Sebastian McKenzie
0dfea1a51b update notes 2015-01-14 14:54:31 +11:00
Sebastian McKenzie
a4e528e2b3 v2.12.0 2015-01-14 10:14:14 +11:00
Sebastian McKenzie
99ca9b7e9a fix linting errors 2015-01-14 10:12:11 +11:00
Sebastian McKenzie
313e932e7c fix linting errors 2015-01-14 10:11:41 +11:00
Sebastian McKenzie
6a57a4e565 fix linting errors 2015-01-14 10:11:07 +11:00
Sebastian McKenzie
fc3a5f25fb add 2.12.0 changelog 2015-01-14 10:09:47 +11:00
Sebastian McKenzie
e258b85420 clean up loose template literals 2015-01-14 08:55:24 +11:00
Sebastian McKenzie
6b836de306 add #480 test 2015-01-14 07:56:45 +11:00
Sebastian McKenzie
fe6f53d471 Merge pull request #480 from monsanto/loose-templates
Add loose transform for tagged template literals
2015-01-14 07:54:19 +11:00
Sebastian McKenzie
3b259c6b1e clean up 6to5 register-browser 2015-01-14 07:31:51 +11:00
Sebastian McKenzie
2005df3fa2 support non-string jsx literals - fixes #479 2015-01-14 07:31:28 +11:00
Christopher Monsanto
4fdcf685d3 add loose transform for tagged template literals 2015-01-13 14:48:31 -05:00
Sebastian McKenzie
afd3af834d add loose option to computed property names 2015-01-14 00:35:45 +11:00
Sebastian McKenzie
8afec8b12a rename fast mode to loose #465 2015-01-14 00:24:34 +11:00
Sebastian McKenzie
f25ed0b5de add minimum of 1 newline after line comments - fixes #442 and fixes #477 2015-01-13 23:27:52 +11:00
Sebastian McKenzie
4898770d60 ignore test262 in istanbul 2015-01-13 23:27:26 +11:00
Sebastian McKenzie
bd2fa77446 fix fast forOf and add tests 2015-01-13 23:18:46 +11:00
Sebastian McKenzie
1c2bafe0e1 use assignment instead of define for fast classes 2015-01-13 23:18:38 +11:00
Sebastian McKenzie
f8915333b0 remove double spaces in version read in makefile 2015-01-13 22:44:26 +11:00
Sebastian McKenzie
f8275adc6f upgrade acorn-6to5 2015-01-13 22:44:06 +11:00
Sebastian McKenzie
2a97a4233d remove invalid jshint options 2015-01-13 22:26:33 +11:00
Sebastian McKenzie
70eae9f6ce remove functions inside of loops 2015-01-13 22:18:58 +11:00
Sebastian McKenzie
f560062d82 remove loopfunc: false from jshint - thanks @dcousens... 2015-01-13 22:02:30 +11:00
Sebastian McKenzie
0f55a66f5b add "fast" option for transformers 2015-01-13 22:02:04 +11:00
Sebastian McKenzie
f14f72b635 add --mangle option to uglify 2015-01-13 22:01:37 +11:00
Sebastian McKenzie
9aa010d987 v2.11.4 2015-01-13 20:15:35 +11:00
Sebastian McKenzie
bd179ace86 add 2.11.4 changelog 2015-01-13 20:08:38 +11:00
Sebastian McKenzie
4df6d6043e make dependency versions static - fixes #475 2015-01-13 20:07:34 +11:00
Sebastian McKenzie
7ed7475c46 v2.11.3 2015-01-13 14:35:14 +11:00
Sebastian McKenzie
b2dc560a2d allow a string to be passed as the optional option 2015-01-13 14:33:18 +11:00
Sebastian McKenzie
010dbe1cce v2.11.2 2015-01-13 11:29:46 +11:00
Sebastian McKenzie
75cd0bab02 add 2.11.2 changelog 2015-01-13 11:26:07 +11:00
Sebastian McKenzie
3283991ed0 flip es6 geneartors include regenerator tests 2015-01-13 10:56:36 +11:00
Sebastian McKenzie
a66ce5b6ce add ignore ast check to es6 generators test because regenerator outputs an invalid ast 2015-01-13 10:44:17 +11:00
Sebastian McKenzie
9620f50f22 fix #474 test 2015-01-13 10:32:39 +11:00
Sebastian McKenzie
cc049ea851 Merge pull request #474 from amasad/master
Handle esprima-like AST catch clause in a TryStatement. Fixes #473
2015-01-13 10:26:47 +11:00
Amjad Masad
e5a04ae117 Add test 2015-01-12 17:56:16 -05:00
Amjad Masad
e07e74f010 Handle esprima-like AST catch clause in a TryStatement. Fixes #473 2015-01-12 17:32:02 -05:00
Sebastian McKenzie
7b04c501eb fix formatting of #472 2015-01-13 08:54:43 +11:00
Sebastian McKenzie
70349dd4b3 Merge pull request #472 from monsanto/no-traceback-on-syntax-err
don't print traceback on syntax error in CLI
2015-01-13 08:52:42 +11:00
Christopher Monsanto
2cedc843a8 don't print traceback on syntax error in CLI 2015-01-12 16:49:28 -05:00
Sebastian McKenzie
cf40fe3430 v2.11.1 2015-01-13 08:21:54 +11:00
Sebastian McKenzie
09ffeed139 add 2.11.1 changelog 2015-01-13 08:19:33 +11:00
Sebastian McKenzie
18f79d6253 Merge pull request #470 from monsanto/fix-dict-aliasing
remove Dict from core aliasable constructors
2015-01-13 08:17:23 +11:00
Christopher Monsanto
6f5270f38f remove Dict from core aliasable constructors 2015-01-12 14:00:43 -05:00
Brian Donovan
aac7aac373 Merge pull request #469 from clavery/master
remove console.log from react transforms
2015-01-12 10:29:29 -08:00
Charles Lavery
9361470dc7 remove console.log from react transforms 2015-01-12 13:19:32 -05:00
Sebastian McKenzie
cf579f4b6e v2.11.0 2015-01-13 01:53:03 +11:00
Sebastian McKenzie
2e497eef98 fix linting errors 2015-01-13 01:51:21 +11:00
Sebastian McKenzie
7867daaa04 add 2.11.0 changelog 2015-01-13 01:50:30 +11:00
Sebastian McKenzie
eabbcd31ad add comments to ambiguous code 2015-01-13 01:50:30 +11:00
Sebastian McKenzie
17d198f3d6 Merge pull request #468 from AluisioASG/core-aliasable
Whitelist constructors aliasable to core-js
2015-01-13 01:46:19 +11:00
Aluísio Augusto Silva Gonçalves
afd5376c8d Whitelist constructors aliasable to core-js
Expand the list of identifiers for which we substitute `_core.<Something>`
for `<Something>`.  Also an alternative fix for #421.
2015-01-12 12:29:37 -02:00
Sebastian McKenzie
02a50c9f7e fix unnecessary default parameter iife - fixes #251 2015-01-13 01:16:00 +11:00
Sebastian McKenzie
df9fa32b82 add optional to keep module id extensions - fixes #420 2015-01-13 01:12:14 +11:00
Sebastian McKenzie
831b420df3 special case single super method call with spread, fixes #227 2015-01-13 01:09:10 +11:00
Sebastian McKenzie
123186003c add support for super instead of closures - fixes #425 2015-01-13 01:00:35 +11:00
Sebastian McKenzie
fbb150cfc1 remove allowImportExportEverywhere 2015-01-13 00:10:12 +11:00
Sebastian McKenzie
ea627ed57c don't use function variable declaration for class constructor 2015-01-13 00:03:52 +11:00
Sebastian McKenzie
157bb48776 add 3.0.0 fast transformer note 2015-01-12 23:27:04 +11:00
Sebastian McKenzie
76a3771943 change ambiguous _inherits parameters 2015-01-12 20:54:37 +11:00
Sebastian McKenzie
54f8889a30 v2.10.1 2015-01-12 20:09:54 +11:00
Sebastian McKenzie
bab159bc08 fix version number in changelog 2015-01-12 20:08:14 +11:00
Sebastian McKenzie
23950963e5 add upgrade core-js note 2015-01-12 20:07:51 +11:00
Sebastian McKenzie
d1daac5550 add global shim due to core-js 0.4.4 2015-01-12 20:07:30 +11:00
Sebastian McKenzie
d93ece5ccf add 2.10.11 changelog 2015-01-12 20:05:19 +11:00
Sebastian McKenzie
c8c667bf16 add back loop ensure block 2015-01-12 20:04:19 +11:00
Sebastian McKenzie
49cdacbcb4 add includeRegenerator option 2015-01-12 20:03:02 +11:00
Sebastian McKenzie
f97bd584f7 upgrade core-js 2015-01-12 19:49:04 +11:00
Sebastian McKenzie
f1328aa82f v2.10.0 2015-01-12 11:52:32 +11:00
Sebastian McKenzie
e298a5d350 remove unused check function 2015-01-12 11:50:45 +11:00
Sebastian McKenzie
89a6ef0b26 add 2.10.0 changelog 2015-01-12 11:50:19 +11:00
Sebastian McKenzie
c7ac9b7815 rename --reactCompat arg to --react-compat 2015-01-12 11:47:04 +11:00
Sebastian McKenzie
55c99b9122 upgrade acorn-6to5 2015-01-12 11:45:21 +11:00
Sebastian McKenzie
545c8c3adb define class methods instead of assigning them - fixes #454 2015-01-12 11:44:23 +11:00
Sebastian McKenzie
d093dc8231 disallow setters without one parameter - fixes #455 2015-01-12 10:25:37 +11:00
Sebastian McKenzie
eaf9d58b8d Merge branch 'master' of github.com:6to5/6to5 2015-01-12 10:19:53 +11:00
Sebastian McKenzie
6131cea5b2 add classesFastSuper optional transformer - fixes #451 2015-01-12 10:19:22 +11:00
Sebastian McKenzie
ca4831febe Merge pull request #453 from amasad/master
Add --reactCompat option to cli
2015-01-12 09:57:21 +11:00
Amjad Masad
9cf8d05a19 Add --reactCompat option to cli 2015-01-11 12:47:17 -05:00
Sebastian McKenzie
2a4f03330b better bin name for 6to5-node 2015-01-11 22:59:36 +11:00
Sebastian McKenzie
83bc614bad add note about splitting up super transforming #411 2015-01-11 22:42:45 +11:00
Sebastian McKenzie
99ccb4111a start adding support for this mapping for supers 2015-01-11 22:15:56 +11:00
Sebastian McKenzie
f6c72e9ae9 add newline to scope 2015-01-11 22:15:56 +11:00
Sebastian McKenzie
a90730d4bf Merge pull request #449 from monsanto/fix-6to5-node-name
fix _6to5-node name in help screen
2015-01-11 18:19:04 +11:00
Christopher Monsanto
29503d2d37 fix _6to5-node name in help screen 2015-01-10 23:04:13 -05:00
Sebastian McKenzie
35451ed408 Merge pull request #447 from fkling/cli
Fix short --whitelist option
2015-01-11 11:21:41 +11:00
Felix Kling
7167aeb65a Fix short --whitelist option
`6to5 -w generators` doesn't work because `-w` is also short for
`--watch`. This changes the short option for `--whitelist` to `-l`.
2015-01-10 11:03:26 -08:00
Sebastian McKenzie
29d0489443 add autoindentation note 2015-01-11 04:55:34 +11:00
Sebastian McKenzie
82aa2686f9 fix writable being set on accessors 2015-01-11 04:55:27 +11:00
Sebastian McKenzie
24616fa08a fix linting errors 2015-01-11 03:35:37 +11:00
Sebastian McKenzie
9f3e1eabfd simplify define properties 2015-01-11 03:21:05 +11:00
Sebastian McKenzie
286d2f84bd add configurable and writable property to defined properties 2015-01-11 02:43:17 +11:00
Sebastian McKenzie
7fc484d82e add ES5 getter/setter split up note - closes #444 2015-01-11 02:30:11 +11:00
Sebastian McKenzie
ad6ab57fe3 only use raw type references in coreAliasing on Symbol - fixes #421 2015-01-11 01:00:04 +11:00
Sebastian McKenzie
348fe045d3 reformat for of transformers and add pattern support 2015-01-11 00:35:41 +11:00
Sebastian McKenzie
980b20316b Merge pull request #441 from monsanto/fast-for-of
Optional for-of transformer that puts arrays in fast path
2015-01-11 00:32:56 +11:00
Sebastian McKenzie
5b52e507ca fix non-identifier class super tests 2015-01-10 22:55:19 +11:00
Sebastian McKenzie
9853c9d78d add empty statement case to toBlock 2015-01-10 22:42:35 +11:00
Sebastian McKenzie
72ec771725 fix unnecessarily shifting super ref 2015-01-10 22:42:20 +11:00
Sebastian McKenzie
75e97d9f7e format scope default declarations better 2015-01-10 22:34:08 +11:00
Sebastian McKenzie
295faf185c remove unnecessary ensureBlock in let scoping transformer #434 2015-01-10 22:33:57 +11:00
Sebastian McKenzie
54b05f33f2 move super reference into closure 2015-01-10 22:26:51 +11:00
Sebastian McKenzie
1985146760 use Array.isArray instead of _.isArray 2015-01-10 22:26:37 +11:00
Sebastian McKenzie
13a52dd300 always use an IIFE for classes - fixes #435 2015-01-10 22:18:30 +11:00
Sebastian McKenzie
9d4bea70e6 Merge pull request #433 from gaearon/perf-traverse-refactor
Refactor traversal to avoid closures for perf
2015-01-10 22:06:08 +11:00
Dan Abramov
421906bcc1 Refactor traversal to avoid closures 2015-01-10 14:02:08 +03:00
Sebastian McKenzie
508b3531e5 Merge pull request #432 from gaearon/perf-stable
Replace _.each and for-in with for loop in hot paths
2015-01-10 21:49:37 +11:00
Sebastian McKenzie
c67c407cd0 v2.9.4 2015-01-10 16:28:02 +11:00
Sebastian McKenzie
aa552fea0d add 2.9.4 changelog 2015-01-10 16:25:39 +11:00
Sebastian McKenzie
9bbf109dc8 support UpdateExpressions as MemberExpression objects - fixes #440 2015-01-10 16:24:17 +11:00
Christopher Monsanto
393d52088a optional for-of transformer that puts arrays in fast path 2015-01-09 20:53:48 -05:00
Dan Abramov
5783973734 A few minor perf improvements 2015-01-09 22:00:07 +03:00
Dan Abramov
55e01afd0d Improve performance on hot paths by using for loops 2015-01-09 16:51:34 +03:00
Dan Abramov
1231dc6cef Replace _.each and for-in with for loop in hot paths 2015-01-09 16:00:53 +03:00
Sebastian McKenzie
b08f2061b5 fix destructuring tests 2015-01-09 21:43:24 +11:00
Sebastian McKenzie
1536d3de91 Revert "add base optional object observe transformer"
This reverts commit b619e843a9.
2015-01-09 21:18:55 +11:00
Sebastian McKenzie
fddacb1612 don't assign array expressions to a temp variable in destructuring #431 2015-01-09 21:18:51 +11:00
Sebastian McKenzie
9d1ff2b71b v2.9.3 2015-01-09 20:10:17 +11:00
Sebastian McKenzie
1c8d24f78c remove exportsWildcard helper in favor of defaults #430 2015-01-09 20:08:05 +11:00
Sebastian McKenzie
b619e843a9 add base optional object observe transformer 2015-01-09 19:57:21 +11:00
Sebastian McKenzie
e6a71c5849 move npm version up 2015-01-09 19:56:22 +11:00
Sebastian McKenzie
682668c219 v2.9.2 2015-01-09 19:51:44 +11:00
Sebastian McKenzie
dd64297838 add 2.9.2 changelog 2015-01-09 19:49:10 +11:00
Sebastian McKenzie
944a9d3908 pass exports to exportsWildcard - fixes #430 2015-01-09 19:48:11 +11:00
Sebastian McKenzie
d6922c9b75 v2.9.1 2015-01-09 19:34:28 +11:00
Sebastian McKenzie
fb0fcc7138 fix runtime generator breaking the helper inclusion loop - fixes #429 2015-01-09 19:31:43 +11:00
Sebastian McKenzie
89148e6029 Merge pull request #424 from 6to5/more-super-issues
Ensure more than one level of superclass works.
2015-01-09 08:35:40 +11:00
Brian Donovan
28d10b8eb4 Ensure more than one level of superclass works. 2015-01-08 13:33:02 -08:00
Sebastian McKenzie
3509990563 enable esnext tests by default 2015-01-09 07:23:17 +11:00
Sebastian McKenzie
c5960fb9f7 Merge pull request #408 from 6to5/fix-esnext-class-tests
[WIP] Fix super with getters and setters and with class prototypes changing.
2015-01-09 07:22:35 +11:00
Brian Donovan
07131576cf Use undefined instead of void 0. 2015-01-08 11:59:01 -08:00
Sebastian McKenzie
e75e778300 v2.9.0 2015-01-09 06:02:43 +11:00
Sebastian McKenzie
f6cb14c975 upgrade acorn-6to5 2015-01-09 06:00:19 +11:00
Brian Donovan
af1912ab7a Ensure constructors use the current super class.
This is an extension of 324a4a1b22.
2015-01-08 09:31:18 -08:00
Brian Donovan
8c478f29bc Use desc.writable instead of "writable" in desc as suggested by @stefanpenner. 2015-01-08 09:21:35 -08:00
Brian Donovan
5b4d6d7ba9 Replace superIdentifier with superProperty.
This also disallows the usage of bare `super` that is not part of a
member expression, call expression, or new expression.
2015-01-08 09:21:32 -08:00
Sebastian McKenzie
1776b072b0 v2.8.2 2015-01-09 00:08:42 +11:00
Sebastian McKenzie
726fad1b6c move publish-core into publish task 2015-01-09 00:06:21 +11:00
Sebastian McKenzie
23c16b0094 fix github url in no templates directory 2015-01-09 00:06:12 +11:00
Sebastian McKenzie
24f70ee4d0 add alternate core package - fixes #387 2015-01-08 23:31:03 +11:00
Sebastian McKenzie
fe9b0afd95 v2.8.1 2015-01-08 23:14:56 +11:00
Sebastian McKenzie
47695a8710 add 2.8.1 changelog 2015-01-08 23:12:36 +11:00
Sebastian McKenzie
e1c7584280 fix computed accessors on objects 2015-01-08 23:11:58 +11:00
Sebastian McKenzie
3e63e6cd4b v2.8.0 2015-01-08 22:49:23 +11:00
Sebastian McKenzie
ba643680e5 add 2.8.0 changelog 2015-01-08 22:46:16 +11:00
Sebastian McKenzie
611137c7d7 add umd strict and amd strict module formatter, also fix bug with wrong amd module constructor - fixes #415 2015-01-08 22:44:51 +11:00
Sebastian McKenzie
6240e5111f add modules common strict formatter - fixes #418 2015-01-08 22:29:24 +11:00
Brian Donovan
324a4a1b22 Fix super with getters and setters and with class prototypes changing. 2015-01-07 21:10:36 -08:00
Sebastian McKenzie
035f667a8f update notes with additional 3.0.0 breaking change and add a reference to the export default issue 2015-01-08 13:09:59 +11:00
Sebastian McKenzie
98985dd253 Merge pull request #416 from monsanto/indent
Add --indent option to change indent width
2015-01-08 12:43:41 +11:00
Christopher Monsanto
0a207903ce Add --indent option to change indent width 2015-01-07 18:27:58 -05:00
Sebastian McKenzie
90437d262b v2.7.4 2015-01-08 01:02:39 +11:00
Sebastian McKenzie
4aba7ec192 fix generation tests and add variable kind length 2015-01-08 01:00:32 +11:00
Sebastian McKenzie
a924c9c218 fix up declarations being split up and use a new algorithm to determine whether or not we should align them 2015-01-08 00:54:01 +11:00
Sebastian McKenzie
a2ed0ea9c5 only align variable declarations if at least one declarator has an init 2015-01-08 00:44:53 +11:00
Sebastian McKenzie
c5cd729c3d add 2.7.4 changelog 2015-01-08 00:40:43 +11:00
Sebastian McKenzie
b065d43a6d add custom level to buffer getIndent 2015-01-08 00:37:46 +11:00
Sebastian McKenzie
281003c7bd properly align multi declarator var declarations - fixes #413 2015-01-08 00:37:32 +11:00
Sebastian McKenzie
6650336c64 inherit assign from declaration in destructuring - fixes #413 2015-01-08 00:37:07 +11:00
Sebastian McKenzie
f904734695 rename prettyPrint to the more descriptive prettyCall 2015-01-08 00:36:40 +11:00
Sebastian McKenzie
0528560d81 v2.7.3 2015-01-07 22:55:09 +11:00
Sebastian McKenzie
4362ba93de fix verison number in changelog 2015-01-07 22:53:02 +11:00
Sebastian McKenzie
ca12e87370 remove unused variables 2015-01-07 22:50:24 +11:00
Sebastian McKenzie
ebaa735adc add 2.7.2 changelog 2015-01-07 22:49:21 +11:00
Sebastian McKenzie
62e406a6fe fix better jsx output 2015-01-07 22:47:37 +11:00
Sebastian McKenzie
0d45a8975c normalise module name paths 2015-01-07 22:43:05 +11:00
Sebastian McKenzie
8f64fe2332 add extends helper instead of using Object.assign 2015-01-07 22:42:26 +11:00
Sebastian McKenzie
a8a7587c1f better jsx output #369 2015-01-07 22:42:03 +11:00
Sebastian McKenzie
7736fa11f2 v2.7.2 2015-01-07 18:38:00 +11:00
Sebastian McKenzie
d203924541 disable module import reassignment tests 2015-01-07 18:35:36 +11:00
Sebastian McKenzie
cd23e500a1 add back specNoForInOfAssignment transformer 2015-01-07 18:30:48 +11:00
Sebastian McKenzie
bf24a0d6b5 temporarily disable module collission detections 2015-01-07 18:30:33 +11:00
Sebastian McKenzie
279d1affea v2.7.1 2015-01-07 14:15:16 +11:00
Sebastian McKenzie
2a1e012240 upgrade core-js 2015-01-07 14:12:21 +11:00
Sebastian McKenzie
a307a961a6 add istanbul to travis test 2015-01-07 14:10:47 +11:00
Sebastian McKenzie
fe5b1dc542 add reactCompat default to file opts 2015-01-07 14:10:37 +11:00
Sebastian McKenzie
f057347ae9 add version to browser and node build 2015-01-07 14:10:27 +11:00
Sebastian McKenzie
98f2287267 v2.7.0 2015-01-07 14:01:44 +11:00
Sebastian McKenzie
e60e0e0b0e disable timeout on test262 tests 2015-01-07 13:58:47 +11:00
Sebastian McKenzie
81fb8647b6 fixing linting errors 2015-01-07 13:58:41 +11:00
Sebastian McKenzie
e8387c7de5 add 2.7.0 changelog 2015-01-07 13:57:04 +11:00
Sebastian McKenzie
655196f3ce Merge pull request #410 from amasad/master
Add support for React pre v0.12 transform
2015-01-07 13:54:23 +11:00
Amjad Masad
eef371c3df Add support for React pre v0.12 transform
This uses an option `reactCompat` to emit code that works with React pre v0.12
2015-01-06 21:49:35 -05:00
Sebastian McKenzie
a3d21f02c6 just call mocha instead of test-simple 2015-01-07 13:44:05 +11:00
Sebastian McKenzie
ad4386c0ed make test-travis use test-simple and remove test-spec task 2015-01-07 13:33:31 +11:00
Sebastian McKenzie
3c82a61af1 better lazy error description test262 2015-01-07 13:33:19 +11:00
Sebastian McKenzie
3c154f9f6d better test262 test aliases 2015-01-07 13:19:53 +11:00
Sebastian McKenzie
22c972e85b add bootstrap to travis test 2015-01-07 13:14:45 +11:00
Sebastian McKenzie
6d7e14fb2b fix test262 loc check 2015-01-07 13:14:08 +11:00
Sebastian McKenzie
9287449372 add test-all make command 2015-01-07 13:11:25 +11:00
Sebastian McKenzie
44a35400f5 better output messages for missing vendors 2015-01-07 13:10:12 +11:00
Sebastian McKenzie
2305e2447f fix hasOwnProperty object lookup conflict 2015-01-07 13:08:20 +11:00
Sebastian McKenzie
c420d1ffc3 add test262 2015-01-07 13:08:06 +11:00
Sebastian McKenzie
fa42b076a7 remove benchmarks 2015-01-07 11:47:09 +11:00
Sebastian McKenzie
0d23c1cfdb add todo for module collisions 2015-01-07 09:56:17 +11:00
Sebastian McKenzie
0dafdd6969 better support for import collision checking - todo: check exports for collisions 2015-01-07 09:08:34 +11:00
Sebastian McKenzie
a9af8d39a2 add member expression reassign test 2015-01-07 08:00:55 +11:00
Sebastian McKenzie
1cc606d4d0 make import reassignment illegal @eventualbuddha 2015-01-07 07:58:04 +11:00
Sebastian McKenzie
2a09c0a5a5 fix import specifier and export specifier keys 2015-01-07 07:57:36 +11:00
Sebastian McKenzie
92359520cd Merge pull request #379 from webpro/amd-port-interop
Port AMD interop
2015-01-07 07:52:44 +11:00
Lars Kappert
50e5bd4680 Merge remote-tracking branch 'origin/master' into amd-port-interop
Conflicts:
	test/fixtures/transformation/es6-modules-amd/exports-default/expected.js
	test/fixtures/transformation/es6-modules-amd/overview/expected.js
	test/fixtures/transformation/es6-modules-umd/exports-default/expected.js
	test/fixtures/transformation/es6-modules-umd/overview/expected.js
2015-01-06 20:21:00 +01:00
Sebastian McKenzie
64ef26a937 v2.6.3 2015-01-07 00:33:13 +11:00
Sebastian McKenzie
bfd6ffe471 add 2.6.3 changelog 2015-01-07 00:31:37 +11:00
Sebastian McKenzie
8c1760bea2 fix faulty export default source detection - fixes #406 2015-01-07 00:30:41 +11:00
Sebastian McKenzie
bdb8f87480 move docs to 6to5.github.io repo 2015-01-06 22:43:36 +11:00
Sebastian McKenzie
7f6bc54920 capitalise faq description 2015-01-06 22:40:03 +11:00
Sebastian McKenzie
b6af2f826d es6-transpiler doesn't do sourcemaps - closes 6to5/6to5.github.io#9 2015-01-06 22:34:17 +11:00
Sebastian McKenzie
7455b6d9b9 update faq copytext 2015-01-06 22:33:23 +11:00
Sebastian McKenzie
0d2e876178 doc/faq: pretty -> quite 2015-01-06 22:29:06 +11:00
Sebastian McKenzie
57ce1b201d better faq answer 2015-01-06 22:27:41 +11:00
Sebastian McKenzie
5f56da457c remove old spec tests 2015-01-06 22:19:34 +11:00
Sebastian McKenzie
ed988dc2bb is t.isValidIdentifier instead of esutils.keyword.isKeywordES6 2015-01-06 22:17:32 +11:00
Sebastian McKenzie
2c471968ea remove specBlockHoistFunctions and specNoForInOfAssignment 2015-01-06 22:17:15 +11:00
Sebastian McKenzie
fd1a91bf9c add transformer docs 2015-01-06 22:16:48 +11:00
Sebastian McKenzie
9e7de5ad2e add faq docs 2015-01-06 22:16:43 +11:00
Sebastian McKenzie
06927288ba remove this shorthand example from playground 2015-01-06 22:15:44 +11:00
Sebastian McKenzie
9342aee6bd fix up documentation links 2015-01-06 22:15:01 +11:00
Sebastian McKenzie
4f5669f53c v2.6.2 2015-01-06 20:16:33 +11:00
Sebastian McKenzie
262fd995da add 2.6.2 changelog 2015-01-06 20:15:58 +11:00
Sebastian McKenzie
1696f77980 fix rest parameter keys when on functions with params 2015-01-06 20:15:10 +11:00
Lars Kappert
dfa51954b8 Use unaryExpression for typeof 2015-01-06 10:12:08 +01:00
Lars Kappert
216b8c2fd1 Revert "Add types.TypeOfExpression"
This reverts commit 520dd7e947.
2015-01-06 10:05:44 +01:00
Sebastian McKenzie
ca2cbb02f1 v2.6.1 2015-01-06 20:04:54 +11:00
Sebastian McKenzie
b72427cdd0 fix rest parameter tests 2015-01-06 20:04:04 +11:00
Sebastian McKenzie
44e9812ad4 fix rest parameter arguments key - closes #405 2015-01-06 20:02:56 +11:00
Sebastian McKenzie
b7814e5e24 add documentation on optional protoToAssign transformer 2015-01-06 19:58:19 +11:00
Sebastian McKenzie
ec67a83326 add 3.0.0 breaking notes 2015-01-06 18:55:03 +11:00
Sebastian McKenzie
6a560cea25 Merge pull request #404 from thejameskyle/docs
Add new documentation
2015-01-06 18:44:14 +11:00
James Kyle
46f9ed7d74 Add new documentation 2015-01-05 23:27:46 -08:00
Sebastian McKenzie
92366dfc7b move incorrect tag in bug fix to internal 2015-01-06 18:08:42 +11:00
Sebastian McKenzie
f520a46175 better ordering of 2.6.0 changelog groups 2015-01-06 18:08:01 +11:00
Sebastian McKenzie
88bec1196b group 2.6.0 changelog 2015-01-06 18:07:10 +11:00
Sebastian McKenzie
ff0098f3f3 add additional 2.6.0 note 2015-01-06 17:54:34 +11:00
Sebastian McKenzie
d01d7722f4 add dynamic imports note to changelog 2015-01-06 17:49:32 +11:00
Sebastian McKenzie
2845c1a894 v2.6.0 2015-01-06 17:44:13 +11:00
Sebastian McKenzie
ed51728aba remove unused variable 2015-01-06 17:43:26 +11:00
Sebastian McKenzie
4c8f4121f0 add 2.6.0 changelog 2015-01-06 17:41:57 +11:00
Sebastian McKenzie
b9e4340700 better use strict handling inside of modules 2015-01-06 17:32:00 +11:00
Sebastian McKenzie
4c9e39afa1 replace slice with a loop in rest parameters 2015-01-06 17:05:52 +11:00
Sebastian McKenzie
7439247095 change spread call expression context from null to undefined 2015-01-06 16:45:39 +11:00
Sebastian McKenzie
254424ced5 add npm install to make bootstrap 2015-01-06 12:17:39 +11:00
Sebastian McKenzie
4fc6823ece no ast check on api tests 2015-01-06 12:17:29 +11:00
Sebastian McKenzie
d531c8aa4c add expressionStatement around system module wildcard exports 2015-01-06 12:17:20 +11:00
Sebastian McKenzie
fc59f1ff46 add closure around let scoping return tests 2015-01-06 12:16:34 +11:00
Sebastian McKenzie
7c7cd6f9b8 use thisExpression instead of identifier("this") 2015-01-06 12:08:53 +11:00
Sebastian McKenzie
e3174d5a39 add esvalid validation to transformation tests 2015-01-06 12:08:40 +11:00
Sebastian McKenzie
2558a5e12e better wildcard imports and exports - fixes #224 2015-01-06 11:48:23 +11:00
Sebastian McKenzie
7526ae5486 fix register require in transformation helper 2015-01-06 10:45:10 +11:00
Sebastian McKenzie
811fcf7e1b upgrade acorn-6to5 2015-01-06 10:44:13 +11:00
Sebastian McKenzie
62818d468e Merge branch 'traceur' 2015-01-06 10:40:42 +11:00
Sebastian McKenzie
a88bd69e30 justify disabled traceur tests 2015-01-06 10:39:56 +11:00
Sebastian McKenzie
8164bb17ce don't use interopRequire if noInteropRequire is set for default module formatter 2015-01-06 10:39:47 +11:00
Sebastian McKenzie
3ec97fc86d only check if a function is a declaration in common module hoisting 2015-01-06 10:39:18 +11:00
Sebastian McKenzie
b38a00d70e add destructuring defaults #230 2015-01-06 10:38:55 +11:00
Sebastian McKenzie
1b85607d7d add ability to assert just an error instead of an error message in tests 2015-01-06 10:38:28 +11:00
Sebastian McKenzie
fd6704ac25 update optional bluebird coroutine test to reflect new addImport 2015-01-06 10:38:11 +11:00
Sebastian McKenzie
9c527f9d9c make regenerator test use the ALL environment var 2015-01-06 10:37:40 +11:00
Sebastian McKenzie
6cf318d60f add updated interop modules to tests 2015-01-06 10:37:11 +11:00
Sebastian McKenzie
64f9f4dff5 only check declarations in let scoping reference check 2015-01-06 10:36:49 +11:00
Lars Kappert
abc90778e8 Test for exportIdentifier before building exportDeclaration 2015-01-05 21:17:12 +01:00
Lars Kappert
56f1683f06 Also test for "module" identifier if needed 2015-01-05 14:57:52 +01:00
Lars Kappert
520dd7e947 Add types.TypeOfExpression 2015-01-05 14:51:50 +01:00
Sebastian McKenzie
145413dbfd Merge pull request #396 from caspervonb/master
Add .es to register extensions
2015-01-05 20:55:36 +11:00
Casper Beyer
8c58e0f14c Add .es extension to util.canCompile 2015-01-05 16:43:00 +08:00
Casper Beyer
d62914e41c Amend require documentation to include '.es' extension 2015-01-05 16:35:01 +08:00
Casper Beyer
85db67edf4 Add .es to register extensions
.es is a known ecmascript file extension and should be handled by the loader
See RFC 4329, 8.2.
2015-01-05 16:10:41 +08:00
Sebastian McKenzie
348ad2e25c better dynamic imports - fixes #393 2015-01-05 12:40:12 +11:00
Sebastian McKenzie
5ce8ee6c2b add inheritance type check to tests 2015-01-05 12:39:46 +11:00
Sebastian McKenzie
98ad5d42e1 add optional typeof symbol test options 2015-01-05 12:39:12 +11:00
Sebastian McKenzie
b12734abd6 only run traceur and esnext on ALL_6TO5_TESTS environment variable 2015-01-05 12:39:01 +11:00
Sebastian McKenzie
f34907d518 add make bootstrap 2015-01-05 12:38:34 +11:00
Sebastian McKenzie
3bd6ec20c1 remove regenerator tests and git submodule regenerator 2015-01-05 12:38:26 +11:00
Sebastian McKenzie
b8d4479333 fix linting error 2015-01-05 10:24:23 +11:00
Sebastian McKenzie
ed833be34a force computed property on number literal property 2015-01-05 10:23:30 +11:00
Sebastian McKenzie
16024242b0 add type check to inherits template 2015-01-05 10:23:06 +11:00
Sebastian McKenzie
77add8704e alias hidden properties onto it's transformer instance 2015-01-05 10:22:27 +11:00
Sebastian McKenzie
9fd1ec0596 more reliable toValidIdentifier checking, including reserved words 2015-01-05 10:22:06 +11:00
Sebastian McKenzie
90ce4e93ed don't break let reference checking on loops in let scoping 2015-01-05 10:21:50 +11:00
Sebastian McKenzie
cf7b9234c1 make typeofSymbol transformer optional 2015-01-05 10:21:32 +11:00
Sebastian McKenzie
f85eeeb93c fix blockHoist and declarations transformers unneccesarily unshifting use strict statements 2015-01-05 10:21:24 +11:00
Sebastian McKenzie
45d0eea842 fix native type constructor spread - closes #373 2015-01-05 10:20:36 +11:00
Sebastian McKenzie
b0c9d3daa4 Merge branch 'master' into traceur 2015-01-05 10:19:41 +11:00
Sebastian McKenzie
3f152bfc3f upgrade core-js from 0.3.3 to 0.40 and regenerator from 0.8.2 to 0.8.3 2015-01-05 10:19:01 +11:00
Sebastian McKenzie
ffbfa5281b move esnext tests into their own fixtures folder 2015-01-05 10:18:42 +11:00
Sebastian McKenzie
7f87ca0d43 move traceur test suite to a git submodule 2015-01-05 10:18:30 +11:00
Sebastian McKenzie
a8fad4b958 add traceur gits ubmodule 2015-01-05 10:17:23 +11:00
Sebastian McKenzie
945ea145e7 remove esnext from differences table 2015-01-05 10:17:09 +11:00
Sebastian McKenzie
4f10bcedda Merge pull request #392 from thejameskyle/changlog-tags
Add tags to top of changelog
2015-01-05 10:15:36 +11:00
James Kyle
601b3d584f Add tags to top of changelog 2015-01-04 14:41:17 -08:00
Sebastian McKenzie
42878f85fe Merge pull request #391 from thejameskyle/extend-null-check
Make parent constructor check explicit when extending from null
2015-01-05 09:14:33 +11:00
James Kyle
3b4c9c415e Make parent constructor check explicit when extending from null - fixes #386 2015-01-04 13:45:13 -08:00
Sebastian McKenzie
7345899343 Merge pull request #389 from caspervonb/master
Make build target the default target
2015-01-05 03:01:32 +11:00
Casper Beyer
316102ab14 Make build target the default target
The top target is implicitly the default target, having this as *clean*
is rather unothodox, usually it would be the executable or library target.
2015-01-04 23:53:28 +08:00
Sebastian McKenzie
4c2b85deec better NewExpression paren insertion 2015-01-05 01:06:41 +11:00
Sebastian McKenzie
108784db20 add typeof and interop-require-wildcard helpers 2015-01-05 01:06:28 +11:00
Sebastian McKenzie
a3b30bae7a better traceur test api 2015-01-05 01:06:16 +11:00
Sebastian McKenzie
6420954c53 remove traceur tests 2015-01-05 01:06:07 +11:00
Sebastian McKenzie
a6fda01fa0 Merge branch 'master' into traceur
Conflicts:
	package.json
2015-01-05 00:53:59 +11:00
Sebastian McKenzie
655cc8fcb9 v2.5.0 2015-01-05 00:17:35 +11:00
Sebastian McKenzie
97a504bbef 2.5.0 changelog 2015-01-05 00:16:39 +11:00
Sebastian McKenzie
bf3443962b disable failing esnext tests 2015-01-05 00:15:46 +11:00
Sebastian McKenzie
a4394494ef remove noDuplicateProperties test 2015-01-05 00:15:37 +11:00
Sebastian McKenzie
2b333de81f add basic support for assignment patterns 2015-01-05 00:07:50 +11:00
Sebastian McKenzie
b81f824b7e normalise wildcard import into a default object 2015-01-05 00:07:22 +11:00
Sebastian McKenzie
9bfb8c440a add optional typeof symbol transformer 2015-01-05 00:06:57 +11:00
Sebastian McKenzie
9a6c13a6a4 Merge branch 'esnext'
Conflicts:
	package.json
2015-01-05 00:03:53 +11:00
Lars Kappert
17ce21509d Move exports identifier from UMD template to commonArgs 2015-01-04 12:59:25 +01:00
Lars Kappert
a4c8895dc3 Conditionally pass "module" arg to AMD/UMD factory 2015-01-04 12:58:52 +01:00
Lars Kappert
af4009694a Simplify AMD export declaration fn to re-use CommonJS one 2015-01-04 12:53:17 +01:00
Lars Kappert
941a8cc5ea Remove unused templates 2015-01-04 12:51:34 +01:00
Lars Kappert
359c4e8786 Use module.exports in expectations 2015-01-04 12:51:19 +01:00
Lars Kappert
7ac98c1532 Add custom export declaration fn for AMD modules 2015-01-04 11:46:28 +01:00
Lars Kappert
61c3e0a3de Modify test expectations 2015-01-04 11:45:09 +01:00
Sebastian McKenzie
ac8d77fb45 upgrade acorn-6to5 2015-01-04 21:14:59 +11:00
Sebastian McKenzie
09c88238e1 upgrade acorn-6to5 2015-01-04 20:37:14 +11:00
Sebastian McKenzie
103b619364 remove arity traceur test check 2015-01-04 20:36:35 +11:00
Sebastian McKenzie
c8a404fb72 Merge branch 'master' into traceur 2015-01-04 20:26:41 +11:00
Sebastian McKenzie
05669204dd fix generation expression comment tests 2015-01-04 20:26:07 +11:00
Sebastian McKenzie
38e6abec02 Merge branch 'master' into traceur 2015-01-04 20:23:37 +11:00
Sebastian McKenzie
1abef2c1e2 more intelligent parens wrapping of no line terminator expressions - fixes #376, reference #349 2015-01-04 20:22:24 +11:00
Sebastian McKenzie
cc6678361a comment out arity check 2015-01-04 20:20:03 +11:00
Sebastian McKenzie
2587694d44 Merge branch 'master' into traceur
Conflicts:
	package.json
2015-01-04 19:52:52 +11:00
Sebastian McKenzie
f16079c83f v2.4.10 2015-01-04 19:51:52 +11:00
Sebastian McKenzie
b7132f3529 upgrade acorn-6to5 2015-01-04 19:50:54 +11:00
Sebastian McKenzie
ed41f1652e v2.4.9 2015-01-04 19:49:54 +11:00
Sebastian McKenzie
c522bdb4b9 upgrade acorn-6to5 2015-01-04 19:48:47 +11:00
Sebastian McKenzie
005362a615 update tests to 2.4.9 fixes 2015-01-04 19:48:14 +11:00
Sebastian McKenzie
88e542634f fix linting errors 2015-01-04 19:45:18 +11:00
Sebastian McKenzie
c8304138eb add 2.4.9 changelog 2015-01-04 19:44:04 +11:00
Sebastian McKenzie
35608d497e make comprehension for-of loop a let 2015-01-04 19:42:25 +11:00
Sebastian McKenzie
b5a78355c4 add initProps to single call expression in computed property names - fixes #378 2015-01-04 19:42:16 +11:00
Sebastian McKenzie
223e28ba8f upgrade acorn-6to5 2015-01-04 19:40:51 +11:00
Sebastian McKenzie
6a35bdb42b add traceur test suite 2015-01-04 19:40:09 +11:00
Sebastian McKenzie
18813f26bb Merge branch 'master' into esnext 2015-01-04 15:32:41 +11:00
Sebastian McKenzie
ccabb91f69 add back deleted object-define-properties-closure template 2015-01-04 15:30:59 +11:00
Sebastian McKenzie
35fda899a8 remove spec-no-duplicate-properties transformer 2015-01-04 15:30:40 +11:00
Sebastian McKenzie
e2f01d41a3 fix api test 2015-01-04 13:42:16 +11:00
Sebastian McKenzie
931a80f5b3 rename "declarations" to the more sane "helpers" 2015-01-04 13:34:56 +11:00
Sebastian McKenzie
9a2fd22e91 add newline to esnext super change proto test 2015-01-04 08:35:28 +11:00
Sebastian McKenzie
cbcad22d81 update default parameters transformer to use var a = arguments[0] === undefined ? 1 : arguments[0]; instead of if (a === undefined) a = 1; 2015-01-04 08:35:14 +11:00
Sebastian McKenzie
4d5861cfdc remove invalid strict-mode es6 next class test 2015-01-04 08:34:25 +11:00
Sebastian McKenzie
c578db7ae8 upgrade acorn-6to5 2015-01-04 08:34:14 +11:00
Sebastian McKenzie
dea73b7186 change code assertion to 6to5 output 2015-01-04 08:01:29 +11:00
Sebastian McKenzie
4506e39cf5 add toString key to instance keys as methods are enumerable 2015-01-04 08:01:08 +11:00
Sebastian McKenzie
7ab6df093b use Symbol.iterator instead of @@iterator 2015-01-04 08:00:49 +11:00
Sebastian McKenzie
22eeae1a93 use assert instead of expect 2015-01-04 08:00:40 +11:00
Sebastian McKenzie
a645ae0583 contextLiteral fallback in es6-spread transformer 2015-01-04 07:59:56 +11:00
Sebastian McKenzie
7f4efecb7d support for CallExpression in Scope.prototype.generateUidBasedOnNode 2015-01-04 07:59:43 +11:00
Sebastian McKenzie
0c0f40d14a only automatically assume test is exec if it has a js extension 2015-01-04 07:58:49 +11:00
Sebastian McKenzie
cb54c11d84 add esnext tests 2015-01-04 07:39:11 +11:00
Sebastian McKenzie
55123be7d7 use t.toComputedKey in computed property name transformer 2015-01-04 07:38:49 +11:00
Sebastian McKenzie
324a0b408a add optional protoToAssign transformer 2015-01-04 07:38:36 +11:00
Sebastian McKenzie
8b2788e930 fix es6-property-method-assignment tests name 2015-01-03 21:48:22 +11:00
Sebastian McKenzie
d945379b5b remove isDynamic checks and always execute those expressions **once** 2015-01-03 21:48:06 +11:00
Sebastian McKenzie
5a622ac9c7 update traversal api in optional-bluebird-coroutines transformer 2015-01-03 20:11:21 +11:00
Sebastian McKenzie
0e9eac610b rename es5-property-methods-assignment to es6-property-method-assignment and add function ids to object methods and remap them if they contain a reference to themselves - fixes #308 2015-01-03 20:11:00 +11:00
Sebastian McKenzie
1de94a2705 fix code styling on es6 arrow functions nested test 2015-01-03 20:09:14 +11:00
Sebastian McKenzie
71132c3538 add types.toComputedPropertyKey helper 2015-01-03 20:08:39 +11:00
Sebastian McKenzie
d20ab0eb05 rename traverse stop method to skip and add a stop method that actually breaks the current traversal 2015-01-03 20:08:31 +11:00
Sebastian McKenzie
51f7e75d2e fix formatting of code of conduct paragraph in CONTRIBUTING.md 2015-01-03 11:17:55 +11:00
Sebastian McKenzie
ab4b5ce994 Merge pull request #309 from antn/add-code-of-conduct
add code of conduct
2015-01-03 11:16:05 +11:00
Sebastian McKenzie
f0d50ca9a2 add browser.js to package.json 2015-01-03 08:19:18 +11:00
Sebastian McKenzie
5168355a64 fix differences copytext grammar 2015-01-03 08:19:11 +11:00
Sebastian McKenzie
2f209a9e4e v2.4.8 2015-01-03 07:37:15 +11:00
Sebastian McKenzie
20695eaba6 add 2.4.8 changelog 2015-01-03 07:36:34 +11:00
Sebastian McKenzie
340a4dd1f2 fix code styling #370 2015-01-03 07:35:45 +11:00
Sebastian McKenzie
ef1c7a5c69 Merge pull request #370 from hughsk/browserify-register
Make require("6to5/register") work with browserify
2015-01-03 07:33:15 +11:00
Hugh Kennedy
5a01beaa1f Make require("6to5/register") work with browserify
Previously, you'd have to create a separate file for using 6to5
with both node and browserify, as the latter wasn't able to properly
handle loading 6to5's dependency tree and would crash on attempting
to do so.

This change instructs browserify to use "register-browser.js" in place
of "register.js". "register-browser.js" still loads the 6to5 polyfill,
but is otherwise ignored.
2015-01-02 21:30:40 +01:00
Sebastian McKenzie
5a5bf7b4ac v2.4.7 2015-01-03 06:10:52 +11:00
Sebastian McKenzie
88ee15bb4d upgrade acorn-6to5 #367 2015-01-03 06:10:10 +11:00
Sebastian McKenzie
3e51b65095 v2.4.6 2015-01-03 05:29:28 +11:00
Sebastian McKenzie
371df9ad09 add 2.4.6 changelog 2015-01-03 05:25:48 +11:00
Sebastian McKenzie
d43d5ff409 move coreAliasing and undefinedToVoid transformers down 2015-01-03 05:24:43 +11:00
Sebastian McKenzie
c2c8e52430 add modules caveat - fixes #368 2015-01-03 05:23:12 +11:00
Sebastian McKenzie
57c0ebc5f4 v2.4.5 2015-01-02 22:22:52 +11:00
Sebastian McKenzie
339bf82481 avoid printing comments if they've already been output - fixes #365 2015-01-02 22:22:01 +11:00
Sebastian McKenzie
d981c06444 v2.4.4 2015-01-02 19:24:56 +11:00
Sebastian McKenzie
8269e1488b fix incorrect scripts reference in browser 2015-01-02 19:23:50 +11:00
Sebastian McKenzie
ddda7a020f add 2.4.4 changelog 2015-01-02 19:22:03 +11:00
Sebastian McKenzie
7e9340864a lowercase object rest/spread feature name in doc/index 2015-01-02 19:20:14 +11:00
Sebastian McKenzie
5ec19f23c3 add test skeleton for types and add jsdoc comments to types 2015-01-02 19:20:05 +11:00
Sebastian McKenzie
ba48b66458 add types.appendToMemberExpression and types.prependToMemberExpression helpers 2015-01-02 16:46:58 +11:00
Sebastian McKenzie
6e8c73f65f fix incorrect member expression properties 2015-01-02 16:39:35 +11:00
Sebastian McKenzie
b34fcb0cd9 split up method binding and add description for memoization assignment operator 2015-01-02 14:33:51 +11:00
Sebastian McKenzie
ff7129f1aa remove ES5 methods from caveats and change IE classes note to IE 10 and below 2015-01-02 14:33:38 +11:00
Sebastian McKenzie
fbabd193a4 add module type to 6to5 browser 2015-01-02 14:33:18 +11:00
Sebastian McKenzie
876d69798c v2.4.3 2015-01-02 05:19:42 +11:00
Sebastian McKenzie
1a963ddc06 remove unused variable 2015-01-02 05:19:00 +11:00
Sebastian McKenzie
beb5acea6b better addImport with good hoisting etc 2015-01-02 05:18:03 +11:00
Sebastian McKenzie
6a290f233e add 2.4.3 changelog 2015-01-02 05:01:18 +11:00
Sebastian McKenzie
74563d88ed upgrade acorn-6to5 2015-01-02 05:00:23 +11:00
Sebastian McKenzie
a18177026c add support for statements in asyncToGenerator and bluebirdCoroutines transformers 2015-01-02 04:58:59 +11:00
Sebastian McKenzie
a813341433 v2.4.2 2015-01-02 04:25:44 +11:00
Sebastian McKenzie
4968de9803 fix linting errors 2015-01-02 04:24:56 +11:00
Sebastian McKenzie
0de2d33e8d add 2.4.2 changelog 2015-01-02 04:24:19 +11:00
Sebastian McKenzie
6f81ddd0d5 upgrade acorn-6to5 2015-01-02 04:24:19 +11:00
Sebastian McKenzie
6b83055b12 alias flat references in coreAliasing transformer 2015-01-02 04:24:19 +11:00
Sebastian McKenzie
080c23d5ed Merge pull request #360 from mquandalle/patch-1
Extend the license to the new year
2015-01-02 04:06:22 +11:00
Sebastian McKenzie
293bec58d7 remove appveyor badge 2015-01-02 03:53:33 +11:00
Sebastian McKenzie
93ceafc732 better uid names 2015-01-02 03:53:28 +11:00
Sebastian McKenzie
b2bac04b72 update object getter memoization docs to reflect new changes 2015-01-02 03:04:26 +11:00
Sebastian McKenzie
e549c37ca1 v2.4.1 2015-01-02 03:00:33 +11:00
Sebastian McKenzie
02512da38d fix generation tests with parenthesized expressions and trailing comments 2015-01-02 02:59:53 +11:00
Sebastian McKenzie
abe9c4fd30 add 2.4.1 changelog 2015-01-02 02:57:16 +11:00
Sebastian McKenzie
af21c52cc6 set generator on correct node #252 2015-01-02 02:55:55 +11:00
Sebastian McKenzie
706626f79a better whitespace handling of parenthesized comments due to trailing comments 2015-01-02 02:55:40 +11:00
Sebastian McKenzie
b8dd421073 v2.4.0 2015-01-02 02:26:14 +11:00
Sebastian McKenzie
5453c466d6 remove unused variable 2015-01-02 02:24:49 +11:00
Sebastian McKenzie
0cfb2e76b8 add 2.4.0 changelog 2015-01-02 02:24:01 +11:00
Sebastian McKenzie
ba67f57c1e use simple loops always in array comprehensions, support yield inside of array comprehensions - closes #325, fixes #252 2015-01-02 02:14:36 +11:00
Sebastian McKenzie
f1a178f8f9 compact body nodes in traversal 2015-01-02 01:59:49 +11:00
Sebastian McKenzie
b1d1909c64 forced closure on super classes - fixes #339 2015-01-02 01:59:42 +11:00
Sebastian McKenzie
9529f93690 move useStrict transformer to after _moduleFormatter 2015-01-02 01:58:56 +11:00
Sebastian McKenzie
925b1f7600 add optional asyncToGenerator transformer - closes #321 2015-01-02 01:31:14 +11:00
Sebastian McKenzie
40f8bc0a65 add optional bluebird coroutine transformer - @phpnode 2015-01-02 01:20:28 +11:00
Sebastian McKenzie
3a0dbabf5a v2.3.2 2015-01-02 01:04:43 +11:00
Sebastian McKenzie
383912c11b more reliable t.isExpression 2015-01-02 01:04:04 +11:00
Sebastian McKenzie
470c8fced0 add parens on expressions with trailing comments - fixes #349 2015-01-02 00:57:48 +11:00
Sebastian McKenzie
e3dc2355e8 v2.3.1 2015-01-02 00:46:14 +11:00
Sebastian McKenzie
9733cb58c9 remove unused variable 2015-01-02 00:45:26 +11:00
Sebastian McKenzie
edd5a3878a fix redefined variables 2015-01-02 00:45:01 +11:00
Sebastian McKenzie
78d2c4fa8d 2.3.1 changelog 2015-01-02 00:43:54 +11:00
Sebastian McKenzie
e268dc6138 return Object.defineProperties without a closure in property methods assignment unless it's really necessary 2015-01-02 00:42:28 +11:00
Sebastian McKenzie
5b6c0fcacd add whitespace after array and object expressions 2015-01-02 00:41:58 +11:00
Sebastian McKenzie
777f2be14e add undefinedToVoid optional transformer 2015-01-02 00:41:33 +11:00
Sebastian McKenzie
41d60a85e9 simplify define property by using a helper in playground object getter memoization 2015-01-02 00:40:47 +11:00
Sebastian McKenzie
800c350db6 use Object.defineProperty on computed properties - fixes #357 2015-01-02 00:40:37 +11:00
Sebastian McKenzie
7b5b8ab6ed add undefinedToVoid optional transformer 2015-01-02 00:25:17 +11:00
Maxime Quandalle
c7a02ca289 Extend the license to the new year 2015-01-01 13:03:38 +01:00
Sebastian McKenzie
52e23473ed allow export default non-functions mapping to module.exports in common module formatter - fixes #356 2015-01-01 22:58:46 +11:00
Sebastian McKenzie
af412cae28 v2.3.0 2015-01-01 22:40:44 +11:00
Sebastian McKenzie
4c2c96366f add 2.3.0 changelog 2015-01-01 22:40:02 +11:00
Sebastian McKenzie
de427936a6 remove invalid lval super classes in generation tests 2015-01-01 22:38:01 +11:00
Sebastian McKenzie
9d6850d576 fix linting errors 2015-01-01 22:35:08 +11:00
Sebastian McKenzie
20a0280a52 add support for optional transformers 2015-01-01 22:35:02 +11:00
Sebastian McKenzie
64b7d6fa93 more verbose unknown node error message in code generator 2015-01-01 22:34:51 +11:00
Sebastian McKenzie
d7ca7ebbb9 remove Transformer exposure 2015-01-01 22:34:29 +11:00
Sebastian McKenzie
9680730e24 remove forced closure on super classes 2015-01-01 22:34:22 +11:00
Sebastian McKenzie
07667d80ff clean up traverse 2015-01-01 22:34:05 +11:00
Sebastian McKenzie
9a633ebd9c update scope to use new traversal api 2015-01-01 22:33:40 +11:00
Sebastian McKenzie
fac4a61245 use Makefile command shortcuts 2015-01-01 22:33:30 +11:00
Sebastian McKenzie
0ebc073762 update traversal api, removing return false; in favor of this.stop(); 2015-01-01 22:33:17 +11:00
Sebastian McKenzie
860432cdfd hoist export default to very top 2015-01-01 22:31:59 +11:00
Sebastian McKenzie
c408432445 add support for circular references and hoist all variable declarations 2015-01-01 22:30:28 +11:00
Sebastian McKenzie
27e9f9d616 remove invalid lval super class test 2015-01-01 22:29:57 +11:00
Sebastian McKenzie
94a11cd602 add optional core aliasing transformer 2015-01-01 20:02:20 +11:00
Sebastian McKenzie
ab6e424cac make experimental transformers declare that they're experimental 2015-01-01 20:01:24 +11:00
Sebastian McKenzie
9ee7b07cbf add corejs aliasing transformer and support for optional transformers 2015-01-01 20:01:09 +11:00
Sebastian McKenzie
31fff092b6 upgrade acorn-6to5 - fixes #358 and #353 2014-12-31 11:56:04 +11:00
Sebastian McKenzie
e847ac11af add object-getter-memoization template 2014-12-31 11:54:51 +11:00
Sebastian McKenzie
aee1ca45b0 add isFalsyExpression check to superName and make classes a closure if they're inheriting 2014-12-31 11:54:39 +11:00
Sebastian McKenzie
46632e1a97 better object getter memoization - closes #353 2014-12-31 11:54:13 +11:00
Sebastian McKenzie
961e0b9b6b reenable system modules tests 2014-12-31 11:51:52 +11:00
Sebastian McKenzie
afdde8b3a7 v2.2.0 2014-12-29 12:48:45 +11:00
Sebastian McKenzie
918ddb4124 disable system tests temporairly 2014-12-29 11:16:47 +11:00
Sebastian McKenzie
18739ad78b remove unused variable 2014-12-29 11:15:24 +11:00
Sebastian McKenzie
74a84e2473 fix duplicate comments being output, breaking code 2014-12-29 11:13:50 +11:00
Sebastian McKenzie
52ffc65a06 make system module formatter modules anonymous by default - fixes #347 2014-12-29 01:55:30 +11:00
Sebastian McKenzie
d4fbfbbe47 Merge pull request #348 from guybedford/system
System test adjustments
2014-12-29 01:51:16 +11:00
Sebastian McKenzie
781467d423 v2.1.0 2014-12-29 01:41:05 +11:00
Sebastian McKenzie
44f5b7d013 fix case statement newline in code generator test 2014-12-29 01:39:04 +11:00
Sebastian McKenzie
dcf7f0b70b fix newline in case statement test 2014-12-29 01:37:19 +11:00
Sebastian McKenzie
03efd69998 check if node exists before inheriting comments to it 2014-12-29 01:37:12 +11:00
Sebastian McKenzie
213003a007 fix new templates path in dotfiles 2014-12-29 01:34:49 +11:00
Sebastian McKenzie
b0503f2efe add 2.1.0 changelog 2014-12-29 01:33:58 +11:00
Sebastian McKenzie
c8cf7ff286 better blacklist tests and expose register cache - closes #344 2014-12-29 01:31:26 +11:00
Sebastian McKenzie
ceb32816d7 fix destructuring in switch/case statements - closes #346 2014-12-29 01:26:51 +11:00
Sebastian McKenzie
32b94899a6 update runtime script to runtime generator 2014-12-29 01:26:21 +11:00
Sebastian McKenzie
d951082b09 move replacement node comment inheritance to traverse replacement 2014-12-29 01:26:11 +11:00
Sebastian McKenzie
b49f6e33d6 fix newline on case statement 2014-12-29 01:25:56 +11:00
Sebastian McKenzie
c5fa6425a5 explicit canRun for hidden transformers 2014-12-29 01:25:15 +11:00
Sebastian McKenzie
70d896d609 rename runtime script to runtime-generator 2014-12-29 01:24:57 +11:00
Sebastian McKenzie
e00fa8c9b1 update core-js 2014-12-29 01:24:41 +11:00
Sebastian McKenzie
13933bc9b8 move templates folder into transformation folder 2014-12-29 01:24:35 +11:00
guybedford
295bab544b re-exporting in setters 2014-12-28 14:43:56 +02:00
guybedford
cfe05ca10d exported variable declarations hoist along with functions 2014-12-28 14:41:32 +02:00
guybedford
da72182219 make modules anonymous 2014-12-28 14:38:52 +02:00
Sebastian McKenzie
005f5b2174 v2.0.4 2014-12-28 11:06:04 +11:00
Sebastian McKenzie
8551c94fa0 fix linting errors 2014-12-28 11:05:27 +11:00
Sebastian McKenzie
c509d06bc2 vaoid being greedy when destructuring array iterables 2014-12-28 11:04:00 +11:00
Sebastian McKenzie
f21743012b v2.0.3 2014-12-28 09:37:32 +11:00
Sebastian McKenzie
22dc33f93c remove unused variable 2014-12-28 09:36:29 +11:00
Sebastian McKenzie
6df6652629 better circular references in amd/umd/system module formatter 2014-12-28 09:35:47 +11:00
Sebastian McKenzie
4942ba6dd7 v2.0.2 2014-12-28 01:14:54 +11:00
Sebastian McKenzie
b63bd8cba0 remove interopRequire from system module formatter 2014-12-28 01:14:08 +11:00
Sebastian McKenzie
cd1eb11171 Merge branch 'master' of github.com:6to5/6to5 2014-12-28 01:10:00 +11:00
Sebastian McKenzie
6e1c12fd78 inherit comments in for-of transformer 2014-12-28 01:09:48 +11:00
Sebastian McKenzie
a4ea71b85d Merge pull request #337 from guybedford/master
Correct system format base support tests
2014-12-28 01:03:35 +11:00
Sebastian McKenzie
1df69bdbeb v2.0.1 2014-12-28 01:02:29 +11:00
Sebastian McKenzie
84c2766756 remove unused variable 2014-12-28 01:01:52 +11:00
Sebastian McKenzie
1f000ac83d add 2.0.1 changelog 2014-12-28 01:01:18 +11:00
Sebastian McKenzie
322aa246b8 fix automatic closure on private declarations - fixes #335 2014-12-28 01:01:13 +11:00
Sebastian McKenzie
601bbb86cd remap UpdateExpression in module exports - closes #334 2014-12-28 01:00:53 +11:00
guybedford
5c39685650 correct system format base support tests 2014-12-27 15:59:52 +02:00
Sebastian McKenzie
e6ac5eccd0 v2.0.0 2014-12-27 23:56:34 +11:00
Sebastian McKenzie
c4c9f7984f fix linting errors 2014-12-27 23:55:52 +11:00
Sebastian McKenzie
8d472a14be Merge pull request #319 from 6to5/2.0.0
2.0.0
2014-12-27 21:36:07 +11:00
Sebastian McKenzie
4fd007948c fix system modules exports from test 2014-12-27 21:34:20 +11:00
Sebastian McKenzie
f4e516e8ce fix tests as per acorn upgrade 2014-12-27 21:29:24 +11:00
Sebastian McKenzie
7fcd8ea642 upgrade acorn 2014-12-27 21:24:34 +11:00
Sebastian McKenzie
add0a7d5fe better ClassDeclarations in expression contexts 2014-12-27 21:24:29 +11:00
Sebastian McKenzie
e9445c9277 move spec transformers to bottom 2014-12-27 21:24:02 +11:00
Sebastian McKenzie
df66fa0a7f heavily simplify system module formatter and share common code between them all 2014-12-27 21:23:53 +11:00
Sebastian McKenzie
0a85211e8e fix traverse blacklist test 2014-12-27 21:22:34 +11:00
Sebastian McKenzie
ac8fc24fdb fix traverse test to reflect the new api 2014-12-27 19:16:06 +11:00
Sebastian McKenzie
71c4a29a78 update 2.0.0 changelog 2014-12-27 19:13:05 +11:00
Sebastian McKenzie
08dde22939 better ClassDeclaration contextual transformation 2014-12-27 19:12:56 +11:00
Sebastian McKenzie
d3ea0fe84f always add additional newline on the last node 2014-12-27 19:12:43 +11:00
Sebastian McKenzie
22851cd1ac clean up system module formatter 2014-12-27 19:12:31 +11:00
Sebastian McKenzie
987dc0692f Merge branch 'feat-system-module-rewrite' of https://github.com/douglasduteil/6to5 into 2.0.0
Conflicts:
	lib/6to5/transformation/modules/system.js
	test/fixtures/transformation/es6-modules-system/exports-from/expected.js
2014-12-27 17:05:21 +11:00
Sebastian McKenzie
560d60e3e7 fix formatting on react display name object declaration actual test 2014-12-27 17:02:00 +11:00
Sebastian McKenzie
e96d02c972 make traversal code simpler 2014-12-27 17:01:47 +11:00
Sebastian McKenzie
13a2d469a3 update core-js 2014-12-27 17:01:06 +11:00
Sebastian McKenzie
0b232ed228 add api opts.ast === false test 2014-12-27 17:00:58 +11:00
Sebastian McKenzie
9053e0dedf ignore bin tests under instanbul 2014-12-27 17:00:46 +11:00
Sebastian McKenzie
873e820210 add unknown module formatter test 2014-12-27 17:00:38 +11:00
Sebastian McKenzie
27bb08eadf add amd module name test 2014-12-27 17:00:27 +11:00
Sebastian McKenzie
bea903c69f add modules remap tests 2014-12-27 17:00:20 +11:00
Sebastian McKenzie
198a9c6ead nicer local exports remapping in default module formatter 2014-12-27 16:59:57 +11:00
Sebastian McKenzie
9c92679053 fix polyfill regenerator runtime path 2014-12-27 16:59:39 +11:00
Sebastian McKenzie
87d2bdadeb remove user transformers 2014-12-27 16:59:19 +11:00
Sebastian McKenzie
fa71f2a7f9 Merge branch 'core-js' into 2.0.0
Conflicts:
	lib/6to5/polyfill.js
2014-12-25 14:27:29 +11:00
Sebastian McKenzie
66e7134335 revert strict equals after #329 2014-12-23 16:11:15 +11:00
Sebastian McKenzie
99a1cf08f9 Merge pull request #329 from chicoxyzzy/fix_jshint_errors_2.0.0
fix jsHint errors in branch 2.0.0
2014-12-23 16:08:34 +11:00
chico
5de9c22452 fix jsHint errors in branch 2.0.0 2014-12-23 06:23:16 +03:00
Sebastian McKenzie
694a8dc456 rename helper functions to be more reflective of what they do 2014-12-22 23:23:59 +11:00
Sebastian McKenzie
2df1ca3971 properly freeze tagged template literal object #328 2014-12-22 22:07:45 +11:00
Sebastian McKenzie
6c7cdc9b7c update 2.0.0 changelog 2014-12-22 22:04:42 +11:00
Sebastian McKenzie
52b1d055ac fix regenerator/recast/ast-types monkey patch 2014-12-22 21:58:35 +11:00
Sebastian McKenzie
2a316bf362 move default parameters to after destructuring for param destructuring 2014-12-22 21:38:11 +11:00
Sebastian McKenzie
26ce0b8c8b switch to regenerator/runtime 2014-12-22 21:37:40 +11:00
Sebastian McKenzie
275c4cc34e add note about node/browserify polyfill usage 2014-12-22 21:37:32 +11:00
Sebastian McKenzie
bc914e6f23 freeze tagged template literal object - fixes #328 2014-12-22 21:36:59 +11:00
Sebastian McKenzie
4ea425ac7b remove ParenthesizedExpression 2014-12-22 21:36:33 +11:00
Sebastian McKenzie
bd255257f1 switch to vanilla regenerator 2014-12-22 21:34:09 +11:00
Sebastian McKenzie
41f072d112 clarify es5 and add getters/setters in IE 8<= to caveats fixes #314 2014-12-19 01:11:48 +11:00
Sebastian McKenzie
2a4c8e8423 add note about sourcemaps and 6to5/register 2014-12-18 16:30:49 +11:00
Sebastian McKenzie
122705bdaf remove custom regenerator runtime from dist 2014-12-18 16:30:33 +11:00
Sebastian McKenzie
f84e0ba640 add if statement to class super constructor call 2014-12-18 16:30:23 +11:00
Sebastian McKenzie
64216ec384 change generators/async functions to reference regenerator runtime rather than the polyfill 2014-12-18 16:30:14 +11:00
Sebastian McKenzie
a948928973 add roadrunner dependency 2014-12-18 16:29:20 +11:00
Sebastian McKenzie
5ab891b39d make first node in a class body inherit class comments 2014-12-18 16:28:13 +11:00
Sebastian McKenzie
2a742b5fac add in todo for a better t.isReferenced 2014-12-18 16:28:00 +11:00
Sebastian McKenzie
cd6b678b51 add support for exportdeclarations to constants 2014-12-18 16:27:50 +11:00
Sebastian McKenzie
c290a008b2 add --cache option to 6to5-node 2014-12-18 16:27:30 +11:00
Sebastian McKenzie
e8f0c8e8a4 Merge branch '2.0.0' of github.com:6to5/6to5 into 2.0.0 2014-12-18 01:10:28 +11:00
Sebastian McKenzie
22eb8edf41 support other operators in abstract reference assignment expression - fixes #311 2014-12-18 01:09:51 +11:00
Sebastian McKenzie
a3eb8900a9 add if super check to constructor default 2014-12-18 01:09:24 +11:00
Sebastian McKenzie
bf74f5a634 Merge pull request #310 from Dashed/patch-1
Clarify usage of 6to5 in node with harmony flag.
2014-12-18 00:25:44 +11:00
Alberto Leal
98e9a45f63 Rephrasing again.
Clarified by @sebmck on gitter.
2014-12-17 08:23:02 -05:00
Alberto Leal
1d91a758b4 Rephrasing 2014-12-17 08:19:47 -05:00
Alberto Leal
b94b4b335b Clarify usage of 6to5 in node with harmony flag. 2014-12-17 04:18:53 -05:00
antn
f4055612e5 add link to code of conduct [ci skip] 2014-12-16 22:29:37 -08:00
antn
46911bd28c add code of conduct 2014-12-16 22:17:35 -08:00
Douglas Duteil
104b1f4c9b feat(system-module): rewrite 2014-12-17 02:36:47 +01:00
Sebastian McKenzie
00c95f6a94 Merge pull request #302 from raine/patch-1
Update differences.md
2014-12-16 09:37:22 +11:00
Raine Virta
f14dc60934 Update differences.md
fix typo
2014-12-16 00:36:18 +02:00
Sebastian McKenzie
2fc8010034 move jshint to normal dependencies 2014-12-16 08:08:14 +11:00
Sebastian McKenzie
882ed48438 fix a catch param property identifier incorrectly being replaced when exploding statements in generators - fixes #301 2014-12-16 08:08:06 +11:00
Sebastian McKenzie
49578fe223 fix let variable declaration hoisting bug. All let variable declarators now have a default initializer of undefined unless they're the left of a ForIn or ForOf 2014-12-16 08:07:46 +11:00
Sebastian McKenzie
01bdb7efdc fix export and import specifier getIds and add support for computed properties to isReferenced 2014-12-16 08:07:18 +11:00
Sebastian McKenzie
fc7fc384c9 add declaration/reference support to scope 2014-12-16 08:06:56 +11:00
Sebastian McKenzie
bd78e3ed4d add end/start user transformers 2014-12-16 08:06:38 +11:00
Sebastian McKenzie
1f990f4030 fFix module formatter parsing bug where literals were being converted to identifiers 2014-12-16 08:06:25 +11:00
Sebastian McKenzie
d8e4a4a776 add module changes to 2.0.0 changelog 2014-12-15 22:36:10 +11:00
Sebastian McKenzie
473b6d6a91 more microoptimizations 2014-12-15 22:35:58 +11:00
Sebastian McKenzie
3d975da530 remove reference to regenerator runtime and say that the explicit polyfill is required 2014-12-15 22:35:41 +11:00
Sebastian McKenzie
1a4110e0a1 categorise differences and elaborate on why they're significant 2014-12-15 22:35:25 +11:00
Sebastian McKenzie
a03d491ac6 microoptimize module formatters, change method names to a new API, and add support for exporting multiple variable declarators - fixes #299 2014-12-15 22:34:49 +11:00
Sebastian McKenzie
e01e010577 add 2.0.0 changelog 2014-12-15 18:53:50 +11:00
Sebastian McKenzie
132ac00ec7 Merge pull request #298 from Dashed/patch-2
Clarify usage in node env
2014-12-15 16:35:54 +11:00
Alberto Leal
1673f78ab5 Clarify usage in node env 2014-12-15 00:35:17 -05:00
Sebastian McKenzie
76b8a06e90 Merge branch 'master' into 2.0.0 2014-12-15 16:35:15 +11:00
Sebastian McKenzie
711f84c826 Merge pull request #297 from Dashed/patch-1
Clarify polyfill usage in node env
2014-12-15 16:34:55 +11:00
Alberto Leal
4b4ff007e9 Clarify polyfill usage in node env 2014-12-15 00:34:14 -05:00
Sebastian McKenzie
e31e68cae3 use types.isSpecifierDefault in amd modules formatter 2014-12-15 14:16:34 +11:00
Sebastian McKenzie
778b4e3a27 remove commonStrict module formatter 2014-12-15 14:16:18 +11:00
Sebastian McKenzie
6011db7ae1 Merge branch 'master' into 2.0.0 2014-12-15 14:02:04 +11:00
Sebastian McKenzie
363b1631f5 switch to core-js from es6-symbol and es6-shim
Conflicts:
	lib/6to5/polyfill.js
2014-12-15 14:00:41 +11:00
Sebastian McKenzie
01286ebd5b add custom regenerator runtime to build process 2014-12-15 14:00:14 +11:00
Sebastian McKenzie
fe918a3535 add async generator functions to docs 2014-12-15 14:00:04 +11:00
Sebastian McKenzie
2fb6c7820c microoptimizations 2014-12-15 13:59:54 +11:00
Sebastian McKenzie
e7cbbefc11 Merge pull request #296 from caseywebdev/fix-295
Fix incorrect object reference in #295
2014-12-15 13:58:34 +11:00
Casey Foster
f4fdc3adc6 Fix incorrect object reference in #295 2014-12-14 20:57:32 -06:00
Sebastian McKenzie
2cd49b08ec add async generator functions to docs 2014-12-15 13:56:22 +11:00
Sebastian McKenzie
1b16ff3a0b Revert "switch to core-js from es6-symbol and es6-shim"
This reverts commit 37b2e747d5.
2014-12-15 13:54:45 +11:00
Sebastian McKenzie
b7c298a0ee Merge pull request #295 from caseywebdev/amd-umd-interop-require
Add interop require support for AMD and UMD
2014-12-15 13:48:59 +11:00
Casey Foster
5da4397392 Add interop require support for AMD and UMD 2014-12-14 20:44:38 -06:00
Sebastian McKenzie
ea5954121e disable es6-transpiler 2014-12-14 23:58:42 +11:00
Sebastian McKenzie
37b2e747d5 switch to core-js from es6-symbol and es6-shim 2014-12-14 23:58:31 +11:00
Sebastian McKenzie
3dd6eb1202 update acorn-6to5 2014-12-14 14:53:00 +11:00
Sebastian McKenzie
319ed09407 remove string includes polyfill 2014-12-14 14:49:48 +11:00
Sebastian McKenzie
77f9596682 update classes tests to work with new _extends method 2014-12-14 14:49:37 +11:00
Sebastian McKenzie
00cb90541a add support for experimental private abstract references syntax - closes #291 2014-12-14 14:49:25 +11:00
Sebastian McKenzie
d26f441a5c support falsy and null super classes - fixes #284 2014-12-14 12:19:24 +11:00
Sebastian McKenzie
11fc7cd0ce rename 6to5-browserify to 6to5ify 2014-12-14 12:18:33 +11:00
Sebastian McKenzie
c38428c536 make react transformer first 2014-12-14 12:18:14 +11:00
Sebastian McKenzie
bf40849e35 make ensureProto methods non-enumerable 2014-12-14 12:18:03 +11:00
Sebastian McKenzie
194fb77b9c add WithStatement buider keys 2014-12-14 12:17:28 +11:00
Sebastian McKenzie
ceb8e812b6 expose transformers and types 2014-12-14 12:17:16 +11:00
Sebastian McKenzie
3a261a5e05 add kexec to optionalDependencies 2014-12-13 18:02:26 +11:00
Sebastian McKenzie
4c1ad04b2c fix wrong variable name for bin/6to5-node kexec catch 2014-12-13 17:56:17 +11:00
Sebastian McKenzie
0d9e6aca67 Merge pull request #289 from monsanto/kexec
run _6to5-node using execvp() if available
2014-12-13 17:53:55 +11:00
Christopher Monsanto
aac6303696 run _6to5-node using execvp() if available 2014-12-13 01:53:36 -05:00
Sebastian McKenzie
833a4900da remove IIFE on class declarations #288 2014-12-13 17:33:35 +11:00
Sebastian McKenzie
525169460a add back parentheses generator option 2014-12-13 17:32:58 +11:00
Sebastian McKenzie
13785bddb0 escape illegal js but valid json unicode characters - fixes #247 2014-12-13 14:14:47 +11:00
Sebastian McKenzie
84332da399 document format options 2014-12-13 12:52:31 +11:00
Sebastian McKenzie
aae7d8190b fix up tests to work with the new method binding operator 2014-12-13 12:40:43 +11:00
Sebastian McKenzie
03dcc335d8 Merge branch 'master' into 2.0.0
Conflicts:
	CHANGELOG.md
2014-12-13 12:20:02 +11:00
Sebastian McKenzie
9ca05b1971 v1.15.0 2014-12-13 12:18:05 +11:00
Sebastian McKenzie
2a27b7c16c 1.15.0 2014-12-13 12:15:32 +11:00
Sebastian McKenzie
c92fd6f0bb remove useless GeneratorFunction aliasing causing issues #283 2014-12-13 12:13:03 +11:00
Sebastian McKenzie
2267344471 use # operator instead of : for playground method binding to remove ambiguous syntax 2014-12-13 04:37:00 +11:00
Sebastian McKenzie
593e4ca670 remove useless GeneratorFunction aliasing causing issues #283 2014-12-12 12:14:24 +11:00
Sebastian McKenzie
e563783a1e add gratipay to readme 2014-12-12 12:14:07 +11:00
Sebastian McKenzie
615425c808 fix linting errors 2014-12-12 12:14:02 +11:00
Sebastian McKenzie
55e2010311 comment out broken esnext 2014-12-11 23:12:15 +11:00
Sebastian McKenzie
74f40c2824 fix generator rest parameters 2014-12-11 11:02:55 +11:00
Sebastian McKenzie
c26ce1c114 abstract away astRun from transformer 2014-12-11 10:14:08 +11:00
Sebastian McKenzie
2537768772 inherit comments in modules transformer - fixes #280 2014-12-11 10:13:40 +11:00
Sebastian McKenzie
8af05634fa fix rest parameters on arrow functions 2014-12-11 10:10:07 +11:00
Sebastian McKenzie
74614e712e make rest parameters work inside of aliasFunction 2014-12-11 09:52:50 +11:00
Sebastian McKenzie
ad923cf8fa add playground support to 6to5-node 2014-12-11 09:52:29 +11:00
Sebastian McKenzie
c7d69b2f92 block scope constants 2014-12-10 23:49:13 +11:00
Sebastian McKenzie
2a0b63f3bb better symbol iterator check in regenerator runtime 2014-12-10 23:28:50 +11:00
Sebastian McKenzie
01934b6960 fix default import generation 2014-12-10 23:18:23 +11:00
Sebastian McKenzie
8ffd2e843f fix fromAst not passing ast to transform 2014-12-10 22:34:58 +11:00
Sebastian McKenzie
6d68b3da4d fix fromAst usage 2014-12-10 21:54:54 +11:00
Sebastian McKenzie
79b4207b44 upgrade acorn-6to5 2014-12-10 21:54:43 +11:00
Sebastian McKenzie
30a90d2554 fix hash bang support 2014-12-10 21:54:38 +11:00
Sebastian McKenzie
bac8758369 remove other commonInterop reference 2014-12-10 21:37:07 +11:00
Sebastian McKenzie
d00faf4a72 remove commonInterop option from register 2014-12-10 21:33:30 +11:00
Sebastian McKenzie
b986a4e482 expose ast transformer - fixes #263 2014-12-10 21:31:27 +11:00
Sebastian McKenzie
f11f364d2c add _aliasFunction to generator comprehension container - fixes #278 2014-12-10 21:28:49 +11:00
Sebastian McKenzie
c4a0f62eef add global symbol registry to polyfill 2014-12-10 21:12:01 +11:00
Sebastian McKenzie
072fff0f4c clean up system modules formatter 2014-12-10 21:11:43 +11:00
Sebastian McKenzie
59b81b389a Fix up checkLoop method comment 2014-12-10 21:11:26 +11:00
Sebastian McKenzie
4a439857d2 make mutators enumerable 2014-12-10 21:11:13 +11:00
Sebastian McKenzie
187f7ba01e Remove regenerator finished generator error 2014-12-10 21:10:59 +11:00
Sebastian McKenzie
e6da342e8b add a "spec" transformer namespace for transformers that nicen up code and make it well, more spec compliant 2014-12-10 21:09:58 +11:00
Sebastian McKenzie
1c22c608a9 make bin/6to5-node usage more inline with node 2014-12-10 21:09:09 +11:00
Sebastian McKenzie
8e96130bc0 rename common to commonStrict and commonInterop to common 2014-12-10 21:08:54 +11:00
Sebastian McKenzie
0f47814b41 separate experimental page in docs 2014-12-10 21:08:00 +11:00
Sebastian McKenzie
b32d56a168 remove 6to5-node filenames test 2014-12-09 23:32:25 +11:00
Sebastian McKenzie
5f26a0c5cc update modules tests 2014-12-09 23:28:07 +11:00
Sebastian McKenzie
2245bbc6c4 make bin/6to5-node more node bin compliant 2014-12-09 23:18:54 +11:00
Sebastian McKenzie
b8d61f1528 update github urls and regroup plugins 2014-12-09 23:18:54 +11:00
Sebastian McKenzie
e97e916b5c module export variable declaration initializer default - fixes #264 2014-12-09 23:18:54 +11:00
Sebastian McKenzie
b688154aee reformat CHANGELOG 2014-12-09 23:18:54 +11:00
Sebastian McKenzie
ccb56fe33f Merge pull request #271 from es128/patch-1
Simplify chokidar event handler
2014-12-09 09:57:12 +11:00
Elan Shanker
5e67dfbd9e Ensure only file events are acted upon 2014-12-08 17:55:54 -05:00
Elan Shanker
6f6d9bd5a8 Simplify chokidar event handler 2014-12-08 17:17:31 -05:00
Sebastian McKenzie
61b9c28ce6 update plugins to reflect 6to5 org migrations 2014-12-08 12:11:39 +11:00
Sebastian McKenzie
d11d0d3216 split up plugins into sections and change some community plugin urls to official ones 2014-12-07 22:00:31 +11:00
Sebastian McKenzie
bd876f7a4d fix starting file newlines 2014-12-07 22:00:30 +11:00
Sebastian McKenzie
f9f48620de remove unused test transformation whitespace option 2014-12-07 22:00:30 +11:00
Sebastian McKenzie
ce9a82c194 add docs for ast and code option 2014-12-07 22:00:30 +11:00
Sebastian McKenzie
24f6dfa8e2 Merge pull request #262 from josh/comment-before-newlines
Fix whitespace before comments
2014-12-07 21:11:48 +11:00
Joshua Peek
f592f95a68 Subtract one if line already ends with "{\n" 2014-12-07 02:06:54 -08:00
Joshua Peek
2e0cd0f349 Add tests for newlines before comments 2014-12-07 02:06:41 -08:00
Sebastian McKenzie
e17d5bdb13 fix comments test in property name shorthand 2014-12-07 11:46:59 +11:00
Sebastian McKenzie
c1c22ed5f7 fix duplicate comments on property key shorthands - fixes #234 2014-12-07 11:43:51 +11:00
Sebastian McKenzie
bf07f54e57 add note about inline functions to docs/differences 2014-12-07 11:31:08 +11:00
Sebastian McKenzie
eef0344cb2 fix comments-only rendering 2014-12-07 11:30:50 +11:00
Sebastian McKenzie
88a85c0ca8 fix files only containg comments not being output - fixes #259 2014-12-07 11:20:43 +11:00
Sebastian McKenzie
302e6f4caa Merge pull request #257 from thejameskyle/readme-center
Center everything in README
2014-12-07 10:55:43 +11:00
James Kyle
36c16a0227 Center everything in README 2014-12-06 15:33:17 -08:00
Sebastian McKenzie
0ee4a15d01 v1.14.17 2014-12-06 23:37:32 +11:00
Sebastian McKenzie
fbdaedc4f8 remove unused loopParent variable 2014-12-06 23:36:28 +11:00
Sebastian McKenzie
75c8d73d35 add default initializer to let variables within loop bodies and fix excessive break replacement inside of switches in let scoping - fixes #255 2014-12-06 23:35:47 +11:00
Sebastian McKenzie
21599d3a9a change memoisation to memoization 2014-12-06 20:49:33 +11:00
Sebastian McKenzie
9fbbabc7e4 v1.14.16 2014-12-06 20:48:31 +11:00
Sebastian McKenzie
8c1fe49b2e upgrade acorn-6to5 2014-12-06 20:47:40 +11:00
Sebastian McKenzie
763b4caf32 v1.14.15 2014-12-06 20:46:16 +11:00
Sebastian McKenzie
c0248cf04c add 1.14.15 changelog 2014-12-06 20:44:58 +11:00
Sebastian McKenzie
a7a6ee80f2 add object getter memoization and this shorthand to playground 2014-12-06 19:37:23 +11:00
Sebastian McKenzie
aa298b1e0a update doc/differences to reflect current status of project - fixes #253 2014-12-06 19:36:46 +11:00
Sebastian McKenzie
9c0a8e22d2 fix let scoping not working with while loops - fixes #254 2014-12-06 19:36:08 +11:00
Sebastian McKenzie
7c1a924ef6 v1.14.14 2014-12-06 00:04:00 +11:00
Sebastian McKenzie
1d975a2635 Fix tagged template literals 2014-12-06 00:03:11 +11:00
Sebastian McKenzie
67cfdbd447 better closure variable name in default parameters 2014-12-06 00:00:09 +11:00
Sebastian McKenzie
ab02231d39 fix template literals escaping 2014-12-06 00:00:00 +11:00
Sebastian McKenzie
40a2d14c7c v1.14.13 2014-12-05 23:12:01 +11:00
Sebastian McKenzie
573283f260 fix bin/6to5 error message test 2014-12-05 23:11:04 +11:00
Sebastian McKenzie
0497860462 Fix linting error 2014-12-05 23:08:35 +11:00
Sebastian McKenzie
a173775fec 1.14.13 2014-12-05 23:07:21 +11:00
Sebastian McKenzie
c5214ffe70 enumerable es6 class methods 2014-12-05 23:06:36 +11:00
Sebastian McKenzie
3d62af004d fix bin/6to5-node code formatting 2014-12-05 23:06:17 +11:00
Sebastian McKenzie
d7af8c6261 whitespace after function assignment 2014-12-05 23:06:05 +11:00
Sebastian McKenzie
680c6b166a Fix let scoping to work with while loops 2014-12-05 23:05:47 +11:00
Sebastian McKenzie
5bad458b09 Fix tests 2014-12-05 23:05:20 +11:00
Sebastian McKenzie
055f894a88 Use stylish jshint reporter 2014-12-05 23:05:05 +11:00
Sebastian McKenzie
da8edecc09 v1.14.12 2014-12-05 10:57:27 +11:00
Sebastian McKenzie
cd6dea6480 fix version in changelog 2014-12-05 10:56:33 +11:00
Sebastian McKenzie
69d7ac0e0c 1.14.11 2014-12-05 10:54:25 +11:00
Sebastian McKenzie
dae46bfbfa DRY up isDynamic checks - add isDynamic check to spread - fixes #232 2014-12-05 10:53:46 +11:00
Sebastian McKenzie
b5b175c45a v1.14.11 2014-12-05 10:10:31 +11:00
Sebastian McKenzie
569c681c4f v1.14.10 2014-12-05 09:58:16 +11:00
Sebastian McKenzie
ed1e4a7820 fix changelog version 2014-12-05 09:57:14 +11:00
Sebastian McKenzie
b55f941dae v1.14.1 2014-12-05 09:56:36 +11:00
Sebastian McKenzie
a0219ef278 fix let scoping unneccesary override - fixes #245 2014-12-05 09:55:26 +11:00
Sebastian McKenzie
b9266b0c4c v1.14.10 2014-12-04 10:35:52 +11:00
Sebastian McKenzie
a1239e5f5a add ast return transform option 2014-12-04 10:34:52 +11:00
Sebastian McKenzie
2f279de7d1 v1.14.9 2014-12-04 10:31:08 +11:00
Sebastian McKenzie
c70b3586fb Remove roadrunner 2014-12-04 10:30:16 +11:00
Sebastian McKenzie
3928384c27 v1.14.8 2014-12-04 10:25:02 +11:00
Sebastian McKenzie
e469f7f589 fix require caching 2014-12-04 10:23:55 +11:00
Sebastian McKenzie
988ab0e823 v1.14.7 2014-12-04 10:18:57 +11:00
Sebastian McKenzie
e708394408 start fixing shorthand comment issue 2014-12-04 10:17:37 +11:00
Sebastian McKenzie
7c3ab8bc3c add isparta to docs/plugins 2014-12-04 10:17:28 +11:00
Sebastian McKenzie
2b11a45117 Add support for ExpressionStatement in t.isDynamic 2014-12-04 10:17:13 +11:00
Sebastian McKenzie
d5666912d4 Add cache option to 6to5-node 2014-12-04 10:17:04 +11:00
Sebastian McKenzie
2eab56c38b Merge pull request #240 from thejameskyle/arguments-spread
Only slice arguments when necessary - fixes #239
2014-12-03 12:28:14 +11:00
James Kyle
888ab5473a Only slice arguments when necessary - fixes #239 2014-12-02 16:46:48 -08:00
Sebastian McKenzie
5fe1c07d9a v1.14.6 2014-11-30 23:40:12 +11:00
Sebastian McKenzie
758a873894 avoid ensuring a block on non-array node replacements 2014-11-30 23:39:08 +11:00
Sebastian McKenzie
e91926d094 v1.14.5 2014-11-30 11:15:54 +11:00
Sebastian McKenzie
5085b96753 update 1.14.5 changelog 2014-11-30 11:12:36 +11:00
Sebastian McKenzie
66f67b92ce upgrade acorn-6to5 2014-11-30 11:10:58 +11:00
Sebastian McKenzie
3c9fa13a1f remove JSON.stringify of unknown generator node types 2014-11-30 11:10:58 +11:00
Sebastian McKenzie
5f21fc2f17 ensureBlock on multiple node replacements - fixes #229 2014-11-30 11:10:57 +11:00
Sebastian McKenzie
4bd4e4cdbe fix sh doc code blocks 2014-11-30 11:10:57 +11:00
Sebastian McKenzie
3c7b2d7872 Merge pull request #231 from thejameskyle/module-names
Add CLI commands for module docs
2014-11-30 10:52:42 +11:00
James Kyle
5db757354a Add CLI commands for module docs 2014-11-29 11:31:34 -08:00
Sebastian McKenzie
063b379d4f remove dead playground docs 2014-11-26 22:21:18 +11:00
Sebastian McKenzie
af42fe3d30 v1.14.4 2014-11-26 17:24:55 +11:00
Sebastian McKenzie
3c808fcef2 merge pretzel maps and method binding 2014-11-26 17:23:33 +11:00
Sebastian McKenzie
a29505f75d v1.14.3 2014-11-26 16:21:40 +11:00
Sebastian McKenzie
05942d17bf add 1.14.3 changelog 2014-11-26 16:19:15 +11:00
Sebastian McKenzie
be0d4b344b add playground pretzel maps 2014-11-26 16:17:27 +11:00
Sebastian McKenzie
f1a2401681 v1.14.2 2014-11-26 10:54:45 +11:00
Sebastian McKenzie
2d61672cdb add 1.14.2 changelog 2014-11-26 10:53:52 +11:00
Sebastian McKenzie
1b00ba21a1 fix commonInterop default export handling - fixes #223 2014-11-26 10:48:30 +11:00
Sebastian McKenzie
f8ea386f3c fix computed property literals - fixes #221 2014-11-26 10:47:23 +11:00
Sebastian McKenzie
2527fffbad merge memberExpressionKeywords and memberExpressionLiterals transformer 2014-11-26 10:46:32 +11:00
Sebastian McKenzie
86498ad990 fix memoisation operator example 2014-11-26 10:46:10 +11:00
Sebastian McKenzie
27c8804214 v1.14.1 2014-11-26 00:43:24 +11:00
Sebastian McKenzie
2b6f0ee780 add changelog for 1.14.1 2014-11-26 00:42:05 +11:00
Sebastian McKenzie
c7c9660c79 classes: make VariableDeclaration inherit comments from ClassDeclaration 2014-11-26 00:41:07 +11:00
Sebastian McKenzie
ff025e63ec add ParenthesizedExpression support to t.isDynamic 2014-11-26 00:40:42 +11:00
Sebastian McKenzie
9fb6681ad3 fix dot in playground docs 2014-11-26 00:08:34 +11:00
Sebastian McKenzie
301887f88d v1.14.0 2014-11-26 00:06:13 +11:00
Sebastian McKenzie
b519bb6a68 add playground experimental note 2014-11-26 00:04:03 +11:00
Sebastian McKenzie
b6e366ad94 remove unused variables 2014-11-26 00:03:22 +11:00
Sebastian McKenzie
ba2204156c make playground option enable experimental 2014-11-26 00:02:49 +11:00
Sebastian McKenzie
2545292bce add 1.14.0 changelog 2014-11-26 00:01:29 +11:00
Sebastian McKenzie
c763cf364c clarify playground warning note 2014-11-26 00:01:17 +11:00
Sebastian McKenzie
1db7247d9a remove weird sounding however in playground warning message 2014-11-25 23:57:43 +11:00
Sebastian McKenzie
1a1e6bc3ba remove arguments-to-array helper 2014-11-25 23:56:38 +11:00
Sebastian McKenzie
d184bc93b9 add playground 2014-11-25 23:50:50 +11:00
Sebastian McKenzie
e12cca974a remove irrelevant max line length 2014-11-25 23:49:35 +11:00
Sebastian McKenzie
b17bc95b4f v1.13.13 2014-11-25 19:49:51 +11:00
Sebastian McKenzie
a71f260377 add 1.13.13 changelog 2014-11-25 19:48:42 +11:00
Sebastian McKenzie
8cbc1f7f06 Merge pull request #218 from timoxley/no-no-timeouts
Remove --no-timeouts flag.
2014-11-25 19:47:54 +11:00
Sebastian McKenzie
34335018e9 v1.13.12 2014-11-25 19:03:48 +11:00
Sebastian McKenzie
136bddab33 temporarily disable es7-modules-system tests 2014-11-25 19:02:49 +11:00
Sebastian McKenzie
b2951c5462 remove SpreadProperty definition 2014-11-25 19:01:22 +11:00
Sebastian McKenzie
07de6f5f4a clean up Scope reference addition 2014-11-25 18:59:45 +11:00
Sebastian McKenzie
99ea00ca18 simplify generator context id 2014-11-25 18:59:36 +11:00
Sebastian McKenzie
ab5c6a38eb add VirtualPropertyExpression and SpreadProperty to ast-types 2014-11-25 18:59:26 +11:00
Sebastian McKenzie
52cee84625 add 1.13.12 changelog 2014-11-25 18:57:43 +11:00
Tim Oxley
20dc8b05c9 Remove --no-timeouts flag.
Not a valid flag, causes errors when trying to use debug modes.
2014-11-25 14:54:36 +08:00
Sebastian McKenzie
ba5992621d Merge branch 'guybedford-system' 2014-11-25 14:59:57 +11:00
Sebastian McKenzie
cdae98f653 Merge branch 'system' of github.com:guybedford/6to5 into guybedford-system 2014-11-25 14:59:47 +11:00
Sebastian McKenzie
81434bb557 add types.isDynamic so we can scan a node to see if it's ~safe~ to include it twice 2014-11-25 11:44:53 +11:00
Sebastian McKenzie
3af0fc6fb7 ignore XJSEmptyExpression - fixes #214 2014-11-25 11:44:35 +11:00
guybedford
3f60062ab6 system tests updates for live bindings and function hoisting 2014-11-24 16:05:54 +02:00
Sebastian McKenzie
76499bb26e update modules docs 2014-11-24 10:33:43 +11:00
Sebastian McKenzie
44f2f701e1 v1.13.11 2014-11-24 10:23:56 +11:00
Sebastian McKenzie
032bc0af5e fix util.regexify tests 2014-11-24 10:23:00 +11:00
Sebastian McKenzie
0e822a7e54 remove unused variables 2014-11-24 10:21:01 +11:00
Sebastian McKenzie
51e521f0e0 add 1.13.11 changelog 2014-11-24 10:19:40 +11:00
Sebastian McKenzie
e5ce69d6af clean up register module formatter and rename it to system 2014-11-24 10:19:06 +11:00
Sebastian McKenzie
e3b8fa93e2 export as module.exports if there are no other ExportDeclarations in commonInterop module formatter @guybedford 2014-11-24 10:05:50 +11:00
Sebastian McKenzie
f4ce3a23ad fix explicit arguments reference for rest parameters - fixes #210 2014-11-24 10:05:49 +11:00
Sebastian McKenzie
39f4696ac7 fix util.regexify on falsy values - fixes #208 2014-11-24 10:05:49 +11:00
Sebastian McKenzie
4a9918ec6b Merge pull request #209 from douglasduteil/feat-modules-add-register-module-type
Add "register" module formatter
2014-11-24 10:05:29 +11:00
Douglas Duteil
c87e14f6a9 feat(modules): add "register" module type
Inspired by https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
2014-11-23 22:54:01 +01:00
Sebastian McKenzie
680771c81b v1.13.10 2014-11-24 01:02:18 +11:00
Sebastian McKenzie
cad3f63723 update assignment expression destructuring test 2014-11-24 01:01:13 +11:00
Sebastian McKenzie
eceda64528 add 1.13.10 changelog 2014-11-24 01:00:26 +11:00
Sebastian McKenzie
b8ec87e058 fix Scope::push block type error message 2014-11-24 00:59:56 +11:00
Sebastian McKenzie
04bd023787 add support for AssignmentExpression destructuring outside of ExpressionStatement 2014-11-24 00:56:06 +11:00
Sebastian McKenzie
f1759dc419 v1.13.9 2014-11-24 00:48:05 +11:00
Sebastian McKenzie
2985f1b40b fix VirtualPropertyExpression visitor keys - fixes #207 2014-11-24 00:47:10 +11:00
Sebastian McKenzie
14d1b6701e v1.13.8 2014-11-24 00:37:33 +11:00
Sebastian McKenzie
eb3cc9ff07 remove unused variables 2014-11-24 00:36:36 +11:00
Sebastian McKenzie
b97a2bd61d reorder object spread/rest 2014-11-24 00:35:39 +11:00
Sebastian McKenzie
49e7e3b998 fix multiple references in experimental abstract references #207 2014-11-24 00:35:18 +11:00
Sebastian McKenzie
11ac6ff084 v1.13.7 2014-11-23 22:57:30 +11:00
Sebastian McKenzie
54e7e495ac add 1.13.7 changelog 2014-11-23 22:56:13 +11:00
Sebastian McKenzie
fafdb1a18a add exponentiation operator 2014-11-23 22:55:20 +11:00
Sebastian McKenzie
b599e2c794 v1.13.6 2014-11-23 21:51:31 +11:00
Sebastian McKenzie
7f57d3d6a2 fix experimental object spread/rest helper 2014-11-23 21:50:49 +11:00
Sebastian McKenzie
a2b0ee6809 v1.13.5 2014-11-23 21:47:20 +11:00
Sebastian McKenzie
83e8c4bddd bump acorn-6to5 version 2014-11-23 21:46:07 +11:00
Sebastian McKenzie
57aca3c77f add 1.13.5 changelog 2014-11-23 21:45:18 +11:00
Sebastian McKenzie
f80527832c remove unused variables 2014-11-23 21:45:10 +11:00
Sebastian McKenzie
2ecceaac45 add VirtualPropertyExpression generator test 2014-11-23 21:43:39 +11:00
Sebastian McKenzie
32f8f9e663 change arguments to array to an additional faster helper method 2014-11-23 21:43:28 +11:00
Sebastian McKenzie
3447204d97 add experimental es7 object spread/rest - closes #200 2014-11-23 21:43:01 +11:00
Sebastian McKenzie
c500532469 v1.13.4 2014-11-23 20:17:14 +11:00
Sebastian McKenzie
3396cc84f1 fix spread not returning a new array with a single spread element 2014-11-23 20:16:10 +11:00
Sebastian McKenzie
1de4893a69 v1.13.3 2014-11-23 18:51:53 +11:00
Sebastian McKenzie
abba930f36 update sequence expression generator test 2014-11-23 18:51:07 +11:00
Sebastian McKenzie
c84097cf57 fix bin/6to5-node experimental option 2014-11-23 18:49:56 +11:00
Sebastian McKenzie
790b81938c fix Node::isUserWhitespacable 2014-11-23 18:47:38 +11:00
Sebastian McKenzie
187bbca731 add 1.13.3 changelog 2014-11-23 18:46:56 +11:00
Sebastian McKenzie
4ccc12b04d simplify Node::isUserWhitespacable method 2014-11-23 18:46:49 +11:00
Sebastian McKenzie
9a5f97d85b fix jshint errors 2014-11-23 18:46:30 +11:00
Sebastian McKenzie
4ed77e136b Merge branch 'abstract-references' 2014-11-23 18:38:24 +11:00
Sebastian McKenzie
0339d21c33 add WeakMap existence check to symbol polyfilling 2014-11-23 18:37:43 +11:00
Sebastian McKenzie
4502aee988 add support for call expression abstract references and more versatile tests 2014-11-23 18:37:30 +11:00
Sebastian McKenzie
55150853b4 remove SequenceExpression user whitespace 2014-11-23 18:36:57 +11:00
Sebastian McKenzie
b9da4f988c upgrade acorn-6to5 2014-11-23 18:36:38 +11:00
Sebastian McKenzie
bf0ca10253 add abstract reference CallExpression base 2014-11-23 16:54:51 +11:00
Sebastian McKenzie
fcc4734a1f complete abstract references support - parser support left 2014-11-23 16:47:13 +11:00
Sebastian McKenzie
d1c5c773fa make experimental warning more scary 2014-11-23 16:21:42 +11:00
Sebastian McKenzie
01ce38c5ac Merge branch 'master' into abstract-references 2014-11-23 16:17:56 +11:00
Sebastian McKenzie
cc6d440f0e update classes and destructuring test names 2014-11-23 16:17:49 +11:00
Sebastian McKenzie
2b21f4b571 Merge branch 'master' into abstract-references
Conflicts:
	lib/6to5/polyfill.js
2014-11-23 16:17:10 +11:00
Sebastian McKenzie
24d9833170 better categorisation of transformers 2014-11-23 16:15:39 +11:00
Sebastian McKenzie
20f21987de fix travis badge branch 2014-11-23 16:09:13 +11:00
Sebastian McKenzie
fad0be8a45 add spec references 2014-11-23 16:08:54 +11:00
Sebastian McKenzie
02c42b94f5 Add abstract references base #205 2014-11-23 16:04:25 +11:00
Sebastian McKenzie
4808689795 add support link to readme 2014-11-23 15:30:37 +11:00
Sebastian McKenzie
6231dceb1c clarify polyfill usage 2014-11-23 15:29:21 +11:00
Sebastian McKenzie
1753afa782 rename no runtime to optional runtime in differences table 2014-11-23 15:18:00 +11:00
Sebastian McKenzie
4097da09bd clarify polyfill usage 2014-11-23 15:17:49 +11:00
Sebastian McKenzie
c7965df42d update esutils and es6-shim 2014-11-23 15:16:42 +11:00
Sebastian McKenzie
1027f8a5a4 use slice helper on arguments instead of toArray 2014-11-23 13:09:31 +11:00
Sebastian McKenzie
cbd6be30bf v1.13.2 2014-11-23 12:02:26 +11:00
Sebastian McKenzie
7e299470fd remove unused variables 2014-11-23 12:01:19 +11:00
Sebastian McKenzie
c794c2aede upgrade acorn-6to5 2014-11-23 11:59:57 +11:00
Sebastian McKenzie
1a58087460 use toArray inline helper instead of Array.from #203 #199 2014-11-23 11:59:18 +11:00
Sebastian McKenzie
44f6fc67f8 v1.13.1 2014-11-23 01:17:14 +11:00
Sebastian McKenzie
e4a3d222d6 fix constructor spread optimisation - thanks @zloirock 2014-11-23 01:16:09 +11:00
Sebastian McKenzie
5a96c2e015 v1.13.0 2014-11-22 23:46:00 +11:00
Sebastian McKenzie
43390c0d1f add experimental usage note about proposal changes 2014-11-22 23:45:05 +11:00
Sebastian McKenzie
d166656149 add constructor spread caveat and add additional Array.from cases 2014-11-22 23:44:47 +11:00
Sebastian McKenzie
acc4d289e4 link straight to caveats in no runtime on doc index 2014-11-22 23:44:28 +11:00
Sebastian McKenzie
717e6df407 use Array.from on single block array comprehensions - closes #199 2014-11-22 23:44:12 +11:00
Sebastian McKenzie
286404c6f2 update changelog for 1.13.0 2014-11-22 23:33:06 +11:00
Sebastian McKenzie
f191fd7883 update #203 test 2014-11-22 23:32:03 +11:00
Sebastian McKenzie
74f36cfaa0 Merge pull request #202 from RReverser/webworker-runtime
Fix runtime injection in Web Worker.
2014-11-22 23:29:07 +11:00
Sebastian McKenzie
71aed8b269 Merge branch 'ctor-spread-speedup' of https://github.com/RReverser/6to5 2014-11-22 23:28:06 +11:00
Sebastian McKenzie
9e6b0b45b3 Revert "Merge pull request #203 from RReverser/ctor-spread-speedup"
This reverts commit 714ca9fbc8, reversing
changes made to d50d4972a7.
2014-11-22 23:27:39 +11:00
Sebastian McKenzie
7bbb3725d4 bump next release version 2014-11-22 23:26:39 +11:00
Sebastian McKenzie
1210c92405 remove hound.yml 2014-11-22 23:26:39 +11:00
Sebastian McKenzie
714ca9fbc8 Merge pull request #203 from RReverser/ctor-spread-speedup
Speed up constructor spreads.
2014-11-22 23:22:53 +11:00
Ingvar Stepanyan
60713f0e5f Speed up constructor spreads.
Replace slow .bind with manual .create+.apply.
Gives up to 19x speed up depending on browser.

http://jsperf.com/apply-constructor
2014-11-22 14:22:50 +02:00
Ingvar Stepanyan
f1f5f8bb27 Speed up constructor spreads.
Replace slow .bind with manual .create+.apply.
Gives up to 19x speed up depending on browser.

http://jsperf.com/apply-constructor
2014-11-22 14:20:55 +02:00
Ingvar Stepanyan
a69f095720 Fix runtime injection in Web Worker.
Web Workers don't have `window` object but they have `self`
(which is available in regular windows as well).
2014-11-22 14:14:42 +02:00
Sebastian McKenzie
d50d4972a7 use experimental option in generation tests 2014-11-21 19:40:05 +11:00
Sebastian McKenzie
bd91bbee71 put experimental ES7 features behind a flag --experimental and experimental option 2014-11-21 19:36:35 +11:00
Sebastian McKenzie
8b46cce466 v1.12.26 2014-11-21 17:10:54 +11:00
Sebastian McKenzie
defa9108bd support computed property destructuring 2014-11-21 17:09:31 +11:00
Sebastian McKenzie
6b1d9b49b7 use generateUidIdentifier over the long form 2014-11-21 17:09:15 +11:00
Sebastian McKenzie
4e333cf357 add arrayify and regexify tests, add destructuring assignment expression statement only test 2014-11-21 17:08:56 +11:00
Sebastian McKenzie
ddcd7ab28d v1.12.25 2014-11-20 21:30:08 +11:00
Sebastian McKenzie
4b8a4492ba remove unused Scope variable 2014-11-20 21:29:00 +11:00
Sebastian McKenzie
4256a9960c update acorn-6to5 - fixes #195 2014-11-20 21:28:07 +11:00
Sebastian McKenzie
ecb695c30c add 1.12.25 changelog 2014-11-20 21:18:31 +11:00
Sebastian McKenzie
db97f665ed remove scope from generator visitor 2014-11-20 21:18:21 +11:00
Sebastian McKenzie
931b68dc5d use generateUidIdentifier instead of generateUid 2014-11-20 21:18:11 +11:00
Sebastian McKenzie
b5feaf7c2f remove dead code 2014-11-20 21:17:57 +11:00
Sebastian McKenzie
d82683f598 remova via regenerator from features 2014-11-20 21:10:35 +11:00
Sebastian McKenzie
6772f5a74f update ast-types, es6-shim, chokidar, estraverse and private 2014-11-20 21:10:23 +11:00
Sebastian McKenzie
a90f133918 update Scope arguments 2014-11-20 21:09:38 +11:00
Sebastian McKenzie
71ad511322 add File::generateUidIdentifier method 2014-11-20 21:08:33 +11:00
Sebastian McKenzie
ff6677a4b7 v1.12.24 2014-11-20 16:56:29 +11:00
Sebastian McKenzie
ac5e0ad392 add changelog for 1.12.24 2014-11-20 16:54:46 +11:00
Sebastian McKenzie
0a25618c34 collect references that haven't been declared in scope - fixes #173 and fixes #175 2014-11-20 16:53:22 +11:00
Sebastian McKenzie
984c048591 v1.12.23 2014-11-20 16:03:53 +11:00
Sebastian McKenzie
5867e24886 remove unused variables 2014-11-20 16:02:56 +11:00
Sebastian McKenzie
02d7cdc701 changelog for 1.12.23 2014-11-20 16:02:15 +11:00
Sebastian McKenzie
d3b3febfeb finish missing code examples in features 2014-11-20 16:02:10 +11:00
Sebastian McKenzie
7fccf98c10 small performance improvements 2014-11-20 15:09:20 +11:00
Sebastian McKenzie
4a1c393bdb inherit generator comments and add block hoisting - fixes #196 2014-11-20 15:09:07 +11:00
Sebastian McKenzie
afaf3fb0c0 v1.12.22 2014-11-20 00:51:26 +11:00
Sebastian McKenzie
2152ae9b17 remove unused kind variable 2014-11-20 00:50:18 +11:00
Sebastian McKenzie
b8f5693b5e add 1.12.22 changelog 2014-11-20 00:49:27 +11:00
Sebastian McKenzie
638143700b add whitespace around defineArgs 2014-11-20 00:49:12 +11:00
Sebastian McKenzie
aa7eb9c1c9 remove unused opts arg 2014-11-20 00:49:01 +11:00
Sebastian McKenzie
27ca532896 add 1.12.22 changelog 2014-11-20 00:44:12 +11:00
Sebastian McKenzie
913fbdbd87 Merge pull request #190 from webpro/amd-module-id
Make AMD module id's optional
2014-11-20 00:42:53 +11:00
Sebastian McKenzie
fb39df71eb support array destructuring on iterables - fixes #194 2014-11-19 21:10:40 +11:00
Sebastian McKenzie
102a566b1d ensure newlines at end of transformation tests 2014-11-19 21:09:50 +11:00
Lars Kappert
b924e3deb5 Rename to "--amd-module-ids" 2014-11-19 08:55:16 +01:00
Lars Kappert
ef21724a9c Update docs 2014-11-19 08:52:33 +01:00
Lars Kappert
fdad51b53b Revert "update umd and amd tests with new moduleName option"
This reverts commit 5409691a3a.
2014-11-19 08:45:58 +01:00
Lars Kappert
df0e4f6431 Reuse Formatter::getModuleName(), fix opts 2014-11-19 08:43:28 +01:00
Lars Kappert
a37f2093bc Merge branch 'master' of github.com:6to5/6to5 into amd-module-id
Conflicts:
	lib/6to5/file.js
	lib/6to5/transformation/modules/umd.js
2014-11-19 08:39:02 +01:00
Sebastian McKenzie
32b32329b2 make umd module formatter inherit amd constructor 2014-11-19 17:50:42 +11:00
Sebastian McKenzie
d4379d52a7 split up generator transformer emit and explode 2014-11-19 17:48:59 +11:00
Sebastian McKenzie
5c5d811647 bump chokidar and fs-readdir-recursive versions 2014-11-19 17:18:16 +11:00
Sebastian McKenzie
8feb17dd23 normalise whitespace after function keyword 2014-11-19 17:18:05 +11:00
Sebastian McKenzie
55b3f84a2f add sourceRoot and moduleRoot defaults to docs 2014-11-19 13:51:01 +11:00
Sebastian McKenzie
50dee1a754 v1.12.21 2014-11-19 13:49:35 +11:00
Sebastian McKenzie
f80f860bbc changelog for 1.12.21 2014-11-19 13:48:09 +11:00
Sebastian McKenzie
7fc2fe41af fix bug in let scoping resulting in unneccesary replacement - closes #193, closes #185 2014-11-19 13:46:00 +11:00
Sebastian McKenzie
a884a26402 revert acorn-6to5 2014-11-19 13:28:01 +11:00
Sebastian McKenzie
81ec1e1f42 remove unused variable in generators/meta 2014-11-19 12:54:54 +11:00
Sebastian McKenzie
1a27970376 publish acorn-6to5 as an npm package - fixes #187 2014-11-19 12:51:14 +11:00
Sebastian McKenzie
6822c854d4 add interop-require declaration 2014-11-19 12:40:44 +11:00
Sebastian McKenzie
8f4c4be821 generator: add existence check to printJoin 2014-11-19 12:40:35 +11:00
Sebastian McKenzie
5fca095149 use commonInterop module formatter in 6to5/register 2014-11-19 12:40:23 +11:00
Sebastian McKenzie
34599a21cb clean up common-interop module formatter 2014-11-19 12:40:10 +11:00
Sebastian McKenzie
d9d84c60b5 check for existence of node before checking it in let scoping 2014-11-19 12:13:00 +11:00
Sebastian McKenzie
221d78d2e2 arrayify whitelist and blacklist, inherit moduleRoot from sourceRoot and vice versa 2014-11-19 12:13:00 +11:00
Sebastian McKenzie
fa46f60655 expose util as _util 2014-11-19 12:13:00 +11:00
Sebastian McKenzie
03ce52fb7c use regexify and arrayify in register options 2014-11-19 12:13:00 +11:00
Sebastian McKenzie
0df0c696a9 add util.arrayify and util.regexify 2014-11-19 12:12:59 +11:00
Sebastian McKenzie
21b7f4120e add assertion checks into types 2014-11-19 12:12:59 +11:00
Sebastian McKenzie
f43a3dec4b more regenerator spring cleaning 2014-11-19 12:12:59 +11:00
Sebastian McKenzie
cacee5c625 Merge pull request #191 from Naddiseo/commonjs-interop
Added an interop commonjs loader.
2014-11-19 12:09:00 +11:00
Sebastian McKenzie
553c90ae75 Merge pull request #192 from Naddiseo/function-modules
Allow module transformers to be directly passed into opts.
2014-11-19 12:06:02 +11:00
Richard Eames
bc3502d695 Allow module transformers to be directly passed into opts. 2014-11-18 15:29:59 -07:00
Richard Eames
6ae03a5dce Added an interop commonjs loader. 2014-11-18 15:25:12 -07:00
Lars Kappert
9895711bf4 Improve performance 2014-11-18 22:15:02 +01:00
Lars Kappert
d2724554cc Make module id's for AMD body in UMD optional as well 2014-11-18 22:12:03 +01:00
Lars Kappert
8db466c698 Make AMD module id's optional 2014-11-18 22:04:41 +01:00
Sebastian McKenzie
68ef2d545e Merge pull request #188 from brentburg/webpack-return
Webpack doesn't like return outside of a function in a module
2014-11-19 01:14:07 +11:00
Brent Burgoyne
861b9e68d3 Deleted uneeded _runtime.js 2014-11-18 07:13:12 -07:00
Brent Burgoyne
a0eb108cd4 Remove global existence check 2014-11-18 07:10:47 -07:00
Brent Burgoyne
756aef6adc Instead of returning early, conditionally require actual runtime (./_runtime.js)
Fix this error with webpack:

ERROR in ./~/6to5/lib/6to5/transformation/transformers/generators/runtime.js
Module parse failed: /[...]/node_modules/6to5/lib/6to5/transformation/transformers/generators/runtime.js Line 12: Illegal return statement
You may need an appropriate loader to handle this file type.
|
| if (typeof global.regeneratorRuntime === "object") {
  |   return;
  |
}
|
 @ ./~/6to5/lib/6to5/polyfill.js 6:0-59
2014-11-18 06:55:39 -07:00
Sebastian McKenzie
7b74c1c8ec more generator spring cleaning 2014-11-17 17:30:41 +11:00
Sebastian McKenzie
8e115ef3ed regenerator spring cleaning 2014-11-17 17:04:04 +11:00
Sebastian McKenzie
b9a6cf35b7 Merge pull request #184 from thejameskyle/support-table
Sort comparison table by most es6 support and split into two groups
2014-11-17 16:50:24 +11:00
James Kyle
2e22de71b4 Sort comparison table by most es6 support and split into two groups 2014-11-16 21:49:19 -08:00
Sebastian McKenzie
a077c75c8c v1.12.20 2014-11-17 14:24:31 +11:00
Sebastian McKenzie
c0b03e8126 append sourceMappingURL when using bin/6to5 and output sourcemaps - fixes #183 2014-11-17 14:22:25 +11:00
Sebastian McKenzie
a3a4a7645c v1.12.19 2014-11-17 14:10:10 +11:00
Sebastian McKenzie
7bd1337ee8 clean up weird regenerator formatting, only one instance, heaps more to go! 2014-11-17 13:56:42 +11:00
Sebastian McKenzie
c54f530b10 fix up duplicate variables in regenerator 2014-11-17 12:48:35 +11:00
Sebastian McKenzie
9d3a3a57f2 fix up generator normaliseOptions 2014-11-17 12:39:01 +11:00
Sebastian McKenzie
e1474c2f5f add 1.12.19 changelog 2014-11-17 12:00:05 +11:00
Sebastian McKenzie
8a9a205122 fix up comments option 2014-11-17 11:59:52 +11:00
Sebastian McKenzie
885d65f9de Merge pull request #179 from webpro/remove-comments
Remove comments
2014-11-17 11:54:41 +11:00
Sebastian McKenzie
43d1435c97 Merge pull request #180 from SimonDegraeve/add-jsxhint-plugin
Add JSXHint in the plugins list.
2014-11-17 11:47:47 +11:00
Simon Degraeve
247c14c5ab Add JSXHint in the plugins list. 2014-11-17 08:19:49 +08:00
Lars Kappert
0e2b12c134 Separate comments and comments setting 2014-11-16 21:11:43 +01:00
Lars Kappert
59c5abe188 Exclude comments from generated code 2014-11-16 20:33:50 +01:00
Lars Kappert
e1cc1dcb4b Introduce --remove-comments (-c) option 2014-11-16 20:33:50 +01:00
Sebastian McKenzie
d091793077 add generator support let scoping - fixes #178 2014-11-17 04:09:48 +11:00
Sebastian McKenzie
e6baac1003 move regenerator into main repo so we can iterate on it faster and make a bunch of additional changes 2014-11-17 04:09:29 +11:00
Sebastian McKenzie
c41608edc3 add gobble to plugins 2014-11-17 04:04:02 +11:00
Sebastian McKenzie
3815913537 v1.12.18 2014-11-16 21:01:12 +11:00
Sebastian McKenzie
e5c18749f0 add changelog for 1.12.18 2014-11-16 21:00:00 +11:00
Sebastian McKenzie
b7458f949c Merge pull request #177 from josh/browser-global
Prefer module provided `global` rather than `window` reference
2014-11-16 20:58:12 +11:00
Sebastian McKenzie
69302b314f add sprockets-es6 to plugins 2014-11-16 20:55:56 +11:00
Joshua Peek
0c57a00fdb Check if attachEvent is defined 2014-11-16 01:41:56 -08:00
Joshua Peek
3bec8b0311 Prefer module global reference rather than window 2014-11-16 01:41:16 -08:00
Sebastian McKenzie
6a88e05362 v1.12.17 2014-11-16 19:29:25 +11:00
Sebastian McKenzie
e3bd2dff8d remove unused path variable 2014-11-16 19:27:49 +11:00
Sebastian McKenzie
ef82171254 update amd/umd modules documentation 2014-11-16 19:27:15 +11:00
Sebastian McKenzie
00d94fd810 update changelog with additional new options 2014-11-16 19:26:03 +11:00
Sebastian McKenzie
d929d3c5eb remove duplicate i variable from traverse 2014-11-16 19:24:58 +11:00
Sebastian McKenzie
5c1ee86b97 remove filenameRelative from bin/6to5* since it's unneccesary 2014-11-16 19:24:47 +11:00
Sebastian McKenzie
5409691a3a update umd and amd tests with new moduleName option 2014-11-16 19:22:37 +11:00
Sebastian McKenzie
24964ac454 add filenameRelative to bin/6to5* 2014-11-16 19:20:08 +11:00
Sebastian McKenzie
faa81ab85b add 1.12.17 changelog 2014-11-16 19:19:57 +11:00
Sebastian McKenzie
d4bc082bb9 add new filenameRelative, sourceRoot and moduleRoot option documentation 2014-11-16 19:19:46 +11:00
Sebastian McKenzie
3777af6bbd add filenameRelative default and make sourceFileName and sourceMapName inherit form it 2014-11-16 19:19:25 +11:00
Sebastian McKenzie
1f258e9e9c add sourceRoot to source map 2014-11-16 19:19:07 +11:00
Sebastian McKenzie
50333c879c add comments and change single quotes in amd formatter getModuleName 2014-11-16 19:18:56 +11:00
Sebastian McKenzie
105e6ac379 add filenameRelative to tests 2014-11-16 19:18:30 +11:00
Sebastian McKenzie
dadab64e39 Merge pull request #176 from darvelo/master
Generate moduleNames for AMD/UMD
2014-11-16 19:00:56 +11:00
Sebastian McKenzie
2b82f2bcc2 ignore unknown nodes in traversal 2014-11-16 18:52:54 +11:00
Sebastian McKenzie
f1183505b1 optimise traverse, improves traversal speed by 50% 2014-11-16 18:50:07 +11:00
Sebastian McKenzie
fa3b24e5b4 don't lazy set templates, can't even remember why i did this 2014-11-16 18:49:29 +11:00
Sebastian McKenzie
5789447068 add loc option to exec test 2014-11-16 18:48:32 +11:00
David Arvelo
f1f7321590 Generate moduleNames for AMD/UMD 2014-11-16 02:38:00 -05:00
Sebastian McKenzie
9ff4df6dae v1.12.16 2014-11-16 14:39:15 +11:00
Sebastian McKenzie
0dbb24c922 remove unused i variable in default parameters transformer 2014-11-16 14:37:26 +11:00
Sebastian McKenzie
a027d2b9cf add 1.12.16 changelog 2014-11-16 14:34:42 +11:00
Sebastian McKenzie
e290990371 scope: remove unused references instance property 2014-11-16 14:34:29 +11:00
Sebastian McKenzie
d0a2bd170e clean up constants transformer 2014-11-16 14:33:37 +11:00
Sebastian McKenzie
69db46f96b move down and clump constants and let scoping transformer positions 2014-11-16 14:33:29 +11:00
Sebastian McKenzie
27ba4b2bba scope: switch over declaration building to info so we can build multiple things 2014-11-16 14:33:16 +11:00
Sebastian McKenzie
b337c1ab06 test/transformation: use full location as filename 2014-11-16 14:32:40 +11:00
Sebastian McKenzie
a1895b4bb4 implement temporal dead zone for default parameters - fixes #169 2014-11-16 14:32:03 +11:00
Sebastian McKenzie
00483917f0 fix comments not being retained from MethodDefinition in classes 2014-11-16 11:30:05 +11:00
Sebastian McKenzie
d09bafaf8c Merge pull request #172 from thejameskyle/docs-whitespace
Add newline to keep marked from parsing incorrectly
2014-11-16 10:32:04 +11:00
James Kyle
a7ef02c781 Add newline to keep marked from parsing incorrectly 2014-11-15 15:31:16 -08:00
Sebastian McKenzie
94cd45c269 v1.12.15 2014-11-15 11:42:06 +11:00
Sebastian McKenzie
424bab97d0 update acorn-6to5 - fixes #165 2014-11-15 11:40:34 +11:00
Sebastian McKenzie
a1bdd804e2 v1.12.14 2014-11-15 11:30:37 +11:00
Sebastian McKenzie
10c051890b fix changelog version 2014-11-15 11:29:41 +11:00
Sebastian McKenzie
ac49d0a335 v1.12.4 2014-11-15 11:29:06 +11:00
Sebastian McKenzie
b56f1800e5 update regenerator-6to5 2014-11-15 11:27:29 +11:00
Sebastian McKenzie
49ef92c586 add changelog for v1.12.4 2014-11-15 11:23:42 +11:00
Sebastian McKenzie
542fe89123 fix up tests to work with new member expression keyword generator 2014-11-15 11:23:16 +11:00
Sebastian McKenzie
5b118c0c3f add _property-literals test 2014-11-15 11:13:10 +11:00
Sebastian McKenzie
8503916799 add _memberExpressionKeywords transformer that turns keyword identifiers to computed literals 2014-11-15 11:13:02 +11:00
Sebastian McKenzie
206c828a56 more react compliant whitespace - #165 2014-11-15 11:00:32 +11:00
Sebastian McKenzie
7a261a1db1 fix duplicate let scoping in functions - fixes #166 2014-11-15 09:47:48 +11:00
Sebastian McKenzie
c9d9a085f1 v1.12.13 2014-11-15 03:08:35 +11:00
Sebastian McKenzie
6d1953d9c3 fix constants transformer not accurately checking nodes 2014-11-15 03:07:33 +11:00
Sebastian McKenzie
92621d71c7 remove unused variable 2014-11-15 03:01:58 +11:00
Sebastian McKenzie
dc01731c25 add changelog for 1.12.13 2014-11-15 03:01:01 +11:00
Sebastian McKenzie
9fb8a80f60 support raw property on tagged template literals - closes #164 2014-11-15 03:00:53 +11:00
Sebastian McKenzie
85c2de57e4 fix for-head duplication testing and replacement - fixes #162 2014-11-15 02:50:05 +11:00
Sebastian McKenzie
58fac2e2be support duplicate constants within different block scopes - fixes #161 2014-11-15 02:49:49 +11:00
Sebastian McKenzie
682806f1ca instead of ignoring dot tests, add them as pending 2014-11-15 02:49:28 +11:00
Sebastian McKenzie
47c6f74251 v1.12.12 2014-11-14 23:15:14 +11:00
Sebastian McKenzie
37f360c72d make scope tracker more reliable to handle all edgecases 2014-11-14 23:13:58 +11:00
Sebastian McKenzie
e5a8c95b62 v1.12.11 2014-11-14 19:39:25 +11:00
Sebastian McKenzie
921d459f13 fix transformation let scoping hoisting test 2014-11-14 19:38:29 +11:00
Sebastian McKenzie
58898932e6 shift letScoping to before forOf transformer 2014-11-14 19:35:07 +11:00
Sebastian McKenzie
c7b45116c4 fix generation of integer Literals in MemberExpression 2014-11-14 19:34:54 +11:00
Sebastian McKenzie
32ddd638ba Revert "expose moduleName option - closes #158"
This reverts commit fdd1451d53.
2014-11-14 18:33:11 +11:00
Sebastian McKenzie
0eb3cda2d4 add 1.12.11 changelog 2014-11-14 17:20:05 +11:00
Sebastian McKenzie
2acb24d43d block scope classes 2014-11-14 17:19:46 +11:00
Sebastian McKenzie
fdd1451d53 expose moduleName option - closes #158 2014-11-14 17:19:39 +11:00
Sebastian McKenzie
43e2f121a6 remove nodes replacing in util.template 2014-11-14 09:28:23 +11:00
Sebastian McKenzie
297e55ba63 Revert "fix up types.toStatement and return an expressionStatement if all else fails"
This reverts commit 740193b1e2.
2014-11-14 09:28:04 +11:00
Sebastian McKenzie
38396dadd5 remove unused nodes.inherits in util.template 2014-11-14 09:15:29 +11:00
Sebastian McKenzie
f75f045026 turn custom runtime into a proper identifier 2014-11-14 09:15:00 +11:00
Sebastian McKenzie
740193b1e2 fix up types.toStatement and return an expressionStatement if all else fails 2014-11-14 09:14:49 +11:00
Sebastian McKenzie
b9fe1475c2 add basic api test 2014-11-14 09:13:00 +11:00
Sebastian McKenzie
6065220f9b add runtime test 2014-11-14 09:12:54 +11:00
Sebastian McKenzie
715884662e fix basic unicode-regex test 2014-11-14 09:12:49 +11:00
Sebastian McKenzie
11780c28ff add let scoping hoisting test 2014-11-14 09:12:38 +11:00
Sebastian McKenzie
215c2da7cb v1.12.10 2014-11-14 07:40:41 +11:00
Sebastian McKenzie
c7c41d6548 add changelog for 1.12.10 2014-11-14 07:39:06 +11:00
Sebastian McKenzie
695571b435 fix LetScoping::pushDeclar - fixes #156 2014-11-14 07:34:50 +11:00
Sebastian McKenzie
f845633cc1 v1.12.9 2014-11-14 02:24:08 +11:00
Sebastian McKenzie
72c9b1d6c9 remove redundant changelog message 2014-11-14 02:23:23 +11:00
Sebastian McKenzie
edd3363e48 fix unicode regex test escaping 2014-11-14 02:23:12 +11:00
Sebastian McKenzie
114b5ef9ec add changelog for 1.12.9 2014-11-14 02:20:15 +11:00
Sebastian McKenzie
2f4e0c3361 escape unicode characters - fixes #154 2014-11-14 02:17:06 +11:00
Sebastian McKenzie
3ee51dae1a fix semicolon 2014-11-14 00:59:18 +11:00
Sebastian McKenzie
20263c1151 fix newline in let-scoping/for-break-continue-return test 2014-11-14 00:55:39 +11:00
Sebastian McKenzie
eaac564f11 add toIdentifier, toBlock and toStatement tests 2014-11-14 00:55:22 +11:00
Sebastian McKenzie
63a47ef7bb optimise types.toStatement for when we're directly passed a statement 2014-11-14 00:55:14 +11:00
Sebastian McKenzie
6963cc1e40 fix WithStatement missing paranthesis 2014-11-14 00:54:58 +11:00
Sebastian McKenzie
5eb2462e29 fix up semicolons for module ExportDeclaration generator 2014-11-14 00:54:28 +11:00
Sebastian McKenzie
9e285cdc20 remove unneccesary Literal generator raw 2014-11-14 00:54:12 +11:00
Sebastian McKenzie
01ade47af9 add single spread test 2014-11-14 00:54:00 +11:00
Sebastian McKenzie
b1fe449b0d allow XJSElement and SequenceExpression to be user whitespacable 2014-11-14 00:53:45 +11:00
Sebastian McKenzie
2b458ec2d4 make it illegal to use destructuring outside of an ExpressionStatement 2014-11-14 00:53:10 +11:00
Sebastian McKenzie
d5f47f4f4d generator: correctly output XJSEmptyExpression 2014-11-14 00:52:49 +11:00
Sebastian McKenzie
d4deb18975 support async functions in generator and move MethodDefinition to class generator 2014-11-14 00:52:36 +11:00
Sebastian McKenzie
5a794db73b fix up let scoping transformer comments 2014-11-14 00:52:15 +11:00
Sebastian McKenzie
dc131f05a8 add comprehensive generation tests 2014-11-14 00:51:59 +11:00
Sebastian McKenzie
1d4f79790a add brief usage to doc/index.md - thanks @gabrielecirulli ❤️ 2014-11-13 23:31:51 +11:00
Sebastian McKenzie
6bcbaf6df1 better feature code examples 2014-11-13 19:00:08 +11:00
Sebastian McKenzie
bc199ef0c9 better api documentation 2014-11-13 18:59:59 +11:00
Sebastian McKenzie
f5fed99c81 better 6to5 tagline 2014-11-13 18:59:46 +11:00
Sebastian McKenzie
66a6d3cffe add CONTRIBUTING.md 2014-11-13 18:59:29 +11:00
Sebastian McKenzie
39227486a6 add async to caveats 2014-11-13 14:47:39 +11:00
Sebastian McKenzie
caafa31df1 chagne ES6 to ES6+ when talking about 6to5 support 2014-11-13 14:47:32 +11:00
Sebastian McKenzie
4c41c904f5 v1.12.8 2014-11-13 13:42:54 +11:00
Sebastian McKenzie
0917a6a5b1 better destructuring AssignmentExpression error message 2014-11-13 13:42:18 +11:00
Sebastian McKenzie
349eba33ce add async functions to traceur differences 2014-11-13 13:40:54 +11:00
Sebastian McKenzie
8ff21b407d temporarily forbid AssignmentExpression destructuring outside of ExpressionStatement 2014-11-13 13:40:41 +11:00
Sebastian McKenzie
751ea7a12c v1.12.7 2014-11-13 13:19:45 +11:00
Sebastian McKenzie
b30cd227cc update acorn-6to5 - fixes #153 2014-11-13 13:18:59 +11:00
Sebastian McKenzie
18dc7b8143 v1.12.6 2014-11-13 12:55:39 +11:00
Sebastian McKenzie
1c628bbec1 disable generation/comments/comment-only test 2014-11-13 12:53:38 +11:00
Sebastian McKenzie
d4c3dde02a update to latest acorn-6to5 2014-11-13 12:49:29 +11:00
Sebastian McKenzie
a587106a6b v1.12.5 2014-11-13 12:26:16 +11:00
Sebastian McKenzie
9c1b60e451 fix excessive whitespace trimming resulting in innaccurate sourcemap line - fixes #151 2014-11-13 12:25:11 +11:00
Sebastian McKenzie
0c7e0b65b9 add browser support, array comprehension, async functions and generator comprehension to differences table 2014-11-13 03:24:45 +11:00
Sebastian McKenzie
5c17091db4 replace documentation link 2014-11-13 01:17:14 +11:00
Sebastian McKenzie
7fa5ba88df v1.12.4 2014-11-13 01:16:45 +11:00
Sebastian McKenzie
2fae245cd5 add 1.12.4 changelog 2014-11-13 01:15:41 +11:00
Sebastian McKenzie
297f103ddb move docs to folder 2014-11-13 01:13:48 +11:00
Sebastian McKenzie
fd63650d6a add .hound.yml 2014-11-12 19:25:35 +11:00
Sebastian McKenzie
e13ed39567 v1.12.3 2014-11-12 18:43:39 +11:00
Sebastian McKenzie
bb00f641b7 remove unused variables in spread transformer 2014-11-12 18:42:24 +11:00
Sebastian McKenzie
25b466a627 remove unused variables 2014-11-12 18:39:50 +11:00
Sebastian McKenzie
ac231f2987 add 1.12.3 changelog 2014-11-12 18:38:39 +11:00
Sebastian McKenzie
458e3d48f6 use Array.from instead of Array.prototype.slice in spread transformer and support NewExpression spreads - fixes #148 2014-11-12 18:38:30 +11:00
Sebastian McKenzie
c235780611 move down 6to5-node util declaration 2014-11-12 18:37:32 +11:00
Sebastian McKenzie
56b858ccb1 add generator comprehension transformer 2014-11-12 18:29:41 +11:00
Sebastian McKenzie
d42351bb02 add default parameters existence change to well... the defaultParameters transformer 2014-11-12 18:29:27 +11:00
Sebastian McKenzie
ed7378cc2d add apply-constructor declaration and add support for not returning generated code in opts.code 2014-11-12 18:29:03 +11:00
Sebastian McKenzie
a47a7dc347 rename util.parseNoProperties to util.parseTemplate 2014-11-12 18:28:11 +11:00
Sebastian McKenzie
2c82b5a4b0 add generator option to FunctionExpression builder keys 2014-11-12 18:27:56 +11:00
Sebastian McKenzie
3578135b90 add spread caveat and add generator comprehension and react/jsx to features 2014-11-12 18:27:05 +11:00
Sebastian McKenzie
5f3408b2a2 upgrade regenerator-6to5 2014-11-12 18:26:29 +11:00
Sebastian McKenzie
9e3f9fda6b add support for generator comprehensions - fixes #149 2014-11-12 18:26:22 +11:00
Sebastian McKenzie
7f425d2c6e v1.12.2 2014-11-12 12:22:03 +11:00
Sebastian McKenzie
311a8e042b add missing semicolon 2014-11-12 12:19:25 +11:00
Sebastian McKenzie
27d30329fd add more react spread tests 2014-11-12 12:18:16 +11:00
Sebastian McKenzie
12c5a3e73b add 1.12.2 changelog 2014-11-12 12:17:59 +11:00
Sebastian McKenzie
2a166a6ed1 support jsx spread attributes that aren't the first - fixes #146 2014-11-12 12:17:45 +11:00
Sebastian McKenzie
896929378e add util.trimRight method - fixes #147 2014-11-12 12:17:26 +11:00
Sebastian McKenzie
ae439d27b9 update mocha and browserify 2014-11-12 12:08:33 +11:00
Sebastian McKenzie
e22798261a change useless self references to this 2014-11-12 02:03:46 +11:00
Sebastian McKenzie
d0af8b8d0a remove numeric literals transformer 2014-11-12 02:03:25 +11:00
Sebastian McKenzie
beaa2fa540 add async functions to features 2014-11-12 02:03:11 +11:00
Sebastian McKenzie
b8cac9787e produce new MemberExpression in a CallExpression super identifier instead of mutating the property 2014-11-12 01:51:57 +11:00
Sebastian McKenzie
64f6e4a0c5 clean up classes transformer and add comments 2014-11-12 01:48:55 +11:00
Sebastian McKenzie
c4a7ac5a8b turn classes transformer into a class like let scoping 2014-11-12 01:39:35 +11:00
Sebastian McKenzie
1ed682fa76 fix up jsdoc in let-scoping transformer 2014-11-12 01:39:02 +11:00
Sebastian McKenzie
9987e7fe0e add 1.12.1 changelog 2014-11-12 01:38:50 +11:00
Sebastian McKenzie
e74c7cb0b7 turn the let scoping transformer into a class because it's quite complicated and the logic needs to be WAY more organised 2014-11-12 01:20:51 +11:00
Sebastian McKenzie
2f01e5c3af v1.12.1 2014-11-12 00:47:53 +11:00
Sebastian McKenzie
6847211971 fix up aliasFunctions transformer 2014-11-12 00:46:36 +11:00
Sebastian McKenzie
965e246259 add back opts defaults 2014-11-12 00:46:20 +11:00
Sebastian McKenzie
af59eb7d6a fix linting errors 2014-11-12 00:33:39 +11:00
Sebastian McKenzie
def4319058 stop _alias-functions transformer when hitting a function that's not an arrow function - fixes #145 2014-11-12 00:32:30 +11:00
Sebastian McKenzie
d90383b1ba generator: add Buffer class that deals with the actual code output 2014-11-12 00:27:59 +11:00
Sebastian McKenzie
1ac40ee834 remove static whitespace properties in favor of pushing to the dynamic ones 2014-11-12 00:15:31 +11:00
Sebastian McKenzie
3d5d170eff move whitespace and parentheses generation logic into separate files 2014-11-12 00:11:34 +11:00
Sebastian McKenzie
b5bdba46f1 change test-appveyor to test-spec and add test-clean method to clean up after tests 2014-11-11 23:27:01 +11:00
Sebastian McKenzie
c4e162b8e5 add rails to plugins 2014-11-11 22:27:52 +11:00
Sebastian McKenzie
98bc750b05 add mocha to plugins 2014-11-11 22:25:27 +11:00
Sebastian McKenzie
84002ed1ce add jest to plugins 2014-11-11 22:12:26 +11:00
Sebastian McKenzie
aaab2db0ec add react/jsx to readme 2014-11-11 20:06:02 +11:00
Sebastian McKenzie
7f3959444c v1.12.0 2014-11-11 19:14:52 +11:00
Sebastian McKenzie
0ba9216d6f remove unused variables in react transformer 2014-11-11 19:14:00 +11:00
Sebastian McKenzie
6dfe66bce3 add v1.12.0 to changelog 2014-11-11 19:12:44 +11:00
Sebastian McKenzie
9e08a6f084 combine jsx and react transformer so we can make the jsx output correct - #143 2014-11-11 19:11:30 +11:00
Sebastian McKenzie
b9f3f1e2a9 add comment inheriting to types.inherits 2014-11-11 19:10:41 +11:00
Sebastian McKenzie
4f18ed406c v1.11.15 2014-11-11 17:17:08 +11:00
Sebastian McKenzie
4d8e5f728a 1.11.15 2014-11-11 17:16:11 +11:00
Sebastian McKenzie
54857ceac7 fix jsx literal generator - closes #143 2014-11-11 17:15:37 +11:00
Sebastian McKenzie
5b961ea3e7 v1.11.14 2014-11-11 15:35:18 +11:00
Sebastian McKenzie
35b28cf722 more reliable jsx literal whitespace 2014-11-11 15:34:29 +11:00
Sebastian McKenzie
c5bfbf37f0 add 1.11.14 changelog 2014-11-11 15:27:23 +11:00
Sebastian McKenzie
cfee68aa67 jsx: replace all newlines and excess whitespace with spaces - fixes #142 2014-11-11 15:26:25 +11:00
Sebastian McKenzie
7d0dae129c nicer let-scoping switch 2014-11-11 15:25:37 +11:00
Sebastian McKenzie
f9d14fa2ed add runtime, property-literals and shebang tests 2014-11-11 15:25:27 +11:00
Sebastian McKenzie
11d55e661e rename let-scoping tests to traceur-let-scoping and add additional let-scoping tests 2014-11-11 15:25:13 +11:00
Sebastian McKenzie
0544e98fb1 add switch case generated node whitespace 2014-11-11 15:24:40 +11:00
Sebastian McKenzie
59d918ea67 remove unused isArray traverse.hasType 2014-11-11 15:23:52 +11:00
Sebastian McKenzie
b4232699d2 add newline after shebang 2014-11-11 15:23:31 +11:00
Sebastian McKenzie
6bd67ca660 v1.11.13 2014-11-11 14:31:06 +11:00
Sebastian McKenzie
4722c0ce56 add support for escodegen-style format options 2014-11-11 14:30:06 +11:00
Sebastian McKenzie
25a5caa0fc update regenerator-6to5 2014-11-11 14:29:32 +11:00
Sebastian McKenzie
6f05466cf5 normalise windows path separators to unix 2014-11-11 13:36:59 +11:00
Sebastian McKenzie
1ad9edb57c tests/bin: normalise stdout path separators 2014-11-11 13:33:50 +11:00
Sebastian McKenzie
c6ae33c5a2 tests: change all windows line endings to unix ones 2014-11-11 13:30:19 +11:00
Sebastian McKenzie
e0d620b1d5 remove browser-polyfill.js instead of polyfill.js 2014-11-11 13:29:50 +11:00
Sebastian McKenzie
5588bf56eb add CHANGELOG 2014-11-11 13:29:37 +11:00
Sebastian McKenzie
a0e500de6c v1.11.12 2014-11-11 13:14:31 +11:00
Sebastian McKenzie
bf8d9801ce rename browserified polyfill to browser-polyfill - fixes #140 2014-11-11 13:13:10 +11:00
Sebastian McKenzie
68b99a7004 v1.11.11 2014-11-11 13:06:06 +11:00
Sebastian McKenzie
5ae4f8eec7 add AwaitExpression generator 2014-11-11 13:05:07 +11:00
Sebastian McKenzie
d9a3eadad7 move generators transformer to bottom 2014-11-11 13:03:06 +11:00
Sebastian McKenzie
b1cc5419a4 add AwaitExpression visitor keys - fixes #141 2014-11-11 13:02:55 +11:00
Sebastian McKenzie
c6a7a9c401 v1.11.10 2014-11-11 09:48:28 +11:00
Sebastian McKenzie
608df54b02 bump acorn-6to5 version to one that supports async/await - closes #134 2014-11-11 09:47:29 +11:00
Sebastian McKenzie
2ac83ec95b v1.11.9 2014-11-11 08:07:29 +11:00
Sebastian McKenzie
e4596f638d only check string literals in property-literals transformer 2014-11-11 08:06:31 +11:00
Sebastian McKenzie
1425af9b2a v1.11.8 2014-11-11 07:51:43 +11:00
Sebastian McKenzie
9351c6470f bump regenerator version 2014-11-11 07:50:07 +11:00
Sebastian McKenzie
7b8a50509a v1.11.7 2014-11-11 01:07:20 +11:00
Sebastian McKenzie
1400dee0c1 delegate code and opts assurance to File 2014-11-11 01:06:29 +11:00
Sebastian McKenzie
9e2fc6db9c clone options - sindresorhus/grunt-6to5#7 2014-11-11 01:04:39 +11:00
Sebastian McKenzie
aef5b89492 fix appveyor badge 2014-11-10 21:12:30 +11:00
Sebastian McKenzie
e0bf6f698e add appveyor badge to readme 2014-11-10 21:09:09 +11:00
Sebastian McKenzie
1ac459a05d better appveyor make test 2014-11-10 21:09:04 +11:00
Sebastian McKenzie
1b49835b27 v1.11.6 2014-11-10 16:46:40 +11:00
Sebastian McKenzie
db7b6a4972 fix canCompile in readdirFilter in bin/6to5 util 2014-11-10 16:45:30 +11:00
Sebastian McKenzie
79045e15c5 remove second canCompile declaration 2014-11-10 16:42:04 +11:00
Sebastian McKenzie
b7e6d8f998 add appveyor.yml 2014-11-10 16:31:32 +11:00
Sebastian McKenzie
88c6ce4e48 v1.11.5 2014-11-10 13:10:39 +11:00
Sebastian McKenzie
8c97f1d92e allow constant properties to be modified - fixes #131 2014-11-10 13:09:45 +11:00
Sebastian McKenzie
833e8b091b v1.11.4 2014-11-10 13:02:04 +11:00
Sebastian McKenzie
23ebb23944 add missing util declaration to let scoping transformer 2014-11-10 13:00:52 +11:00
Sebastian McKenzie
778cab33d5 move canCompile method to util 2014-11-10 12:59:24 +11:00
Sebastian McKenzie
5849c6af17 add canCompile method to node api 2014-11-10 12:58:44 +11:00
Sebastian McKenzie
bb0655d8f6 move transformer assignment to new Transformer 2014-11-10 08:21:35 +11:00
Sebastian McKenzie
9977a5f614 change gitter travis hook to always 2014-11-10 08:20:18 +11:00
Sebastian McKenzie
9318d63b5c add let-scoping-return template to let scoping transformer 2014-11-10 08:16:47 +11:00
Sebastian McKenzie
b2ab0dbedc add self-global template to runtime generation 2014-11-10 08:16:38 +11:00
Sebastian McKenzie
e0d3e18865 add allowReturnOutsideFunction to util.parse and make nodes optional in util.template 2014-11-10 08:16:22 +11:00
Sebastian McKenzie
3a3ad4775b add gitter webhook to travis 2014-11-10 08:16:00 +11:00
Sebastian McKenzie
40fdd2a828 dry up types.getIds 2014-11-10 00:51:46 +11:00
Sebastian McKenzie
12f66e852a v1.11.3 2014-11-10 00:22:09 +11:00
Sebastian McKenzie
c61c9aab56 remove invalid ObjectPattern assignment 2014-11-10 00:19:37 +11:00
Sebastian McKenzie
7adc919bb6 remove invalid ObjectPattern destructuring assignment 2014-11-10 00:18:01 +11:00
Sebastian McKenzie
9989b89b92 v1.11.2 2014-11-09 22:27:52 +11:00
Sebastian McKenzie
361ef02a88 support ParenthesizedExpression in types.getIds 2014-11-09 22:26:48 +11:00
Sebastian McKenzie
72369c90a2 update dependencies 2014-11-09 22:11:06 +11:00
Sebastian McKenzie
fa26174d3f better isParenthesizedExpression support for destructuring 2014-11-09 22:10:59 +11:00
Sebastian McKenzie
227d51a556 add AssignmentExpression ObjectPattern test 2014-11-09 22:10:43 +11:00
Sebastian McKenzie
a5f00aa3f6 v1.11.1 2014-11-09 21:39:19 +11:00
Sebastian McKenzie
a47723c66c fix destructuring to support ParanthesizedExpression 2014-11-09 21:37:59 +11:00
Sebastian McKenzie
ab2f652bdf break up let scoping transformer some more 2014-11-09 21:25:14 +11:00
Sebastian McKenzie
5aff7709f7 add back _property-literals transformer that somehow disappeared? 2014-11-09 21:25:05 +11:00
Sebastian McKenzie
06ba731452 traverse: pass opts.scope instead of opts 2014-11-09 21:24:48 +11:00
Sebastian McKenzie
f4c81531ad break up let scoping 2014-11-09 20:31:46 +11:00
Sebastian McKenzie
19b115c76b generator: dry up ForXStatements and *Statements 2014-11-09 20:31:36 +11:00
Sebastian McKenzie
96b08bf7df remove codeclimate from travis 2014-11-09 20:20:21 +11:00
Sebastian McKenzie
8f435d59da change sebmck to new 6to5 org 2014-11-09 20:08:36 +11:00
Sebastian McKenzie
6df03c00a8 Merge pull request #130 from thejameskyle/patch-1
Update logo on README
2014-11-09 20:05:11 +11:00
James Kyle
4ec134814e Update logo on README 2014-11-09 01:04:32 -08:00
Sebastian McKenzie
4fb50cfe20 v1.11.0 2014-11-09 18:45:50 +11:00
Sebastian McKenzie
bac952e036 move runtime to dist/runtime 2014-11-09 18:42:42 +11:00
Sebastian McKenzie
9844540bb0 add npm release-only files to gitignore 2014-11-09 18:38:09 +11:00
Sebastian McKenzie
1a9a60e010 fix polyfill require path 2014-11-09 18:37:57 +11:00
Sebastian McKenzie
e26812e622 remove v8-argv 2014-11-09 18:33:07 +11:00
Sebastian McKenzie
7f306388e4 remove polyfill from root 2014-11-09 18:32:19 +11:00
Sebastian McKenzie
b217453d49 clean up runtime generation declarations 2014-11-09 18:22:26 +11:00
Sebastian McKenzie
463165e0c8 remove unneccesary declaration 2014-11-09 18:22:12 +11:00
Sebastian McKenzie
85d7da9a7c fix comment space column bug 2014-11-09 18:22:04 +11:00
Sebastian McKenzie
48f6c5c649 remove i from mocha globals 2014-11-09 18:21:50 +11:00
Sebastian McKenzie
d1187dde82 fix up tests to work with the new code generator 2014-11-09 18:21:42 +11:00
Sebastian McKenzie
f21a6b36ac peg regenerator-6to5 and acorn-6to5 to a commit 2014-11-09 18:21:29 +11:00
Sebastian McKenzie
407bb9278f uglify polyfill.js and use minified versions in npm release 2014-11-09 16:41:45 +11:00
Sebastian McKenzie
70b3d88455 fix browser polyfill copytext 2014-11-09 16:40:46 +11:00
Sebastian McKenzie
98df094e60 fix cached templates exporting 2014-11-09 16:40:37 +11:00
Sebastian McKenzie
4bae820a5a remove Error.captureStackTrace monkey patch as it's no longer necessary with the latest ast-types 2014-11-09 16:37:47 +11:00
Sebastian McKenzie
4e8afa18da move Polyfill from caveats 2014-11-09 16:34:21 +11:00
Sebastian McKenzie
fbf0c25bbe include polyfill 2014-11-09 16:33:26 +11:00
Sebastian McKenzie
a90da9908c only prepend whitespace to properties if we're the first 2014-11-09 16:28:56 +11:00
Sebastian McKenzie
bd51215316 change Runtime to Optional runtime in README 2014-11-09 16:28:21 +11:00
Sebastian McKenzie
e3c6ee5c88 only use needsParens if the node has changed parent 2014-11-09 16:28:05 +11:00
Sebastian McKenzie
8c40db5658 use Program builder 2014-11-09 16:27:39 +11:00
Sebastian McKenzie
4d59976d82 remove _parent from nodes in traverse.removeProperties 2014-11-09 16:27:31 +11:00
Sebastian McKenzie
83286cccd2 use file node builder and save parents to ast tree 2014-11-09 16:26:52 +11:00
Sebastian McKenzie
de7edcaeb0 finalize ast-types 2014-11-09 16:26:32 +11:00
Sebastian McKenzie
6c8db61b23 switch to regenerator-6to5 2014-11-09 16:26:27 +11:00
Sebastian McKenzie
e3d2748970 fix up react display-name test whitespace 2014-11-09 16:26:12 +11:00
Sebastian McKenzie
fa8c570e77 add File and Program to builder keys 2014-11-09 16:25:55 +11:00
Sebastian McKenzie
677f9805c6 update ast-types and add regenerator-6to5 2014-11-09 16:25:45 +11:00
Sebastian McKenzie
eff5efaf10 fix up patching 2014-11-09 13:42:11 +11:00
Sebastian McKenzie
a909a6febd add CatchClause scope 2014-11-09 13:42:00 +11:00
Sebastian McKenzie
61ee0ef6f6 fix generation comments return-no-argument test whitespace 2014-11-09 12:14:15 +11:00
Sebastian McKenzie
07c15f02e6 update generation test to new api 2014-11-09 12:13:55 +11:00
Sebastian McKenzie
3f4068ae00 fix runtime declaration inclusion copytext 2014-11-09 12:12:23 +11:00
Sebastian McKenzie
dce41bb989 fix up tests 2014-11-09 12:09:59 +11:00
Sebastian McKenzie
896663056d add ParenthesizedExpression builder 2014-11-09 12:09:42 +11:00
Sebastian McKenzie
dfe4ce86e0 fix up templateLiterals blacklist check 2014-11-09 12:09:32 +11:00
Sebastian McKenzie
24f0120e01 add patch so we can patch estraverse and ast-types 2014-11-09 12:09:07 +11:00
Sebastian McKenzie
0108562e88 remove unused key variable 2014-11-09 12:07:57 +11:00
Sebastian McKenzie
e4e4ae5b1d fix up node inheritance 2014-11-09 12:07:46 +11:00
Sebastian McKenzie
ba04377ed8 add types.toIdentifier 2014-11-09 12:07:25 +11:00
Sebastian McKenzie
cd9e289dee traverse: clean up scope getIds building 2014-11-09 12:07:14 +11:00
Sebastian McKenzie
0b86a2fef8 use acorns preserveParens 2014-11-09 12:06:56 +11:00
Sebastian McKenzie
b84cb1828b generator: avoid redundant source map mappings 2014-11-09 12:03:47 +11:00
Sebastian McKenzie
aedc013ab8 generator: rename Whitespace methods 2014-11-09 12:03:31 +11:00
Sebastian McKenzie
ab9cd4e630 add support for an optional runtime - closes #129 2014-11-09 12:02:06 +11:00
Sebastian McKenzie
8ef5148870 fix up modules tests 2014-11-08 12:00:49 +11:00
Sebastian McKenzie
4cb90cb1e0 add precedence to generated node generation 2014-11-08 12:00:26 +11:00
Sebastian McKenzie
d0a33ab933 add inherits option to util.template 2014-11-08 12:00:12 +11:00
Sebastian McKenzie
9ea4431ba3 add alternate shallow equals option to types.is* 2014-11-08 11:59:54 +11:00
Sebastian McKenzie
08580edda8 fix up some tests 2014-11-08 09:17:21 +11:00
Sebastian McKenzie
5c6d57c51b add transformation and generation folders 2014-11-08 09:17:12 +11:00
Sebastian McKenzie
744d1af485 move down propertyLiterals transformer in case classes produces any 2014-11-07 21:10:28 +11:00
Sebastian McKenzie
591b78b159 move property literal check to a separate transformer 2014-11-07 21:01:39 +11:00
Sebastian McKenzie
49ea641314 ignore computed property literals that are valid identifiers 2014-11-07 20:51:01 +11:00
Sebastian McKenzie
37a7c92500 remove duplicate mutator map test 2014-11-07 20:47:15 +11:00
Sebastian McKenzie
35b7b140da fix pointless newlines after left braces 2014-11-07 20:47:09 +11:00
Sebastian McKenzie
159f5217e3 simplify ast transformer code 2014-11-07 20:46:54 +11:00
Sebastian McKenzie
795e38e4f4 add Statement node type 2014-11-07 20:46:43 +11:00
Sebastian McKenzie
2a9af21e93 add modules ignore tests 2014-11-07 20:46:20 +11:00
Sebastian McKenzie
e327e041ab add basic generation tests 2014-11-07 20:46:11 +11:00
Sebastian McKenzie
f8e8cd3979 support SpreadElement in destructuring - fixes #128 2014-11-07 20:46:02 +11:00
Sebastian McKenzie
b3206d94a6 Merge branch 'master' into experimental
Conflicts:
	README.md
	lib/6to5/register.js
2014-11-07 13:54:59 +11:00
Sebastian McKenzie
56ac964e54 remove newline assurance and add optional Error constructor to File::errorWithNode 2014-11-07 13:51:31 +11:00
Sebastian McKenzie
df70be4ebb clean up and fix tests 2014-11-07 12:33:35 +11:00
Sebastian McKenzie
99ba77bb0b nicer removeProperties for comments 2014-11-07 12:33:22 +11:00
Sebastian McKenzie
346f72be05 ensure files end with a newline 2014-11-07 12:32:48 +11:00
Sebastian McKenzie
c0e6cda071 add UserWhitespacable alias to Property 2014-11-07 12:32:31 +11:00
Sebastian McKenzie
c054ff7bbb better whitespace detection in generator 2014-11-07 12:32:15 +11:00
Sebastian McKenzie
771d3dc8a0 don't inherit from XJSAttribute in jsx transformer because it causes some weird whitespace issues 2014-11-07 12:31:54 +11:00
Sebastian McKenzie
e8d4806b45 combine export declaration assignments into variable declarations 2014-11-07 12:31:31 +11:00
Sebastian McKenzie
469a522300 better whitespace for code generation 2014-11-07 12:31:09 +11:00
Sebastian McKenzie
4068a8bf68 remove exposure to generator from browser build 2014-11-07 12:30:29 +11:00
Sebastian McKenzie
a04513a3c7 faster util.pushMutatorMap aliases 2014-11-07 12:28:52 +11:00
Sebastian McKenzie
6f0ca947a7 remove exposure to generate and util 2014-11-07 12:28:28 +11:00
Sebastian McKenzie
dd62244e10 use v8-argv to make sure node is ran with --harmony for 6to5-node 2014-11-07 12:28:17 +11:00
Sebastian McKenzie
12f68b05c3 better Symbol polyfill existence check because the one es6-symbol uses isn't reliable 2014-11-07 12:27:57 +11:00
Sebastian McKenzie
62fe128132 more support to t.getIds and add t.needsWhitespaceBefore method 2014-11-07 12:26:48 +11:00
Sebastian McKenzie
bf632ca20b more efficient constants collision checking 2014-11-07 12:26:19 +11:00
Sebastian McKenzie
26428cde41 require: add missing blacklistTests, implement opts.whitelist and opts.only - closes #125 2014-11-07 12:25:42 +11:00
Sebastian McKenzie
9bb8a16d93 change polyfill to monkey patch in browser comment 2014-11-05 15:22:17 +11:00
Sebastian McKenzie
44cd044586 add duo and karma plugins to readme - thanks @shuhei and @bd-labs! 2014-11-05 15:22:07 +11:00
Sebastian McKenzie
765899a521 use push instead of _push for first backtick in template literals 2014-11-04 18:37:00 +11:00
Sebastian McKenzie
1d40cac52f let ExpressionStatements handle child comments 2014-11-04 18:34:21 +11:00
Sebastian McKenzie
fb0325a4d8 add support for SpreadElement to types.getIds 2014-11-04 18:33:48 +11:00
Sebastian McKenzie
1df25a633c fix code reference on generate 2014-11-04 18:33:33 +11:00
Sebastian McKenzie
cfbaae456b use _push instead of push on template literals end 2014-11-04 18:32:51 +11:00
Sebastian McKenzie
95ace3220d fix indentation on generation comments tests 2014-11-04 18:32:30 +11:00
Sebastian McKenzie
2e0f3de72c add missing util require 2014-11-04 18:07:28 +11:00
Sebastian McKenzie
732c21d42a clean up some tests 2014-11-04 18:07:19 +11:00
Sebastian McKenzie
a535007a35 clean up let scoping transformer and add lots of comments 2014-11-04 18:06:54 +11:00
Sebastian McKenzie
5ff6f445b2 fix class computed methods 2014-11-04 15:53:36 +11:00
Sebastian McKenzie
d7ae3b506a fix linting errors 2014-11-04 15:53:11 +11:00
Sebastian McKenzie
287cbbb6a1 implement new and improved let scoping - fixes #91, fixes #102, fixes #124 2014-11-04 14:59:44 +11:00
Sebastian McKenzie
d1088583ba default generateUid scope to Program 2014-11-04 12:57:06 +11:00
Sebastian McKenzie
c967cded78 make id optional in t.getIds 2014-11-04 12:56:53 +11:00
Sebastian McKenzie
71d87f5b97 cache scope ids and limit id variable declarations to kind 2014-11-04 12:56:37 +11:00
Sebastian McKenzie
56271efada pass scope to transformers 2014-11-04 12:48:08 +11:00
Sebastian McKenzie
89fbb06658 simplify VariableDeclaration ForStatement check 2014-11-04 12:47:56 +11:00
Sebastian McKenzie
43ee3b77f3 add SequenceExpression and UnaryExpression builders 2014-11-04 12:47:39 +11:00
Sebastian McKenzie
9ef826b53e move visitor-keys from traverse to types 2014-11-04 12:47:27 +11:00
Sebastian McKenzie
6519ceaa63 move util.getIds to types.getIds 2014-11-04 12:47:03 +11:00
Sebastian McKenzie
d28496006e implement Scope so we can keep track of references to avoid collisions when generating ids 2014-11-04 12:46:47 +11:00
Sebastian McKenzie
5f9710e61f add explanation for gross Error.captureStackTrace polyfill 2014-11-04 12:45:17 +11:00
Sebastian McKenzie
c4cadd8a64 add text/6to5 to browser compilation script types 2014-11-04 09:13:50 +11:00
Sebastian McKenzie
d3c5b8ef0b automatic browser <script type="text/ecmascript-6"> compilation - closes #97 2014-11-04 08:56:48 +11:00
Sebastian McKenzie
120df2c611 make browser api backwards compatible 2014-11-04 08:22:44 +11:00
Sebastian McKenzie
719d23eb3b add Error.captureStackTrace polyfill so browser build will work in non-v8 environments - fixes #107 2014-11-04 08:19:13 +11:00
Sebastian McKenzie
364abf60ea fix generation test whitespace 2014-11-04 08:05:09 +11:00
Sebastian McKenzie
0f5a141c91 change acorn-ast-types to ast-types 2014-11-04 08:04:41 +11:00
Sebastian McKenzie
fca3a0c56f generator: add ensureSemicolon and printBlock methods 2014-11-04 08:04:32 +11:00
Sebastian McKenzie
e88505aba6 better ExportDeclaration generation 2014-11-04 08:04:22 +11:00
Sebastian McKenzie
500a0bdfb6 better whitespace for blocks and methods 2014-11-04 08:04:11 +11:00
Sebastian McKenzie
2a0efceef5 change behaviour of tests and browser testing/build 2014-11-04 08:03:52 +11:00
Sebastian McKenzie
225754ae12 Merge branch 'master' into experimental 2014-11-03 21:18:50 +11:00
Sebastian McKenzie
6f230de01c fix maybeReplace wrong node callback bug 2014-11-03 21:17:56 +11:00
Sebastian McKenzie
3c3746b21f fix transformer alias types key 2014-11-03 21:17:42 +11:00
Sebastian McKenzie
f49f057b33 generator: add trim option to isLast 2014-11-03 21:17:17 +11:00
Sebastian McKenzie
e3b9a0dd38 update alias-functions transformer to use types 2014-11-03 21:16:15 +11:00
Sebastian McKenzie
f540c3f4b7 fix test newlines 2014-11-03 21:15:58 +11:00
Sebastian McKenzie
6e5917e537 make array comprehensions use for-of unless using an array literal - fixes #98 2014-11-03 21:15:49 +11:00
Sebastian McKenzie
816c1d304b remove builders and move them to automatially generated types 2014-11-03 21:13:35 +11:00
Sebastian McKenzie
718e342e86 fix classes supername transformer inference 2014-11-03 18:22:57 +11:00
Sebastian McKenzie
cb98605520 add example usage for custom module formatters 2014-11-03 18:20:01 +11:00
Sebastian McKenzie
600513bcab add ignore module formatter - closes #119 2014-11-03 18:18:51 +11:00
Sebastian McKenzie
620e5791af use t.is* methods to nicen up code 2014-11-03 18:10:52 +11:00
Sebastian McKenzie
47ee2cc99f simplify err.loc references 2014-11-03 17:53:08 +11:00
Sebastian McKenzie
6cc70f7465 compare code instead of ast for transformation tests 2014-11-03 17:52:59 +11:00
Sebastian McKenzie
20484c66c5 add types.inherits method that inherits loc, range, start, end etc 2014-11-03 17:52:50 +11:00
Sebastian McKenzie
171bcad870 make transformation tests compare output instead of ast 2014-11-03 17:52:15 +11:00
Sebastian McKenzie
c963c30107 fix errorWithNode line mapping 2014-11-03 17:50:25 +11:00
Sebastian McKenzie
795183569d fix export default assignment bug 2014-11-03 14:40:47 +11:00
Sebastian McKenzie
9a3c973280 add removeLastNewline to generator and add newlines to generated nodes 2014-11-03 14:40:33 +11:00
Sebastian McKenzie
95f3ca6348 Merge branch 'master' into code-generator
Conflicts:
	lib/6to5/transformers/classes.js
	test/fixtures/transformation/source-maps/class/expected.js
	test/fixtures/transformation/source-maps/class/source-mappings.json
2014-11-03 13:38:44 +11:00
Sebastian McKenzie
6d6039aeb6 Merge branch 'master' into code-generator 2014-11-03 12:36:11 +11:00
Sebastian McKenzie
4c63b4ea1e Merge branch 'master' into code-generator 2014-11-03 12:34:15 +11:00
Sebastian McKenzie
f3d371869d Merge branch 'master' into code-generator
Conflicts:
	lib/6to5/register.js
2014-11-03 12:22:07 +11:00
Sebastian McKenzie
9f8e8d96a8 simplify hasParans for NewExpression 2014-11-03 12:15:57 +11:00
Sebastian McKenzie
a7bbd1dd3e generator: fix comments in harmony-edgecase tests 2014-11-03 12:15:44 +11:00
Sebastian McKenzie
6d961c1857 faster traverse.hasType with array of nodes 2014-11-03 12:15:27 +11:00
Sebastian McKenzie
e13a650d05 remove IfStatement making consequent and alternate blocks 2014-11-03 11:17:36 +11:00
Sebastian McKenzie
3cd7ed69a3 remove useless blank template 2014-11-03 11:16:48 +11:00
Sebastian McKenzie
93c6d69e21 make transformation tests ignore whitespace 2014-11-03 11:15:06 +11:00
Sebastian McKenzie
57d3c836bd register: add additional blacklistTests 2014-11-03 11:14:52 +11:00
Sebastian McKenzie
115282d57b generator: add _push method to simplify buffer pushing and location tracking 2014-11-03 11:13:37 +11:00
Sebastian McKenzie
72d924d85b generator: fix NewExpression arguments 2014-11-03 11:12:30 +11:00
Sebastian McKenzie
6838062279 move util.errorWithNode to File 2014-11-03 11:11:37 +11:00
Sebastian McKenzie
bc79cec15a add NewExpression support to needsParans 2014-11-03 11:11:07 +11:00
Sebastian McKenzie
85f0f6fb14 add whitespace option and move util.errorWithNode to File 2014-11-03 11:09:58 +11:00
Sebastian McKenzie
bf61c1e85d remove recast and add ast-types 2014-11-03 11:09:24 +11:00
Sebastian McKenzie
bd2e3d784f fix source-map transformation tests 2014-11-03 11:09:14 +11:00
Sebastian McKenzie
435b9434ea don't mess with the indentation of TemplateElements 2014-11-01 23:26:48 +11:00
Sebastian McKenzie
2409b017db generator: remove parans around ConditionalExpression 2014-11-01 23:08:50 +11:00
Sebastian McKenzie
99f2864048 generator: remove redundant print call 2014-11-01 23:08:33 +11:00
Sebastian McKenzie
5351057557 generator: move BlockStatement to base generator 2014-11-01 23:08:16 +11:00
Sebastian McKenzie
1a5ee7d5da change acorn-jsx to acorn-6to5 2014-11-01 23:07:53 +11:00
Sebastian McKenzie
ebea86c527 split up types.ensureBlock into types.toBlock 2014-11-01 23:07:34 +11:00
Sebastian McKenzie
bf58004947 generator: add intelligent whitespace based on tokens on nodes in a sequence 2014-11-01 23:07:17 +11:00
Sebastian McKenzie
f0c78102ca move template literal generators into separate file 2014-11-01 19:37:21 +11:00
Sebastian McKenzie
da1512eeb0 rename generation test names to be more descriptive 2014-11-01 19:34:16 +11:00
Sebastian McKenzie
43ea593677 traverse.removeProperties: remove raw property 2014-11-01 19:29:17 +11:00
Sebastian McKenzie
629cea497f move keyword method and restyle variable declarations 2014-11-01 19:29:02 +11:00
Sebastian McKenzie
9475dc681f finish jsx generator 2014-11-01 19:28:42 +11:00
Sebastian McKenzie
6e41309ede add err.stack test to code frame error capture 2014-11-01 19:28:35 +11:00
Sebastian McKenzie
42322e1ce7 add examples to types.needsParans tests 2014-11-01 19:27:42 +11:00
Sebastian McKenzie
400fa8ed97 remove unused ParenthesizedExpression 2014-11-01 19:27:23 +11:00
Sebastian McKenzie
07e2842226 implement array comprehension generator 2014-11-01 19:27:09 +11:00
Sebastian McKenzie
7d46b7c465 expose generator 2014-11-01 17:56:07 +11:00
Sebastian McKenzie
fcf6c9e066 generator: add isLast helper method 2014-11-01 17:53:01 +11:00
Sebastian McKenzie
a5523664fc generator: add alternate support to IfStatement 2014-11-01 17:52:48 +11:00
Sebastian McKenzie
1d3544eadc fix function generation spacing 2014-11-01 16:00:17 +11:00
Sebastian McKenzie
646bdfd04c types.needsParans: add parent ExpressionStatement check for FunctionExpression 2014-11-01 15:58:44 +11:00
Sebastian McKenzie
aba9bba7db generator: use new keyword method for keywords 2014-11-01 15:56:27 +11:00
Sebastian McKenzie
e77382582f generator: add keyword method, remove __ident method and implement better position tracking 2014-11-01 15:56:10 +11:00
Sebastian McKenzie
bbffde374e Merge branch 'master' into code-generator 2014-10-31 21:39:47 +11:00
Sebastian McKenzie
0fbf0e2a77 generator: add semicolon helper method, add optional printJoin iterator 2014-10-31 21:24:54 +11:00
Sebastian McKenzie
e8628ea1a7 add chai 2014-10-31 21:24:36 +11:00
Sebastian McKenzie
a5a8f08bb8 generator: implement missing node types 2014-10-31 21:23:45 +11:00
Sebastian McKenzie
d376bd3c0e generator: remove redundant async tests 2014-10-31 21:23:31 +11:00
Sebastian McKenzie
20818b086c generator: add support for modules 2014-10-31 21:22:56 +11:00
Sebastian McKenzie
f9ef1723a6 generator: add support for ForOfStatement 2014-10-31 21:22:43 +11:00
Sebastian McKenzie
6e7b8a14fe remove comments in traverse.removeProperties 2014-10-31 21:22:28 +11:00
Sebastian McKenzie
622bb2e962 types: add more tests for optional paranthesis 2014-10-31 21:22:03 +11:00
Sebastian McKenzie
5c5348537d generator: add support for method properties and computed keys and shorthand 2014-10-31 21:21:50 +11:00
Sebastian McKenzie
0def62b918 replace single quotes with double quotes in generaton tests 2014-10-31 21:21:26 +11:00
Sebastian McKenzie
daced12baa add base for TemplateLiteral generator 2014-10-31 11:51:00 +11:00
Sebastian McKenzie
51f18a152e fix test generation actual ast 2014-10-31 11:50:52 +11:00
Sebastian McKenzie
11270e0803 Merge branch 'master' into code-generator
Conflicts:
	lib/6to5/transformers/rest-parameters.js
2014-10-31 11:44:48 +11:00
Sebastian McKenzie
591f123670 update tests to work with new syntax 2014-10-31 11:38:52 +11:00
Sebastian McKenzie
1f7270720f add more type methods 2014-10-31 11:38:37 +11:00
Sebastian McKenzie
ec3a3cbbc9 more descriptive test helper method names 2014-10-31 11:38:18 +11:00
Sebastian McKenzie
8a1ea82e97 remove legacy generator options 2014-10-31 11:38:04 +11:00
Sebastian McKenzie
6953b6e8b6 remove start and end props from nodes in traverse.removeProperties 2014-10-31 11:37:49 +11:00
Sebastian McKenzie
378832d31b add comments with estraverse 2014-10-31 11:37:17 +11:00
Sebastian McKenzie
85703eb5b8 run internal transformers when using a whitelist 2014-10-31 11:37:04 +11:00
Sebastian McKenzie
d0fdd3bf41 remove comments transformer 2014-10-31 11:36:44 +11:00
Sebastian McKenzie
a7385bdf1b make CodeGenerators use static method calls instead of recursive string methods 2014-10-31 11:36:28 +11:00
Sebastian McKenzie
9c7c385ee8 add generation tests from escodegen 2014-10-31 11:35:57 +11:00
Sebastian McKenzie
7c84af2ba8 remove optional computed property in b.memberExpression 2014-10-30 17:38:05 +11:00
Sebastian McKenzie
009d063790 just return constructor if only a constructor exists in classes 2014-10-30 17:37:51 +11:00
Sebastian McKenzie
5483c4ef6f split up code generators 2014-10-30 17:30:05 +11:00
Sebastian McKenzie
5558f61518 add more feature detection to 6to5/register 2014-10-30 17:16:33 +11:00
Sebastian McKenzie
96bc95d6d9 add blacklist syntax feature checking to 6to5/register 2014-10-30 17:11:54 +11:00
Sebastian McKenzie
11dd13b7e0 remove invalid node types from generator and add todo ones 2014-10-30 17:11:31 +11:00
Sebastian McKenzie
976e6782a2 expose traverse.VISITOR_KEYS 2014-10-30 17:11:13 +11:00
Sebastian McKenzie
febc3062cc update traverse visitor keys to acorn ones 2014-10-30 17:11:05 +11:00
Sebastian McKenzie
efff5e5aab add generation completeness test 2014-10-30 17:10:54 +11:00
Sebastian McKenzie
eefab7f80f remove unused variables 2014-10-30 13:31:45 +11:00
Sebastian McKenzie
1a3d306949 Merge branch 'master' into code-generator
Conflicts:
	package.json
2014-10-30 13:29:05 +11:00
Sebastian McKenzie
e5ae2f8eaf fix linting errors 2014-10-30 13:26:13 +11:00
Sebastian McKenzie
e797be518f move some util and traverse methods into types 2014-10-30 13:26:06 +11:00
Sebastian McKenzie
45cb755845 better eval contexts in bin/6to5-node 2014-10-30 13:09:37 +11:00
Sebastian McKenzie
3b9a339c79 remove useless traverse.Delete 2014-10-30 13:09:23 +11:00
Sebastian McKenzie
ea7ac4cd2d change acorn-ast-types to internal builders 2014-10-30 13:09:12 +11:00
Sebastian McKenzie
e141a8b875 run 6to5-node repl in a context 2014-10-30 12:15:37 +11:00
Sebastian McKenzie
6768fc3800 add back regex.flags in unicode regex transformer 2014-10-30 12:15:12 +11:00
Sebastian McKenzie
0af5e00b5f update jsx empty test to new dom tags behaviour 2014-10-30 12:14:41 +11:00
Sebastian McKenzie
4b3ebc62b1 fix indentation 2014-10-29 20:52:31 +11:00
Sebastian McKenzie
cc094efe1b modify regex object instead of creating a new literal 2014-10-29 20:52:25 +11:00
Sebastian McKenzie
8f4a3f77a0 remove jsx known-tags and use the latest jsx known tag definition 2014-10-29 20:52:12 +11:00
Sebastian McKenzie
b31f3666c8 yank out acorn-recast and replace it with our own code generator 2014-10-29 20:51:52 +11:00
Sebastian McKenzie
b1495832d7 remove acorn-recast 2014-10-29 20:51:03 +11:00
2028 changed files with 97608 additions and 6363 deletions

6
.babelrc Normal file
View File

@@ -0,0 +1,6 @@
{
"experimental": true,
"playground": true,
"loose": true,
"blacklist": ["es6.tailCall"]
}

View File

@@ -4,8 +4,8 @@ root = true
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.js]
[*.{js,json}]
indent_style = space
indent_size = 2

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
src/babel/transformation/templates

22
.eslintrc Normal file
View File

@@ -0,0 +1,22 @@
{
"parser": "babel-eslint",
"rules": {
"strict": 0,
"no-underscore-dangle": 0,
"no-unused-vars": 0,
"curly": 0,
"no-multi-spaces": 0,
"key-spacing": 0,
"no-return-assign": 0,
"consistent-return": 0,
"no-shadow": 0,
"no-comma-dangle": 0,
"no-use-before-define": 0,
"no-empty": 0,
"new-parens": 0,
"no-cond-assign": 0
},
"env": {
"node": true
}
}

10
.gitignore vendored
View File

@@ -1,9 +1,17 @@
.DS_Store
node_modules
test/tmp
test/core/tmp
*.log
*.cache
/templates.json
/tests.json
/browser.js
/browser-polyfill.js
/runtime.js
coverage
dist
.package.json
packages/babel-runtime/core-js
packages/babel-runtime/helpers/*.js
packages/babel-runtime/regenerator/*.js
lib

12
.gitmodules vendored Normal file
View File

@@ -0,0 +1,12 @@
[submodule "vendor/traceur"]
path = vendor/traceur
url = https://github.com/google/traceur-compiler
[submodule "vendor/regenerator"]
path = vendor/regenerator
url = https://github.com/babel/regenerator-babel
[submodule "vendor/test262"]
path = vendor/test262
url = https://github.com/tc39/test262
[submodule "vendor/compat-table"]
path = vendor/compat-table
url = https://github.com/kangax/compat-table

2
.istanbul.yml Normal file
View File

@@ -0,0 +1,2 @@
instrumentation:
root: lib

View File

@@ -1,3 +0,0 @@
node_modules
test
lib/6to5/templates

View File

@@ -1,28 +0,0 @@
{
"esnext": true,
"indent": 2,
"freeze": true,
"camelcase": true,
"unused": true,
"eqnull": true,
"proto": true,
"newcap": true,
"supernew": true,
"noyield": true,
"evil": true,
"node": true,
"boss": true,
"expr": true,
"undef": true,
"loopfunc": true,
"white": true,
"maxparams": 5,
"maxdepth": 4,
"globals": {
"suite": true,
"set": true,
"before": true,
"bench": true
}
}

View File

@@ -1,10 +1,15 @@
node_modules
*.log
*.cache
lib/6to5/templates
test
benchmark
Makefile
.*
dist
!README.md
/lib/babel/transformation/templates
/test
/benchmark
/Makefile
/dist
/tests.json
/CHANGELOG.md
/.package.json
/coverage
/vendor
/packages
/src

View File

@@ -1,16 +1,19 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
node_js:
- "0.10"
- "0.11"
branches:
except:
- experimental
- "0.12"
- "iojs"
before_script: "npm install -g codeclimate-test-reporter"
script: "make test-travis"
addons:
code_climate:
repo_token:
secure: "PfP9sDUJzSznDb+ZEPO2cignXabSTXJxEVm5ESRPgEcFr+/4b0pt3hI8R9b+9mLtBEwtw3DLUq48MOeqEKnq29csQmpjPVcN6gT4uR2DdNa1JpVgDuwxT05NB3fBea9U2reM73iV8ylCgPHExr2uGR9/87JzR2beY/56EUL5NjY="
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/acf1870e9d223c65e8d5
on_success: always
on_failure: always
on_start: false

1093
CHANGELOG-6to5.md Normal file

File diff suppressed because it is too large Load Diff

495
CHANGELOG.md Normal file
View File

@@ -0,0 +1,495 @@
# Changelog
> **Tags:**
> - [New Feature]
> - [Bug Fix]
> - [Spec Compliancy]
> - [Breaking Change]
> - [Documentation]
> - [Internal]
> - [Polish]
_Note: Gaps between patch versions are faulty/broken releases._
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
## 5.1.9
* **Bug Fix**
* Fix class property initializers with `undefined` values not being correctly writable.
* Fix self inferring generators incorrectly causing a stack error.
* **Internal**
* Upgrade to latest `acorn`.
* **Polish**
* Make invalid LHS pattern error messages nicer.
## 5.1.8
* **Bug Fix**
* Only make parenthesized object pattern LHS illegal.
## 5.1.7
* **Internal**
* Add `parse` node API.
## 5.1.6
* **Bug Fix**
* Fix `runtime` built-in catchall not properly checking for local variables.
## 5.1.5
* **Internal**
* Bump `core-js` version.
## 5.1.4
* **Polish**
* Add missing `Reflect` methods to runtime transformer.
## 5.1.3
* **Internal**
* Switch entirely to vanilla regenerator.
* Clean up and make the parsing of decorators stateless.
* **Bug Fix**
* Don't do TCO on generators and async functions.
* Add missing `core-js` runtime definitions.
## 5.1.2
* **Bug Fix**
* Add `getIterator` and `isIterable` to `babel-runtime` build script.
## 5.1.1
* **Bug Fix**
* Add missing runtime symbol definitions.
## 5.1.0
* **Bug Fix**
* Fix super reference when using decorators.
* Don't do array unpack optimisation when member expressions are present.
* Add missing descriptors for undecorated class properties.
* Don't consider `arguments` and `eval` valid function names when doing function name inferrence.
* Fix scope tracking of constants in loop heads.
* Parse `AwaitExpression` as a unary instead of an assignment.
* Fix regex evaluation when attempting static evaluation.
* Don't emit tokens when doing a lookahead.
* Add missing `test` declaration to `utility.deadCodeElimination` transformer.
* **Internal**
* Upgrade `regenerator` to the latest and use my branch with the hope of eventually switching to vanilla regenerator.
* Add support for the replacement of for loop `init`s with statements.
* Upgrade dependencies.
* **Polish**
* When adding the scope IIFE when using default parameters, don't shadow the function expression, just `apply` `this` and `arguments` if necessary.
* Use path basename as non-default import fallback.
* **New Feature**
* Add [trailing function comma proposal](https://github.com/jeffmo/es-trailing-function-commas). Thanks [@AluisioASG](https://github.com/AluisioASG)!
* Add support for object literal decorators.
* Make core-js modular when using the `runtime` transformer.
## 5.0.12
* **Bug Fix**
* Fix incorrect remapping of module references inside of a function id redirection container.
## 5.0.11
* **Bug Fix**
* Fix new `for...of` loops not properly inheriting their original loop.
* **Internal**
* Disable scope instance cache.
* **Polish**
* Allow comments in `.babelrc` JSON.
## 5.0.9
* **Polish**
* Use `moduleId` for UMD global name if available.
* **Bug Fix**
* Fix UMD global `module` variable shadowing the `amd`/`common` `module` variable.
* Fix Flow param type annotation regression.
* Fix function name collision `toString` wrapper. Thanks [@alawatthe](https://github.com/alawatthe)!
## 5.0.8
* **Bug Fix**
* Fix falsy static class properties not being writable.
* Fix block scoping collisions not properly detecting modules and function clashes.
* Skip `this` before `super` for derived constructors on functions.
## 5.0.7
* **New Feature**
* Add `--ignore` and `--only` support to the CLI.
* **Bug Fix**
* Remove `HOMEPATH` environment variable from home resolution in `babel/register` cache.
* **Internal**
* Disable WIP path resolution introducing infinite recursion in some code examples.
* **Polish**
* Add live binding to CommonJS default imports.
## 5.0.6
* **Bug Fix**
* Fix mangling of import references that collide with properties on `Object.prototype`.
* Fix duplicate declarations incorrectly being reported for `var`.
## 5.0.5
* **Internal**
* Upgrade `core-js`.
* **Bug Fix**
* Fix arrays not being supported in `util.list`.
## 5.0.4
* **Polish**
* Check for top level `breakConfig` in `resolveRc`.
## 5.0.3
* **Bug Fix**
* Make relative location absolute before calling `resolveRc`.
* **Internal**
* Switch to global UID registry.
* Add `breakConfig` option to prevent Babel from erroring when hitting that option.
## 5.0.1
* **Bug Fix**
* Fix duplicate declaration regression.
* Fix not being able to call non-writable methods.
## 5.0.0
* **New Feature**
* Decorators based on [@wycat's](https://github.com/wycats) [stage 1 proposal](https://github.com/wycats/javascript-decorators).
* Class property initializers based on [@jeffmo's](https://github.com/jeffmo) [stage 0 proposal](https://gist.github.com/jeffmo/054df782c05639da2adb).
* Export extensions based on [@leebyron's](https://github.com/leebyron) [stage 1 proposal](https://github.com/leebyron/ecmascript-more-export-from).
* UMD module formatter now supports globals.
* Add `es3.runtime`, `optimisation.react.inlineElements` and `optimisation.react.constantElements` transformers.
* Add stage option that replaces the experimental one.
* Allow ES7 transformer to be enabled via `optional` instead of only via `stage`.
* Infer string quotes to use in the code generator.
* Consider `export { foo as default };` to be the same as `export default foo;`.
* Add `nonStandard` option that can be set to `false` to remove parser support for JSX and Flow.
* Add `jsxPragma` option.
* Automatically generate CLI options based on internal API options.
* Add support for `.babelrc` on absolute paths.
* Plugin API!
* **Internal**
* Export `options` in browser API.
* Rewritten parser.
* Don't block hoist when runtime transformer is enabled in system module formatter.
* Rewritten the internal traversal and node replacement API to use "paths" that abstracts out node relationships.
* **Polish**
* JSX output is now more inline with the official JSX transformer.
* Hoist block scoping IIFE - this improves memory usage and performance.
* Better IIFE detection - references are now checked to see if they're referencing the binding we're searching for.
* Check for import reassignments in constants transformer.
* Make method definitions with expression bodies illegal.
* Save register cache on tick instead of `SIGINT`.
* Enable strict mode on babel-node eval flag.
* **Bug Fixes**
* Add support for live bindings. This change also increases the reliablity of export specifier renaming.
* Add support for super update and non equals assignment expressions.
* Rename shadow constructor binding in classes.
* Seed next iteration bindings with previous fresh bindings when reassinging loop block scoped variables.
* Fix new expression spread referencing the wrong constructor.
* Call `resolveModuleSource` on dynamic imports.
* Added `param` to list of duplicate declaration kinds.
* **Breaking Changes**
* The Babel playground has been removed.
* ES7 Abstract References have been removed.
* Experimental option has been removed in favor of a stage option.
* Rename `returnUsedHelpers` to `metadataUsedHelpers`.
## 4.7.16
* **Bug Fix**
* Fix constructor spreading of typed arrays.
* Fix break/continue/return aliasing of non-loops in block scoping transformer.
## 4.7.15
* **Bug Fix**
* Fix constructor spreading of collections.
## 4.7.14
* **Bug Fix**
* Fix constructor spreading of `Promise`.
* **Internal**
* Deprecate remaining playground transformers and abstract references.
## 4.7.13
* **Bug Fix**
* Handle comments on use strict directives.
* Fix assignment patterns with a left side pattern.
* **Polish**
* Special case `this` when doing expression memoisation.
## 4.7.12
* **Bug Fix**
* Deprecate `playground.methodBinding`.
## 4.7.11
* **Bug Fix**
* Fix unicode regexes stripping their unicode flag before being passed on two `regexpu`.
## 4.7.10
* **Internal**
* Deprecate `playground.methodBinding` and `playground.objectGetterMemoization`.
* **Bug Fix**
* Fix `inputSourceMap` option. Thanks [@Rich-Harris](https://github.com/Rich-Harris)!
## 4.7.9
* **Polish**
* Allow `inputSourceMap` to be set to `false` to skip the source map inference.
* Infer computed literal property names.
* **Bug Fix**
* Fix nested labeled for-ofs.
* Fix block scoping `break` colliding with the parent switch case.
* **Internal**
* Upgrade `acorn-babel`.
## 4.7.8
* **Bug Fix**
* Fix computed classes not properly setting symbols.
## 4.7.7
* **Bug Fix**
* Fix `types` API exposure.
## 4.7.6
* **Bug Fix**
* Fix non-Identifier/Literal computed class methods.
* **Polish**
* Add a fallback if `stack` on an error is unconfigurable.
* Hoist `esModule` module declarations to the top of the file to handle circular dependencies better.
## 4.7.5
* **Bug Fix**
* Don't remap` break`s to call the iterator return.
* **Polish**
* Use a different helper for computed classes for much nicer output. Also fixes a bug in symbols being non-enumerable so they wouldn't be set on the class.
## 4.7.4
* **Bug Fix**
* Rewrite named function expressions in optional async function transformers.
* Hoist directives.
* Remove `Number` from the list of valid `runtime` constructors.
* **Internal**
* `spec.typeofSymbol` transformer has been renamed to `es6.symbols`.
## 4.7.2
* **New Feature**
* `"both"` option for `sourceMap`.
* Add output types to external helpers. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* **Bug Fix**
* Fix node duplication sometimes resulting in a recursion error.
* Ignore `break`s within cases inside `for...of`.
* **Polish**
* Split up variable declarations and export declarations to allow easier transformation.
## 4.7.0
* **Bug Fix**
* Add `alternate` to list of `STATEMENT_OR_BLOCK` keys.
* Add support for module specifiers to `t.isReferenced`.
* **New Feature**
* Add `inputSourceMap` option.
* **Polish**
* Throw an error on different `babel` and `babel-runtime` versions.
* Replicate module environment for `babel-node` eval.
* Clean up classes output.
* **Spec Compliancy**
* Make it illegal to use a rest parameter on a setter.
## 4.6.6
* **Bug Fix**
* Fix incorrect method call in `utility.deadCodeElimination` transformer.
* Fix `es6.blockScopingTDZ` transformer duplicating binding nodes.
## 4.6.5
* **Internal**
* `useStrict` transformer has been renamed to `strict`.
## 4.6.4
* **Bug Fix**
* Fix `ForOfStatement` not proplery inheriting labels.
* When in closure mode in block scoping transformer, properly check for variable shadowing.
* **New Feature**
* New `utility.inlineEnvironmentVariables` and `utility.inlineExpression` transformers.
## 4.6.3
* **Bug Fix**
* Fix `arguments` being incorrectly aliased in arrow function rest parameter optimisation.
* Make deoptimisation trigger safer.
* **New Feature**
* Flow types are now retained when blacklisting the `flow` transformer.
## 4.6.1
* **Bug Fix**
* Fix generators in template directory being transformed.
* Fix exposure of `util` for plugins.
## 4.6.0
* **New Feature**
* Desugar sticky regexes to a new constructor expression so it can be handled by a polyfill.
* **Spec Compliancy**
* `for...of` now outputs in a lengthy `try...catch` this is to ensure spec compliancy in regards to iterator returns and abrupt completions. See [google/traceur-compiler#1773](https://github.com/google/traceur-compiler/issues/1773) and [babel/babel/#838](https://github.com/babel/babel/issues/838) for more information.
* **Polish**
* Rest parameters that are only refered to via number properties on member expressions are desugared into a direct `arguments` reference. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* `$ babel` no longer exits on syntax errors.
* **Internal**
* Upgrade `browserify`.
* Upgrade `source-map`.
* Publicly expose more internals.
## 4.5.5
* **Polish**
* Delete old extensions when overriding them in `babel/register`.
## 4.5.3
* **Bug Fix**
* Fix whitelisting logic for helper build script.
## 4.5.2
* **New Feature**
* `returnUsedHelpers` option and add whitelist to `buildHelpers`.
* **Bug Fix**
* Fix function arity on self referencing inferred named functions.
* **Internal**
* Bump `acorn-babel`.
* Start converting source to ES6...
## 4.5.1
**Babel now compiles itself!**
![holy shit](http://gifsec.com/wp-content/uploads/GIF/2014/03/OMG-GIF_2.gif)
## 4.5.0
* **New Feature**
* Add `.babelrc` support.
* **Bug Fix**
* Move use strict directives to the module formatter bodies.
* **Internal**
* Make default `bin/babel` behaviour to ignore non-compilable files and add a `--copy-files` flag to revert to the old behaviour.
## 4.4.6
* **Bug Fix**
* Fix extending a class expression with no methods/only constructor. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* Allow `MemberExpression` as a valid `left` of `ForOfStatement`.
* **Polish**
* Throw an error when people try and transpile code with the `@jsx React.DOM` pragma as it conflicts with the custom jsx constructo method detection.
* Crawl all comments for `@jsx` pragma.
* **Internal**
* Upgrade `chalk`.
* Upgrade `core-js`.
## 4.4.5
* **Internal**
* Remove function self reference optimisation.
## 4.4.4
* **Bug Fix**
* Handle inferred function ids to be reassigned and deopt to a slower but working equivalent.
* Don't unpack array patterns that have more elements than their right hand array expression.
* **Polish**
* Improve syntax highlighting in the code frame. Thanks [@lydell](https://github.com/lydell)!
* **Internal**
* Upgrade `acorn-babel`.
## 4.4.3
* **Bug Fix**
* Fix `for...of` iterator break returns being duplicated.
* Only call `return` on the iterator if it exists.
* **Internal**
* Rename `selfContained` transformer to `runtime`.
## 4.4.2
* **New Feature**
* Add `moduleId` option for specifying a custom module id.
## 4.4.0
* **New Feature**
* `/*** @jsx NAMESPACE **/` comments are now honored by the `react` transformer.
* `getModuleName` option.
* Infer function expression names. Thanks [@RReverser](https://github.com/RReverser)!
* **Bug Fix**
* Add proper control flow for tail recursion optimisation.
* **Internal**
* Remove useless `format` options and move the `format.compact` option to `format`.
* **Polish**
* Newline handling of the code generator has been heavily improved.
* Code generator now deopts whitespace if the input size is >100KB.
## 4.3.0
* **Breaking Change**
* Remove `commonStandard` module formatter and make it the default behaviour of all the strict module formatters.
## 4.2.1
* **Polish**
* Add auxiliary comment to let scoping closure flow control.
## 4.2.0
* **Polish**
* Use an assignment instead of a define for `__esModule` in loose mode.
* **Internal**
* Add error for `eval();` usage and enable strict mode for parsing.
## 4.1.0
* **New Feature**
* Add `BABEL_CACHE_PATH` and `BABEL_DISABLE_CACHE` environment variables.
* **Internal**
* Replace many internal util functions with modules. Thanks [@sindresorhus](https://github.com/sindresorhus)!
## 4.0.2
* **Bug Fix**
* Fix generators not properly propagating their internal declarations.
* **Polish**
* Update setter param length error message.
* Use ranges on dependencies.
## 4.0.0
* 6to5 is now known as Babel.
* Global helpers/runtime has now been given the more descriptive name of "external helpers".

13
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,13 @@
# Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)

77
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,77 @@
# Contributing
Contributions are always welcome, no matter how large or small. Before
contributing, please read the
[code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
## Developing
#### Setup
```sh
$ git clone https://github.com/babel/babel
$ cd babel
$ make bootstrap
```
Then you need to run:
```sh
$ make watch-core
```
This will compile Babel and then sit in the background and on file modification
recompile the necessary files.
#### Running tests
You can run tests via:
```sh
$ make test
```
This is mostly overkill and you can limit the tests to a select few by directly
running them with `mocha`:
```sh
$ mocha test/core/transformation.js
```
Use mocha's `--grep` option to run a subset of tests by name:
```sh
$ mocha test/core/transformation.js --grep es7
```
#### Workflow
* Fork the repository
* Clone your fork and change directory to it (`git clone git@github.com:yourUserName/babel.git && cd babel`)
* Install the project dependencies (`make bootstrap`)
* Link your forked clone (`npm link`)
* Develop your changes ensuring you're fetching updates from upstream often
* Ensure the test are passing (`make test`)
* Create new pull request explaining your proposed change or reference an issue in your commit message
#### Code Standards
* **General**
* Max of five arguments for functions
* Max depth of four nested blocks
* 2-spaced soft tabs
* **Naming**
* CamelCase all class names
* camelBack all variable names
* **Spacing**
* Spaces after all keywords
* Spaces before all left curly braces
* **Comments**
* Use JSDoc-style comments for methods
* Single-line comments for ambiguous code
* **Quotes**
* Always use double quotes
* Only use single quotes when the string contains a double quote
* **Declaration**
* No unused variables
* No pollution of global variables and prototypes

View File

@@ -1,162 +0,0 @@
# Features
## Array comprehension
```javascript
[for (i of [1, 2, 3]) i * i]; // [1, 4, 9]
```
## Arrow functions
```javascript
arr.map(x => x * x);
```
## Let scoping
```javascript
for (let i in arr) {
let v = arr[i];
}
```
## Classes
```javascript
class Foo extends Bar {
constructor() { }
foo() { }
get bar() { }
set bar() { }
}
```
## Computed property names
```javascript
var foo = "foo";
var bar = "bar";
var obj = {
["foo" + bar]: "heh",
["bar" + foo]: "noo",
foo: "foo",
bar: "bar"
};
```
## Constants
```javascript
const MULTIPLIER = 5;
console.log(2 * MULTIPLIER);
MULTIPLIER = 6; // error
var MULTIPLIER; // error
```
## Default parameters
```javascript
function foo(bar = "foo") {
return bar + "bar";
}
```
## Destructuring
```javascript
var [a, [b], c, d] = ["hello", [", ", "junk"], ["world"]];
console.log(a + b + c); // hello, world
```
## For-of
```javascript
for (var i of [1, 2, 3]) {
console.log(i * i);
}
```
## Generators
```javascript
```
## Modules
```javascript
```
## Numeric literals
```javascript
0b111110111 === 503; // true
0o767 === 503; // true
```
## Property method assignment
```javascript
var obj = {
foo() {
return "foobar";
},
get bar() {
return this._bar;
},
set bar(val) {
this._bar = val;
}
};
```
## Property name shorthand
```javascript
function f(x, y) {
return { x, y };
}
```
## Rest parameters
```javascript
function printList(name, ...items) {
console.log("list %s has the following items", name);
items.forEach(function (item) {
console.log(item);
});
}
```
## Spread
```javascript
function add(x, y) {
return x + y;
}
var numbers = [5, 10];
add(...numbers); // 15
```
## Template literals
```javascript
var x = 5;
var y = 10;
console.log(`${x} + ${y} = ${x + y}`); // "5 + 10 = 15"
```
## Unicode regex
```javascript
var string = 'foo💩bar';
var match = string.match(/foo(.)bar/u);
console.log(match[1]);
```

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014 Sebastian McKenzie
Copyright (c) 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
MIT License

View File

@@ -1,145 +0,0 @@
# Modules
## Usage
### CLI
$ 6to5 --modules common script.js
### Node
```javascript
var to5 = require("6to5");
to5.transform('import "foo";', { modules: "common" });
```
## Formats
### Common (Default)
**In**
```javascript
import "foo";
import foo from "foo";
import * as foo from "foo";
import {bar} from "foo";
import {foo as bar} from "foo";
export {test};
export var test = 5;
export default test;
```
**Out**
```javascript
require("foo");
var foo = require("foo").default;
var foo = require("foo");
var bar = require("foo").bar;
var bar = require("foo").foo;
exports.test = test;
var test = 5; exports.test = test;
exports.default = test;
```
### AMD
**In**
```javascript
import foo from "foo";
export function bar() {
return foo("foobar");
}
```
**Out**
```javascript
define(["exports", "foo"], function (exports, _foo) {
exports.bar = bar;
var foo = _foo.default;
function bar() {
return foo("foobar");
}
});
```
### UMD
**In**
```javascript
import foo from "foo";
export function bar() {
return foo("foobar");
}
```
**Out**
```javascript
(function (factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "foo"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("foo"));
}
})(function (exports) {
exports.bar = bar;
var foo = _foo.default;
function bar() {
return foo("foobar");
}
});
```
## Custom
You can alternatively specify module names instead of one of the built-in types.
```javascript
module.exports = ModuleFormatter;
function ModuleFormatter() {
}
ModuleFormatter.prototype.transform = function (ast) {
// this is ran after all transformers have had their turn at modifying the ast
// feel free to modify this however
};
ModuleFormatter.prototype.import = function (node, nodes) {
// node is an ImportDeclaration
};
ModuleFormatter.prototype.importSpecifier = function (specifier, node, nodes) {
// specifier is an ImportSpecifier
// node is an ImportDeclaration
};
ModuleFormatter.prototype.export = function (node, nodes) {
// node is an ExportDeclaration
};
ModuleFormatter.prototype.exportSpecifier = function (specifier, node, nodes) {
// specifier is an ExportSpecifier
// node is an ExportDeclaration
};
```

120
Makefile
View File

@@ -1,60 +1,118 @@
MAKEFLAGS = -j1
BROWSERIFY_CMD = node_modules/browserify/bin/cmd.js
ISTANBUL_CMD = node_modules/istanbul/lib/cli.js cover
UGLIFY_CMD = node_modules/uglify-js/bin/uglifyjs
#UGLIFY_CMD = node_modules/uglify-js/bin/uglifyjs --mangle sort
JSHINT_CMD = node_modules/jshint/bin/jshint
MOCHA_CMD = node_modules/mocha/bin/_mocha
BABEL_CMD = node_modules/babel/bin/babel
export NODE_ENV = test
.PHONY: clean test test-cov test-travis test-browser publish bench build
.PHONY: clean test test-cov test-clean test-travis test-simple test-all test-browser test-parser publish build bootstrap publish-core publish-runtime build-core watch-core build-core-test
clean:
rm -rf coverage templates.json test/tmp dist
build-core:
node $(BABEL_CMD) src --out-dir lib --copy-files
bench:
npm install es6-transpiler traceur esnext es6now jstransform
node node_modules/matcha/bin/_matcha
build-core-test:
node $(BABEL_CMD) src --out-dir lib --copy-files --auxiliary-comment "istanbul ignore next"
test:
$(JSHINT_CMD) lib bin benchmark/index.js
$(MOCHA_CMD)
test-cov:
rm -rf coverage
node $(ISTANBUL_CMD) $(MOCHA_CMD) --
test-travis:
node $(ISTANBUL_CMD) $(MOCHA_CMD) -- --reporter spec
if test -n "$$CODECLIMATE_REPO_TOKEN"; then codeclimate < coverage/lcov.info; fi
test-browser:
make build
node bin/generate-browser-test >dist/6to5-test.js
test -n "`which open`" && open test/browser.html
watch-core:
node $(BABEL_CMD) src --out-dir lib --watch --copy-files
build:
mkdir -p dist
make build-core
node bin/cache-templates
node tools/cache-templates
browserify lib/6to5/browser.js -s to5 >dist/6to5.js
uglifyjs dist/6to5.js >dist/6to5.min.js
node $(BROWSERIFY_CMD) -e lib/babel/polyfill.js >dist/polyfill.js
node $(UGLIFY_CMD) dist/polyfill.js >dist/polyfill.min.js
node $(BROWSERIFY_CMD) lib/babel/api/browser.js -s babel >dist/babel.js
node $(UGLIFY_CMD) dist/babel.js >dist/babel.min.js
node packages/babel-cli/bin/babel-external-helpers >dist/external-helpers.js
node $(UGLIFY_CMD) dist/external-helpers.js >dist/external-helpers.min.js
rm -rf templates.json
clean:
rm -rf coverage templates.json test/tmp dist lib
test-clean:
rm -rf test/tmp
test: test-parser
node $(MOCHA_CMD) test/core
make test-clean
test-all:
export ALL_BABEL_TESTS=1; \
make test
test-cov:
rm -rf coverage
make build-core-test
node $(ISTANBUL_CMD) $(MOCHA_CMD) -- test/core
test-parser:
node test/acorn/run.js
test-travis: bootstrap build test
test-browser:
mkdir -p dist
node tools/cache-templates
node tools/build-tests
node $(BROWSERIFY_CMD) -e test/core/_browser.js >dist/babel-test.js
rm -rf templates.json tests.json
test -n "`which open`" && open test/browser.html
publish:
git pull --rebase
make test
make build
cp dist/6to5.js browser.js
read -p "Version: " version; \
npm version $$version --message "v%s"
node bin/cache-templates
make build
cp dist/babel.min.js browser.js
cp dist/polyfill.min.js browser-polyfill.js
cp dist/external-helpers.min.js external-helpers.js
node tools/cache-templates
test -f templates.json
read -p "Version: " version; \
npm version $$version --message "v%s"
npm publish
git push --follow-tags
rm -rf templates.json browser.js
make publish-cli
make publish-runtime
rm -rf templates.json browser.js browser-polyfill.js external-helpers.js
publish-runtime:
cd packages; \
node build-runtime.js; \
cd babel-runtime; \
npm publish
publish-cli:
cd packages; \
node build-cli.js; \
cd babel-cli; \
npm publish
bootstrap:
npm list --global --depth 1 babel >/dev/null 2>&1 && npm uninstall -g babel || true
npm install
npm link
cd packages/babel-cli && npm install && npm link && npm link babel-core
git submodule update --init
cd vendor/regenerator && npm install
cd vendor/compat-table && npm install object-assign

422
README.md
View File

@@ -1,419 +1,17 @@
<p align="center">
<img alt="6to5" src="http://i.imgur.com/hVl9KRw.png">
<a href="https://babeljs.io/">
<img alt="babel" src="https://raw.githubusercontent.com/babel/logo/master/logo.png" width="546">
</a>
</p>
<p align="center">
<a href="https://travis-ci.org/sebmck/6to5">
<img alt="Travis Status" src="http://img.shields.io/travis/sebmck/6to5.svg?branch=master&amp;style=flat&amp;label=travis">
</a>
<a href="https://codeclimate.com/github/sebmck/6to5">
<img alt="Code Climate Score" src="http://img.shields.io/codeclimate/github/sebmck/6to5.svg?style=flat">
</a>
<a href="https://codeclimate.com/github/sebmck/6to5">
<img alt="Coverage" src="http://img.shields.io/codeclimate/coverage/github/sebmck/6to5.svg?style=flat">
</a>
<a href="https://david-dm.org/sebmck/6to5">
<img alt="Dependency Status" src="http://img.shields.io/david/sebmck/6to5.svg?style=flat">
</a>
<strong>Babel</strong> is a compiler for writing next generation JavaScript.
</p>
**6to5** turns ES6 code into vanilla ES5, so you can use ES6 features **today.**
<p align="center">
For questions and support please visit the <a href="https://gitter.im/babel/babel">gitter room</a> or <a href="http://stackoverflow.com/questions/tagged/babeljs">StackOverflow</a>. The Babel issue tracker is <strong>exclusively</strong> for bug reports and feature requests.
</p>
- **Readable** - formatting is retained if possible so your generated code is as similar as possible.
- **Extensible** - with a large range of [plugins](#plugins) and **browser support**.
- **Lossless** - **source map support** so you can debug your compiled code with ease.
- **Compact** - maps directly to the equivalent ES5 with **no runtime**[\*](#generators).
## Installation
It's as easy as:
$ npm install -g 6to5
## Table of Contents
- [Features](#features)
- [Usage](#usage)
- [Plugins](#plugins)
- [CLI](#cli)
- [Node](#node-1)
- [Browser](#browser)
- [Modules](#modules)
- [Caveats](#caveats)
- [Differences](#differences)
## [Features](FEATURES.md)
- [Array comprehension](FEATURES.md#array-comprehension)
- [Arrow functions](FEATURES.md#arrow-functions)
- [Classes](FEATURES.md#classes)
- [Computed property names](FEATURES.md#computed-property-names)
- [Constants](FEATURES.md#constants)
- [Default parameters](FEATURES.md#default-parameters)
- [Destructuring](FEATURES.md#destructuring)
- [For-of](FEATURES.md#for-of)
- [Generators](FEATURES.md#generators) via [regenerator](https://github.com/facebook/regenerator)
- [Let scoping](FEATURES.md#let-scoping)
- [Modules](FEATURES.md#modules)
- [Numeric literals](FEATURES.md#numeric-literals)
- [Property method assignment](FEATURES.md#property-method-assignment)
- [Property name shorthand](FEATURES.md#property-name-shorthand)
- [Rest parameters](FEATURES.md#rest-parameters)
- [Spread](FEATURES.md#spread)
- [Template literals](FEATURES.md#template-literals)
- [Unicode regex](FEATURES.md#unicode-regex)
## Usage
### Plugins
- [Broccoli](https://github.com/very-geek/broccoli-6to5-transpiler)
- [Browserify](https://github.com/sebmck/6to5-browserify)
- [Brunch](https://github.com/es128/6to5-brunch)
- [Connect](https://github.com/sebmck/6to5-connect)
- [Gulp](https://github.com/sindresorhus/gulp-6to5)
- [Grunt](https://github.com/sindresorhus/grunt-6to5)
- [Jade](https://github.com/Apoxx/jade-6to5)
- [webpack](https://github.com/Couto/6to5-loader)
### CLI
Compile the file `script.js` and output it to stdout.
$ 6to5 script.js
Compile the file `script.js` and output it to `script-compiled.js`.
$ 6to5 script.js --out-file script-compiled.js
Compile the file `script.js` and output it to `script-compiled.js` and save a
source map to `script-compiled.js.map`.
$ 6to5 script.js --source-maps --out-file script-compiled.js
Compile the file `script.js` and output it to `script-compiled.js` with a source
map embedded in a comment at the bottom.
$ 6to5 script.js --source-maps-inline --out-file script-compiled.js
Compile the entire `src` directory and output it to the `lib` directory.
$ 6to5 src --out-dir lib
Compile the entire `src` directory and output it to the one concatenated file.
$ 6to5 src --out-file script-compiled.js
Pipe a file in via stdin and output it to `script-compiled.js`
$ 6to5 --out-file script-compiled.js < script.js
#### Node
Launch a repl.
$ 6to5-node
Evaluate code.
$ 6to5-node -e "class Test { }"
Compile and run `test.js`.
$ 6to5-node test
### Node
```javascript
var to5 = require("6to5");
var result = to5.transform("code();", options);
result.code;
result.map;
result.ast;
to5.transformFileSync("filename.js", options).code;
to5.transformFile("filename.js", options, function (err, result) {
});
```
##### Options
```javascript
{
// Filename for use in errors etc.
// Default: "unknown"
filename: "filename",
// List of transformers to EXCLUDE.
// Run `6to5 --help` to see a full list of transformers.
blacklist: [],
// List of transformers to ONLY use.
// Run `6to5 --help` to see a full list of transformers.
whitelist: [],
// Module formatter to use
// Run `6to5 --help` to see a full list of module formatters.
// Default: "common"
modules: "common",
// If truthy, adds a `map` property to returned output.
// If set to "inline", a comment with a sourceMappingURL directive is added to
// the bottom of the returned code.
// Default: false
sourceMap: true,
// Set `file` on returned source map.
// Default: `filename` option.
sourceMapName: "filename",
// Set `sources[0]` on returned source map.
// Default: `filename` option.
sourceFileName: "filename"
}
```
#### Require hook
All subsequent files required by node with the extensions `.es6` and `.js` will
be transformed by 6to5. The polyfill specified in [Polyfill](#polyfill) is also
required.
```javascript
require("6to5/register");
```
**NOTE:** By default all requires to `node_modules` will be ignored. You can
override this by passing an ignore regex via options.
```javascript
require("6to5/register")({
// This will override `node_modules` ignoring - you can alternatively pass
// a regex
ignore: false
});
```
##### Options
```javascript
require("6to5/register")({
// Optional ignore regex - if any filenames **do** match this regex then they
// aren't compiled
ignore: /regex/,
// Optional only regex - if any filenames **don't** match this regex then they
// aren't compiled
only: /my_es6_folder/,
// See options above for usage
whitelist: [],
blacklist: [],
// This will remove the currently hooked extensions of .es6 and .js so you'll
// have to add them back if you want them to be used again.
extensions: [".js", ".es6"]
});
```
### Browser
You can build a browser version of the compiler by running the following in the
6to5 directory:
$ make build
This will output the files `dist/6to5.js` and `dist/6to5.min.js`.
Just include one of those in the browser and access the transform method via the
global `to5`.
```javascript
to5("class Test {}").code;
```
#### Test
To test 6to5 in your browser run:
$ make test-browser
And open `test/browser.html` in your browser if it doesn't open automatically.
## [Modules](MODULES.md)
See [Modules - Common](MODULES.md#common-default) for documentation on the
default module formatting.
Alternatively see [Modules](MODULES.md) for all other supported module formatting types.
## Caveats
### Polyfill
6to5 does not include a runtime nor polyfill and it's up to the developer to
include one in compiled browser code.
#### Node
A polyfill is included with the 6to5 module that can be included in node like
so:
```javascript
require("6to5/polyfill");
```
This is simply a wrapper around the
[regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js) and the
[es6-shim](https://github.com/paulmillr/es6-shim) and
[es6-symbol](https://github.com/medikoo/es6-symbol) polyfills.
#### Browser
If you're planning on using 6to5 output in the browser then it's up to you
to include polyfills. [es6-symbol](https://github.com/medikoo/es6-symbol#browser)
and [es6-shim](https://raw.githubusercontent.com/paulmillr/es6-shim/master/es6-shim.js)
fill the vast majority of polyfill concerns.
### For-of
A polyfill is required for for-of functionality that implements `Symbol` and
adds `prototype[Symbol.iterator]` behaviour to built-ins. Using the polyfills
specified in [polyfill](#polyfill) suffices.
### Classes
Built-in classes such as `Date`, `Array` and `DOM` cannot be subclassed due to
limitations in ES5 implementations.
If you're inheriting from a class then static properties are inherited from it
via [\_\_proto\_\_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto),
this is widely supported but you may run into problems with much older browsers.
**NOTE:** `__proto__` is not supported on IE <= 9 so static properties
**will not** be inherited. A possible workaround is to use `super();`:
```javascript
class Foo {
static foo() {
}
}
class Bar extends Foo {
static foo() {
super();
}
}
```
### Generators
The [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js)
and an [ES6 polyfill](#polyfill) are required in order for generators to work.
## Differences
### Philosophy
The fundamental concept behind 6to5 is that the generated code must be close as
possible to the original, retaining all the same formatting and readability.
Many other transpilers are just concerned with making the code work while 6to5
is concerned with making sure it works **and** is readable at the same time.
For example, given the following array comprehension:
```javascript
var seattlers = [for (c of customers) if (c.city == "Seattle") { name: c.name, age: c.age }];
```
is generated to the following with 6to5:
```javascript
var seattlers = customers.filter(function (c) {
return c.city == "Seattle";
}).map(function (c) {
return {
name: c.name,
age: c.age
};
});
```
The following is what Traceur generates:
```javascript
var seattlers = (function() {
var c;
var $__20 = 0,
$__21 = [];
for (var $__22 = customers[$traceurRuntime.toProperty(Symbol.iterator)](),
$__23; !($__23 = $__22.next()).done; ) {
c = $__23.value;
if (c.city == "Seattle")
$traceurRuntime.setProperty($__21, $__20++, {
name: c.name,
age: c.age
});
}
return $__21;
}());
```
As you can tell, it's not very pretty, unreadable even. Instead of mapping
directly to a runtime, like other transpilers, 6to5 maps directly to the
equivalent ES5.
I'm not saying 6to5 is for everyone or even suited for everything. Traceur is
better suited if you'd like a full ES6 environment with polyfills and all.
### Comparison to other transpilers
| | 6to5 | Traceur | esnext | es6now | es6-transpiler | jstransform |
| ---------------------------- | ---- | ------- | ------ | ------ | -------------- | ----------- |
| No runtime | ✓ | | | | ✓ | ✓ |
| Source maps | ✓ | ✓ | ✓ | | ✓ | ✓ |
| No compiler global pollution | ✓ | | ✓ | | ✓ | ✓ |
| Arrow functions | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Classes | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Computed property names | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Constants | ✓ | ✓ | | | ✓ | |
| Default parameters | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Destructuring | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| For-of | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Generators | ✓ | ✓ | ✓ | | | |
| Let scoping | ✓ | ✓ | | | ✓ | |
| Modules | ✓ | ✓ | | ✓ | | |
| Property method assignment | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Property name shorthand | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Rest parameters | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Spread | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Template literals | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Unicode regex | ✓ | ✓ | | | ✓ | |
#### [Traceur](https://github.com/google/traceur-compiler)
Traceur requires quite a bulky runtime (~75KB) and produces quite verbose code.
While this can be trimmed down by selectively building the runtime, it's an
unneccesary step when a runtime can be eliminated entirely.
#### [es6now](https://github.com/zenparsing/es6now)
es6now doesn't output sourcemaps. This is cited as a positive as line-to-line
mapping is the goal. This however obviously doesn't retain column mapping
resulting in the output code not being very pleasant.
#### [es6-transpiler](https://github.com/termi/es6-transpiler)
The es6-transpiler compiler requires shims to operate which pollutes the global
scope resulting in possible collisions.
es6-transpiler maps line-by-line, just like es6now, this results in the same
issues such as lack of column information and unpleasant code output.
<p align="center">
For documentation and website issues please visit the <a href="https://github.com/babel/babel.github.io">babel.github.io</a> repo.
</p>

View File

@@ -1,99 +0,0 @@
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var obj = {};
var foo = "foo";
var bar = "bar";
// constants
const MULTIPLIER = 5;
// classes
class Foo {
constructor() {
this.foo = "bar";
}
}
class Bar extends Foo {
constructor() {
super();
}
// default parameters
go(foo = "bar", bar = "foo") {
}
// not supported by jstransform
//get foo() {
// return this._foo;
//}
//set foo(val) {
// this._foo = val + " foo!";
//}
}
// arrow functions
arr.map(x => x * x);
// block binding
for (let key in arr) {
let val = arr[key];
console.log(key, val);
}
// computed property names
obj = {
["foo" + bar]: "foobar"
};
// destructuring
var [a, [b], c, d] = ["hello", [", ", "junk"], ["world"]];
console.log(a + b + c);
// array comprehension
// [for (i of [1, 2, 3]) i * i]; // not supported by es6now
// for-of
for (var i of [1, 2, 3]) {
console.log(i * i);
}
// property method assignment
obj = {
foo() {
return "foobar";
},
get bar() {
return this._bar;
},
set bar(val) {
this._bar = val;
}
};
// property name shorthand
function f(x, y) {
return { x, y };
}
// rest parameters
function printList(name, ...items) {
console.log("list %s has the following items", name);
items.forEach(function (item) {
console.log(item);
});
}
// spread
function add(x, y) {
return x + y;
}
var numbers = [5, 10];
add(...numbers);
// template literals
var x = 5;
var y = 10;
console.log(`${x} + ${y} = ${x + y}`);

View File

@@ -1,168 +0,0 @@
Error.stackTraceLimit = Infinity;
var jsTrans = require("jstransform");
var traceur = require("traceur");
var es6tr = require("es6-transpiler");
var es6now = require("es6now");
var esnext = require("esnext");
var to5 = require("../lib/6to5");
//var uglify = require("uglify-js");
var matcha = require("matcha");
var path = require("path");
var fs = require("fs");
var _ = require("lodash");
var readResolve = function (filename) {
try {
filename = require.resolve(filename);
} catch (err) {
return null;
}
return fs.readFileSync(filename, "utf8");
};
var getVersion = function (name) {
return require(name + "/package.json").version;
};
var jsTransVisitors = [];
_.each([
"arrow-function-visitors", "class-visitors", "destructuring-visitors",
"object-concise-method-visitors", "object-short-notation-visitors",
"rest-param-visitors", "template-visitors"
], function (name) {
var mod = require("jstransform/visitors/es6-" + name);
jsTransVisitors = jsTransVisitors.concat(mod.visitorList);
});
var compilers = {
"6to5": {
version: getVersion(".."),
compile: function (code, filename) {
return to5.transform(code, { filename: filename }).code;
}
},
traceur: {
runtime: readResolve("traceur/bin/traceur-runtime.js"),
compile: function (code) {
return traceur.compile(code, {
modules: "commonjs",
experimental: true
});
}
},
esnext: {
runtime: readResolve("esnext/node_modules/regenerator/runtime.js") || readResolve("regenerator/runtime.js"),
compile: function (code) {
return esnext.compile(code).code;
}
},
es6now: {
runtime: readResolve("es6now/runtime/ES6.js"),
compile: function (code) {
return es6now.translate(code);
}
},
"es6-transpiler": {
compile: function (code) {
var result = es6tr.run({ src: code });
if (result.errors.length) throw new Error(result.join("; "));
return result.src;
}
},
jstransform: {
compile: function (code) {
return jsTrans.transform(jsTransVisitors, code).code;
}
}
};
// versions
//var uglifyTitle = "uglify v" + getVersion("uglify-js");
_.each(compilers, function (compiler, name) {
compiler.title = name + " v" + (compiler.version || getVersion(name));
});
//
var sizeBenchmark = function (code, loc, name, compiler) {
var log = function (output, title) {
title = [compiler.title].concat(title || []).join(" + ");
var text;
var color;
if (output.stack) {
text = "error";
color = "red";
} else {
var kilo = (output.length / 1024).toFixed(2);
text = kilo + "KB";
color = "cyan";
}
text = matcha.utils.color(matcha.utils.padBefore(text, 22), color);
console.log(text, matcha.utils.color("» " + title, "gray"));
if (output.stack) {
console.error(output.stack);
}
};
var go = function (getOutput, title) {
var code;
try {
code = getOutput();
} catch (err) {
log(err, title);
return;
}
log(code, title);
};
var output;
go(function () {
return output = compiler.compile(code, loc);
});
if (!output) return;
//go(function () {
// return uglify.minify(output, { fromString: true }).code;
//}, uglifyTitle);
};
//
_.each(fs.readdirSync(__dirname + "/fixtures"), function (name) {
var alias = path.basename(name, path.extname(name));
suite(alias, function () {
set("delay", 0);
var loc = __dirname + "/fixtures/" + name;
var code = fs.readFileSync(loc, "utf8");
before(function () {
_.each(compilers, function (compiler, name) {
sizeBenchmark(code, loc, name, compiler);
});
});
_.each(compilers, function (compiler) {
bench(compiler.title, function () {
compiler.compile(code, loc);
});
});
});
});

View File

@@ -1,83 +0,0 @@
#!/usr/bin/env node
var commander = require("commander");
var util = require("../lib/6to5/util");
var path = require("path");
var repl = require("repl");
var to5 = require("../lib/6to5");
var vm = require("vm");
var _ = require("lodash");
commander.option("-e, --eval [script]", "evaluate script");
commander.option("-p, --print", "evaluate script and print result");
commander.option("-i, --ignore [regex]", "ignore all files that match this regex when using the require hook");
commander.option("-x, --extensions [extensions]", "list of extensions to hook into [.es6,.js]", util.list);
var pkg = require("../package.json");
commander.version(pkg.version);
commander.usage("[options] [ -e script | script.js ] [arguments]");
commander.parse(process.argv);
//
var registerOpts = {};
if (commander.ignore) {
registerOpts.ignoreRegex = new RegExp(commander.ignore);
}
if (commander.extensions && commander.extensions.length) {
registerOpts.extensions = commander.extensions
}
to5.register(registerOpts);
//
var _eval = function (code, filename) {
code = to5.transform(code, { filename: filename }).code;
return vm.runInThisContext(code, filename);
};
if (commander.eval) {
var result = _eval(commander.eval, "eval");
if (commander.print) console.log(result);
} else {
var filenames = commander.args;
if (filenames.length) {
_.each(filenames, function (filename) {
if (!util.isAbsolute(filename)) {
filename = path.join(process.cwd(), filename);
}
require(require.resolve(filename));
});
} else {
replStart();
}
}
function replStart() {
repl.start({
prompt: "> ",
input: process.stdin,
output: process.stdout,
eval: replEval,
useGlobal: true
});
}
function replEval(code, context, filename, callback) {
var err;
var result;
try {
code = code.slice(1, -2); // remove "(" and "\n)"
result = _eval(code, filename);
} catch (e) {
err = e;
}
callback(err, result);
}

View File

@@ -1,66 +0,0 @@
var chokidar = require("chokidar");
var mkdirp = require("mkdirp");
var path = require("path");
var util = require("./util");
var fs = require("fs");
var _ = require("lodash");
module.exports = function (commander, filenames, opts) {
if (commander.sourceMapsInline) {
opts.sourceMap = "inline";
}
var write = function (src, relative) {
var dest = path.join(commander.outDir, relative);
var data = util.compile(src, { sourceMapName: dest });
var up = path.normalize(dest + "/..");
mkdirp.sync(up);
if (commander.sourceMaps) {
fs.writeFileSync(dest + ".map", JSON.stringify(data.map));
}
fs.writeFileSync(dest, data.code);
console.log(src + " -> " + dest);
};
var handle = function (filename) {
if (!fs.existsSync(filename)) return;
var stat = fs.statSync(filename);
if (stat.isDirectory(filename)) {
var dirname = filename;
_.each(util.readdirFilter(dirname), function (filename) {
write(path.join(dirname, filename), filename);
});
} else {
write(filename, filename);
}
};
_.each(filenames, handle);
if (commander.watch) {
_.each(filenames, function (dirname) {
var watcher = chokidar.watch(dirname, {
persistent: true,
ignoreInitial: true
});
_.each(["add", "change", "unlink"], function (type) {
watcher.on(type, function (filename) {
// chop off the dirname plus the path separator
var relative = filename.slice(dirname.length + 1);
console.log(type, filename);
write(filename, relative);
});
});
});
}
};

View File

@@ -1,25 +0,0 @@
var readdir = require("fs-readdir-recursive");
var index = require("./index");
var util = require("../../lib/6to5/util");
var to5 = require("../../lib/6to5");
var fs = require("fs");
var _ = require("lodash");
exports.readdirFilter = function (filename) {
return readdir(filename).filter(util.canCompile);
};
exports.transform = function (filename, code, opts) {
opts = _.extend(opts || {}, index.opts);
opts.filename = filename;
var result = to5.transform(code, opts);
result.filename = filename;
result.actual = code;
return result;
};
exports.compile = function (filename, opts) {
var code = fs.readFileSync(filename, "utf8");
return exports.transform(filename, code, opts);
};

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env node
var helper = require("../test/_helper");
var util = require("../lib/6to5/util");
console.log("(" + helper.run + ")(" + JSON.stringify(helper.getTests()) + ", to5, proclaim)");

View File

@@ -1,3 +0,0 @@
var transform = require("./transform");
module.exports = transform;

View File

@@ -1,150 +0,0 @@
module.exports = File;
var SHEBANG_REGEX = /^\#\!.*/;
var transform = require("./transform");
var recast = require("acorn-recast");
var util = require("./util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
function File(opts) {
this.opts = File.normaliseOptions(opts);
this.moduleFormatter = this.getModuleFormatter(opts.modules);
this.declarations = {};
this.uids = {};
this.ast = {};
}
File.normaliseOptions = function (opts) {
opts = opts || {};
_.defaults(opts, {
blacklist: [],
whitelist: [],
sourceMap: false,
filename: "unknown",
modules: "common"
});
_.defaults(opts, {
sourceFileName: opts.filename,
sourceMapName: opts.filename
});
transform._ensureTransformerNames("blacklist", opts.blacklist);
transform._ensureTransformerNames("whitelist", opts.whitelist);
return opts;
};
File.prototype.getModuleFormatter = function (type) {
var ModuleLoader = transform.moduleFormatters[type];
if (!ModuleLoader) {
var loc = util.resolve(type);
if (loc) ModuleLoader = require(loc);
}
if (!ModuleLoader) {
throw new ReferenceError("unknown module formatter type " + type);
}
return new ModuleLoader(this);
};
File.prototype.parseShebang = function (code) {
var shebangMatch = code.match(SHEBANG_REGEX);
if (shebangMatch) {
this.shebang = shebangMatch[0];
// remove shebang
code = code.replace(SHEBANG_REGEX, "");
}
return code;
};
File.prototype.addDeclaration = function (name) {
var declar = this.declarations[name];
if (declar) return declar.uid;
var uid = b.identifier(this.generateUid(name));
this.declarations[name] = {
uid: uid,
node: util.template(name)
};
return uid;
};
File.prototype.parse = function (code) {
var self = this;
code = this.parseShebang(code);
return util.parse(this.opts, code, function (tree) {
self.transform(tree);
return self.generate();
});
};
File.prototype.transform = function (ast) {
this.ast = ast;
var self = this;
_.each(transform.transformers, function (transformer) {
transformer.transform(self);
});
};
File.prototype.generate = function () {
var opts = this.opts;
var ast = this.ast;
var printOpts = { tabWidth: 2 };
if (opts.sourceMap) {
printOpts.sourceMapName = opts.sourceMapName;
}
var result = recast.print(ast, printOpts);
var code = result.code;
if (this.shebang) {
// add back shebang
code = this.shebang + code;
}
if (opts.sourceMap === "inline") {
code += "\n" + util.sourceMapToComment(result.map);
}
return {
code: code,
map: result.map || null,
ast: ast
};
};
File.prototype.generateUid = function (name) {
// replace all non-valid identifiers with dashes
name = name.replace(/[^a-zA-Z0-9]/g, "-");
// remove all dashes and numbers from start of name
name = name.replace(/^[-0-9]+/, "");
// camel case
name = name.replace(/[-_\s]+(.)?/g, function (match, c) {
return c ? c.toUpperCase() : "";
});
var uids = this.uids;
var i = uids[name] || 1;
var id = name;
if (i > 1) id += i;
uids[name] = i + 1;
return "_" + id;
};

View File

@@ -1,46 +0,0 @@
var transform = require("./transform");
var fs = require("fs");
var _ = require("lodash");
exports.util = require("./util");
exports.register = function (opts) {
var register = require("./register");
if (opts != null) register(opts);
return register;
};
exports.polyfill = function () {
require("./polyfill");
};
exports.transform = transform;
exports.transformFile = function (filename, opts, callback) {
if (_.isFunction(opts)) {
callback = opts;
opts = {};
}
opts.filename = filename;
fs.readFile(filename, function (err, code) {
if (err) return callback(err);
var result;
try {
result = transform(code, opts);
} catch (err) {
return callback(err);
}
callback(null, result);
});
};
exports.transformFileSync = function (filename, opts) {
opts = opts || {};
opts.filename = filename;
return transform(fs.readFileSync(filename), opts);
};

View File

@@ -1,82 +0,0 @@
module.exports = AMDFormatter;
var CommonJSFormatter = require("./common");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
function AMDFormatter(file) {
this.file = file;
this.ids = {};
}
util.inherits(AMDFormatter, CommonJSFormatter);
AMDFormatter.prototype.transform = function (ast) {
var program = ast.program;
var body = program.body;
// build an array of module names
var names = [b.literal("exports")];
_.each(this.ids, function (id, name) {
names.push(b.literal(name));
});
names = b.arrayExpression(names);
// build up define container
var params = _.values(this.ids);
params.unshift(b.identifier("exports"));
var container = b.functionExpression(null, params, b.blockStatement(body));
var call = b.callExpression(b.identifier("define"), [names, container]);
program.body = [b.expressionStatement(call)];
};
AMDFormatter.prototype._push = function (node) {
var id = node.source.value;
var ids = this.ids;
if (ids[id]) {
return ids[id];
} else {
return this.ids[id] = b.identifier(this.file.generateUid(id));
}
};
AMDFormatter.prototype.import = function (node) {
this._push(node);
};
AMDFormatter.prototype.importSpecifier = function (specifier, node, nodes) {
var key = util.getSpecifierName(specifier);
var id = specifier.id;
// import foo from "foo";
if (specifier.default) {
id = b.identifier("default");
}
var ref;
if (specifier.type === "ImportBatchSpecifier") {
// import * as bar from "foo";
ref = this._push(node);
} else {
// import foo from "foo";
ref = b.memberExpression(this._push(node), id, false);
}
nodes.push(b.variableDeclaration("var", [
b.variableDeclarator(key, ref)
]));
};
AMDFormatter.prototype.exportSpecifier = function (specifier, node, nodes) {
var self = this;
return this._exportSpecifier(function () {
return self._push(node);
}, specifier, node, nodes);
};

View File

@@ -1,97 +0,0 @@
module.exports = CommonJSFormatter;
var util = require("../util");
var b = require("acorn-ast-types").builders;
function CommonJSFormatter(file) {
this.file = file;
}
CommonJSFormatter.prototype.import = function (node, nodes) {
// import "foo";
nodes.push(util.template("require", {
MODULE_NAME: node.source.raw
}, true));
};
CommonJSFormatter.prototype.importSpecifier = function (specifier, node, nodes) {
var variableName = util.getSpecifierName(specifier);
// import foo from "foo";
if (specifier.default) {
specifier.id = b.identifier("default");
}
var templateName = "require-assign";
// import * as bar from "foo";
if (specifier.type !== "ImportBatchSpecifier") templateName += "-key";
nodes.push(util.template(templateName, {
VARIABLE_NAME: variableName,
MODULE_NAME: node.source.raw,
KEY: specifier.id
}));
};
CommonJSFormatter.prototype.export = function (node, nodes) {
var declar = node.declaration;
if (node.default) {
util.ensureExpressionType(declar);
nodes.push(util.template("exports-default", {
VALUE: declar
}, true));
} else {
var id = declar.id;
if (declar.type === "VariableDeclaration") {
id = declar.declarations[0].id;
}
var assign = util.template("exports-assign", {
VALUE: id,
KEY: id
}, true);
nodes.push(declar);
if (declar.type === "FunctionDeclaration") {
assign._blockHoist = true;
}
nodes.push(assign);
}
};
CommonJSFormatter.prototype._exportSpecifier = function (getRef, specifier, node, nodes) {
var variableName = util.getSpecifierName(specifier);
if (node.source) {
if (specifier.type === "ExportBatchSpecifier") {
// export * from "foo";
nodes.push(util.template("exports-wildcard", {
OBJECT: getRef()
}, true));
} else {
// export { foo } from "test";
nodes.push(util.template("exports-assign-key", {
VARIABLE_NAME: variableName.name,
OBJECT: getRef(),
KEY: specifier.id
}, true));
}
} else {
// export { foo };
nodes.push(util.template("exports-assign", {
VALUE: specifier.id,
KEY: variableName
}, true));
}
};
CommonJSFormatter.prototype.exportSpecifier = function (specifier, node, nodes) {
return this._exportSpecifier(function () {
return b.callExpression(b.identifier("require"), [node.source]);
}, specifier, node, nodes);
};

View File

@@ -1,47 +0,0 @@
module.exports = UMDFormatter;
var AMDFormatter = require("./amd");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
function UMDFormatter(file) {
this.file = file;
this.ids = {};
}
util.inherits(UMDFormatter, AMDFormatter);
UMDFormatter.prototype.transform = function (ast) {
var program = ast.program;
var body = program.body;
// build an array of module names
var names = [];
_.each(this.ids, function (id, name) {
names.push(b.literal(name));
});
// factory
var ids = _.values(this.ids);
var args = [b.identifier("exports")].concat(ids);
var factory = b.functionExpression(null, args, b.blockStatement(body));
// runner
var runner = util.template("umd-runner-body", {
AMD_ARGUMENTS: b.arrayExpression([b.literal("exports")].concat(names)),
COMMON_ARGUMENTS: names.map(function (name) {
return b.callExpression(b.identifier("require"), [name]);
})
});
//
var call = b.callExpression(runner, [factory]);
program.body = [b.expressionStatement(call)];
};

View File

@@ -1,3 +0,0 @@
require("es6-symbol/implement");
require("es6-shim");
require("regenerator/runtime");

View File

@@ -1,109 +0,0 @@
require("./polyfill");
var sourceMapSupport = require("source-map-support");
var to5 = require("./index");
var _ = require("lodash");
sourceMapSupport.install({
retrieveSourceMap: function (source) {
var map = maps[source];
if (map) {
return {
url: null,
map: map
};
} else {
return null;
}
}
});
//
var blacklist = [];
var blacklistTest = function (transformer, code) {
try {
if (_.isFunction(code)) {
code();
} else {
new Function(code);
}
blacklist.push(transformer);
} catch (err) {
if (err.name !== "SyntaxError") throw err;
}
};
blacklistTest("arrayComprehension", "var foo = [for (foo of bar) foo * foo];");
blacklistTest("arrowFunctions", "var foo = x => x * x;");
blacklistTest("classes", "class Foo {}");
blacklistTest("computedPropertyNames", "var foo = { [foo]: bar };");
//blacklistTest("constants", "const foo = 0;");
blacklistTest("defaultParamaters", "var foo = function (bar = 0) {};");
blacklistTest("destructuring", "var { x, y } = { x: 0, y: 0 };");
blacklistTest("forOf", "for (var foo of bar) {}");
blacklistTest("generators", "function* foo() {}");
blacklistTest("letScoping", "let foo = 0;");
blacklistTest("modules", 'import foo from "from";');
blacklistTest("propertyMethodAssignment", "{ get foo() {} }");
blacklistTest("propertyNameShorthand", "var foo = { x, y };");
blacklistTest("restParameters", "function foo(...bar) {}");
blacklistTest("spread", "foo(...bar);");
blacklistTest("templateLiterals", "`foo`");
blacklistTest("unicodeRegex", function () { new RegExp("foo", "u"); });
//
var ignoreRegex = /node_modules/;
var onlyRegex;
var whitelist = [];
var exts = {};
var maps = {};
var old = require.extensions[".js"];
var loader = function (m, filename) {
if ((ignoreRegex && ignoreRegex.test(filename)) || (onlyRegex && !onlyRegex.test(filename))) {
return old.apply(this, arguments);
}
var result = to5.transformFileSync(filename, {
whitelist: whitelist,
blacklist: blacklist,
sourceMap: true
});
maps[filename] = result.map;
m._compile(result.code, filename);
};
var hookExtensions = function (_exts) {
_.each(exts, function (old, ext) {
require.extensions[ext] = old;
});
exts = {};
_.each(_exts, function (ext) {
exts[ext] = require.extensions[ext];
require.extensions[ext] = loader;
});
};
hookExtensions([".es6", ".js"]);
module.exports = function (opts) {
// normalise options
opts = opts || {};
if (_.isRegExp(opts)) opts = { ignore: opts };
if (opts.ignoreRegex != null) opts.ignore = opts.ignoreRegex;
if (opts.only != null) onlyRegex = opts.only;
if (opts.ignore != null) ignoreRegex = opts.ignore;
if (opts.extensions) hookExtensions(opts.extensions);
if (opts.blacklist) blacklist = opts.blacklist;
if (opts.whitelist) whitelist = opts.whitelist;
};

View File

@@ -1 +0,0 @@
var VARIABLE_NAME = SLICE_KEY.call(arguments, SLICE_ARG);

View File

@@ -1 +0,0 @@
var VARIABLE_NAME = SLICE_KEY.call(arguments);

View File

@@ -1 +0,0 @@
SLICE_KEY.call(arguments);

View File

@@ -1,5 +0,0 @@
ARRAY.filter(function (KEY) {
return FILTER;
}).map(function (KEY) {
return STATEMENT;
});

View File

@@ -1,3 +0,0 @@
ARRAY.forEach(function (KEY) {
});

View File

@@ -1,3 +0,0 @@
ARRAY.map(function (KEY) {
return STATEMENT;
});

View File

@@ -1,4 +0,0 @@
(function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
})

View File

@@ -1,2 +0,0 @@
SUPER_NAME.apply(this, arguments);

View File

@@ -1,7 +0,0 @@
(function () {
var CLASS_NAME = function () {
};
return CLASS_NAME;
})()

View File

@@ -1 +0,0 @@
exports.VARIABLE_NAME = OBJECT.KEY;

View File

@@ -1 +0,0 @@
exports.default = VALUE;

View File

@@ -1,5 +0,0 @@
(function (obj) {
for (var i in obj) {
exports[i] = obj[i];
}
})(OBJECT);

View File

@@ -1,11 +0,0 @@
(function (child, parent) {
child.prototype = Object.create(parent.prototype, {
constructor: {
value: child,
enumerable: false,
writable: true,
configurable: true
}
});
child.__proto__ = parent;
})

View File

@@ -1,3 +0,0 @@
for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(STEP_KEY = ITERATOR_KEY.next()).done; ) {
}

View File

@@ -1,3 +0,0 @@
(function (KEY) {
return KEY;
})(OBJECT)

View File

@@ -1 +0,0 @@
if (VARIABLE === undefined) VARIABLE = DEFAULT;

View File

@@ -1,4 +0,0 @@
(function (KEY) {
CONTENT;
return KEY;
})(OBJECT);

View File

@@ -1 +0,0 @@
Object.defineProperties(OBJECT, PROPS);

View File

@@ -1 +0,0 @@
var VARIABLE_NAME = require(MODULE_NAME);

View File

@@ -1,7 +0,0 @@
(function (factory) {
if (typeof define === "function" && define.amd) {
define(AMD_ARGUMENTS, factory);
} else if (typeof exports !== "undefined") {
factory(exports, COMMON_ARGUMENTS);
}
});

View File

@@ -1,120 +0,0 @@
module.exports = transform;
var Transformer = require("./transformer");
var sourceMap = require("source-map");
var recast = require("acorn-recast");
var File = require("./file");
var util = require("./util");
var _ = require("lodash");
function transform(code, opts) {
opts = opts || {};
code = (code || "") + "";
var file = new File(opts);
return file.parse(code);
}
transform.test = function (task, assert) {
var actual = task.actual;
var expect = task.expect;
var opts = task.options;
var exec = task.exec;
var getOpts = function (filename) {
return _.merge({ filename: filename }, opts);
};
var execCode = exec.code.trim();
var result;
if (execCode) {
result = transform(execCode, getOpts(exec.filename));
execCode = result.code;
require("./polyfill");
var fn = new Function("assert", execCode);
fn(assert);
} else {
var actualCode = actual.code.trim();
var expectCode = expect.code.trim();
var printOpts = { tabWidth: 2 };
result = transform(actualCode, getOpts(actual.filename));
actualCode = recast.prettyPrint(result.ast, printOpts).code;
var expectAst = util.parse(expect, expectCode);
var expectResult = recast.prettyPrint(expectAst, printOpts);
expectCode = expectResult.code;
assert.equal(actualCode, expectCode);
}
if (task.sourceMap) {
assert.deepEqual(task.sourceMap, result.map);
}
if (task.sourceMappings) {
var consumer = new sourceMap.SourceMapConsumer(result.map);
_.each(task.sourceMappings, function (mapping, i) {
var generated = mapping.generated;
var original = mapping.original;
var pos = consumer.originalPositionFor(generated);
var msg = "source mapping " + i + " - generated: " + generated.line + ":" + generated.column;
assert.equal(pos.line + ":" + pos.column, original.line + ":" + original.column, msg);
});
}
};
transform._ensureTransformerNames = function (type, keys) {
_.each(keys, function (key) {
if (!_.has(transform.transformers, key)) {
throw new ReferenceError("unknown transformer " + key + " specified in " + type);
}
});
};
transform.transformers = {
modules: require("./transformers/modules"),
computedPropertyNames: require("./transformers/computed-property-names"),
propertyNameShorthand: require("./transformers/property-name-shorthand"),
constants: require("./transformers/constants"),
arrayComprehension: require("./transformers/array-comprehension"),
arrowFunctions: require("./transformers/arrow-functions"),
classes: require("./transformers/classes"),
spread: require("./transformers/spread"),
templateLiterals: require("./transformers/template-literals"),
propertyMethodAssignment: require("./transformers/property-method-assignment"),
defaultParameters: require("./transformers/default-parameters"),
letScoping: require("./transformers/let-scoping"),
restParameters: require("./transformers/rest-parameters"),
destructuring: require("./transformers/destructuring"),
forOf: require("./transformers/for-of"),
unicodeRegex: require("./transformers/unicode-regex"),
generators: require("./transformers/generators"),
numericLiterals: require("./transformers/numeric-literals"),
react: require("./transformers/react"),
jsx: require("./transformers/jsx"),
_aliasFunctions: require("./transformers/_alias-functions"),
_blockHoist: require("./transformers/_block-hoist"),
_declarations: require("./transformers/_declarations"),
useStrict: require("./transformers/use-strict"),
_moduleFormatter: require("./transformers/_module-formatter")
};
transform.moduleFormatters = {
common: require("./modules/common"),
amd: require("./modules/amd"),
umd: require("./modules/umd")
};
_.each(transform.transformers, function (transformer, key) {
transform.transformers[key] = new Transformer(key, transformer);
});

View File

@@ -1,76 +0,0 @@
module.exports = Transformer;
var traverse = require("./traverse");
var _ = require("lodash");
function Transformer(key, transformer) {
this.transformer = Transformer.normalise(transformer);
this.key = key;
}
Transformer.normalise = function (transformer) {
if (_.isFunction(transformer)) {
transformer = { ast: transformer };
}
_.each(transformer, function (fns, type) {
if (_.isFunction(fns)) fns = { enter: fns };
transformer[type] = fns;
});
return transformer;
};
Transformer.prototype.transform = function (file) {
if (!this.canRun(file)) return;
var transformer = this.transformer;
var ast = file.ast;
if (transformer.ast && transformer.ast.enter) {
transformer.ast.enter(ast, file);
}
var build = function (exit) {
return function (node, parent) {
// add any node type aliases that exist
var types = [node.type].concat(traverse.aliases[node.type] || []);
var fns = transformer.all;
_.each(types, function (type) {
fns = transformer[type] || fns;
});
// this transformer cannot deal with this node type
if (!fns) return;
var fn = fns.enter;
if (exit) fn = fns.exit;
if (!fn) return;
return fn(node, parent, file);
};
};
traverse(ast, {
enter: build(),
exit: build(true)
});
if (transformer.ast && transformer.ast.exit) {
transformer.ast.exit(ast, file);
}
};
Transformer.prototype.canRun = function (file) {
var opts = file.opts;
var blacklist = opts.blacklist;
if (blacklist.length && _.contains(blacklist, this.key)) return false;
var whitelist = opts.whitelist;
if (whitelist.length && !_.contains(whitelist, this.key)) return false;
return true;
};

View File

@@ -1,86 +0,0 @@
var traverse = require("../traverse");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var go = function (getBody, node, file) {
var argumentsId;
var thisId;
var getArgumentsId = function () {
return argumentsId = argumentsId || b.identifier(file.generateUid("arguments"));
};
var getThisId = function () {
return thisId = thisId || b.identifier(file.generateUid("this"));
};
// traverse the function and find all alias functions so we can alias
// arguments and this if necessary
traverse(node, function (node) {
var _aliasFunction = node._aliasFunction;
if (!_aliasFunction) {
if (traverse.isFunction(node)) {
// stop traversal of this node as it'll be hit again by this transformer
return false;
} else {
return;
}
}
// traverse all child nodes of this function and find arguments and this
traverse(node, function (node, parent) {
if (_aliasFunction === "arrows") {
if (traverse.isFunction(node) && node._aliasFunction !== "arrows") {
return false;
}
}
if (node._ignoreAliasFunctions) return;
var getId;
if (node.type === "Identifier" && node.name === "arguments") {
getId = getArgumentsId;
} else if (node.type === "ThisExpression") {
getId = getThisId;
} else {
return;
}
if (util.isReferenced(node, parent)) return getId();
});
return false;
});
var body;
var pushDeclaration = function (id, init) {
body = body || getBody();
body.unshift(b.variableDeclaration("var", [
b.variableDeclarator(id, init)
]));
};
if (argumentsId) {
pushDeclaration(argumentsId, b.identifier("arguments"));
}
if (thisId) {
pushDeclaration(thisId, b.identifier("this"));
}
};
exports.Program = function (node, parent, file) {
go(function () {
return node.body;
}, node, file);
};
exports.FunctionDeclaration =
exports.FunctionExpression = function (node, parent, file) {
go(function () {
util.ensureBlock(node);
return node.body.body;
}, node, file);
};

View File

@@ -1,17 +0,0 @@
exports.BlockStatement =
exports.Program = {
exit: function (node) {
var unshift = [];
node.body = node.body.filter(function (bodyNode) {
if (bodyNode._blockHoist) {
unshift.push(bodyNode);
return false;
} else {
return true;
}
});
node.body = unshift.concat(node.body);
}
};

View File

@@ -1,12 +0,0 @@
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
module.exports = function (ast, file) {
var body = ast.program.body;
_.each(file.declarations, function (declar) {
body.unshift(b.variableDeclaration("var", [
b.variableDeclarator(declar.uid, declar.node)
]));
});
};

View File

@@ -1,11 +0,0 @@
var transform = require("../transform");
exports.ast = {
exit: function (ast, file) {
if (!transform.transformers.modules.canRun(file)) return;
if (file.moduleFormatter.transform) {
file.moduleFormatter.transform(ast);
}
}
};

View File

@@ -1,75 +0,0 @@
var util = require("../util");
var b = require("acorn-ast-types").builders;
var single = function (node) {
var block = node.blocks[0];
var templateName = "array-comprehension-map";
if (node.filter) templateName = "array-comprehension-filter";
var result = util.template(templateName, {
STATEMENT: node.body,
FILTER: node.filter,
ARRAY: block.right,
KEY: block.left
});
result._aliasFunction = true;
return result;
};
var multiple = function (node, file) {
var uid = file.generateUid("arr");
var container = util.template("array-comprehension-container", {
KEY: uid
});
container._aliasFunction = true;
var block = container.callee.body;
var body = block.body;
var returnStatement = body.pop();
var build = function () {
var self = node.blocks.shift();
if (!self) return;
var child = build();
if (!child) {
// last item
child = util.template("array-push", {
STATEMENT: node.body,
KEY: uid
}, true);
// add a filter as this is our final stop
if (node.filter) {
child = b.ifStatement(node.filter, b.blockStatement([child]));
}
}
var container2 = util.template("array-comprehension-for-each", {
ARRAY: self.right,
KEY: self.left
}, true);
// set function body
container2.expression.arguments[0].body.body = [child];
return container2;
};
body.push(build());
body.push(returnStatement);
return container;
};
exports.ComprehensionExpression = function (node, parent, file) {
if (node.blocks.length === 1) {
return single(node);
} else {
return multiple(node, file);
}
};

View File

@@ -1,11 +0,0 @@
var util = require("../util");
exports.ArrowFunctionExpression = function (node) {
util.ensureBlock(node);
node._aliasFunction = "arrows";
node.expression = false;
node.type = "FunctionExpression";
return node;
};

View File

@@ -1,185 +0,0 @@
var traverse = require("../traverse");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
exports.ClassDeclaration = function (node, parent, file) {
return b.variableDeclaration("var", [
b.variableDeclarator(node.id, buildClass(node, file))
]);
};
exports.ClassExpression = function (node, parent, file) {
return buildClass(node, file);
};
var getMemberExpressionObject = function (node) {
while (node.type === "MemberExpression") {
node = node.object;
}
return node;
};
var buildClass = function (node, file) {
var superName = node.superClass;
var className = node.id || b.identifier(file.generateUid("class"));
var superClassArgument = node.superClass;
var superClassCallee = node.superClass;
if (superName) {
if (superName.type === "MemberExpression") {
superClassArgument = superClassCallee = getMemberExpressionObject(superName);
} else if (superName.type !== "Identifier") {
superClassArgument = superName;
superClassCallee = superName = b.identifier(file.generateUid("ref"));
}
}
var container = util.template("class", {
CLASS_NAME: className
});
var block = container.callee.body;
var body = block.body;
if (node.id) {
body[0].declarations[0].init.id = className;
}
var returnStatement = body.pop();
if (superName) {
body.push(b.expressionStatement(b.callExpression(file.addDeclaration("extends"), [className, superName])));
container.arguments.push(superClassArgument);
container.callee.params.push(superClassCallee);
}
buildClassBody(file, body, className, superName, node);
body.push(returnStatement);
return container;
};
var buildClassBody = function (file, body, className, superName, node) {
var instanceMutatorMap = {};
var staticMutatorMap = {};
var hasConstructor = false;
var construct = body[0].declarations[0].init;
var classBody = node.body.body;
_.each(classBody, function (node) {
var methodName = node.key.name;
var method = node.value;
replaceInstanceSuperReferences(superName, method, node, methodName);
if (methodName === "constructor") {
if (node.kind === "") {
hasConstructor = true;
addConstructor(construct, method);
} else {
throw util.errorWithNode(node, "unknown kind for constructor method");
}
} else {
var mutatorMap = instanceMutatorMap;
if (node.static) mutatorMap = staticMutatorMap;
var kind = node.kind;
if (kind === "") {
kind = "value";
util.pushMutatorMap(mutatorMap, methodName, "writable", b.identifier("true"));
}
util.pushMutatorMap(mutatorMap, methodName, kind, node);
}
});
if (!hasConstructor && superName) {
construct.body.body.push(util.template("class-super-constructor-call", {
SUPER_NAME: superName
}, true));
}
var instanceProps;
var staticProps;
if (!_.isEmpty(instanceMutatorMap)) {
var protoId = util.template("prototype-identifier", {
CLASS_NAME: className
});
instanceProps = util.buildDefineProperties(instanceMutatorMap, protoId);
}
if (!_.isEmpty(staticMutatorMap)) {
staticProps = util.buildDefineProperties(staticMutatorMap, className);
}
if (instanceProps || staticProps) {
instanceProps = instanceProps || b.literal(null);
staticProps = staticProps || b.literal(null);
body.push(b.expressionStatement(
b.callExpression(file.addDeclaration("class-props"), [className, staticProps, instanceProps])
));
}
};
var superIdentifier = function (superName, methodNode, methodName, node, parent) {
if (parent.property === node) {
return;
} else if (parent.type === "CallExpression" && parent.callee === node) {
// super(); -> ClassName.prototype.MethodName.call(this);
parent.arguments.unshift(b.thisExpression());
if (methodName === "constructor") {
// constructor() { super(); }
return b.memberExpression(superName, b.identifier("call"), false);
} else {
node = superName;
// foo() { super(); }
if (!methodNode.static) {
node = b.memberExpression(node, b.identifier("prototype"), false);
}
node = b.memberExpression(node, b.identifier(methodName), false);
return b.memberExpression(node, b.identifier("call"), false);
}
} else if (parent.type === "MemberExpression" && !methodNode.static) {
// super.test -> ClassName.prototype.test
return b.memberExpression(superName, b.identifier("prototype"), false);
} else {
return superName;
}
};
var replaceInstanceSuperReferences = function (superName, method, methodNode, methodName) {
superName = superName || b.identifier("Function");
traverse(method, function (node, parent) {
if (node.type === "Identifier" && node.name === "super") {
return superIdentifier(superName, methodNode, methodName, node, parent);
} else if (node.type === "CallExpression") {
var callee = node.callee;
if (callee.type !== "MemberExpression") return;
if (callee.object.name !== "super") return;
// super.test(); -> ClassName.prototype.MethodName.call(this);
callee.property.name = callee.property.name + ".call";
node.arguments.unshift(b.thisExpression());
}
});
};
var addConstructor = function (construct, method) {
construct.defaults = method.defaults;
construct.params = method.params;
construct.body = method.body;
construct.rest = method.rest;
};

View File

@@ -1,47 +0,0 @@
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
exports.ObjectExpression = function (node, parent, file) {
var hasComputed = false;
var computed = [];
node.properties = node.properties.filter(function (prop) {
if (prop.computed) {
hasComputed = true;
computed.unshift(prop);
return false;
} else {
return true;
}
});
if (!hasComputed) return;
var objId = util.getUid(parent, file);
var container = util.template("function-return-obj", {
KEY: objId,
OBJECT: node
});
var containerCallee = container.callee;
var containerBody = containerCallee.body.body;
containerCallee._aliasFunction = "arrows";
_.each(computed, function (prop) {
containerBody.unshift(
b.expressionStatement(
b.assignmentExpression(
"=",
b.memberExpression(objId, prop.key, true),
prop.value
)
)
);
});
return container;
};

View File

@@ -1,45 +0,0 @@
var traverse = require("../traverse");
var util = require("../util");
var _ = require("lodash");
exports.Program =
exports.BlockStatement =
exports.ForInStatement =
exports.ForOfStatement =
exports.ForStatement = function (node) {
var constants = [];
var check = function (node, name) {
if (constants.indexOf(name) >= 0) {
throw util.errorWithNode(node, name + " is read-only");
}
};
_.each(node.body, function (child) {
if (child && child.type === "VariableDeclaration" && child.kind === "const") {
_.each(child.declarations, function (declar) {
_.each(util.getIds(declar.id), function (name) {
check(declar, name);
constants.push(name);
});
declar._ignoreConstant = true;
});
child.kind = "let";
}
});
if (!constants.length) return;
traverse(node, function (child) {
if (child._ignoreConstant) return;
if (child.type === "VariableDeclarator" ||
child.type === "FunctionDeclaration" ||
child.type === "ClassDeclaration") {
check(child, child.id.name);
} else if (child.type === "AssignmentExpression") {
check(child, child.left.name);
}
});
};

View File

@@ -1,20 +0,0 @@
var util = require("../util");
var _ = require("lodash");
exports.Function = function (node) {
if (!node.defaults.length) return;
util.ensureBlock(node);
_.each(node.defaults, function (def, i) {
if (!def) return;
var param = node.params[i];
node.body.body.unshift(util.template("if-undefined-set-to", {
VARIABLE: param,
DEFAULT: def
}, true));
});
node.defaults = [];
};

View File

@@ -1,169 +0,0 @@
var traverse = require("../traverse");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
var buildVariableAssign = function (kind, id, init) {
if (kind === false) {
return b.expressionStatement(b.assignmentExpression("=", id, init));
} else {
return b.variableDeclaration(kind, [
b.variableDeclarator(id, init)
]);
}
};
var push = function (kind, nodes, elem, parentId) {
if (elem.type === "ObjectPattern") {
pushObjectPattern(kind, nodes, elem, parentId);
} else if (elem.type === "ArrayPattern") {
pushArrayPattern(kind, nodes, elem, parentId);
} else if (elem.type === "MemberExpression") {
nodes.push(buildVariableAssign(false, elem, parentId));
} else {
nodes.push(buildVariableAssign(kind, elem, parentId));
}
};
var pushObjectPattern = function (kind, nodes, pattern, parentId) {
_.each(pattern.properties, function (prop) {
var pattern2 = prop.value;
var patternId2 = b.memberExpression(parentId, prop.key, false);
if (traverse.isPattern(pattern2)) {
push(kind, nodes, pattern2, patternId2);
} else {
nodes.push(buildVariableAssign(kind, pattern2, patternId2));
}
});
};
var pushArrayPattern = function (kind, nodes, pattern, parentId) {
_.each(pattern.elements, function (elem, i) {
if (!elem) return;
var newPatternId = b.memberExpression(parentId, b.literal(i), true);
push(kind, nodes, elem, newPatternId);
});
};
var pushPattern = function (kind, nodes, pattern, parentId, file) {
if (parentId.type !== "MemberExpression" && parentId.type !== "Identifier") {
var key = b.identifier(file.generateUid("ref"));
nodes.push(b.variableDeclaration("var", [
b.variableDeclarator(key, parentId)
]));
parentId = key;
}
push(kind, nodes, pattern, parentId);
};
exports.ForInStatement =
exports.ForOfStatement = function (node, parent, file) {
var declar = node.left;
if (declar.type !== "VariableDeclaration") return;
var pattern = declar.declarations[0].id;
if (!traverse.isPattern(pattern)) return;
var key = b.identifier(file.generateUid("ref"));
node.left = b.variableDeclaration(declar.kind, [
b.variableDeclarator(key, null)
]);
var nodes = [];
push(declar.kind, nodes, pattern, key);
util.ensureBlock(node);
var block = node.body;
block.body = nodes.concat(block.body);
};
exports.Function = function (node, parent, file) {
var nodes = [];
var hasDestructuring = false;
node.params = node.params.map(function (pattern) {
if (!traverse.isPattern(pattern)) return pattern;
hasDestructuring = true;
var parentId = b.identifier(file.generateUid("ref"));
pushPattern("var", nodes, pattern, parentId, file);
return parentId;
});
if (!hasDestructuring) return;
util.ensureBlock(node);
var block = node.body;
block.body = nodes.concat(block.body);
};
exports.ExpressionStatement = function (node, parent, file) {
var expr = node.expression;
if (expr.type !== "AssignmentExpression") return;
if (!traverse.isPattern(expr.left)) return;
var nodes = [];
var ref = b.identifier(file.generateUid("ref"));
nodes.push(b.variableDeclaration("var", [
b.variableDeclarator(ref, expr.right)
]));
push(false, nodes, expr.left, ref);
return nodes;
};
exports.VariableDeclaration = function (node, parent, file) {
if (parent.type === "ForInStatement") return;
var nodes = [];
var hasPattern = false;
_.each(node.declarations, function (declar) {
if (traverse.isPattern(declar.id)) {
hasPattern = true;
return false;
}
});
if (!hasPattern) return;
_.each(node.declarations, function (declar) {
var patternId = declar.init;
var pattern = declar.id;
if (traverse.isPattern(pattern) && patternId) {
pushPattern(node.kind, nodes, pattern, patternId, file);
} else {
nodes.push(buildVariableAssign(node.kind, declar.id, declar.init));
}
});
if (parent.type !== "Program" && parent.type !== "BlockStatement") {
var declar;
_.each(nodes, function (node) {
declar = declar || b.variableDeclaration(node.kind, []);
if (node.type !== "VariableDeclaration" && declar.kind !== node.kind) {
throw util.errorWithNode(node, "Cannot use this node within the current parent");
}
declar.declarations = declar.declarations.concat(node.declarations);
});
return declar;
}
return nodes;
};

View File

@@ -1,34 +0,0 @@
var util = require("../util");
var b = require("acorn-ast-types").builders;
exports.ForOfStatement = function (node, parent, file) {
var left = node.left;
var declar;
var stepKey = b.identifier(file.generateUid("step"));
var stepValueId = b.memberExpression(stepKey, b.identifier("value"), false);
if (left.type === "Identifier") {
declar = b.expressionStatement(b.assignmentExpression("=", left, stepValueId));
} else if (left.type === "VariableDeclaration") {
declar = b.variableDeclaration(left.kind, [
b.variableDeclarator(left.declarations[0].id, stepValueId)
]);
} else {
return;
}
var node2 = util.template("for-of", {
ITERATOR_KEY: file.generateUid("iterator"),
STEP_KEY: stepKey,
OBJECT: node.right
});
util.ensureBlock(node);
var block = node2.body;
block.body.push(declar);
block.body = block.body.concat(node.body.body);
return node2;
};

View File

@@ -1,3 +0,0 @@
var regenerator = require("regenerator");
module.exports = regenerator.transform;

View File

@@ -1,97 +0,0 @@
// Based upon the excellent jsx-transpiler by Ingvar Stepanyan (RReverser)
// https://github.com/RReverser/jsx-transpiler
var esutils = require("esutils");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
var JSX_ANNOTATION_REGEX = /^\*\s*@jsx\s+([^\s]+)/;
var KNOWN_TAGS = require("./known-tags");
exports.Program = function (node, parent, file) {
var jsx = "React.DOM";
// looking for namespace annotation
_.each(node.comments, function (comment) {
if (!comment.possiblyLeading) return;
var matches = JSX_ANNOTATION_REGEX.exec(comment.value);
if (matches) jsx = matches[1];
});
// prebuilding AST node
file.jsx = jsx.split(".").map(b.identifier).reduce(function (object, property) {
return b.memberExpression(object, property, false);
});
};
exports.XJSIdentifier = function (node) {
if (esutils.keyword.isIdentifierName(node.name)) {
node.type = "Identifier";
} else {
return b.literal(node.name);
}
};
exports.XJSNamespacedName = function () {
throw new Error("Namespace tags are not supported. ReactJSX is not XML.");
};
exports.XJSMemberExpression = {
exit: function (node) {
node.computed = node.property.type === "Literal";
node.type = "MemberExpression";
}
};
exports.XJSEmptyExpression = function (node) {
node.value = null;
node.type = "Literal";
};
exports.XJSExpressionContainer = function (node) {
return node.expression;
};
exports.XJSAttribute = {
exit: function (node) {
var value = node.value || b.literal(true);
var propNode = b.property("init", node.name, value);
propNode.loc = node.loc;
return propNode;
}
};
exports.XJSOpeningElement = {
exit: function (node, parent, file) {
var tagExpr = node.name;
if (_.contains(KNOWN_TAGS, tagExpr.name)) {
tagExpr = b.memberExpression(file.jsx, tagExpr, false);
}
var props = node.attributes;
if (props.length) {
props = b.objectExpression(props);
} else {
props = b.literal(null);
}
return b.callExpression(tagExpr, [props]);
}
};
exports.XJSElement = {
exit: function (node) {
var callExpr = node.openingElement;
var children = node.children;
_.each(children, function (child) {
delete child.raw;
callExpr.arguments.push(child);
});
callExpr.loc = node.loc;
return callExpr;
}
};

View File

@@ -1,132 +0,0 @@
[
"a",
"abbr",
"address",
"applet",
"area",
"article",
"aside",
"audio",
"b",
"base",
"bdi",
"bdo",
"big",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"circle",
"cite",
"code",
"col",
"colgroup",
"command",
"data",
"datalist",
"dd",
"defs",
"del",
"details",
"dfn",
"dialog",
"div",
"dl",
"dt",
"ellipse",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"footer",
"form",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"kbd",
"keygen",
"label",
"legend",
"li",
"line",
"linearGradient",
"link",
"main",
"map",
"mark",
"marquee",
"menu",
"menuitem",
"meta",
"meter",
"nav",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"path",
"polygon",
"polyline",
"pre",
"progress",
"q",
"radialGradient",
"rect",
"rp",
"rt",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"small",
"source",
"span",
"stop",
"strong",
"style",
"sub",
"summary",
"sup",
"svg",
"table",
"tbody",
"td",
"text",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"tspan",
"u",
"ul",
"var",
"video",
"wbr"
]

View File

@@ -1,60 +0,0 @@
var traverse = require("../traverse");
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
exports.VariableDeclaration = function (node, parent, file) {
if (node.kind !== "let") return;
node.kind = "var";
var ids = {};
_.each(node.declarations, function (declar) {
_.each(util.getIds(declar.id), function (id) {
ids[id] = b.identifier(file.generateUid(id));
});
});
var replaceId = function (node, parent) {
// not an identifier so we have no use for this node
if (node.type !== "Identifier") return;
// not a let reference
var id = ids[node.name];
if (!id) return;
if (util.isReferenced(node, parent)) return id;
};
var isProgram = parent.type === "Program";
var replace = function (node, parent) {
if (!isProgram && _.contains(traverse.FUNCTION_TYPES, node.type)) {
var letReferences = [];
traverse(node, function (node, parent) {
var id = replaceId(node, parent);
if (id && !_.contains(letReferences, id)) letReferences.push(id);
return id;
});
if (letReferences.length) {
if (node.type === "FunctionDeclaration") {
throw new Error("`FunctionDeclaration`s that use `let` and `constant` references aren't allowed outside of the root scope");
} else {
var func = b.functionExpression(null, letReferences, b.blockStatement([
b.returnStatement(node)
]));
func._aliasFunction = true;
return b.callExpression(func, letReferences);
}
} else {
return false;
}
}
return replaceId(node, parent);
};
traverse(parent, replace);
};

View File

@@ -1,29 +0,0 @@
var _ = require("lodash");
exports.ImportDeclaration = function (node, parent, file) {
var nodes = [];
if (node.specifiers.length) {
_.each(node.specifiers, function (specifier) {
file.moduleFormatter.importSpecifier(specifier, node, nodes);
});
} else {
file.moduleFormatter.import(node, nodes);
}
return nodes;
};
exports.ExportDeclaration = function (node, parent, file) {
var nodes = [];
if (node.declaration) {
file.moduleFormatter.export(node, nodes);
} else {
_.each(node.specifiers, function (specifier) {
file.moduleFormatter.exportSpecifier(specifier, node, nodes);
});
}
return nodes;
};

View File

@@ -1,6 +0,0 @@
var _ = require("lodash");
exports.Literal = function (node) {
// TODO: remove this when the new code generator is released
if (_.isNumber(node.value)) delete node.raw;
};

View File

@@ -1,32 +0,0 @@
var util = require("../util");
var _ = require("lodash");
exports.Property = function (node) {
if (node.method) node.method = false;
};
exports.ObjectExpression = function (node, parent, file) {
var mutatorMap = {};
node.properties = node.properties.filter(function (prop) {
if (prop.kind === "get" || prop.kind === "set") {
util.pushMutatorMap(mutatorMap, prop.key.name, prop.kind, prop.value);
return false;
} else {
return true;
}
});
if (_.isEmpty(mutatorMap)) return;
var objId = util.getUid(parent, file);
return util.template("object-define-properties-closure", {
KEY: objId,
OBJECT: node,
CONTENT: util.template("object-define-properties", {
OBJECT: objId,
PROPS: util.buildDefineProperties(mutatorMap)
})
});
};

View File

@@ -1,3 +0,0 @@
exports.Property = function (node) {
if (node.shorthand) node.shorthand = false;
};

View File

@@ -1,63 +0,0 @@
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
var addDisplayName = function (id, call) {
if (!call || call.type !== "CallExpression") return;
var callee = call.callee;
if (callee.type !== "MemberExpression") return;
// not React
var obj = callee.object;
if (obj.type !== "Identifier" || obj.name !== "React") return;
// not createClass
var prop = callee.property;
if (prop.type !== "Identifier" || prop.name !== "createClass") return;
// no arguments
var args = call.arguments;
if (args.length !== 1) return;
// not an object
var first = args[0];
if (first.type !== "ObjectExpression") return;
var props = first.properties;
var safe = true;
_.each(props, function (prop) {
if (prop.key.name === "displayName") {
return safe = false;
}
});
if (safe) {
props.unshift(b.property("init", b.identifier("displayName"), b.literal(id)));
}
};
exports.AssignmentExpression =
exports.Property =
exports.VariableDeclarator = function (node) {
var left, right;
if (node.type === "AssignmentExpression") {
left = node.left;
right = node.right;
} else if (node.type === "Property") {
left = node.key;
right = node.value;
} else if (node.type === "VariableDeclarator") {
left = node.id;
right = node.init;
}
if (left && left.type === "MemberExpression") {
left = left.property;
}
if (left && left.type === "Identifier") {
addDisplayName(left.name, right);
}
};

View File

@@ -1,24 +0,0 @@
var util = require("../util");
var b = require("acorn-ast-types").builders;
exports.Function = function (node, parent, file) {
if (!node.rest) return;
var rest = node.rest;
delete node.rest;
var templateName = "arguments-slice-assign";
if (node.params.length) templateName += "-arg";
util.ensureBlock(node);
var template = util.template(templateName, {
SLICE_KEY: file.addDeclaration("slice"),
VARIABLE_NAME: rest,
SLICE_ARG: b.literal(node.params.length)
});
template.declarations[0].init.arguments[0]._ignoreAliasFunctions = true;
node.body.body.unshift(template);
};

View File

@@ -1,98 +0,0 @@
var util = require("../util");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
var getSpreadLiteral = function (spread, file) {
var literal = spread.argument;
if (literal.type !== "ArrayExpression") {
literal = util.template("call", {
OBJECT: file.addDeclaration("slice"),
CONTEXT: literal
});
}
return literal;
};
var hasSpread = function (nodes) {
var has = false;
_.each(nodes, function (node) {
if (node.type === "SpreadElement") {
has = true;
return false;
}
});
return has;
};
var build = function (props, file) {
var nodes = [];
var _props = [];
var push = function () {
if (!_props.length) return;
nodes.push(b.arrayExpression(_props));
_props = [];
};
_.each(props, function (prop) {
if (prop.type === "SpreadElement") {
push();
nodes.push(getSpreadLiteral(prop, file));
} else {
_props.push(prop);
}
});
push();
return nodes;
};
exports.ArrayExpression = function (node, parent, file) {
var elements = node.elements;
if (!hasSpread(elements)) return;
var nodes = build(elements, file);
var first = nodes.shift();
if (!nodes.length) return first;
return b.callExpression(b.memberExpression(first, b.identifier("concat"), false), nodes);
};
exports.CallExpression = function (node, parent, file) {
var args = node.arguments;
if (!hasSpread(args)) return;
var contextLiteral = b.literal(null);
node.arguments = [];
var nodes = build(args, file);
var first = nodes.shift();
if (nodes.length) {
node.arguments.push(b.callExpression(b.memberExpression(first, b.identifier("concat"), false), nodes));
} else {
node.arguments.push(first);
}
var callee = node.callee;
if (callee.type === "MemberExpression") {
contextLiteral = callee.object;
if (callee.computed) {
callee.object = b.memberExpression(callee.object, callee.property, true);
callee.property = b.identifier("apply");
callee.computed = false;
} else {
callee.property = b.memberExpression(callee.property, b.identifier("apply"), false);
}
} else {
node.callee = b.memberExpression(node.callee, b.identifier("apply"), false);
}
node.arguments.unshift(contextLiteral);
};

View File

@@ -1,49 +0,0 @@
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
var buildBinaryExpression = function (left, right) {
return b.binaryExpression("+", left, right);
};
exports.TaggedTemplateExpression = function (node) {
var args = [];
var quasi = node.quasi;
var strings = quasi.quasis.map(function (elem) {
return b.literal(elem.value.raw);
});
args.push(b.arrayExpression(strings));
_.each(quasi.expressions, function (expr) {
args.push(expr);
});
return b.callExpression(node.tag, args);
};
exports.TemplateLiteral = function (node) {
var nodes = [];
_.each(node.quasis, function (elem) {
nodes.push(b.literal(elem.value.raw));
var expr = node.expressions.shift();
if (expr) nodes.push(expr);
});
if (nodes.length > 1) {
// remove redundant '' at the end of the expression
var last = _.last(nodes);
if (last.type === "Literal" && last.value === "") nodes.pop();
var root = buildBinaryExpression(nodes.shift(), nodes.shift());
_.each(nodes, function (node) {
root = buildBinaryExpression(root, node);
});
return root;
} else {
return nodes[0];
}
};

View File

@@ -1,15 +0,0 @@
var rewritePattern = require("regexpu/rewrite-pattern");
var b = require("acorn-ast-types").builders;
var _ = require("lodash");
exports.Literal = function (node) {
var regex = node.regex;
if (!regex) return;
var flags = regex.flags.split("");
if (!_.contains(regex.flags, "u")) return;
_.pull(flags, "u");
var pattern = rewritePattern(regex.pattern, regex.flags);
return b.literal(new RegExp(pattern, flags.join("")));
};

View File

@@ -1,12 +0,0 @@
var b = require("acorn-ast-types").builders;
module.exports = function (ast) {
var body = ast.program.body;
var first = body[0];
var noStrict = !first || first.type !== "ExpressionStatement" || first.expression.type !== "Literal" || first.expression.value !== "use strict";
if (noStrict) {
body.unshift(b.expressionStatement(b.literal("use strict")));
}
};

View File

@@ -1,127 +0,0 @@
var VISITOR_KEYS = require("./visitor-keys");
var _ = require("lodash");
var traverse = module.exports = function (parent, callbacks, blacklistTypes) {
// falsy node
if (!parent) return;
// array of nodes
if (_.isArray(parent)) {
_.each(parent, function (node) {
traverse(node, callbacks, blacklistTypes);
});
return;
}
// unknown node type to traverse
var keys = VISITOR_KEYS[parent.type];
if (!keys) return;
// blacklist these node types from being traversed
blacklistTypes = blacklistTypes || [];
// normalise callbacks
if (_.isFunction(callbacks)) callbacks = { enter: callbacks };
_.each(keys, function (key) {
var nodes = parent[key];
if (!nodes) return;
var handle = function (obj, key) {
var node = obj[key];
if (!node) return;
// type is blacklisted
if (_.contains(blacklistTypes, node.type)) return;
var result;
// replace node
var maybeReplace = function (result) {
if (result != null) obj[key] = result;
};
// enter
if (callbacks.enter) {
result = callbacks.enter(node, parent, obj, key);
// stop iteration
if (result === false) return;
maybeReplace(result);
}
// traverse node
traverse(node, callbacks, blacklistTypes);
// exit
if (callbacks.exit) {
maybeReplace(callbacks.exit(node, parent, obj, key));
}
};
if (_.isArray(nodes)) {
_.each(nodes, function (node, i) {
handle(nodes, i);
});
// remove deleted nodes
parent[key] = _.flatten(parent[key]).filter(function (node) {
return node !== traverse.Delete;
});
} else {
handle(parent, key);
if (parent[key] === traverse.Delete) {
throw new Error("trying to delete property " + key + " from " +
parent.type + " but can't because it's required");
}
}
});
};
traverse.FUNCTION_TYPES = ["ArrowFunctionExpression", "FunctionDeclaration", "FunctionExpression"];
traverse.aliases = {
ArrowFunctionExpression: ["Function"],
FunctionDeclaration: ["Function"],
FunctionExpression: ["Function"]
};
traverse.isFunction = function (node) {
return _.contains(traverse.FUNCTION_TYPES, node.type);
};
traverse.isPattern = function (node) {
return node.type === "ArrayPattern" || node.type === "ObjectPattern";
};
traverse.Delete = {};
traverse.hasType = function (tree, type, blacklistTypes) {
blacklistTypes = [].concat(blacklistTypes || []);
var has = false;
if (_.isArray(tree)) {
// array of nodes, find the first
return !!_.find(tree, function (node) {
return traverse.hasType(node, type, blacklistTypes);
});
} else {
// the node we're searching in is blacklisted
if (_.contains(blacklistTypes, tree.type)) return false;
// the type we're looking for is the same as the passed node
if (tree.type === type) return true;
traverse(tree, function (node) {
if (node.type === type) {
has = true;
return false;
}
}, blacklistTypes);
}
return has;
};

View File

@@ -1,86 +0,0 @@
{
"ArrayExpression": ["elements"],
"ArrayPattern": ["elements"],
"ArrowFunctionExpression": ["params", "defaults", "rest", "body"],
"AssignmentExpression": ["left", "right"],
"AwaitExpression": ["argument"],
"BinaryExpression": ["left", "right"],
"BlockStatement": ["body"],
"BreakStatement": ["label"],
"CallExpression": ["callee", "arguments"],
"CatchClause": ["param", "body"],
"ClassBody": ["body"],
"ClassDeclaration": ["id", "body", "superClass"],
"ClassExpression": ["id", "body", "superClass"],
"ClassProperty": ["key", "value"],
"ComprehensionBlock": ["left", "right", "body"],
"ComprehensionExpression": ["filter", "blocks", "body"],
"ConditionalExpression": ["test", "consequent", "alternate"],
"ContinueStatement": ["label"],
"DebuggerStatement": [],
"DoWhileStatement": ["body", "test"],
"EmptyStatement": [],
"ExportDeclaration": ["declaration", "specifiers", "source"],
"ExportBatchSpecifier": [],
"ExportSpecifier": ["id", "name"],
"ExpressionStatement": ["expression"],
"File": ["program"],
"ForInStatement": ["left", "right", "body"],
"ForOfStatement": ["left", "right", "body"],
"ForStatement": ["init", "test", "update", "body"],
"FunctionDeclaration": ["id", "params", "defaults", "rest", "body"],
"FunctionExpression": ["id", "params", "defaults", "rest", "body"],
"Identifier": [],
"IfStatement": ["test", "consequent", "alternate"],
"ImportDeclaration": ["specifiers", "source"],
"ImportDefaultSpecifier": ["id"],
"ImportNamespaceSpecifier": ["id"],
"ImportSpecifier": ["id", "name"],
"LabeledStatement": ["label", "body"],
"Literal": [],
"LogicalExpression": ["left", "right"],
"MemberExpression": ["object", "property"],
"MethodDefinition": ["key", "value"],
"ModuleSpecifier": [],
"NewExpression": ["callee", "arguments"],
"ObjectExpression": ["properties"],
"ObjectPattern": ["properties"],
"ObjectTypeAnnotation": ["properties"],
"OptionalParameter": ["id"],
"ParametricTypeAnnotation": ["params"],
"ParametricallyTypedIdentifier": [],
"Program": ["body"],
"Property": ["key", "value"],
"ReturnStatement": ["argument"],
"SequenceExpression": ["expressions"],
"SpreadElement": ["argument"],
"SpreadProperty": ["argument"],
"SwitchCase": ["test", "consequent"],
"SwitchStatement": ["discriminant", "cases"],
"TaggedTemplateExpression": ["tag", "quasi"],
"TemplateElement": [],
"TemplateLiteral": ["quasis", "expressions"],
"ThisExpression": [],
"ThrowStatement": ["argument"],
"TryStatement": ["block", "handlers", "handler", "guardedHandlers", "finalizer"],
"TypeAnnotatedIdentifier": ["id", "annotation"],
"TypeAnnotation": ["id", "params", "returnType", "parametricType"],
"UnaryExpression": ["argument"],
"UpdateExpression": ["argument"],
"VariableDeclaration": ["declarations"],
"VariableDeclarator": ["id", "init"],
"VoidTypeAnnotation": [],
"WhileStatement": ["test", "body"],
"WithStatement": ["object", "body"],
"XJSIdentifier": [],
"XJSNamespacedName": ["namespace", "name"],
"XJSMemberExpression": ["object", "property"],
"XJSEmptyExpression": [],
"XJSExpressionContainer": ["expression"],
"XJSElement": ["openingElement", "closingElement", "children"],
"XJSClosingElement": ["name"],
"XJSOpeningElement": ["name", "attributes"],
"XJSAttribute": ["name", "value"],
"XJSText": [],
"YieldExpression": ["argument"]
}

View File

@@ -1,311 +0,0 @@
var traverse = require("./traverse");
var astTypes = require("acorn-ast-types");
var recast = require("acorn-recast");
var path = require("path");
var util = require("util");
var fs = require("fs");
var _ = require("lodash");
var n = astTypes.namedTypes;
var b = astTypes.builders;
exports.inherits = util.inherits;
exports.ensureBlock = function (node) {
var block = node.body;
if (block.type === "BlockStatement") return;
if (!_.isArray(block)) {
if (!n.Statement.check(block)) block = b.returnStatement(block);
block = [block];
}
node.body = b.blockStatement(block);
};
exports.resolve = function (loc) {
try {
return require.resolve(loc);
} catch (err) {
return null;
}
};
exports.list = function (val) {
return val ? val.split(",") : [];
};
exports.getSpecifierName = function (specifier) {
return specifier.name || specifier.id;
};
exports.ensureExpressionType = function (node) {
node.type = {
FunctionDeclaration: "FunctionExpression",
ClassDeclaration: "ClassExpression"
}[node.type] || node.type;
return node;
};
exports.getUid = function (parent, file) {
var node;
if (parent.type === "AssignmentExpression") {
node = parent.left;
} else if (parent.type === "VariableDeclarator") {
node = parent.id;
}
var id = "ref";
if (node && node.type === "Identifier") {
id = node.name;
}
return b.identifier(file.generateUid(id));
};
exports.isAbsolute = function (loc) {
if (!loc) return false;
if (loc[0] === "/") return true; // unix
if (loc[1] === ":" && loc[2] === "\\") return true; // windows
return false;
};
exports.removeProperties = function (tree) {
var clear = function (node) {
delete node.tokens;
delete node.range;
delete node.loc;
};
clear(tree);
traverse(tree, clear);
return tree;
};
exports.getIds = function (node) {
var search = [node];
var ids = [];
while (search.length) {
var id = search.shift();
if (id.type === "Identifier") {
ids.push(id.name);
} else if (id.type === "ArrayPattern") {
_.each(id.elements, function (elem) {
search.push(elem);
});
} else if (id.type === "ObjectPattern") {
_.each(id.properties, function (prop) {
search.push(prop.value);
});
} else {
throw new Error("unknown node " + id.type);
}
}
return ids;
};
exports.errorWithNode = function (node, msg) {
var line = node.loc.start.line;
var col = node.loc.start.column;
var err = new SyntaxError("Line " + line + ": " + msg);
err.lineNumber = line;
err.column = col;
return err;
};
exports.canCompile = function (filename) {
var ext = path.extname(filename);
return _.contains([".js", ".es6"], ext);
};
exports.sourceMapToComment = function (map) {
var json = JSON.stringify(map);
var base64 = new Buffer(json).toString("base64");
return "//# sourceMappingURL=data:application/json;base64," + base64;
};
exports.pushMutatorMap = function (mutatorMap, key, kind, method) {
var map;
if (_.has(mutatorMap, key)) {
map = mutatorMap[key];
} else {
map = {};
}
mutatorMap[key] = map;
if (map[kind]) {
throw new Error("a " + kind + " already exists for this property");
} else {
map[kind] = method;
}
};
exports.buildDefineProperties = function (mutatorMap) {
var objExpr = b.objectExpression([]);
_.each(mutatorMap, function (map, key) {
var mapNode = b.objectExpression([]);
var propNode = b.property("init", b.identifier(key), mapNode);
_.each(map, function (node, key) {
node = _.clone(node);
if (node.type === "MethodDefinition") node = node.value;
mapNode.properties.push(b.property("init", b.identifier(key), node));
});
objExpr.properties.push(propNode);
});
return objExpr;
};
exports.template = function (name, nodes, keepExpression) {
var template = exports.templates[name];
if (!template) throw new ReferenceError("unknown template " + name);
template = _.cloneDeep(template);
if (!_.isEmpty(nodes)) {
traverse(template, function (node) {
if (node.type === "Identifier" && _.has(nodes, node.name)) {
var newNode = nodes[node.name];
if (_.isString(newNode)) {
node.name = newNode;
} else {
return newNode;
}
}
});
}
var node = template.body[0];
if (!keepExpression && node.type === "ExpressionStatement") {
return node.expression;
} else {
return node;
}
};
exports.isReferenced = function (node, parent) {
// we're a property key
if (parent.type === "Property" && parent.key === node) return false;
var isMemberExpression = parent.type === "MemberExpression";
// we're in a member expression and we're the computed property so we're referenced
var isComputedProperty = isMemberExpression && parent.property === node && parent.computed;
// we're in a member expression and we're the object so we're referenced
var isObject = isMemberExpression && parent.object === node;
// we are referenced
if (!isMemberExpression || isComputedProperty || isObject) return true;
return false;
};
exports.codeFrame = function (lines, lineNumber, colNumber) {
colNumber = Math.max(colNumber, 0);
lines = lines.split("\n");
var start = Math.max(lineNumber - 3, 0);
var end = Math.min(lines.length, lineNumber + 3);
var width = (end + "").length;
return "\n" + lines.slice(start, end).map(function (line, i) {
var curr = i + start + 1;
var gutter = curr === lineNumber ? "> " : " ";
var sep = curr + exports.repeat(width + 1);
gutter += sep + "| ";
var str = gutter + line;
if (colNumber && curr === lineNumber) {
str += "\n";
str += exports.repeat(gutter.length - 2);
str += "|" + exports.repeat(colNumber) + "^";
}
return str;
}).join("\n");
};
exports.repeat = function (width, cha) {
cha = cha || " ";
return new Array(width + 1).join(cha);
};
exports.parse = function (opts, code, callback) {
try {
var recastOpts = {};
if (opts.sourceMap) {
recastOpts.sourceFileName = opts.sourceFileName;
recastOpts.sourceRoot = opts.sourceRoot;
}
var ast = recast.parse(code, recastOpts);
if (callback) {
return callback(ast);
} else {
return ast;
}
} catch (err) {
if (!err._6to5) {
err._6to5 = true;
var message = opts.filename + ": " + err.message;
if (err.loc) {
var frame = exports.codeFrame(code, err.loc.line, err.loc.column);
message += frame;
}
err.stack = err.stack.replace(err.message, message);
err.message = message;
}
throw err;
}
};
exports.parseNoProperties = function (loc, code) {
var ast = exports.parse({ filename: loc }, code).program;
return exports.removeProperties(ast);
};
try {
exports.templates = require("../../templates.json");
} catch (err) {
if (err.code !== "MODULE_NOT_FOUND") throw err;
exports.templates = {};
var templatesLoc = __dirname + "/templates";
if (!fs.existsSync(templatesLoc)) {
throw new Error("no templates directory - this is most likely the result" +
" of a broken `npm publish`. Please report to " +
"https://github.com/sebmck/6to5/issues");
}
_.each(fs.readdirSync(templatesLoc), function (name) {
if (name[0] === ".") return;
var key = path.basename(name, path.extname(name));
var loc = templatesLoc + "/" + name;
var code = fs.readFileSync(loc, "utf8");
exports.templates[key] = exports.parseNoProperties(loc, code);
});
}

View File

@@ -1,21 +1,13 @@
{
"name": "6to5",
"name": "babel-core",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.10.12",
"version": "5.1.9",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/sebmck/6to5",
"repository": {
"type": "git",
"url": "https://github.com/sebmck/6to5.git"
},
"bugs": {
"url": "https://github.com/sebmck/6to5/issues"
},
"preferGlobal": true,
"main": "lib/6to5/index.js",
"bin": {
"6to5": "./bin/6to5/index.js",
"6to5-node": "./bin/6to5-node"
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"main": "lib/babel/api/node.js",
"browser": {
"./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js"
},
"keywords": [
"harmony",
@@ -27,39 +19,56 @@
"es6",
"transpile",
"transpiler",
"6to5"
"6to5",
"babel"
],
"scripts": {
"bench": "make bench",
"test": "make test"
},
"dependencies": {
"commander": "2.4.0",
"fs-readdir-recursive": "0.0.2",
"lodash": "2.4.1",
"mkdirp": "0.5.0",
"es6-shim": "0.18.0",
"es6-symbol": "0.1.1",
"regexpu": "0.3.0",
"recast": "0.8.0",
"source-map": "0.1.40",
"regenerator": "0.6.7",
"chokidar": "0.10.0",
"source-map-support": "0.2.7",
"esutils": "1.1.4",
"acorn-jsx": "https://github.com/sebmck/acorn-jsx/archive/master.tar.gz",
"acorn-recast": "0.8.0-4",
"acorn-ast-types": "0.5.3-1"
"ast-types": "~0.7.0",
"chalk": "^1.0.0",
"convert-source-map": "^1.0.0",
"core-js": "^0.8.3",
"debug": "^2.1.1",
"detect-indent": "^3.0.0",
"estraverse": "^3.0.0",
"esutils": "^2.0.0",
"fs-readdir-recursive": "^0.1.0",
"globals": "^6.4.0",
"is-integer": "^1.0.4",
"js-tokens": "1.0.0",
"leven": "^1.0.1",
"line-numbers": "0.2.0",
"lodash": "^3.6.0",
"minimatch": "^2.0.3",
"output-file-sync": "^1.1.0",
"path-is-absolute": "^1.0.0",
"private": "^0.1.6",
"regenerator": "^0.8.20",
"regexpu": "^1.1.2",
"repeating": "^1.1.2",
"shebang-regex": "^1.0.0",
"slash": "^1.0.0",
"source-map": "^0.4.0",
"source-map-support": "^0.2.10",
"strip-json-comments": "^1.0.2",
"to-fast-properties": "^1.0.0",
"trim-right": "^1.0.0",
"user-home": "^1.1.1"
},
"devDependencies": {
"istanbul": "0.3.2",
"matcha": "0.5.0",
"mocha": "1.21.5",
"uglify-js": "2.4.15",
"browserify": "6.1.0",
"proclaim": "2.0.0",
"rimraf": "2.2.8",
"jshint": "2.5.6",
"chai": "^1.9.2"
"babel": "4.7.13",
"browserify": "^9.0.8",
"chai": "^2.2.0",
"eslint": "^0.18.0",
"babel-eslint": "^2.0.0",
"esvalid": "^1.1.0",
"istanbul": "^0.3.5",
"matcha": "^0.6.0",
"mocha": "2.2.0",
"rimraf": "^2.3.2",
"uglify-js": "^2.4.16"
}
}

View File

@@ -0,0 +1,5 @@
# babel-cli
Babel CLI
For more information please look at [babel](https://github.com/babel/babel).

View File

@@ -0,0 +1,142 @@
#!/usr/bin/env node
var pathIsAbsolute = require("path-is-absolute");
var commander = require("commander");
var Module = require("module");
var babel = require("babel-core");
var inspect = require("util").inspect;
var path = require("path");
var repl = require("repl");
var util = require("babel-core").util;
var vm = require("vm");
var _ = require("lodash");
var program = new commander.Command("babel-node");
program.option("-e, --eval [script]", "Evaluate script");
program.option("-p, --print [code]", "Evaluate script and print result");
program.option("-i, --ignore [regex]", "Ignore all files that match this regex when using the require hook");
program.option("-x, --extensions [extensions]", "List of extensions to hook into [.es6,.js,.es,.jsx]");
program.option("-r, --stage [stage]", "Enable support for specific ECMAScript stages");
program.option("-w, --whitelist [whitelist]", "Whitelist of transformers to ONLY use", util.list);
program.option("-b, --blacklist [blacklist]", "Blacklist of transformers to NOT use", util.list);
program.option("-o, --optional [optional]", "List of optional transformers to enable", util.list);
var pkg = require("../package.json");
program.version(pkg.version);
program.usage("[options] [ -e script | script.js ] [arguments]");
program.parse(process.argv);
//
babel.register({
extensions: program.extensions,
blacklist: program.blacklist,
whitelist: program.whitelist,
optional: program.optional,
ignore: program.ignore,
stage: program.stage,
});
//
var _eval = function (code, filename) {
if (!code) return undefined;
code = babel.transform(code, {
filename: filename,
blacklist: program.blacklist,
whitelist: program.whitelist,
optional: program.optional,
stage: program.stage
}).code;
return vm.runInThisContext(code, {
filename: filename
});
};
if (program.eval || program.print) {
var code = program.eval;
if (!code || code === true) code = program.print;
global.__filename = "[eval]";
global.__dirname = process.cwd();
var module = new Module(global.__filename);
module.filename = global.__filename;
module.paths = Module._nodeModulePaths(global.__dirname);
global.exports = module.exports;
global.module = module;
global.require = module.require.bind(module);
var result = _eval(code, global.__filename);
if (program.print) {
var output = _.isString(result) ? result : inspect(result);
process.stdout.write(output + "\n");
}
} else {
if (program.args.length) {
// slice all arguments up to the first filename since they're babel args that we handle
var args = process.argv.slice(2);
var i = 0;
var ignoreNext = false;
_.each(args, function (arg, i2) {
if (ignoreNext) {
ignoreNext = false;
return;
}
if (arg[0] === "-") {
var parsedArg = program[arg.slice(2)];
if (parsedArg && parsedArg !== true) {
ignoreNext = true;
}
} else {
i = i2;
return false;
}
});
args = args.slice(i);
// make the filename absolute
var filename = args[0];
if (!pathIsAbsolute(filename)) args[0] = path.join(process.cwd(), filename);
// add back on node and concat the sliced args
process.argv = ["node"].concat(args);
Module.runMain();
} else {
replStart();
}
}
function replStart() {
repl.start({
prompt: "> ",
input: process.stdin,
output: process.stdout,
eval: replEval,
useGlobal: true
});
}
function replEval(code, context, filename, callback) {
var err;
var result;
try {
if (code[0] === "(" && code[code.length - 1] === ")") {
code = code.slice(1, -1); // remove "(" and ")"
}
result = _eval(code, filename);
} catch (e) {
err = e;
}
callback(err, result);
}

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env node
var commander = require("commander");
var util = require("babel-core").util;
var runtime = require("babel-core").buildExternalHelpers;
commander.option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", util.list);
commander.option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");
commander.usage("[options]");
commander.parse(process.argv);
console.log(runtime(commander.whitelist, commander.outputType));

448
packages/babel-cli/bin/babel-node Executable file
View File

@@ -0,0 +1,448 @@
#!/usr/bin/env node
/**
* This tiny wrapper file checks for known node flags and appends them
* when found, before invoking the "real" _babel-node(1) executable.
*/
var args = [__dirname + "/_babel-node"];
var babelArgs = process.argv.slice(2);
var userArgs;
// separate node arguments from script arguments
var argSeparator = babelArgs.indexOf("--");
if (argSeparator > -1) {
userArgs = babelArgs.slice(argSeparator); // including the --
babelArgs = babelArgs.slice(0, argSeparator);
}
babelArgs.forEach(function(arg){
var flag = arg.split("=")[0];
switch (flag) {
case "-d":
args.unshift("--debug");
break;
case "debug":
case "--debug":
case "--debug-brk":
args.unshift(arg);
break;
case "-gc":
case "--expose-gc":
args.unshift("--expose-gc");
break;
case "--use_strict":
case "--es_staging":
case "--harmony":
case "--harmony_shipping":
case "--harmony_modules":
case "--harmony_arrays":
case "--harmony_array_includes":
case "--harmony_regexps":
case "--harmony_arrow_functions":
case "--harmony_proxies":
case "--harmony_sloppy":
case "--harmony_unicode":
case "--harmony_tostring":
case "--harmony_numeric_literals":
case "--harmony_strings":
case "--harmony_scoping":
case "--harmony_classes":
case "--harmony_object_literals":
case "--harmony_templates":
case "--compiled_keyed_generic_loads":
case "--pretenuring_call_new":
case "--allocation_site_pretenuring":
case "--trace_pretenuring":
case "--trace_pretenuring_statistics":
case "--track_fields":
case "--track_double_fields":
case "--track_heap_object_fields":
case "--track_computed_fields":
case "--track_field_types":
case "--smi_binop":
case "--vector_ics":
case "--optimize_for_size":
case "--unbox_double_arrays":
case "--string_slices":
case "--crankshaft":
case "--hydrogen_filter":
case "--use_gvn":
case "--gvn_iterations":
case "--use_canonicalizing":
case "--use_inlining":
case "--use_escape_analysis":
case "--use_allocation_folding":
case "--use_local_allocation_folding":
case "--use_write_barrier_elimination":
case "--max_inlining_levels":
case "--max_inlined_source_size":
case "--max_inlined_nodes":
case "--max_inlined_nodes_cumulative":
case "--loop_invariant_code_motion":
case "--fast_math":
case "--collect_megamorphic_maps_from_stub_cache":
case "--hydrogen_stats":
case "--trace_check_elimination":
case "--trace_hydrogen":
case "--trace_hydrogen_filter":
case "--trace_hydrogen_stubs":
case "--trace_hydrogen_file":
case "--trace_phase":
case "--trace_inlining":
case "--trace_load_elimination":
case "--trace_store_elimination":
case "--trace_alloc":
case "--trace_all_uses":
case "--trace_range":
case "--trace_gvn":
case "--trace_representation":
case "--trace_removable_simulates":
case "--trace_escape_analysis":
case "--trace_allocation_folding":
case "--trace_track_allocation_sites":
case "--trace_migration":
case "--trace_generalization":
case "--stress_pointer_maps":
case "--stress_environments":
case "--deopt_every_n_times":
case "--deopt_every_n_garbage_collections":
case "--print_deopt_stress":
case "--trap_on_deopt":
case "--trap_on_stub_deopt":
case "--deoptimize_uncommon_cases":
case "--polymorphic_inlining":
case "--use_osr":
case "--array_bounds_checks_elimination":
case "--trace_bce":
case "--array_bounds_checks_hoisting":
case "--array_index_dehoisting":
case "--analyze_environment_liveness":
case "--load_elimination":
case "--check_elimination":
case "--store_elimination":
case "--dead_code_elimination":
case "--fold_constants":
case "--trace_dead_code_elimination":
case "--unreachable_code_elimination":
case "--trace_osr":
case "--stress_runs":
case "--lookup_sample_by_shared":
case "--cache_optimized_code":
case "--flush_optimized_code_cache":
case "--inline_construct":
case "--inline_arguments":
case "--inline_accessors":
case "--escape_analysis_iterations":
case "--optimize_for_in":
case "--concurrent_recompilation":
case "--job_based_recompilation":
case "--trace_concurrent_recompilation":
case "--concurrent_recompilation_queue_length":
case "--concurrent_recompilation_delay":
case "--block_concurrent_recompilation":
case "--concurrent_osr":
case "--omit_map_checks_for_leaf_maps":
case "--turbo_filter":
case "--trace_turbo":
case "--trace_turbo_graph":
case "--trace_turbo_cfg_file":
case "--trace_turbo_types":
case "--trace_turbo_scheduler":
case "--trace_turbo_reduction":
case "--trace_turbo_jt":
case "--turbo_asm":
case "--turbo_verify":
case "--turbo_stats":
case "--turbo_types":
case "--turbo_source_positions":
case "--context_specialization":
case "--turbo_deoptimization":
case "--turbo_inlining":
case "--turbo_inlining_intrinsics":
case "--trace_turbo_inlining":
case "--loop_assignment_analysis":
case "--turbo_profiling":
case "--turbo_reuse_spill_slots":
case "--turbo_delay_ssa_decon":
case "--turbo_move_optimization":
case "--turbo_jt":
case "--typed_array_max_size_in_heap":
case "--frame_count":
case "--interrupt_budget":
case "--type_info_threshold":
case "--generic_ic_threshold":
case "--self_opt_count":
case "--trace_opt_verbose":
case "--debug_code":
case "--code_comments":
case "--enable_sse3":
case "--enable_sse4_1":
case "--enable_sahf":
case "--enable_avx":
case "--enable_fma3":
case "--enable_vfp3":
case "--enable_armv7":
case "--enable_armv8":
case "--enable_neon":
case "--enable_sudiv":
case "--enable_mls":
case "--enable_movw_movt":
case "--enable_unaligned_accesses":
case "--enable_32dregs":
case "--enable_vldr_imm":
case "--force_long_branches":
case "--expose_natives_as":
case "--expose_debug_as":
case "--expose_free_buffer":
case "--expose_gc":
case "--expose_gc_as":
case "--expose_externalize_string":
case "--expose_trigger_failure":
case "--stack_trace_limit":
case "--builtins_in_stack_traces":
case "--disable_native_files":
case "--inline_new":
case "--trace_codegen":
case "--trace":
case "--mask_constants_with_cookie":
case "--lazy":
case "--trace_opt":
case "--trace_opt_stats":
case "--opt":
case "--always_opt":
case "--always_osr":
case "--prepare_always_opt":
case "--trace_deopt":
case "--trace_stub_failures":
case "--serialize_toplevel":
case "--serialize_inner":
case "--trace_serializer":
case "--min_preparse_length":
case "--max_opt_count":
case "--compilation_cache":
case "--cache_prototype_transitions":
case "--cpu_profiler_sampling_interval":
case "--trace_debug_json":
case "--trace_js_array_abuse":
case "--trace_external_array_abuse":
case "--trace_array_abuse":
case "--enable_liveedit":
case "--hard_abort":
case "--stack_size":
case "--max_stack_trace_source_length":
case "--always_inline_smi_code":
case "--min_semi_space_size":
case "--target_semi_space_size":
case "--max_semi_space_size":
case "--semi_space_growth_factor":
case "--experimental_new_space_growth_heuristic":
case "--max_old_space_size":
case "--initial_old_space_size":
case "--max_executable_size":
case "--gc_global":
case "--gc_interval":
case "--trace_gc":
case "--trace_gc_nvp":
case "--trace_gc_ignore_scavenger":
case "--trace_idle_notification":
case "--trace_idle_notification_verbose":
case "--print_cumulative_gc_stat":
case "--print_max_heap_committed":
case "--trace_gc_verbose":
case "--trace_fragmentation":
case "--collect_maps":
case "--weak_embedded_maps_in_optimized_code":
case "--weak_embedded_objects_in_optimized_code":
case "--flush_code":
case "--flush_code_incrementally":
case "--trace_code_flushing":
case "--age_code":
case "--incremental_marking":
case "--incremental_marking_steps":
case "--concurrent_sweeping":
case "--trace_incremental_marking":
case "--track_gc_object_stats":
case "--heap_profiler_trace_objects":
case "--use_idle_notification":
case "--use_ic":
case "--trace_ic":
case "--native_code_counters":
case "--always_compact":
case "--never_compact":
case "--compact_code_space":
case "--incremental_code_compaction":
case "--cleanup_code_caches_at_gc":
case "--use_marking_progress_bar":
case "--zap_code_space":
case "--random_seed":
case "--trace_weak_arrays":
case "--track_prototype_users":
case "--use_verbose_printer":
case "--allow_natives_syntax":
case "--trace_parse":
case "--trace_sim":
case "--debug_sim":
case "--check_icache":
case "--stop_sim_at":
case "--sim_stack_alignment":
case "--sim_stack_size":
case "--log_regs_modified":
case "--log_colour":
case "--ignore_asm_unimplemented_break":
case "--trace_sim_messages":
case "--stack_trace_on_illegal":
case "--abort_on_uncaught_exception":
case "--randomize_hashes":
case "--hash_seed":
case "--profile_deserialization":
case "--regexp_optimization":
case "--testing_bool_flag":
case "--testing_maybe_bool_flag":
case "--testing_int_flag":
case "--testing_float_flag":
case "--testing_string_flag":
case "--testing_prng_seed":
case "--testing_serialization_file":
case "--startup_blob":
case "--profile_hydrogen_code_stub_compilation":
case "--predictable":
case "--help":
case "--dump_counters":
case "--debugger":
case "--map_counters":
case "--js_arguments":
case "--gdbjit":
case "--gdbjit_full":
case "--gdbjit_dump":
case "--gdbjit_dump_filter":
case "--force_marking_deque_overflows":
case "--stress_compaction":
case "--log":
case "--log_all":
case "--log_api":
case "--log_code":
case "--log_gc":
case "--log_handles":
case "--log_snapshot_positions":
case "--log_suspect":
case "--prof":
case "--prof_browser_mode":
case "--log_regexp":
case "--logfile":
case "--logfile_per_isolate":
case "--ll_prof":
case "--perf_basic_prof":
case "--perf_jit_prof":
case "--gc_fake_mmap":
case "--log_internal_timer_events":
case "--log_timer_events":
case "--log_instruction_stats":
case "--log_instruction_file":
case "--log_instruction_period":
case "--redirect_code_traces":
case "--redirect_code_traces_to":
case "--hydrogen_track_positions":
case "--trace_elements_transitions":
case "--trace_creation_allocation_sites":
case "--print_code_stubs":
case "--test_secondary_stub_cache":
case "--test_primary_stub_cache":
case "--print_code":
case "--print_opt_code":
case "--print_unopt_code":
case "--print_code_verbose":
case "--print_builtin_code":
case "--sodium":
case "--print_all_code":
case "--es5_readonly":
case "--es52_globals":
case "--harmony_typeof":
case "--harmony_collections":
case "--packed_arrays":
case "--smi_only_arrays":
case "--clever_optimizations":
case "--use_range":
case "--eliminate_dead_phis":
case "--optimize_closures":
case "--loop_weight":
case "--opt_safe_uint32_operations":
case "--parallel_recompilation":
case "--trace_parallel_recompilation":
case "--parallel_recompilation_queue_length":
case "--experimental_profiler":
case "--watch_ic_patching":
case "--self_optimization":
case "--direct_self_opt":
case "--retry_self_opt":
case "--count_based_interrupts":
case "--interrupt_at_exit":
case "--weighted_back_edges":
case "--debug_code (generate extra code":
case "--enable_sse2":
case "--enable_cmov":
case "--enable_rdtsc":
case "--enable_vfp2":
case "--enable_fpu":
case "--stack_trace_on_abort":
case "--always_full_compiler":
case "--debugger_auto_break":
case "--break_on_abort":
case "--max_new_space_size":
case "--trace_external_memory":
case "--lazy_sweeping":
case "--trace_exception":
case "--preallocate_message_memory":
case "--preemption":
case "--extra_code":
case "--remote_debugger":
case "--debugger_agent":
case "--debugger_port":
case "--debug_compile_events":
case "--debug_script_collected_events":
case "--gdbjit":
case "--log_runtime":
case "--prof_auto":
case "--prof_lazy":
case "--sliding_state_window":
args.unshift(arg);
break;
default:
if (arg.indexOf("--trace") === 0) {
args.unshift(arg);
} else {
args.push(arg);
}
break;
}
});
// append arguments passed after --
if (argSeparator > -1) {
args = args.concat(userArgs);
}
try {
var kexec = require("kexec");
kexec(process.argv[0], args);
} catch (err) {
if (err.code !== "MODULE_NOT_FOUND") throw err;
var child_process = require("child_process");
var proc = child_process.spawn(process.argv[0], args, { stdio: "inherit" });
proc.on("exit", function (code, signal) {
process.on("exit", function () {
if (signal) {
process.kill(process.pid, signal);
} else {
process.exit(code);
}
})
});
}

View File

@@ -0,0 +1,78 @@
var outputFileSync = require("output-file-sync");
var chokidar = require("chokidar");
var path = require("path");
var util = require("./util");
var fs = require("fs");
var _ = require("lodash");
module.exports = function (commander, filenames, opts) {
var write = function (src, relative) {
// remove extension and then append back on .js
relative = relative.replace(/\.(\w*?)$/, "") + ".js";
var dest = path.join(commander.outDir, relative);
var data = util.compile(src, {
sourceFileName: path.relative(dest + "/..", src)
});
if (commander.sourceMaps && commander.sourceMaps !== "inline") {
var mapLoc = dest + ".map";
data.code = util.addSourceMappingUrl(data.code, mapLoc);
outputFileSync(mapLoc, JSON.stringify(data.map));
}
outputFileSync(dest, data.code);
console.log(src + " -> " + dest);
};
var handleFile = function (src, filename) {
if (util.shouldIgnore(src)) return;
if (util.canCompile(filename)) {
write(src, filename);
} else if (commander.copyFiles) {
outputFileSync(path.join(commander.outDir, filename), fs.readFileSync(src));
}
};
var handle = function (filename) {
if (!fs.existsSync(filename)) return;
var stat = fs.statSync(filename);
if (stat.isDirectory(filename)) {
var dirname = filename;
_.each(util.readdir(dirname), function (filename) {
var src = path.join(dirname, filename);
handleFile(src, filename);
});
} else {
write(filename, filename);
}
};
_.each(filenames, handle);
if (commander.watch) {
_.each(filenames, function (dirname) {
var watcher = chokidar.watch(dirname, {
persistent: true,
ignoreInitial: true
});
_.each(["add", "change"], function (type) {
watcher.on(type, function (filename) {
var relative = path.relative(dirname, filename) || filename;
try {
handleFile(filename, relative);
} catch (err) {
console.error(err.stack);
}
});
});
});
}
};

View File

@@ -1,12 +1,16 @@
var sourceMap = require("source-map");
var chokidar = require("chokidar");
var util2 = require("../../lib/6to5/util");
var path = require("path");
var util = require("./util");
var fs = require("fs");
var _ = require("lodash");
var convertSourceMap = require("convert-source-map");
var sourceMap = require("source-map");
var chokidar = require("chokidar");
var path = require("path");
var util = require("./util");
var fs = require("fs");
var _ = require("lodash");
module.exports = function (commander, filenames, opts) {
if (commander.sourceMaps === "inline") {
opts.sourceMaps = true;
}
module.exports = function (commander, filenames) {
var results = [];
var buildResult = function () {
@@ -28,7 +32,7 @@ module.exports = function (commander, filenames) {
map.setSourceContent(filename, result.actual);
consumer.eachMapping(function (mapping) {
map._mappings.push({
map._mappings.add({
generatedLine: mapping.generatedLine + offset,
generatedColumn: mapping.generatedColumn,
originalLine: mapping.originalLine,
@@ -41,8 +45,8 @@ module.exports = function (commander, filenames) {
}
});
if (commander.sourceMapsInline || (!commander.outFile && commander.sourceMaps)) {
code += "\n" + util2.sourceMapToComment(map);
if (commander.sourceMaps === "inline" || (!commander.outFile && commander.sourceMaps)) {
code += "\n" + convertSourceMap.fromObject(map).toComment();
}
return {
@@ -55,13 +59,15 @@ module.exports = function (commander, filenames) {
var result = buildResult();
if (commander.outFile) {
if (commander.sourceMaps) {
fs.writeFileSync(commander.outFile + ".map", JSON.stringify(result.map));
if (commander.sourceMaps && commander.sourceMaps !== "inline") {
var mapLoc = commander.outFile + ".map";
result.code = util.addSourceMappingUrl(result.code, mapLoc);
fs.writeFileSync(mapLoc, JSON.stringify(result.map));
}
fs.writeFileSync(commander.outFile, result.code);
} else {
console.log(result.code);
process.stdout.write(result.code + "\n");
}
};
@@ -75,7 +81,7 @@ module.exports = function (commander, filenames) {
if (chunk !== null) code += chunk;
});
process.stdin.on("end", function() {
process.stdin.on("end", function () {
results.push(util.transform(commander.filename, code));
output();
});
@@ -101,6 +107,8 @@ module.exports = function (commander, filenames) {
});
_.each(_filenames, function (filename) {
if (util.shouldIgnore(filename)) return;
results.push(util.compile(filename));
});
@@ -111,16 +119,18 @@ module.exports = function (commander, filenames) {
walk();
if (commander.watch) {
var watcher = chokidar.watch(filenames, {
chokidar.watch(filenames, {
persistent: true,
ignoreInitial: true
});
_.each(["add", "change", "unlink"], function (type) {
watcher.on(type, function (filename) {
}).on("all", function (type, filename) {
if (type === "add" || type === "change") {
console.log(type, filename);
walk();
});
try {
walk();
} catch (err) {
console.error(err.stack);
}
}
});
}
};

View File

@@ -1,29 +1,55 @@
#!/usr/bin/env node
var commander = require("commander");
var transform = require("../../lib/6to5/transform");
var util = require("../../lib/6to5/util");
var transform = require("babel-core").transform;
var kebabCase = require("lodash/string/kebabCase");
var options = require("babel-core").options;
var util = require("babel-core").util;
var each = require("lodash/collection/each");
var keys = require("lodash/object/keys");
var fs = require("fs");
var _ = require("lodash");
commander.option("-t, --source-maps-inline", "Append sourceMappingURL comment to bottom of code");
commander.option("-s, --source-maps", "Save source map alongside the compiled code");
commander.option("-f, --filename [filename]", "Filename to use when reading from stdin - this will be used in source-maps, errors etc [stdin]", "stdin");
each(options, function (option, key) {
if (option.hidden) return;
var arg = kebabCase(key);
if (option.type !== "boolean") {
arg += " [" + (option.type || "string") + "]";
}
if (option.type === "boolean" && option.default === true) {
arg = "no-" + arg;
}
arg = "--" + arg;
if (option.shorthand) {
arg = "-" + option.shorthand + ", " + arg;
}
var desc = [];
if (option.deprecated) desc.push("[DEPRECATED] " + option.deprecated);
if (option.description) desc.push(option.description);
commander.option(arg, desc.join(" "));
})
commander.option("-w, --watch", "Recompile files on changes");
commander.option("-m, --modules [modules]", "Module formatter type to use [common]", "common");
commander.option("-w, --whitelist [whitelist]", "Whitelist of transformers to ONLY use", util.list);
commander.option("-b, --blacklist [blacklist]", "Blacklist of transformers to NOT use", util.list);
commander.option("-o, --out-file [out]", "Compile all input files into a single file");
commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory");
commander.option("-D, --copy-files", "When compiling a directory copy over non-compilable files");
commander.on("--help", function(){
commander.on("--help", function () {
var outKeys = function (title, obj) {
console.log(" " + title + ":");
console.log();
_.each(_.keys(obj).sort(), function (key) {
each(keys(obj).sort(), function (key) {
if (key[0] === "_") return;
if (obj[key].optional) key = "[" + key + "]";
console.log(" - " + key);
});
@@ -45,7 +71,7 @@ var errors = [];
var filenames = commander.args;
_.each(filenames, function (filename) {
each(filenames, function (filename) {
if (!fs.existsSync(filename)) {
errors.push(filename + " doesn't exist");
}
@@ -69,12 +95,6 @@ if (commander.watch) {
}
}
if (commander.sourceMaps) {
if (!commander.outFile && !commander.outDir) {
errors.push("--source-maps requires --out-file or --out-dir");
}
}
if (errors.length) {
console.error(errors.join(". "));
process.exit(2);
@@ -82,13 +102,14 @@ if (errors.length) {
//
exports.opts = {
sourceMapName: commander.outFile,
blacklist: commander.blacklist,
whitelist: commander.whitelist,
sourceMap: commander.sourceMaps || commander.sourceMapsInline,
modules: commander.modules
};
var opts = exports.opts = {};
each(options, function (opt, key) {
opts[key] = commander[key];
});
opts.ignore = util.arrayify(opts.ignore, util.regexify);
opts.only = util.arrayify(opts.only, util.regexify);
var fn;

View File

@@ -0,0 +1,42 @@
var readdir = require("fs-readdir-recursive");
var index = require("./index");
var babel = require("babel-core");
var util = require("babel-core").util;
var path = require("path");
var fs = require("fs");
var _ = require("lodash");
exports.readdirFilter = function (filename) {
return readdir(filename).filter(function (filename) {
return util.canCompile(filename);
});
};
exports.readdir = readdir;
exports.canCompile = util.canCompile;
exports.shouldIgnore = function (loc) {
return util.shouldIgnore(loc, index.opts.ignore, index.opts.only);
};
exports.addSourceMappingUrl = function (code, loc) {
return code + "\n//# sourceMappingURL=" + path.basename(loc);
};
exports.transform = function (filename, code, opts) {
opts = _.defaults(opts || {}, index.opts);
opts.filename = filename;
opts.ignore = null;
opts.only = null;
var result = babel.transform(code, opts);
result.filename = filename;
result.actual = code;
return result;
};
exports.compile = function (filename, opts) {
var code = fs.readFileSync(filename, "utf8");
return exports.transform(filename, code, opts);
};

View File

@@ -0,0 +1 @@
module.exports = require("babel-core");

View File

@@ -0,0 +1,25 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.1.8",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.1.8",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"fs-readdir-recursive": "^0.1.0",
"output-file-sync": "^1.1.0",
"lodash": "^3.2.0",
"convert-source-map": "^0.5.0",
"source-map": "^0.4.0",
"path-is-absolute": "^1.0.0"
},
"bin": {
"babel": "./bin/babel/index.js",
"babel-node": "./bin/babel-node",
"babel-external-helpers": "./bin/babel-external-helpers"
}
}

View File

@@ -0,0 +1 @@
module.exports = require("babel-core/polyfill");

View File

@@ -0,0 +1 @@
module.exports = require("babel-core/register");

View File

@@ -0,0 +1,5 @@
# babel-runtime
Babel self-contained runtime
For more information please look at [babel](https://github.com/babel/babel).

View File

@@ -0,0 +1,4 @@
module.exports = {
"default": require("core-js/library"),
__esModule: true
};

Some files were not shown because too many files have changed in this diff Show More