Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to VSCode 1.89 (and some fixes) #426

Merged
merged 10 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions demo/src/features/customView.views.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IDialogService, EditorInput, createInstance, IInstantiationService } from 'vscode/services'
import { IDialogService, EditorInput, createInstance, IInstantiationService, IEditorGroup } from 'vscode/services'
import { IEditorCloseHandler, IEditorSerializer, registerCustomView, registerEditorPane, registerEditor, registerEditorSerializer, ViewContainerLocation, SimpleEditorPane, SimpleEditorInput, RegisteredEditorPriority, ConfirmResult } from '@codingame/monaco-vscode-views-service-override'
import * as monaco from 'monaco-editor'

Expand Down Expand Up @@ -45,8 +45,8 @@ registerCustomView({
class CustomEditorPane extends SimpleEditorPane {
static readonly ID = 'workbench.editors.customEditor'

constructor () {
super(CustomEditorPane.ID)
constructor (group: IEditorGroup) {
super(CustomEditorPane.ID, group)
}

initialize (): HTMLElement {
Expand Down
6 changes: 3 additions & 3 deletions demo/src/features/customView.workbench.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IDialogService, EditorInput, createInstance, IInstantiationService } from 'vscode/services'
import { IDialogService, EditorInput, createInstance, IInstantiationService, IEditorGroup } from 'vscode/services'
import { IEditorCloseHandler, IEditorSerializer, registerCustomView, registerEditorPane, registerEditor, registerEditorSerializer, ViewContainerLocation, SimpleEditorPane, SimpleEditorInput, RegisteredEditorPriority, ConfirmResult } from '@codingame/monaco-vscode-workbench-service-override'
import * as monaco from 'monaco-editor'

Expand Down Expand Up @@ -45,8 +45,8 @@ registerCustomView({
class CustomEditorPane extends SimpleEditorPane {
static readonly ID = 'workbench.editors.customEditor'

constructor () {
super(CustomEditorPane.ID)
constructor (group: IEditorGroup) {
super(CustomEditorPane.ID, group)
}

initialize (): HTMLElement {
Expand Down
81 changes: 40 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"config": {
"vscode": {
"version": "1.88.1",
"ref": "1.88.1",
"commit": "e170252f762678dec6ca2cc69aba1570769a5d39"
"version": "1.89.0",
"ref": "1.89.0",
"commit": "9645520c4ae4961f1e927dca9b291f786f11013e"
},
"monaco": {
"ref": "v0.48.0",
Expand All @@ -60,7 +60,7 @@
"@types/mime-types": "^2.1.4",
"@types/node": "18.19.8",
"@types/semver": "^7.5.8",
"@types/vscode": "~1.88.0",
"@types/vscode": "~1.89.0",
"@types/vscode-marked": "npm:@types/marked@^3.0.2",
"@types/vscode-semver": "npm:@types/semver@=5.5.0",
"@types/yargs": "^17.0.32",
Expand Down Expand Up @@ -106,17 +106,17 @@
"@vscode/proxy-agent": "^0.19.0",
"@vscode/ripgrep": "^1.15.9",
"@vscode/spdlog": "^0.15.0",
"@vscode/vscode-languagedetection": "npm:@codingame/vscode-languagedetection@1.0.23",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-canvas": "0.7.0-beta.12",
"@xterm/addon-image": "0.8.0-beta.12",
"@xterm/addon-search": "0.15.0-beta.12",
"@xterm/addon-serialize": "0.13.0-beta.12",
"@xterm/addon-unicode11": "0.8.0-beta.12",
"@xterm/addon-webgl": "0.18.0-beta.12",
"@xterm/headless": "5.5.0-beta.12",
"@xterm/xterm": "5.5.0-beta.12",
"@xterm/addon-canvas": "0.8.0-beta.17",
"@xterm/addon-image": "0.9.0-beta.17",
"@xterm/addon-search": "0.16.0-beta.17",
"@xterm/addon-serialize": "0.14.0-beta.17",
"@xterm/addon-unicode11": "0.9.0-beta.17",
"@xterm/addon-webgl": "0.19.0-beta.17",
"@xterm/headless": "5.6.0-beta.17",
"@xterm/xterm": "5.6.0-beta.17",
"cookie": "^0.4.0",
"css-url-parser": "^1.1.3",
"kerberos": "^2.0.1",
Expand All @@ -136,7 +136,7 @@
"typescript": "$typescript",
"rollup": "$rollup",
"recast": "$recast",
"@xterm/xterm": "5.5.0-beta.12",
"@xterm/xterm": "5.6.0-beta.17",
"eslint-plugin-n": "$eslint-plugin-n"
},
"volta": {
Expand Down
10 changes: 6 additions & 4 deletions scripts/install-vscode
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ BUILD_SOURCEVERSION=$vscodeRef NODE_OPTIONS=--max-old-space-size=8192 yarn gulp
rm -rf $extension_output_directory
cp -R .build/web/extensions "$extension_output_directory"

# Remove useless files
cd src
rm -rf `find . -name '*.test.ts' -o -name 'test' -o -name 'electron-browser'`
rm -rf vs/code
cd ..

# transform to relative imports, replace ESM comments and vs/css! imports
cat << EOF | node -
require('./build/lib/standalone').createESMSourcesAndResources2({
Expand All @@ -80,10 +86,6 @@ cd ..

cd src

# Remove useless files
rm -rf `find . -name '*.test.ts' -o -name 'test' -o -name 'electron-browser'`
rm -rf vs/code

mkdir -p $output_directory
echo $vscodeRef > $version_info

Expand Down
7 changes: 7 additions & 0 deletions src/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import { EditorExtensions, IEditorFactoryRegistry } from 'vs/workbench/common/ed
import { StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices'
import { Disposable } from 'vs/base/common/lifecycle'
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService.service'
import { setHoverDelegateFactory } from 'vs/base/browser/ui/hover/hoverDelegateFactory'
import { setBaseLayerHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate2'
import { WorkbenchHoverDelegate } from 'vs/platform/hover/browser/hover'
import { IHoverService } from 'vs/platform/hover/browser/hover.service'

const layoutEmitter = new Emitter<ServicesAccessor>()
export const onLayout = layoutEmitter.event
Expand Down Expand Up @@ -59,6 +63,9 @@ export async function startup (instantiationService: IInstantiationService): Pro
void instantiationService.invokeFunction(async accessor => {
const lifecycleService = accessor.get(ILifecycleService)

setHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, enableInstantHover, {}))
setBaseLayerHoverDelegate(accessor.get(IHoverService))

Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).start(accessor)
Registry.as<IEditorFactoryRegistry>(EditorExtensions.EditorFactory).start(accessor)

Expand Down
2 changes: 1 addition & 1 deletion src/localExtensionHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class LocalExtensionHost implements IExtensionHost {
}
}

getInspectPort (): number | undefined {
getInspectPort (): { port: number, host: string } | undefined {
return undefined
}

Expand Down
Loading