Skip to content

Commit

Permalink
Update to monaco-vscode-api 1.81.0 and monaco-editor 0.41.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Aug 10, 2023
1 parent 0de4ffe commit 46a4d93
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 218 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The following table describes which version of **monaco-languageclient** and **m

| monaco-languageclient | monaco-vscode-api | monaco-editor | comment |
| :---- | :---- | :--- | :--- |
| 6.4.0 | 1.81.0 | 0.41.0 | Released 2023-08-1x |
| 6.3.0 | 1.80.2 | 0.40.0 | Released 2023-08-04 |
| 6.2.0 | 1.79.3 | 0.39.0 | Released 2023-06-16 |
| 6.1.0 | 1.79.1 | 0.38.0 | Released 2023-06-12 |
Expand Down Expand Up @@ -251,7 +252,7 @@ loader.config({ monaco });
If you use pnpm, you have to add `vscode` / `monaco-vscode-api` as direct dependency (see the [following table](#monaco-editor--monaco-vscode-api-compatibility-table)), otherwise the installation will fail.

```json
"vscode": "npm:@codingame/monaco-vscode-api@~1.80.2"
"vscode": "npm:@codingame/monaco-vscode-api@~1.81.0"
```

## Licenses
Expand Down
357 changes: 166 additions & 191 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

All notable changes to this npm module are documented in this file.

## [6.3.0] - 2023-08-0x
## [6.4.0] - 2023-08-1x

- Update to `monaco-editor` `0.41.0` and `monaco-vscode-api` `1.81.0` [#51x](https://github.com/TypeFox/monaco-languageclient/pull/51x)

## [6.3.0] - 2023-08-04

- Update to `monaco-editor` `0.40.0` and `monaco-vscode-api` `1.80.2` [#513](https://github.com/TypeFox/monaco-languageclient/pull/513)
- vscode api services have been cleaned-up and fully aligned with `monaco-vscode-api
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaco-languageclient",
"version": "6.3.0",
"version": "6.4.0",
"description": "Monaco Language client implementation",
"author": {
"name": "TypeFox GmbH",
Expand Down Expand Up @@ -48,14 +48,14 @@
"License.txt"
],
"dependencies": {
"monaco-editor": "~0.40.0",
"vscode": "npm:@codingame/monaco-vscode-api@1.80.2",
"monaco-editor": "~0.41.0",
"vscode": "npm:@codingame/monaco-vscode-api@1.81.0",
"vscode-jsonrpc": "~8.1.0",
"vscode-languageclient": "~8.1.0"
},
"peerDependencies": {
"monaco-editor": "~0.40.0",
"vscode": "npm:@codingame/monaco-vscode-api@1.80.2"
"monaco-editor": "~0.41.0",
"vscode": "npm:@codingame/monaco-vscode-api@1.81.0"
},
"peerDependenciesMeta": {
"monaco-editor": {
Expand Down
19 changes: 13 additions & 6 deletions packages/client/src/monaco-vscode-api-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export type InitializeServiceConfig = {
enableDialogService?: boolean;
enableNotificationService?: boolean;
enableModelService?: boolean;
/**
* editor service is the default. If you want to use the views service, set enableViewsService to true.
*/
configureEditorOrViewsServiceConfig?: {
enableViewsService?: boolean;
openEditorFunc?: OpenEditor
Expand Down Expand Up @@ -179,21 +182,25 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
reportServiceLoading(userServices, lc.debugLogging === true, 'user');
}

const haveThemeService = serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService');
const haveTextmateService = serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature');
const haveQuickaccessService = serviceNames.includes('quickaccess') || Object.keys(overrideServices).includes('quickInputService');
const haveKeybindingsService = serviceNames.includes('keybindings') || Object.keys(overrideServices).includes('keybindingService');
const haveMarkersService = serviceNames.includes('markers');
const haveViewsService = serviceNames.includes('views') || Object.keys(overrideServices).includes('viewsService');

// theme requires textmate
if ((serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService')) &&
!(serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature'))) {
if (haveThemeService && !haveTextmateService) {
throw new Error('"theme" requires "textmate" service. Please add it to the "initServices" config.');
}

// quickaccess requires keybindings
if ((serviceNames.includes('quickaccess') || Object.keys(overrideServices).includes('quickInputService')) &&
!(serviceNames.includes('keybindings') || Object.keys(overrideServices).includes('keybindingService'))) {
if (haveQuickaccessService && !haveKeybindingsService) {
throw new Error('"quickaccess" requires "keybindings" service. Please add it to the "initServices" config.');
}

// markers service requires views service
if (serviceNames.includes('markers') &&
!(serviceNames.includes('views') || Object.keys(overrideServices).includes('viewsService'))) {
if (haveMarkersService && !haveViewsService) {
throw new Error('"markers" requires "views" service. Please add it to the "initServices" config.');
}

Expand Down
4 changes: 2 additions & 2 deletions packages/examples/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"express": "~4.18.2",
"langium": "~1.2.1",
"langium-statemachine-dsl": "~1.2.0",
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "~6.3.0",
"monaco-editor-workers": "~0.41.0",
"monaco-languageclient": "~6.4.0",
"normalize-url": "~8.0.0",
"react": "~18.2.0",
"react-dom": "~18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/main/src/browser/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const createEditor = async () => {
validate();
});

workspace.onDidOpenTextDocument((_event) => {
workspace.onDidChangeTextDocument((_event) => {
mainVscodeDocument = workspace.textDocuments[0];
validate();
});
Expand Down
2 changes: 0 additions & 2 deletions packages/examples/main/src/langium/statemachineClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { ExtensionHostKind, registerExtension } from 'vscode/extensions';
import { updateUserConfiguration } from 'vscode/service-override/configuration';
import getAccessibilityServiceOverride from 'vscode/service-override/accessibility';
import { LogLevel } from 'vscode/services';
// import { renderPanelPart } from 'vscode/service-override/views';
import 'vscode/default-extensions/theme-defaults';

import { buildWorkerDefinition } from 'monaco-editor-workers';
Expand Down Expand Up @@ -146,7 +145,6 @@ try {
debugLogging: true,
logLevel: LogLevel.Info
});
// renderPanelPart(document.querySelector<HTMLDivElement>('#panel')!);
await setup();
await run();
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion packages/examples/main/statemachine_client.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<h2>Client & Statemachine DSL Web Worker Language Server Example</h2>
<div id="container" style="width:800px;height:600px;border:1px solid grey"></div>
<script type="module" src="./src/langium/statemachineClient.ts"></script>
<div id="panel"></div>
</body>

</html>
6 changes: 3 additions & 3 deletions packages/verify/pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.0.0",
"private": "true",
"dependencies": {
"monaco-languageclient": "~6.3.0",
"monaco-editor": "~0.40.0",
"vscode": "npm:@codingame/monaco-vscode-api@~1.80.2"
"monaco-languageclient": "6.4.0",
"monaco-editor": "~0.41.0",
"vscode": "npm:@codingame/monaco-vscode-api@1.81.0"
},
"devDependencies": {
"shx": "~0.3.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/verify/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"dependencies": {
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "~6.3.0",
"monaco-editor-workers": "~0.41.0",
"monaco-languageclient": "~6.4.0",
"examples-main": "../../examples/main",
"vscode-ws-jsonrpc": "3.0.0",
"normalize-url": "~8.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/verify/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"dependencies": {
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "~6.3.0",
"monaco-editor-workers": "~0.41.0",
"monaco-languageclient": "~6.4.0",
"examples-main": "../../examples/main",
"vscode-ws-jsonrpc": "3.0.0",
"normalize-url": "~8.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/verify/yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": "true",
"dependencies": {
"monaco-languageclient": "~6.3.0"
"monaco-languageclient": "~6.4.0"
},
"devDependencies": {
"shx": "~0.3.4"
Expand Down

0 comments on commit 46a4d93

Please sign in to comment.