Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -9,7 +9,7 @@ import { nfcall, Queue } from 'vs/base/common/async';
import * as fs from 'fs';
import * as os from 'os';
import * as platform from 'vs/base/common/platform';
import { once } from 'vs/base/common/event';
import { Event } from 'vs/base/common/event';
export function readdir(path: string): Promise<string[]> {
return nfcall(extfs.readdir, path);
@@ -36,7 +36,7 @@ export function rimraf(path: string): Promise<void> {
}
}, (err: NodeJS.ErrnoException) => {
if (err.code === 'ENOENT') {
return void 0;
return undefined;
}
return Promise.reject(err);
@@ -77,12 +77,6 @@ export function unlink(path: string): Promise<void> {
return nfcall(fs.unlink, path);
}
export function unlinkIgnoreError(path: string): Promise<void> {
return new Promise(resolve => {
fs.unlink(path, () => resolve());
});
}
export function symlink(target: string, path: string, type?: string): Promise<void> {
return nfcall<void>(fs.symlink, target, path, type);
}
@@ -132,7 +126,7 @@ function ensureWriteFileQueue(queueKey: string): Queue<void> {
writeFileQueue = new Queue<void>();
writeFilePathQueue[queueKey] = writeFileQueue;
const onFinish = once(writeFileQueue.onFinished);
const onFinish = Event.once(writeFileQueue.onFinished);
onFinish(() => {
delete writeFilePathQueue[queueKey];
writeFileQueue.dispose();
@@ -194,7 +188,7 @@ export function whenDeleted(path: string): Promise<void> {
if (!exists) {
clearInterval(interval);
resolve(void 0);
resolve(undefined);
}
});
}