Merge vscode source through 1.62 release (#19981)

* Build breaks 1

* Build breaks

* Build breaks

* Build breaks

* More build breaks

* Build breaks (#2512)

* Runtime breaks

* Build breaks

* Fix dialog location break

* Update typescript

* Fix ASAR break issue

* Unit test breaks

* Update distro

* Fix breaks in ADO builds (#2513)

* Bump to node 16

* Fix hygiene errors

* Bump distro

* Remove reference to node type

* Delete vscode specific extension

* Bump to node 16 in CI yaml

* Skip integration tests in CI builds (while fixing)

* yarn.lock update

* Bump moment dependency in remote yarn

* Fix drop-down chevron style

* Bump to node 16

* Remove playwrite from ci.yaml

* Skip building build scripts in hygine check
This commit is contained in:
Karl Burtram
2022-07-11 14:09:32 -07:00
committed by GitHub
parent fa0fcef303
commit 26455e9113
1876 changed files with 72050 additions and 37997 deletions

View File

@@ -23,6 +23,7 @@ export interface IIndexTreeNode<T, TFilterData = void> extends ITreeNode<T, TFil
visibility: TreeVisibility;
visible: boolean;
filterData: TFilterData | undefined;
lastDiffIds?: string[];
}
export function isFilterResult<T>(obj: any): obj is ITreeFilterDataResult<T> {
@@ -87,7 +88,7 @@ function isCollapsibleStateUpdate(update: CollapseStateUpdate): update is Collap
}
export interface IList<T> extends ISpliceable<T> {
updateElementHeight(index: number, height: number): void;
updateElementHeight(index: number, height: number | undefined): void;
}
export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = void> implements ITreeModel<T, TFilterData, number[]> {
@@ -162,10 +163,14 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
recurseLevels = options.diffDepth ?? 0,
) {
const { parentNode } = this.getParentNodeWithListIndex(location);
if (!parentNode.lastDiffIds) {
return this.spliceSimple(location, deleteCount, toInsertIterable, options);
}
const toInsert = [...toInsertIterable];
const index = location[location.length - 1];
const diff = new LcsDiff(
{ getElements: () => parentNode.children.map(e => identity.getId(e.element).toString()) },
{ getElements: () => parentNode.lastDiffIds! },
{
getElements: () => [
...parentNode.children.slice(0, index),
@@ -177,6 +182,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
// if we were given a 'best effort' diff, use default behavior
if (diff.quitEarly) {
parentNode.lastDiffIds = undefined;
return this.spliceSimple(location, deleteCount, toInsert, options);
}
@@ -221,7 +227,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
location: number[],
deleteCount: number,
toInsert: Iterable<ITreeElement<T>> = Iterable.empty(),
{ onDidCreateNode, onDidDeleteNode }: IIndexTreeModelSpliceOptions<T, TFilterData>,
{ onDidCreateNode, onDidDeleteNode, diffIdentityProvider }: IIndexTreeModelSpliceOptions<T, TFilterData>,
) {
const { parentNode, listIndex, revealed, visible } = this.getParentNodeWithListIndex(location);
const treeListElementsToInsert: ITreeNode<T, TFilterData>[] = [];
@@ -258,6 +264,14 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
const deletedNodes = splice(parentNode.children, lastIndex, deleteCount, nodesToInsert);
if (!diffIdentityProvider) {
parentNode.lastDiffIds = undefined;
} else if (parentNode.lastDiffIds) {
splice(parentNode.lastDiffIds, lastIndex, deleteCount, nodesToInsert.map(n => diffIdentityProvider.getId(n.element).toString()));
} else {
parentNode.lastDiffIds = parentNode.children.map(n => diffIdentityProvider.getId(n.element).toString());
}
// figure out what is the count of deleted visible children
let deletedVisibleChildrenCount = 0;
@@ -328,7 +342,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
}
}
updateElementHeight(location: number[], height: number): void {
updateElementHeight(location: number[], height: number | undefined): void {
if (location.length === 0) {
throw new TreeError(this.user, 'Invalid tree location');
}
@@ -619,6 +633,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
if (node !== this.root) {
node.visible = visibility! === TreeVisibility.Recurse ? hasVisibleDescendants : (visibility! === TreeVisibility.Visible);
node.visibility = visibility!;
}
if (!node.visible) {