Sebastian McKenzie
f979d55b71
remove special ExpressionStatement handling in destructuring transformer
2015-05-30 19:07:31 -04:00
Sebastian McKenzie
164b2116a3
switch expontentation evaluation to just use the operator
2015-05-30 19:05:31 -04:00
Sebastian McKenzie
eb4cee89c5
add referencesImport path method - fixes #1423
2015-05-28 11:39:51 -04:00
Sebastian McKenzie
9613c7fdb6
fix linting error
2015-05-28 10:30:09 -04:00
Sebastian McKenzie
d8c97fba15
check plugin.default and then just plugin to support ES6 modules - closes #1627
2015-05-28 10:25:50 -04:00
Sebastian McKenzie
4901075960
deopt rest parameter member expression optimisation on child arrow functions - fixes #1631
2015-05-28 10:22:12 -04:00
Sebastian McKenzie
4aec242979
add some comments to some path methods and remove some dead code
2015-05-28 10:04:46 -04:00
Sebastian McKenzie
d1d95e0e49
check LHS of ForIn/ForOfStatement for constants - closes #1630
2015-05-28 10:04:32 -04:00
Sebastian McKenzie
d3c643b004
clean up path resolution and add in path resolution recursion detection - cc @RReverser
2015-05-25 19:08:08 +01:00
Sebastian McKenzie
98eb30c482
rename Path#remove to Path#dangerouslyRemove
2015-05-25 16:17:28 +01:00
Sebastian McKenzie
2d43ffb5b4
remove removal scope hooks
2015-05-25 15:57:22 +01:00
Sebastian McKenzie
a195701de2
remove dead code
2015-05-25 15:28:23 +01:00
Sebastian McKenzie
334cbb06c6
flesh out removal hooks more
2015-05-25 15:28:11 +01:00
Sebastian McKenzie
dbe6f1b9a9
merge remove parent context checks
2015-05-25 04:30:17 +01:00
Sebastian McKenzie
73ada57a17
don't inline classes and functions when they're in different scopes in the utility.deadCodeElimination transformer
2015-05-25 03:33:12 +01:00
Sebastian McKenzie
8e2b743f7e
add support for resyncing container on changes
2015-05-25 03:32:25 +01:00
Sebastian McKenzie
a533042503
fix bad .gitignore paths resulting in some tests and path/lib files not being included...
2015-05-25 01:42:54 +01:00
Sebastian McKenzie
49953e3464
enable no-unused-vars in eslint
2015-05-25 01:32:06 +01:00
Sebastian McKenzie
0bf95d6aea
even more split up of path methods
2015-05-25 01:01:21 +01:00
Sebastian McKenzie
7d88a1ca0b
rename TraversalPath to NodePath and further split up methods into separate files
2015-05-25 00:43:46 +01:00
Sebastian McKenzie
ec74eb41cf
reneable eslint and fix assorted linting errors
2015-05-25 00:42:59 +01:00
Sebastian McKenzie
3139482358
clean and fix up visitor merging
2015-05-24 18:15:46 +01:00
Sebastian McKenzie
32f19aff99
clean up file processing API
2015-05-24 18:15:34 +01:00
Sebastian McKenzie
23bead9226
Merge branch 'master' of github.com:babel/babel
2015-05-24 01:45:00 +01:00
Sebastian McKenzie
bd3812c255
handle SwitchStatements as a different type of path when pushing a declaration - fixes #1614
2015-05-24 01:43:04 +01:00
Dekel Cohen
167eda4750
Fixed Remove Debugger transformer to use DebuggerStatement
2015-05-23 01:13:23 +03:00
Sebastian McKenzie
34eb2babdb
don't consider JSXAttribute keys to be referenced identifiers - fixes #1596
2015-05-21 18:58:07 +01:00
Sebastian McKenzie
221c632c05
deprecate custom module formatters
2015-05-21 18:44:02 +01:00
Sebastian McKenzie
7dbde208ef
spec.functionName transformer: hasBinding(name) returns true for built-in globals, so we attempt to rename the binding but it doesn't exist so exits early, add a check that doesn't perform the renaming and instead uses the wrapper - fixes #1598
2015-05-21 18:43:55 +01:00
Sebastian McKenzie
92157161f0
fix prettyCall generation option
2015-05-21 01:43:02 +01:00
Sebastian McKenzie
348c0d2542
handle TCO for calls that exceed the functions parameter count - fixes #1589
2015-05-21 01:21:49 +01:00
Sebastian McKenzie
f2f6bbb02c
clean up explosion of module declarations, remove and inherit comments when taking off the declaration - fixes #1583
2015-05-21 01:03:23 +01:00
Sebastian McKenzie
16f7b967b5
ignore CallExpression _prettyCall when retainLines is enabled - fixes #1585
2015-05-21 00:21:18 +01:00
Sebastian McKenzie
270a8be68d
add JSXIdentifier as a valid ReferencedIdentifier - fixes #1584
2015-05-21 00:20:53 +01:00
Sebastian McKenzie
82254d9d9b
force push space for await/async - fixes #1581
2015-05-20 12:45:04 +01:00
Sebastian McKenzie
c45ce61550
print assignment pattern shorthand with matching key nicely
2015-05-20 10:44:36 +01:00
Sebastian McKenzie
dca0f72e4d
clarify default option descriptions - fixes #1577
2015-05-20 10:36:58 +01:00
Sebastian McKenzie
af4feb4d88
fix renaming of assignment expressions to fix pattern renaming in the es6.blockScoping transformer - fixes #1576
2015-05-20 10:34:50 +01:00
Sebastian McKenzie
430c5df0e7
rename sourceMapName option to sourceMapTarget - closes #1568
2015-05-20 10:14:28 +01:00
Sebastian McKenzie
9b12f799f7
clean up system module formatter hoisting visitor and allow contextual replacement of variable declarations with expressions in for head positions - fixes #1570
2015-05-20 10:07:29 +01:00
Sebastian McKenzie
7643d86047
Merge branch 'master' of github.com:babel/babel
2015-05-20 09:57:03 +01:00
Sebastian McKenzie
e280a810c3
add support for all completion record types when exploding an expression to statements
2015-05-20 09:56:45 +01:00
Sebastian McKenzie
7a59575d1e
force space before class id when generating classes - fixes #1579
2015-05-20 09:56:19 +01:00
Sebastian McKenzie
b01d8448a0
Merge pull request #1558 from jquense/patch-2
...
Resolve "babel-plugin-" name before trying the plain name.
2015-05-19 01:28:02 +01:00
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
12104f822f
add assignment pattern shorthand support to explode transformer - fixes #1566
2015-05-18 22:44:40 +01:00
Sebastian McKenzie
b4cd2df745
ignore this and arguments when performing TCO on shadowed functions - fixes #1564
2015-05-18 22:41:27 +01:00
Sebastian McKenzie
9be3d9c8e1
Merge branch 'master' of github.com:babel/babel
2015-05-18 10:33:12 +01:00
Sebastian McKenzie
55114ec631
update AMD module formatter to add import default remapping - #1150
2015-05-18 02:01:34 +01:00
Sindre Sorhus
90b8826e73
use home-or-tmp module instead of user-home
...
The main point about using this instead of just falling back in code is that it depends on an `os.tmpdir()` polyfill [0], which means the tmpdir handling is the same no matter node/iojs version. This is useful as the core `os.tmpdir()` function has changed a lot between node versions.
[0]: https://github.com/sindresorhus/os-tmpdir
---
`os.tmpdir()` diff between Node 0.10.38 and iojs 2.0.2
```diff
+const trailingSlashRe = isWindows ? /[^:]\\$/
+ : /.\/$/;
+
exports.tmpdir = function() {
- return process.env.TMPDIR ||
- process.env.TMP ||
- process.env.TEMP ||
- (process.platform === 'win32' ? 'c:\\windows\\temp' : '/tmp');
+ var path;
+ if (isWindows) {
+ path = process.env.TEMP ||
+ process.env.TMP ||
+ (process.env.SystemRoot || process.env.windir) + '\\temp';
+ } else {
+ path = process.env.TMPDIR ||
+ process.env.TMP ||
+ process.env.TEMP ||
+ '/tmp';
+ }
+ if (trailingSlashRe.test(path))
+ path = path.slice(0, -1);
+ return path;
};
```
2015-05-18 00:39:49 +02:00