src/vs/platform/userDataSync/common/userDataProfilesManifestMerge.ts/compare
function compare(from: IUserDataProfileInfo[] | null, to: IUserDataProfileInfo[], ignoredProfiles: string[]): { added: string[]; removed: string[]; updated: string[] } {
	from = from ? from.filter(({ id }) => !ignoredProfiles.includes(id)) : [];
	to = to.filter(({ id }) => !ignoredProfiles.includes(id));
	const fromKeys = from.map(({ id }) => id);
	const toKeys = to.map(({ id }) => id);
	const added = toKeys.filter(key => fromKeys.indexOf(key) === -1);
	const removed = fromKeys.filter(key => toKeys.indexOf(key) === -1);
	const updated: string[] = [];

	for (const { id, name, shortName } of from) {
		if (removed.includes(id)) {
			continue;
		}
		const toProfile = to.find(p => p.id === id);
		if (!toProfile
			|| toProfile.name !== name
			|| toProfile.shortName !== shortName
		) {
			updated.push(id);
		}
	}

	return { added, removed, updated };
}