1
>
/*---------------------------------------------------------------------------------------------
extensionsMerge.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { IStringDictionary } from '../../../base/common/collections.js';
7
>
import { deepClone, equals } from '../../../base/common/objects.js';
8
>
import * as semver from '../../../base/common/semver/semver.js';
9
>
import { assertReturnsDefined } from '../../../base/common/types.js';
10
>
import { IExtensionIdentifier } from '../../extensions/common/extensions.js';
11
>
import { ILocalSyncExtension, IRemoteSyncExtension, ISyncExtension } from './userDataSync.js';
12
>
13
>
export interface IMergeResult {
14
>
readonly local: { added: ISyncExtension[]; removed: IExtensionIdentifier[]; updated: ISyncExtension[] };
15
>
readonly remote: { added: ISyncExtension[]; removed: ISyncExtension[]; updated: ISyncExtension[]; all: ISyncExtension[] } | null;
16
>
}
17
>
18
>
export function merge(localExtensions: ILocalSyncExtension[], remoteExtensions: IRemoteSyncExtension[] | null, lastSyncExtensions: IRemoteSyncExtension[] | null, skippedExtensions: ISyncExtension[], ignoredExtensions: string[], lastSyncBuiltinExtensions: IExtensionIdentifier[] | null): IMergeResult {
19
const added: ISyncExtension[] = [];
20
const removed: IExtensionIdentifier[] = [];