mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
debt - remove all of extensionAllowedProposedApi
This commit is contained in:
parent
b471c109f3
commit
e6b63f39c4
|
@ -90,7 +90,6 @@ const createVSCodeWebProductConfigurationPatcher = (product) => {
|
||||||
if (path.endsWith('vs/platform/product/common/product.js')) {
|
if (path.endsWith('vs/platform/product/common/product.js')) {
|
||||||
const productConfiguration = JSON.stringify({
|
const productConfiguration = JSON.stringify({
|
||||||
...product,
|
...product,
|
||||||
extensionAllowedProposedApi: [...product.extensionAllowedProposedApi],
|
|
||||||
version,
|
version,
|
||||||
commit,
|
commit,
|
||||||
date: buildDate
|
date: buildDate
|
||||||
|
|
|
@ -28,12 +28,6 @@
|
||||||
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
||||||
"urlProtocol": "code-oss",
|
"urlProtocol": "code-oss",
|
||||||
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-webview.net/insider/93a2a2fa12dd3ae0629eec01c05a28cb60ac1c4b/out/vs/workbench/contrib/webview/browser/pre/",
|
"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": [
|
"builtInExtensions": [
|
||||||
{
|
{
|
||||||
"name": "ms-vscode.references-view",
|
"name": "ms-vscode.references-view",
|
||||||
|
|
|
@ -138,8 +138,7 @@ export interface IProductConfiguration {
|
||||||
readonly extensionKind?: { readonly [extensionId: string]: ('ui' | 'workspace' | 'web')[] };
|
readonly extensionKind?: { readonly [extensionId: string]: ('ui' | 'workspace' | 'web')[] };
|
||||||
readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[] };
|
readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[] };
|
||||||
readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[] };
|
readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[] };
|
||||||
/** @deprecated */
|
|
||||||
readonly extensionAllowedProposedApi?: readonly string[];
|
|
||||||
readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] };
|
readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] };
|
||||||
readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport };
|
readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport };
|
||||||
readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport };
|
readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport };
|
||||||
|
|
|
@ -66,13 +66,7 @@ else {
|
||||||
urlProtocol: 'code-oss',
|
urlProtocol: 'code-oss',
|
||||||
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
||||||
licenseName: 'MIT',
|
licenseName: 'MIT',
|
||||||
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
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'
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1170,14 +1170,6 @@ class ProposedApiController {
|
||||||
|
|
||||||
this._productEnabledExtensions = new Map<string, ApiProposalName[]>();
|
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
|
// NEW world - product.json spells out what proposals each extension can use
|
||||||
if (productService.extensionEnabledApiProposals) {
|
if (productService.extensionEnabledApiProposals) {
|
||||||
|
@ -1190,9 +1182,6 @@ class ProposedApiController {
|
||||||
}
|
}
|
||||||
return true;
|
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);
|
this._productEnabledExtensions.set(key, proposalNames);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1249,7 +1238,7 @@ class ProposedApiController {
|
||||||
|
|
||||||
if (!extension.isBuiltin && isNonEmptyArray(extension.enabledApiProposals)) {
|
if (!extension.isBuiltin && isNonEmptyArray(extension.enabledApiProposals)) {
|
||||||
// restrictive: extension cannot use proposed API in this context and its declaration is nulled
|
// 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 = [];
|
extension.enabledApiProposals = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -577,10 +577,6 @@ schemaRegistry.registerSchema(schemaId, schema);
|
||||||
|
|
||||||
schemaRegistry.registerSchema(productSchemaId, {
|
schemaRegistry.registerSchema(productSchemaId, {
|
||||||
properties: {
|
properties: {
|
||||||
extensionAllowedProposedApi: {
|
|
||||||
type: 'array',
|
|
||||||
deprecationMessage: nls.localize('product.extensionAllowedProposedApi', "Use `extensionEnabledApiProposals` instead.")
|
|
||||||
},
|
|
||||||
extensionEnabledApiProposals: {
|
extensionEnabledApiProposals: {
|
||||||
description: nls.localize('product.extensionEnabledApiProposals', "API proposals that the respective extensions can freely use."),
|
description: nls.localize('product.extensionEnabledApiProposals', "API proposals that the respective extensions can freely use."),
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|
Loading…
Reference in a new issue