diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85550bb5..6f24ed4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,14 @@ name: Release -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + changes: + description: 'Changes in the releases' + required: true + type: string +env: + RELEASE_CHANGES: ${{ github.event.inputs.changes }} permissions: contents: write # to be able to publish a GitHub release diff --git a/README.md b/README.md index f1a10e52..1cc427b5 100644 --- a/README.md +++ b/README.md @@ -277,11 +277,8 @@ You will then be able to import it as if you were in a VSCode extension: ```typescript import * as vscode from 'vscode' -import { initialize } from 'vscode/extensions' import 'vscode/localExtensionHost' -await initialize() - const range = new vscode.Range(...) vscode.languages.registerCompletionItemProvider(...) ``` diff --git a/release.ts b/release.ts index 924859ab..9c135b17 100644 --- a/release.ts +++ b/release.ts @@ -91,7 +91,7 @@ async function getRepoInformations (): Promise { } } -async function generateReleaseNotes (repoInfos: RepositoryInfos, version: string, lastTag?: string) { +async function generateReleaseNotes (repoInfos: RepositoryInfos, changes: string, version: string, lastTag?: string) { const tag = `v${version}` const newCommits = (lastTag != null @@ -110,7 +110,7 @@ async function generateReleaseNotes (repoInfos: RepositoryInfos, version: string const releaseDetails = newCommits.map(({ hash, subj, short }) => `* ${subj} ([${short}](${repoInfos.publicUrl}/commit/${hash}))`).join('\n') - const releaseNotes = releaseDiffRef + '\n' + releaseDetails + '\n' + const releaseNotes = `${releaseDiffRef}\n${changes}\n### commits: ${releaseDetails}\n` return releaseNotes } @@ -162,7 +162,7 @@ async function run () { const repoInfos = await getRepoInformations() const lastTag = await getLastTag() const nextVersion = await getNextVersion(lastTag) - const releaseNotes = await generateReleaseNotes(repoInfos, nextVersion, lastTag) + const releaseNotes = await generateReleaseNotes(repoInfos, nextVersion, process.env.RELEASE_CHANGES ?? 'Unknown', lastTag) await releaseGithub(repoInfos, nextVersion, releaseNotes) await publishNpm(nextVersion) diff --git a/src/localExtensionHost.ts b/src/localExtensionHost.ts index dab435a5..49302fbd 100644 --- a/src/localExtensionHost.ts +++ b/src/localExtensionHost.ts @@ -13,7 +13,7 @@ import * as platform from 'vs/base/common/platform' import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc' import { LocalProcessRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation' import { IExtHostExtensionService, IHostUtils } from 'vs/workbench/api/common/extHostExtensionService' -import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions' +import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, IExtensionService, nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions' import { IWebWorkerExtensionHostDataProvider } from 'vs/workbench/services/extensions/browser/webWorkerExtensionHost' import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace' @@ -240,6 +240,8 @@ async function createLocalApi (extensionId?: string): Promise { setLocalExtensionHost(LocalExtensionHost) registerLocalApiFactory(createLocalApi) -registerServiceInitializePostParticipant(async () => { +registerServiceInitializePostParticipant(async (accessor) => { + // Make sure the extension service is loaded + accessor.get(IExtensionService) setDefaultApi(await createLocalApi()) }) diff --git a/src/service-override/configuration.ts b/src/service-override/configuration.ts index e0e0fd19..b81bc7db 100644 --- a/src/service-override/configuration.ts +++ b/src/service-override/configuration.ts @@ -1,7 +1,7 @@ import { IEditorOverrideServices, StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices' import { WorkspaceService } from 'vs/workbench/services/configuration/browser/configurationService' import { IConfigurationService } from 'vs/platform/configuration/common/configuration' -import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration' +import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration' import { TextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService' import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' import { ConfigurationScope } from 'vscode/src/vs/platform/configuration/common/configurationRegistry' @@ -32,6 +32,7 @@ import { URI } from 'vs/base/common/uri' import 'vs/workbench/api/common/configurationExtensionPoint' import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService' import { IDisposable } from 'vs/base/common/lifecycle' +import { TextResourcePropertiesService } from 'vs/workbench/services/textresourceProperties/common/textResourcePropertiesService' import getFileServiceOverride, { initFile } from './files' import { memoizedConstructor, unsupported } from '../tools' import { registerServiceInitializePreParticipant } from '../lifecycle' @@ -150,7 +151,8 @@ function getServiceOverride (defaultWorkspace?: URI | IAnyWorkspaceIdentifier): [IWorkspaceContextService.toString()]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true), [ITextResourceConfigurationService.toString()]: new SyncDescriptor(TextResourceConfigurationService, [], true), [IWorkspaceEditingService.toString()]: new SyncDescriptor(MonacoWorkspaceEditingService, [], true), - [IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, undefined, true) + [IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, undefined, true), + [ITextResourcePropertiesService.toString()]: new SyncDescriptor(TextResourcePropertiesService, undefined, true) } }