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

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as paths from 'vs/base/common/paths';
import { sep } from 'vs/base/common/path';
import { URI } from 'vs/base/common/uri';
import * as glob from 'vs/base/common/glob';
import { isLinux } from 'vs/base/common/platform';
@@ -17,7 +17,12 @@ import { isUndefinedOrNull } from 'vs/base/common/types';
export const IFileService = createDecorator<IFileService>('fileService');
export interface IResourceEncodings {
getWriteEncoding(resource: URI, preferredEncoding?: string): string;
getWriteEncoding(resource: URI, preferredEncoding?: string): IResourceEncoding;
}
export interface IResourceEncoding {
encoding: string;
hasBOM: boolean;
}
export interface IFileService {
@@ -385,8 +390,8 @@ export function isParent(path: string, candidate: string, ignoreCase?: boolean):
return false;
}
if (candidate.charAt(candidate.length - 1) !== paths.nativeSep) {
candidate += paths.nativeSep;
if (candidate.charAt(candidate.length - 1) !== sep) {
candidate += sep;
}
if (ignoreCase) {
@@ -419,7 +424,7 @@ export interface IBaseStat {
* A unique identifier thet represents the
* current state of the file or directory.
*/
etag: string;
etag?: string;
/**
* The resource is readonly.
@@ -455,7 +460,7 @@ export interface IFileStat extends IBaseStat {
}
export interface IResolveFileResult {
stat: IFileStat;
stat?: IFileStat;
success: boolean;
}

View File

@@ -5,36 +5,33 @@
import * as assert from 'assert';
import { URI } from 'vs/base/common/uri';
import { join, isEqual, isEqualOrParent } from 'vs/base/common/paths';
import { isEqual, isEqualOrParent } from 'vs/base/common/extpath';
import { FileChangeType, FileChangesEvent, isParent } from 'vs/platform/files/common/files';
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
import { toResource } from 'vs/base/test/common/utils';
suite('Files', () => {
function toResource(path) {
return URI.file(join('C:\\', path));
}
test('FileChangesEvent', () => {
test('FileChangesEvent', function () {
let changes = [
{ resource: URI.file(join('C:\\', '/foo/updated.txt')), type: FileChangeType.UPDATED },
{ resource: URI.file(join('C:\\', '/foo/otherupdated.txt')), type: FileChangeType.UPDATED },
{ resource: URI.file(join('C:\\', '/added.txt')), type: FileChangeType.ADDED },
{ resource: URI.file(join('C:\\', '/bar/deleted.txt')), type: FileChangeType.DELETED },
{ resource: URI.file(join('C:\\', '/bar/folder')), type: FileChangeType.DELETED }
{ resource: toResource.call(this, '/foo/updated.txt'), type: FileChangeType.UPDATED },
{ resource: toResource.call(this, '/foo/otherupdated.txt'), type: FileChangeType.UPDATED },
{ resource: toResource.call(this, '/added.txt'), type: FileChangeType.ADDED },
{ resource: toResource.call(this, '/bar/deleted.txt'), type: FileChangeType.DELETED },
{ resource: toResource.call(this, '/bar/folder'), type: FileChangeType.DELETED }
];
let r1 = new FileChangesEvent(changes);
assert(!r1.contains(toResource('/foo'), FileChangeType.UPDATED));
assert(r1.contains(toResource('/foo/updated.txt'), FileChangeType.UPDATED));
assert(!r1.contains(toResource('/foo/updated.txt'), FileChangeType.ADDED));
assert(!r1.contains(toResource('/foo/updated.txt'), FileChangeType.DELETED));
assert(!r1.contains(toResource.call(this, '/foo'), FileChangeType.UPDATED));
assert(r1.contains(toResource.call(this, '/foo/updated.txt'), FileChangeType.UPDATED));
assert(!r1.contains(toResource.call(this, '/foo/updated.txt'), FileChangeType.ADDED));
assert(!r1.contains(toResource.call(this, '/foo/updated.txt'), FileChangeType.DELETED));
assert(r1.contains(toResource('/bar/folder'), FileChangeType.DELETED));
assert(r1.contains(toResource('/bar/folder/somefile'), FileChangeType.DELETED));
assert(r1.contains(toResource('/bar/folder/somefile/test.txt'), FileChangeType.DELETED));
assert(!r1.contains(toResource('/bar/folder2/somefile'), FileChangeType.DELETED));
assert(r1.contains(toResource.call(this, '/bar/folder'), FileChangeType.DELETED));
assert(r1.contains(toResource.call(this, '/bar/folder/somefile'), FileChangeType.DELETED));
assert(r1.contains(toResource.call(this, '/bar/folder/somefile/test.txt'), FileChangeType.DELETED));
assert(!r1.contains(toResource.call(this, '/bar/folder2/somefile'), FileChangeType.DELETED));
assert.strictEqual(5, r1.changes.length);
assert.strictEqual(1, r1.getAdded().length);