src/vs/platform/extensionManagement/node/extensionManagementService.ts/ExtensionManagementService/installDependenciesAndPackExtensions
class ExtensionManagementService:	private async installDependenciesAndPackExtensions(installed: ILocalExtension, existing: ILocalExtension | undefined, options: InstallOptions): Promise<void> {
		if (!this.galleryService.isEnabled()) {
			return;
		}
		const dependenciesAndPackExtensions: string[] = installed.manifest.extensionDependencies || [];
		if (installed.manifest.extensionPack) {
			for (const extension of installed.manifest.extensionPack) {
				// add only those extensions which are new in currently installed extension
				if (!(existing && existing.manifest.extensionPack && existing.manifest.extensionPack.some(old => areSameExtensions({ id: old }, { id: extension })))) {
					if (dependenciesAndPackExtensions.every(e => !areSameExtensions({ id: e }, { id: extension }))) {
						dependenciesAndPackExtensions.push(extension);
					}
				}
			}
		}
		if (dependenciesAndPackExtensions.length) {
			const installed = await this.getInstalled();
			// filter out installed extensions
			const names = dependenciesAndPackExtensions.filter(id => installed.every(({ identifier: galleryIdentifier }) => !areSameExtensions(galleryIdentifier, { id })));
			if (names.length) {
				const galleryResult = await this.galleryService.query({ names, pageSize: dependenciesAndPackExtensions.length }, CancellationToken.None);
				const extensionsToInstall = galleryResult.firstPage;
				try {
					await Promises.settled(extensionsToInstall.map(e => this.installFromGallery(e, options)));
				} catch (error) {
					try { await this.rollback(extensionsToInstall); } catch (e) { /* ignore */ }
					throw error;
				}
			}
		}
	}