jquense
9b3c8569f7
Resolve 'babel-plugin-' name before the plain name
...
Otherwise you get situations like the following: `plugins: [
'object-assign']` resolves the module `object-assign` (an Object.assign
polyfill) instead of the intended babel plugin:
babel-plugin-object-assign.
2015-05-18 20:26:51 -04:00
Sebastian McKenzie
04992effb3
improve lost node path tracking message
2015-05-16 01:54:35 +01:00
Sebastian McKenzie
fe72a40159
Revert "add back descriptor.initializer existence check"
...
This reverts commit 02dfd18023fd5201cd38279d49f58e6c3341946f.
2015-05-16 01:50:31 +01:00
Sebastian McKenzie
ea510d09d0
fix module shadowing when using CommonJS-like module formatters - fixes #1544
2015-05-16 01:47:48 +01:00
Sebastian McKenzie
375689a1ff
handle path contexts MUCH better, they're now only held during the traversal iteration and the previous context is released upon completion, also verify path keys and try and obtain a new one if invalid - fixes #1545
2015-05-16 01:37:55 +01:00
Sebastian McKenzie
62b94f297a
don't create a new binding for local class ids, just copy the parents - fixes #1547
2015-05-15 19:11:24 +01:00
Sebastian McKenzie
01d399ee3c
check for existence of variable when checking if node is pure
2015-05-15 18:48:17 +01:00
Sebastian McKenzie
30e3908484
don't perform DCE on single references nested inside the binding initializer - fixes #1546
2015-05-15 18:48:05 +01:00
Sebastian McKenzie
1a058b4a6e
Merge branch 'master' of github.com:babel/babel
2015-05-15 17:42:40 +01:00
Sebastian McKenzie
02dfd18023
add back descriptor.initializer existence check
2015-05-15 17:42:28 +01:00
Sebastian McKenzie
9ab7df5f47
remove wildcards from start of patterns
2015-05-15 17:42:10 +01:00
Sebastian McKenzie
7a5b140f92
minor generation style nits
2015-05-15 17:41:56 +01:00
Sebastian McKenzie
6f83111c55
Merge pull request #1542 from amasad/already-printed
...
Fix bug with paren printing in compact + line retained mode
2015-05-15 17:38:40 +01:00
Sebastian McKenzie
f3f60368da
remove TraversalPath node getter/setter
2015-05-15 17:34:31 +01:00
Sebastian McKenzie
7a09640b20
add environment to register cache key
2015-05-15 17:34:06 +01:00
Amjad Masad
2916d1262b
Don't print leftParen if already printed before the catchup
2015-05-14 23:57:35 -07:00
Sebastian McKenzie
5ae3dc01f1
make path patterns used by only and ignore **very** liberal, this will ease a lot of pain in dealing with them
2015-05-15 02:33:40 +01:00
Sebastian McKenzie
b89cf6768f
fix shouldIgnore only matches switch
2015-05-15 01:57:10 +01:00
Sebastian McKenzie
36ad1108b4
fix loose mode loop being weirdly inserted
2015-05-15 01:56:34 +01:00
Sebastian McKenzie
4c04371ea4
remove loop label due to babel bug
2015-05-15 01:48:47 +01:00
Sebastian McKenzie
d3e385c554
one last try fixing the shouldIgnore only filter...
2015-05-15 01:46:36 +01:00
Sebastian McKenzie
6afcef9805
actually fix shouldIgnore algorithm this time, ugh
2015-05-15 01:44:57 +01:00
Sebastian McKenzie
ed861e230b
fix shouldIgnore method for only
2015-05-15 01:41:49 +01:00
Sebastian McKenzie
198d51ddaa
heavily improve shouldIgnore algorithm - fixes #1539
2015-05-15 01:34:58 +01:00
Sebastian McKenzie
583111ebfb
expose file metadata object to transformers
2015-05-15 00:24:14 +01:00
Sebastian McKenzie
1b15481460
ignore "ignored files" when babel.transform has determined that it should be ignored, this is likely the result of an rc file resolution - fixes #1362
2015-05-15 00:24:03 +01:00
Sebastian McKenzie
fd9c98ff86
move strict transformer to builtin-setup group - fixes #1538
2015-05-15 00:18:42 +01:00
Sebastian McKenzie
ad44190c6b
properly register for head variable declaration paths when performing scope tracking - fixes #1524
2015-05-14 23:53:04 +01:00
Sebastian McKenzie
024e4454a1
add env option - closes #1531
2015-05-14 23:47:56 +01:00
Sebastian McKenzie
14dddcda36
make PathHoister much more flexible, now ignores global references and will not deopt on reassignments and will instead hoist as high as it can, this also fixes #1529 since the order of operations has changed
2015-05-14 23:29:02 +01:00
Sebastian McKenzie
d4fb924b6a
add tion comment to all function visitors
2015-05-14 22:37:15 +01:00
Ben Newman
cc611cb71c
Invoke Regenerator on async/generator Function nodes, not whole AST.
...
This should help (dramatically?) with
https://github.com/babel/babel/issues/1486#issuecomment-101491605 ,
although I'm not sure how to run the benchmarks myself.
2015-05-14 15:42:58 -05:00
Sebastian McKenzie
b8a01a9919
move traversal scope logic and binding into it's own folder, rename Scope#generateTemp to generateDeclaredUidIdentifier, rename Scope#generateUidBasedOnNode to Scope#generateUidIdentifierBasedOnNode
2015-05-14 19:12:26 +01:00
Sebastian McKenzie
1563b216df
Merge branch 'master' of github.com:babel/babel
2015-05-14 17:56:33 +01:00
Sebastian McKenzie
a9d4b485d9
simplify getStaticContext in es7.functionBind transformer - thanks @RReverser!
2015-05-14 17:48:51 +01:00
Sebastian McKenzie
360daa6267
Merge pull request #1532 from dchambers/prefix-private-methods-with-underscore
...
Prefix private methods names with underscore.
2015-05-14 16:52:16 +01:00
Sebastian McKenzie
724bf52929
handle "static" contexts in es7.functionBind - #1518
2015-05-14 16:37:44 +01:00
Sebastian McKenzie
7407b37bd9
Merge pull request #1518 from babel/es7.functionBind
...
Add experimental support for ES7 function bind.
2015-05-14 16:22:21 +01:00
Ingvar Stepanyan
da765cc4c1
Flip the negation in if-else.
2015-05-14 18:05:55 +03:00
dchambers
4f862eee6e
Prefix private methods names with underscore.
2015-05-14 13:19:41 +01:00
Ingvar Stepanyan
e05d7cf49a
Fix some parsing edge cases for :: operator.
2015-05-14 12:47:51 +03:00
Ingvar Stepanyan
fd8e94a90f
Preserve original execution order in :: operator.
2015-05-14 12:39:05 +03:00
Nikita Gusakov
6b07b13a8e
Added missing exponential operator inlining
2015-05-14 01:08:02 +03:00
Sebastian McKenzie
f704770b26
uncomment out return traversal path skipping - fixes #1523
2015-05-13 22:03:50 +01:00
Sebastian McKenzie
330665f150
ignore modules alongside param bindings in minification.deadCodeElimination transformer - fixes #1523
2015-05-13 21:49:28 +01:00
Sebastian McKenzie
97680e9dfd
properly hoist all var patterns when wrapping bodies in the es6.blockScoping transformer - fixes #1521
2015-05-13 19:55:40 +01:00
Sebastian McKenzie
51341ca6c3
fix and add missing module specifier reference detection - fixes #1520
2015-05-13 19:23:47 +01:00
Ingvar Stepanyan
1a299b2bcc
Small fixes to es7.functionBind and generation tests added.
2015-05-13 18:20:33 +03:00
Ingvar Stepanyan
37f662d790
Add experimental support for ES7 function bind. (issue #1287 )
2015-05-13 17:58:21 +03:00
Sebastian McKenzie
b0317f9bab
don't consider "globals" to cause incompatible scope hoist
2015-05-13 12:33:08 +01:00