diff --git a/build/lib/compilation.js b/build/lib/compilation.js index 0c0c15f555d..5a882c3f88a 100644 --- a/build/lib/compilation.js +++ b/build/lib/compilation.js @@ -201,7 +201,6 @@ function apiProposalNamesGenerator() { `${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(',\n')}`, '});', 'export type ApiProposalName = keyof typeof allApiProposals;', - 'export const allApiProposalNames = Object.keys(allApiProposals);', '', ].join('\n'); const outFile = path.join(dtsFolder, '../vs/workbench/services/extensions/common/extensionsApiProposals.ts'); diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index f559e07ca77..120c0403755 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -243,7 +243,6 @@ function apiProposalNamesGenerator() { `${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(',\n')}`, '});', 'export type ApiProposalName = keyof typeof allApiProposals;', - 'export const allApiProposalNames = Object.keys(allApiProposals);', '', ].join('\n'); diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index 6379907d099..cc23789aa09 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -34,7 +34,7 @@ import { URI } from 'vs/base/common/uri'; import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints'; import { dedupExtensions } from 'vs/workbench/services/extensions/common/extensionsUtil'; -import { ApiProposalName, allApiProposalNames } from 'vs/workbench/services/extensions/common/extensionsApiProposals'; +import { ApiProposalName, allApiProposals } from 'vs/workbench/services/extensions/common/extensionsApiProposals'; import { forEach } from 'vs/base/common/collections'; import { ILogService } from 'vs/platform/log/common/log'; @@ -1136,14 +1136,14 @@ class ProposedApiController { (_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension (this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID - this._productEnabledExtensions = new Map(); + this._productEnabledExtensions = new Map(); // todo@jrieken this is deprecated and will be removed // OLD world - extensions that are listed in `extensionAllowedProposedApi` get all proposals enabled if (isNonEmptyArray(productService.extensionAllowedProposedApi)) { for (let id of productService.extensionAllowedProposedApi) { const key = ExtensionIdentifier.toKey(id); - this._productEnabledExtensions.set(key, allApiProposalNames.slice()); + this._productEnabledExtensions.set(key, Object.keys(allApiProposals)); } } @@ -1151,7 +1151,7 @@ class ProposedApiController { if (productService.extensionEnabledApiProposals) { forEach(productService.extensionEnabledApiProposals, entry => { const proposalNames = entry.value.filter(name => { - if (!allApiProposalNames.includes(name)) { + if (!allApiProposals[name]) { _logService.warn(`Extension '${key} wants API proposal '${name}' but that proposal DOES NOT EXIST.`); return false; } diff --git a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts index a8f956a9ae0..f30e65fd186 100644 --- a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts +++ b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts @@ -9,4 +9,3 @@ export const allApiProposals = Object.freeze({ languageStatus: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageStatus.d.ts' }); export type ApiProposalName = keyof typeof allApiProposals; -export const allApiProposalNames = Object.keys(allApiProposals);