src/vs/platform/userDataSync/common/extensionsMerge.ts/massageOutgoingExtension
function massageOutgoingExtension<T extends ISyncExtension>(extension: T, key: string): T {
	const massagedExtension: ISyncExtension = {
		identifier: {
			id: extension.identifier.id,
			uuid: key.startsWith('uuid:') ? key.substring('uuid:'.length) : undefined
		},
	};
	if (extension.version) {
		massagedExtension.version = extension.version;
	}
	if (extension.disabled) {
		massagedExtension.disabled = true;
	}
	if (extension.installed) {
		massagedExtension.installed = true;
	}
	if (extension.state) {
		massagedExtension.state = extension.state;
	}
	return massagedExtension as T;
}