From 0c868caa3b3dfd4b0cd99e36d99ed434a7bcb2c9 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 10 Nov 2021 20:38:46 +0000 Subject: [PATCH] Enable proposed API by default Turns out we used to already do this and if you passed the flag you would actually *disable* the global enable setting. This is becaues we were defaulting to an empty array which means to enable it globally. Fixes https://github.com/cdr/code-server/issues/4397 Fixes https://github.com/cdr/code-server/issues/4480 --- .../services/extensions/common/abstractExtensionService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index 5a571ed0f1f637..4ce5ee2f34e91e 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -1132,6 +1132,9 @@ class ProposedApiController { (_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension (this.enableProposedApiFor.length === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID + // NOTE@coder: Always enable the proposed API. + this.enableProposedApiForAll = true; + this.productAllowProposedApi = new Set(); if (isNonEmptyArray(productService.extensionAllowedProposedApi)) { productService.extensionAllowedProposedApi.forEach((id) => this.productAllowProposedApi.add(ExtensionIdentifier.toKey(id)));