Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -31,7 +31,7 @@ suite('ExtHostConfiguration', function () {
if (!shape) {
shape = new class extends mock<MainThreadConfigurationShape>() { };
}
return new ExtHostConfigProvider(shape, new ExtHostWorkspace(new TestRPCProtocol(), null, new NullLogService(), new Counter()), createConfigurationData(contents));
return new ExtHostConfigProvider(shape, new ExtHostWorkspace(new TestRPCProtocol(), new NullLogService(), new Counter()), createConfigurationData(contents));
}
function createConfigurationData(contents: any): IConfigurationInitData {
@@ -56,7 +56,7 @@ suite('ExtHostConfiguration', function () {
assert.equal(extHostConfig.getConfiguration('search.exclude')['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search.exclude').get('**/node_modules'), true);
assert.equal(extHostConfig.getConfiguration('search').get('exclude')['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search').get('exclude')!['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search.exclude').has('**/node_modules'), true);
assert.equal(extHostConfig.getConfiguration('search').has('exclude.**/node_modules'), true);
@@ -111,38 +111,38 @@ suite('ExtHostConfiguration', function () {
});
let testObject = all.getConfiguration();
let actual = testObject.get('farboo');
let actual = testObject.get('farboo')!;
actual['nested']['config1'] = 41;
assert.equal(41, actual['nested']['config1']);
actual['farboo1'] = 'newValue';
assert.equal('newValue', actual['farboo1']);
testObject = all.getConfiguration();
actual = testObject.get('farboo');
actual = testObject.get('farboo')!;
assert.equal(actual['nested']['config1'], 42);
assert.equal(actual['farboo1'], undefined);
testObject = all.getConfiguration();
actual = testObject.get('farboo');
actual = testObject.get('farboo')!;
assert.equal(actual['config0'], true);
actual['config0'] = false;
assert.equal(actual['config0'], false);
testObject = all.getConfiguration();
actual = testObject.get('farboo');
actual = testObject.get('farboo')!;
assert.equal(actual['config0'], true);
testObject = all.getConfiguration();
actual = testObject.inspect('farboo');
actual = testObject.inspect('farboo')!;
actual['value'] = 'effectiveValue';
assert.equal('effectiveValue', actual['value']);
testObject = all.getConfiguration('workbench');
actual = testObject.get('colorCustomizations');
actual = testObject.get('colorCustomizations')!;
delete actual['statusBar.foreground'];
assert.equal(actual['statusBar.foreground'], undefined);
testObject = all.getConfiguration('workbench');
actual = testObject.get('colorCustomizations');
actual = testObject.get('colorCustomizations')!;
assert.equal(actual['statusBar.foreground'], 'somevalue');
});
@@ -166,8 +166,8 @@ suite('ExtHostConfiguration', function () {
}
});
let testObject = all.getConfiguration();
let actual = testObject.get('farboo');
const testObject = all.getConfiguration();
let actual: any = testObject.get('farboo');
assert.deepEqual(JSON.stringify({
'config0': true,
'nested': {
@@ -179,7 +179,7 @@ suite('ExtHostConfiguration', function () {
assert.deepEqual(undefined, JSON.stringify(testObject.get('unknownkey')));
actual = testObject.get('farboo');
actual = testObject.get('farboo')!;
actual['config0'] = false;
assert.deepEqual(JSON.stringify({
'config0': false,
@@ -190,7 +190,7 @@ suite('ExtHostConfiguration', function () {
'config4': ''
}), JSON.stringify(actual));
actual = testObject.get('workbench')['colorCustomizations'];
actual = testObject.get('workbench')!['colorCustomizations']!;
actual['statusBar.background'] = 'anothervalue';
assert.deepEqual(JSON.stringify({
'statusBar.foreground': 'somevalue',
@@ -241,7 +241,7 @@ suite('ExtHostConfiguration', function () {
}
});
let testObject = all.getConfiguration();
let testObject: any = all.getConfiguration();
try {
testObject['get'] = null;
@@ -265,7 +265,7 @@ suite('ExtHostConfiguration', function () {
test('inspect in no workspace context', function () {
const testObject = new ExtHostConfigProvider(
new class extends mock<MainThreadConfigurationShape>() { },
new ExtHostWorkspace(new TestRPCProtocol(), null, new NullLogService(), new Counter()),
new ExtHostWorkspace(new TestRPCProtocol(), new NullLogService(), new Counter()),
{
defaults: new ConfigurationModel({
'editor': {
@@ -284,13 +284,13 @@ suite('ExtHostConfiguration', function () {
}
);
let actual = testObject.getConfiguration().inspect('editor.wordWrap');
let actual = testObject.getConfiguration().inspect('editor.wordWrap')!;
assert.equal(actual.defaultValue, 'off');
assert.equal(actual.globalValue, 'on');
assert.equal(actual.workspaceValue, undefined);
assert.equal(actual.workspaceFolderValue, undefined);
actual = testObject.getConfiguration('editor').inspect('wordWrap');
actual = testObject.getConfiguration('editor').inspect('wordWrap')!;
assert.equal(actual.defaultValue, 'off');
assert.equal(actual.globalValue, 'on');
assert.equal(actual.workspaceValue, undefined);
@@ -306,13 +306,15 @@ suite('ExtHostConfiguration', function () {
}
}, ['editor.wordWrap']);
folders[workspaceUri.toString()] = workspace;
const extHostWorkspace = new ExtHostWorkspace(new TestRPCProtocol(), new NullLogService(), new Counter());
extHostWorkspace.$initializeWorkspace({
'id': 'foo',
'folders': [aWorkspaceFolder(URI.file('foo'), 0)],
'name': 'foo'
});
const testObject = new ExtHostConfigProvider(
new class extends mock<MainThreadConfigurationShape>() { },
new ExtHostWorkspace(new TestRPCProtocol(), {
'id': 'foo',
'folders': [aWorkspaceFolder(URI.file('foo'), 0)],
'name': 'foo'
}, new NullLogService(), new Counter()),
extHostWorkspace,
{
defaults: new ConfigurationModel({
'editor': {
@@ -331,25 +333,25 @@ suite('ExtHostConfiguration', function () {
}
);
let actual1 = testObject.getConfiguration().inspect('editor.wordWrap');
let actual1 = testObject.getConfiguration().inspect('editor.wordWrap')!;
assert.equal(actual1.defaultValue, 'off');
assert.equal(actual1.globalValue, 'on');
assert.equal(actual1.workspaceValue, 'bounded');
assert.equal(actual1.workspaceFolderValue, undefined);
actual1 = testObject.getConfiguration('editor').inspect('wordWrap');
actual1 = testObject.getConfiguration('editor').inspect('wordWrap')!;
assert.equal(actual1.defaultValue, 'off');
assert.equal(actual1.globalValue, 'on');
assert.equal(actual1.workspaceValue, 'bounded');
assert.equal(actual1.workspaceFolderValue, undefined);
let actual2 = testObject.getConfiguration(null, workspaceUri).inspect('editor.wordWrap');
let actual2 = testObject.getConfiguration(undefined, workspaceUri).inspect('editor.wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.equal(actual2.workspaceFolderValue, 'bounded');
actual2 = testObject.getConfiguration('editor', workspaceUri).inspect('wordWrap');
actual2 = testObject.getConfiguration('editor', workspaceUri).inspect('wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
@@ -380,13 +382,15 @@ suite('ExtHostConfiguration', function () {
}, ['editor.wordWrap']);
folders[thirdRoot.toString()] = new ConfigurationModel({}, []);
const extHostWorkspace = new ExtHostWorkspace(new TestRPCProtocol(), new NullLogService(), new Counter());
extHostWorkspace.$initializeWorkspace({
'id': 'foo',
'folders': [aWorkspaceFolder(firstRoot, 0), aWorkspaceFolder(secondRoot, 1)],
'name': 'foo'
});
const testObject = new ExtHostConfigProvider(
new class extends mock<MainThreadConfigurationShape>() { },
new ExtHostWorkspace(new TestRPCProtocol(), {
'id': 'foo',
'folders': [aWorkspaceFolder(firstRoot, 0), aWorkspaceFolder(secondRoot, 1)],
'name': 'foo'
}, new NullLogService(), new Counter()),
extHostWorkspace,
{
defaults: new ConfigurationModel({
'editor': {
@@ -406,62 +410,62 @@ suite('ExtHostConfiguration', function () {
}
);
let actual1 = testObject.getConfiguration().inspect('editor.wordWrap');
let actual1 = testObject.getConfiguration().inspect('editor.wordWrap')!;
assert.equal(actual1.defaultValue, 'off');
assert.equal(actual1.globalValue, 'on');
assert.equal(actual1.workspaceValue, 'bounded');
assert.equal(actual1.workspaceFolderValue, undefined);
actual1 = testObject.getConfiguration('editor').inspect('wordWrap');
actual1 = testObject.getConfiguration('editor').inspect('wordWrap')!;
assert.equal(actual1.defaultValue, 'off');
assert.equal(actual1.globalValue, 'on');
assert.equal(actual1.workspaceValue, 'bounded');
assert.equal(actual1.workspaceFolderValue, undefined);
actual1 = testObject.getConfiguration('editor').inspect('lineNumbers');
actual1 = testObject.getConfiguration('editor').inspect('lineNumbers')!;
assert.equal(actual1.defaultValue, 'on');
assert.equal(actual1.globalValue, undefined);
assert.equal(actual1.workspaceValue, undefined);
assert.equal(actual1.workspaceFolderValue, undefined);
let actual2 = testObject.getConfiguration(null, firstRoot).inspect('editor.wordWrap');
let actual2 = testObject.getConfiguration(undefined, firstRoot).inspect('editor.wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.equal(actual2.workspaceFolderValue, 'off');
actual2 = testObject.getConfiguration('editor', firstRoot).inspect('wordWrap');
actual2 = testObject.getConfiguration('editor', firstRoot).inspect('wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.equal(actual2.workspaceFolderValue, 'off');
actual2 = testObject.getConfiguration('editor', firstRoot).inspect('lineNumbers');
actual2 = testObject.getConfiguration('editor', firstRoot).inspect('lineNumbers')!;
assert.equal(actual2.defaultValue, 'on');
assert.equal(actual2.globalValue, undefined);
assert.equal(actual2.workspaceValue, undefined);
assert.equal(actual2.workspaceFolderValue, 'relative');
actual2 = testObject.getConfiguration(null, secondRoot).inspect('editor.wordWrap');
actual2 = testObject.getConfiguration(undefined, secondRoot).inspect('editor.wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.equal(actual2.workspaceFolderValue, 'on');
actual2 = testObject.getConfiguration('editor', secondRoot).inspect('wordWrap');
actual2 = testObject.getConfiguration('editor', secondRoot).inspect('wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.equal(actual2.workspaceFolderValue, 'on');
actual2 = testObject.getConfiguration(null, thirdRoot).inspect('editor.wordWrap');
actual2 = testObject.getConfiguration(undefined, thirdRoot).inspect('editor.wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
assert.ok(Object.keys(actual2).indexOf('workspaceFolderValue') !== -1);
assert.equal(actual2.workspaceFolderValue, undefined);
actual2 = testObject.getConfiguration('editor', thirdRoot).inspect('wordWrap');
actual2 = testObject.getConfiguration('editor', thirdRoot).inspect('wordWrap')!;
assert.equal(actual2.defaultValue, 'off');
assert.equal(actual2.globalValue, 'on');
assert.equal(actual2.workspaceValue, 'bounded');
@@ -589,13 +593,15 @@ suite('ExtHostConfiguration', function () {
test('configuration change event', (done) => {
const workspaceFolder = aWorkspaceFolder(URI.file('folder1'), 0);
const extHostWorkspace = new ExtHostWorkspace(new TestRPCProtocol(), new NullLogService(), new Counter());
extHostWorkspace.$initializeWorkspace({
'id': 'foo',
'folders': [workspaceFolder],
'name': 'foo'
});
const testObject = new ExtHostConfigProvider(
new class extends mock<MainThreadConfigurationShape>() { },
new ExtHostWorkspace(new TestRPCProtocol(), {
'id': 'foo',
'folders': [workspaceFolder],
'name': 'foo'
}, new NullLogService(), new Counter()),
extHostWorkspace,
createConfigurationData({
'farboo': {
'config': false,