1611 Commits

Author SHA1 Message Date
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
ab134d0919 add data abstraction layer to File 2015-01-20 01:36:00 +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 81bec3e5c4e559cacadbc07dd24aac8d5099caa6 and
157f5c3304e8b85be8ada99a634393ea22e45045.
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
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
Sebastian McKenzie
4a1addc558 better whitespace for VariableDeclarations 2015-01-19 22:09:05 +11: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
Aluísio Augusto Silva Gonçalves
e2f4ca106e Merge branch 'external-regenerator-runtime' into scoped-es6-runtime 2015-01-18 20:02:48 -02:00
Sebastian McKenzie
b719eaf6ab add missing semicolon 2015-01-19 08:58:11 +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
8fc7af5480 properly reference method body - fixes #530 2015-01-19 08:35:01 +11: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
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
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
7c4701716c implement block scoping TDZ 2015-01-18 21:26:02 +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
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 95d9f596687cd3fb4ce4d78dc6c7606128b74209.
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
c210d64557 add loose all option 2015-01-18 12:13:08 +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
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