From d775c7346cc5260e7fa0c3155f61c1cb2b7d02bc Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 Nov 2021 12:31:56 +0100 Subject: [PATCH] create stand-in declaration for contribViewsWelcome and adopt for git-extension, https://github.com/microsoft/vscode/issues/131165 --- extensions/git/package.json | 1 + .../contrib/welcome/common/viewsWelcomeContribution.ts | 2 +- .../services/extensions/common/extensionsApiProposals.ts | 1 + src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts | 6 ++++++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts diff --git a/extensions/git/package.json b/extensions/git/package.json index e14ea0dc12a78..d6f792d939ee6 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -11,6 +11,7 @@ "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "enabledApiProposals": [ "diffCommand", + "contribViewsWelcome", "scmActionButton", "scmSelectedProvider", "scmValidation", diff --git a/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts b/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts index b9a713343c427..41f202b54d454 100644 --- a/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts +++ b/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts @@ -73,7 +73,7 @@ function parseGroupAndOrder(welcome: ViewWelcome, contribution: IExtensionPointU let group: string | undefined; let order: number | undefined; if (welcome.group) { - if (!isProposedApiEnabled(contribution.description, undefined)) { + if (!isProposedApiEnabled(contribution.description, 'contribViewsWelcome')) { contribution.collector.warn(nls.localize('ViewsWelcomeExtensionPoint.proposedAPI', "The viewsWelcome contribution in '{0}' requires 'enableProposedApi' to be enabled.", contribution.description.identifier.value)); return { group, order }; } diff --git a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts index f60c1461dee14..974d2a3bdabfa 100644 --- a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts +++ b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts @@ -7,6 +7,7 @@ export const allApiProposals = Object.freeze({ authSession: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts', + contribViewsWelcome: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts', customEditorMove: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts', diffCommand: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts', documentFiltersExclusive: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts', diff --git a/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts b/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts new file mode 100644 index 0000000000000..035b8f1f8b55a --- /dev/null +++ b/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// empty place holder declaration for the `viewsWelcome`-contribution point