Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -23,6 +23,7 @@ import { ConsoleLogMainService } from 'vs/platform/log/common/log';
import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
import { createHash } from 'crypto';
import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices';
import { Schemas } from 'vs/base/common/network';
suite('BackupMainService', () => {
const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'backupservice');
@@ -34,7 +35,7 @@ suite('BackupMainService', () => {
class TestBackupMainService extends BackupMainService {
constructor(backupHome: string, backupWorkspacesPath: string, configService: TestConfigurationService) {
super(environmentService, configService, new ConsoleLogMainService(environmentService));
super(environmentService, configService, new ConsoleLogMainService());
this.backupHome = backupHome;
this.workspacesJsonPath = backupWorkspacesPath;
@@ -116,24 +117,24 @@ suite('BackupMainService', () => {
service.registerFolderBackupSync(barFile.fsPath);
service.loadSync();
assert.deepEqual(service.getFolderBackupPaths(), []);
assert.ok(!fs.exists(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.exists(service.toBackupPath(barFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(barFile.fsPath)));
// 3) backup workspace path exists with empty folders within
fs.mkdirSync(service.toBackupPath(fooFile.fsPath));
fs.mkdirSync(service.toBackupPath(barFile.fsPath));
fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), 'file'));
fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), 'untitled'));
fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), Schemas.file));
fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), Schemas.untitled));
service.registerFolderBackupSync(fooFile.fsPath);
service.registerFolderBackupSync(barFile.fsPath);
service.loadSync();
assert.deepEqual(service.getFolderBackupPaths(), []);
assert.ok(!fs.exists(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.exists(service.toBackupPath(barFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(barFile.fsPath)));
// 4) backup workspace path points to a workspace that no longer exists
// so it should convert the backup worspace to an empty workspace backup
const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), 'file');
const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), Schemas.file);
fs.mkdirSync(service.toBackupPath(fooFile.fsPath));
fs.mkdirSync(service.toBackupPath(barFile.fsPath));
fs.mkdirSync(fileBackups);
@@ -163,24 +164,24 @@ suite('BackupMainService', () => {
service.registerWorkspaceBackupSync(toWorkspace(barFile.fsPath));
service.loadSync();
assert.deepEqual(service.getWorkspaceBackups(), []);
assert.ok(!fs.exists(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.exists(service.toBackupPath(barFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(barFile.fsPath)));
// 3) backup workspace path exists with empty folders within
fs.mkdirSync(service.toBackupPath(fooFile.fsPath));
fs.mkdirSync(service.toBackupPath(barFile.fsPath));
fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), 'file'));
fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), 'untitled'));
fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), Schemas.file));
fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), Schemas.untitled));
service.registerWorkspaceBackupSync(toWorkspace(fooFile.fsPath));
service.registerWorkspaceBackupSync(toWorkspace(barFile.fsPath));
service.loadSync();
assert.deepEqual(service.getWorkspaceBackups(), []);
assert.ok(!fs.exists(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.exists(service.toBackupPath(barFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(fooFile.fsPath)));
assert.ok(!fs.existsSync(service.toBackupPath(barFile.fsPath)));
// 4) backup workspace path points to a workspace that no longer exists
// so it should convert the backup worspace to an empty workspace backup
const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), 'file');
const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), Schemas.file);
fs.mkdirSync(service.toBackupPath(fooFile.fsPath));
fs.mkdirSync(service.toBackupPath(barFile.fsPath));
fs.mkdirSync(fileBackups);