112 Commits

Author SHA1 Message Date
Sebastian McKenzie
24d4d6d73a remove esModule flag from systemjs module formatter - fixes #599 2015-01-27 20:40:43 +11:00
Sebastian McKenzie
c49438da60 add namespaces and better structure transformation 2015-01-26 21:10:05 +11:00
Sebastian McKenzie
cfd0059fc7 fix linting errors 2015-01-26 13:51:06 +11:00
Sebastian McKenzie
59e3eb2bd1 move doDefaultExportInterop to default module formatter 2015-01-26 11:43:46 +11:00
Sebastian McKenzie
c7c99efa8e add back strict module formatters 2015-01-26 10:57:06 +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
3fdf492dcf safer common interop - closes #493 2015-01-25 14:03:25 +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
e1d2def4b1 add t.getSpecifierId that handles default specifiers 2015-01-23 23:03:04 +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
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
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
Dan Abramov
3d9d842a0d Extract traversers outside methods 2015-01-21 14:34:47 +03: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
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
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
36a933a004 add strict mode to every file 2015-01-18 18:44:08 +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
Dan Abramov
f9480b5280 Avoid closures when traversing 2015-01-17 00:13:39 +03:00
Sebastian McKenzie
0627cd94d4 turn array for ins into fors 2015-01-16 02:25:41 +11:00
Sebastian McKenzie
790c924b54 abstract out build comprehension helper 2015-01-15 20:13:16 +11:00
Sebastian McKenzie
2e497eef98 fix linting errors 2015-01-13 01:51:21 +11:00
Sebastian McKenzie
eabbcd31ad add comments to ambiguous code 2015-01-13 01:50:30 +11:00
Sebastian McKenzie
df9fa32b82 add optional to keep module id extensions - fixes #420 2015-01-13 01:12:14 +11:00
Sebastian McKenzie
1c8d24f78c remove exportsWildcard helper in favor of defaults #430 2015-01-09 20:08:05 +11:00
Sebastian McKenzie
944a9d3908 pass exports to exportsWildcard - fixes #430 2015-01-09 19:48:11 +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
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
bf24a0d6b5 temporarily disable module collission detections 2015-01-07 18:30:33 +11:00
Sebastian McKenzie
81fb8647b6 fixing linting errors 2015-01-07 13:58:41 +11:00
Sebastian McKenzie
2305e2447f fix hasOwnProperty object lookup conflict 2015-01-07 13:08:20 +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
1cc606d4d0 make import reassignment illegal @eventualbuddha 2015-01-07 07:58:04 +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
8c1760bea2 fix faulty export default source detection - fixes #406 2015-01-07 00:30:41 +11:00
Lars Kappert
dfa51954b8 Use unaryExpression for typeof 2015-01-06 10:12:08 +01:00
Sebastian McKenzie
b9e4340700 better use strict handling inside of modules 2015-01-06 17:32:00 +11:00
Sebastian McKenzie
d531c8aa4c add expressionStatement around system module wildcard exports 2015-01-06 12:17:20 +11:00
Sebastian McKenzie
2558a5e12e better wildcard imports and exports - fixes #224 2015-01-06 11:48:23 +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
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