debt - remove all of `extensionAllowedProposedApi`
parent
b471c109f3
commit
e6b63f39c4
|
@ -90,7 +90,6 @@ const createVSCodeWebProductConfigurationPatcher = (product) => {
|
|||
if (path.endsWith('vs/platform/product/common/product.js')) {
|
||||
const productConfiguration = JSON.stringify({
|
||||
...product,
|
||||
extensionAllowedProposedApi: [...product.extensionAllowedProposedApi],
|
||||
version,
|
||||
commit,
|
||||
date: buildDate
|
||||
|
|
|
@ -28,12 +28,6 @@
|
|||
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
||||
"urlProtocol": "code-oss",
|
||||
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-webview.net/insider/93a2a2fa12dd3ae0629eec01c05a28cb60ac1c4b/out/vs/workbench/contrib/webview/browser/pre/",
|
||||
"extensionAllowedProposedApi": [
|
||||
"ms-vscode.vscode-js-profile-flame",
|
||||
"ms-vscode.vscode-js-profile-table",
|
||||
"GitHub.remotehub",
|
||||
"GitHub.remotehub-insiders"
|
||||
],
|
||||
"builtInExtensions": [
|
||||
{
|
||||
"name": "ms-vscode.references-view",
|
||||
|
|
|
@ -138,8 +138,7 @@ export interface IProductConfiguration {
|
|||
readonly extensionKind?: { readonly [extensionId: string]: ('ui' | 'workspace' | 'web')[] };
|
||||
readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[] };
|
||||
readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[] };
|
||||
/** @deprecated */
|
||||
readonly extensionAllowedProposedApi?: readonly string[];
|
||||
|
||||
readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] };
|
||||
readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport };
|
||||
readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport };
|
||||
|
|
|
@ -66,13 +66,7 @@ else {
|
|||
urlProtocol: 'code-oss',
|
||||
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
||||
licenseName: 'MIT',
|
||||
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
||||
extensionAllowedProposedApi: [
|
||||
'ms-vscode.vscode-js-profile-flame',
|
||||
'ms-vscode.vscode-js-profile-table',
|
||||
'GitHub.remotehub',
|
||||
'GitHub.remotehub-insiders'
|
||||
],
|
||||
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1170,14 +1170,6 @@ class ProposedApiController {
|
|||
|
||||
this._productEnabledExtensions = new Map<string, ApiProposalName[]>();
|
||||
|
||||
// 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, Object.keys(allApiProposals));
|
||||
}
|
||||
}
|
||||
|
||||
// NEW world - product.json spells out what proposals each extension can use
|
||||
if (productService.extensionEnabledApiProposals) {
|
||||
|
@ -1190,9 +1182,6 @@ class ProposedApiController {
|
|||
}
|
||||
return true;
|
||||
});
|
||||
if (this._productEnabledExtensions.has(key)) {
|
||||
_logService.warn(`Extension '${key}' appears in BOTH 'product.json#extensionAllowedProposedApi' and 'extensionEnabledApiProposals'. The latter is more restrictive and will override the former.`);
|
||||
}
|
||||
this._productEnabledExtensions.set(key, proposalNames);
|
||||
});
|
||||
}
|
||||
|
@ -1249,7 +1238,7 @@ class ProposedApiController {
|
|||
|
||||
if (!extension.isBuiltin && isNonEmptyArray(extension.enabledApiProposals)) {
|
||||
// restrictive: extension cannot use proposed API in this context and its declaration is nulled
|
||||
this._logService.critical(`Extension '${extension.identifier.value} CANNOT USE these API proposals '${extension.enabledApiProposals?.join(', ') ?? '*'}'. You MUST start in extension development mode or use the --enable-proposed-api command line flag`);
|
||||
this._logService.critical(`Extension '${extension.identifier.value} CANNOT USE these API proposals '${extension.enabledApiProposals?.join(', ') || '*'}'. You MUST start in extension development mode or use the --enable-proposed-api command line flag`);
|
||||
extension.enabledApiProposals = [];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -577,10 +577,6 @@ schemaRegistry.registerSchema(schemaId, schema);
|
|||
|
||||
schemaRegistry.registerSchema(productSchemaId, {
|
||||
properties: {
|
||||
extensionAllowedProposedApi: {
|
||||
type: 'array',
|
||||
deprecationMessage: nls.localize('product.extensionAllowedProposedApi', "Use `extensionEnabledApiProposals` instead.")
|
||||
},
|
||||
extensionEnabledApiProposals: {
|
||||
description: nls.localize('product.extensionEnabledApiProposals', "API proposals that the respective extensions can freely use."),
|
||||
type: 'object',
|
||||
|
|
Loading…
Reference in New Issue