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
Sebastian McKenzie
65f39bbf6f
switch order of jsx/flow plugins to avoid precedence issues - fixes babel/babel-eslint#103
2015-05-17 22:00:38 +01:00
Sebastian McKenzie
e9eced846f
5.4.3
2015-05-16 02:00:20 +01:00
Sebastian McKenzie
a0befe349d
v5.4.3
v5.4.3
2015-05-16 01:58:52 +01:00
Sebastian McKenzie
04992effb3
improve lost node path tracking message
2015-05-16 01:54:35 +01:00
Sebastian McKenzie
9ae54d2a50
add 5.4.3 changelog
2015-05-16 01:54:25 +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
9908e331b7
Merge pull request #1549 from Naddiseo/master
...
Added DCE tests for all the bugs I've reported so far.
2015-05-15 23:08:32 +01:00
Richard Eames
cd8655708d
Added DCE tests for all the bugs I've reported so far.
2015-05-15 15:55:58 -06: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
ff12046009
move traverse replace test up
2015-05-15 18:35:15 +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
Amjad Masad
741abb73d2
Add failing test for printing with compact & retainLines
2015-05-14 23:57:05 -07:00
Sebastian McKenzie
2e46755260
5.4.2
2015-05-15 02:36:22 +01:00
Sebastian McKenzie
2cff9519e1
v5.4.2
v5.4.2
2015-05-15 02:35:07 +01:00
Sebastian McKenzie
f9c2c6e988
Merge branch 'master' of github.com:babel/babel
...
# Conflicts:
# CHANGELOG.md
2015-05-15 02:34:11 +01: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
af4fd69dd0
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:22 +01:00
Sebastian McKenzie
4d4493f325
elaborate on shouldIgnore changes in 5.4.1
2015-05-15 02:03:02 +01:00
Sebastian McKenzie
e70d474b39
5.4.1
2015-05-15 02:01:42 +01:00
Sebastian McKenzie
1b45f64858
v5.4.1
v5.4.1
2015-05-15 02:00:18 +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
e15ced2922
add 5.4.1 changelog
2015-05-15 01:37:48 +01:00
Sebastian McKenzie
93052e532f
Merge branch 'master' of github.com:babel/babel
2015-05-15 01:35:43 +01:00
Sebastian McKenzie
198d51ddaa
heavily improve shouldIgnore algorithm - fixes #1539
2015-05-15 01:34:58 +01:00
Sebastian McKenzie
8730b24def
Merge pull request #1540 from browncolyn/master
...
Added slash as needed dependency
2015-05-15 01:30:50 +01:00
Colyn Brown
f09c0d5998
Added slash as needed dependency
2015-05-14 17:28:20 -07:00
Sebastian McKenzie
21e4481ab7
5.4.0
2015-05-15 00:32:36 +01:00
Sebastian McKenzie
2f61754a24
v5.4.0
v5.4.0
2015-05-15 00:29:42 +01:00
Sebastian McKenzie
3910d18bc9
add 5.4.0 changelog
2015-05-15 00:28:47 +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
41b5607ef3
fix env option tests
2015-05-15 00:11:28 +01:00