Skip to content

Commit

Permalink
Merge pull request #761 from TypeFox/mva-next
Browse files Browse the repository at this point in the history
Updated to monaco-vscode-api 10.0.1
  • Loading branch information
kaisalmen authored Oct 10, 2024
2 parents c81e4e1 + e197de8 commit de5e0b2
Show file tree
Hide file tree
Showing 21 changed files with 601 additions and 508 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ loader.config({ monaco });
If you use pnpm, you have to add `vscode` / `@codingame/monaco-vscode-api` as direct dependency (you find the [compatibility table here](https://github.com/TypeFox/monaco-languageclient/blob/main/docs/versions-and-history.md#monaco-editor--codingamemonaco-vscode-api-compatibility-table), otherwise the installation will fail.

```json
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3"
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1"
```

## Licenses
Expand Down
2 changes: 1 addition & 1 deletion docs/versions-and-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following table describes which version of **monaco-languageclient** and **@

| monaco-languageclient | monaco-editor-wrapper | monaco-editor-react | monaco-vscode-api / editor-api | vscode | monaco-editor | release date | comment |
| :---- | :---- | :--- | :--- | :--- | :--- | :--- | :--- |
| 9.0.0-next.2 | 6.0.0-next.2 | 6.0.0-next.2 | 9.0.3 | 1.93.1 | 0.52.0 | 2024-10-xy | |
| 9.0.0-next.2 | 6.0.0-next.2 | 6.0.0-next.2 | 10.0.1 | 1.94.1 | 0.52.0 | 2024-10-xy | |
| 8.8.3 | 5.5.3 | 4.5.3 | 8.0.4 | 1.92.2 | 0.51.0 | 2024-08-26 | |
| 8.8.2 | 5.5.2 | 4.5.2 | 8.0.2 | 1.92.2 | 0.50.0 | 2024-08-21 | |
| 8.8.1 | 5.5.1 | 4.5.1 | 8.0.1 | 1.92.1 | 0.50.0 | 2024-08-12 | |
Expand Down
901 changes: 492 additions & 409 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"type": "module",
"devDependencies": {
"@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
"@codingame/monaco-vscode-rollup-vsix-plugin": "~9.0.3",
"@codingame/monaco-vscode-rollup-vsix-plugin": "~10.0.1",
"@testing-library/react": "~16.0.1",
"@types/node": "~20.16.10",
"@types/node": "~20.16.11",
"@types/react": "~18.3.10",
"@types/react-dom": "~18.3.0",
"@types/vscode": "~1.93.0",
"@types/vscode": "~1.94.0",
"@typescript-eslint/eslint-plugin": "~7.18.0",
"@typescript-eslint/parser": "~7.18.0",
"@vitejs/plugin-react": "~4.3.2",
Expand All @@ -21,12 +21,12 @@
"eslint-plugin-unused-imports": "~3.2.0",
"http-server": "~14.1.1",
"minimatch": "~10.0.1",
"playwright": "~1.47.2",
"typescript": "~5.6.2",
"playwright": "~1.48.0",
"typescript": "~5.6.3",
"vite": "~5.4.8",
"vite-node": "~2.1.2",
"vitest": "~2.1.2",
"webdriverio": "~9.1.2"
"webdriverio": "~9.1.3"
},
"volta": {
"node": "20.18.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this npm module are documented in this file.

- Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756)
- Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749)
- Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- Updated all `@codingame/monaco-vscode` packages to `10.0.1`.
- Enhancements to logging
- monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741)
- Pass MessageTransports directly
Expand Down
18 changes: 9 additions & 9 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@
"LICENSE"
],
"dependencies": {
"@codingame/monaco-vscode-extensions-service-override": "~9.0.3",
"@codingame/monaco-vscode-languages-service-override": "~9.0.3",
"@codingame/monaco-vscode-localization-service-override": "~9.0.3",
"@codingame/monaco-vscode-log-service-override": "~9.0.3",
"@codingame/monaco-vscode-model-service-override": "~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3",
"@codingame/monaco-vscode-extensions-service-override": "~10.0.1",
"@codingame/monaco-vscode-languages-service-override": "~10.0.1",
"@codingame/monaco-vscode-localization-service-override": "~10.0.1",
"@codingame/monaco-vscode-log-service-override": "~10.0.1",
"@codingame/monaco-vscode-model-service-override": "~10.0.1",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1",
"vscode-languageclient": "~9.0.1"
},
"peerDependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3"
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1"
},
"peerDependenciesMeta": {
"monaco-editor": {
Expand Down
6 changes: 5 additions & 1 deletion packages/client/src/vscode/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ export const importAllServices = async (instructions: InitVscodeApiInstructions)
reportServiceLoading(userServices, instructions.logger);

if (instructions.performChecks === undefined || (typeof instructions.performChecks === 'function' && instructions.performChecks())) {
await initialize(userServices, instructions.htmlContainer, instructions.workspaceConfig, instructions.envOptions);
if (instructions.viewsConfig?.viewServiceType === 'ViewsService' || instructions.viewsConfig?.viewServiceType === 'WorkspaceService') {
await initialize(userServices, instructions.htmlContainer, instructions.workspaceConfig, instructions.envOptions);
} else {
await initialize(userServices, undefined, instructions.workspaceConfig, instructions.envOptions);
}
}
};

Expand Down
3 changes: 2 additions & 1 deletion packages/examples/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ All notable changes to this npm module are documented in this file.
## [2024.10.1] - 20241-10-xy

- Aligend example config. `htmlContainer` is now a required property of `editorAppConfig`
- Fixed problems with Statemachine example (two editor and react version)

## [2024.9.1] - 2024-09-27

- Updated to `[email protected]`, `[email protected]` and `@typefox/[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- Updated to `[email protected]`, `[email protected]` and `@typefox/[email protected]`. Updated all `@codingame/monaco-vscode` packages to `10.0.1`.
- Align configuration of all examples to the latest configuration adjustments.
- Only use a single function to configure `monaco-editor` that all examples.
- `server-commons`: Allow to set `requestMessageHandler` and `responseMessageHandler`.
Expand Down
48 changes: 24 additions & 24 deletions packages/examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaco-languageclient-examples",
"version": "2024.9.1",
"version": "2024.10.1",
"description": "Monaco Language client examples",
"author": {
"name": "TypeFox GmbH",
Expand Down Expand Up @@ -54,35 +54,35 @@
}
},
"dependencies": {
"@codingame/monaco-vscode-configuration-service-override": "~9.0.3",
"@codingame/monaco-vscode-files-service-override": "~9.0.3",
"@codingame/monaco-vscode-groovy-default-extension": "~9.0.3",
"@codingame/monaco-vscode-keybindings-service-override": "~9.0.3",
"@codingame/monaco-vscode-lifecycle-service-override": "~9.0.3",
"@codingame/monaco-vscode-localization-service-override": "~9.0.3",
"@codingame/monaco-vscode-java-default-extension": "~9.0.3",
"@codingame/monaco-vscode-javascript-default-extension": "~9.0.3",
"@codingame/monaco-vscode-json-default-extension": "~9.0.3",
"@codingame/monaco-vscode-python-default-extension": "~9.0.3",
"@codingame/monaco-vscode-standalone-languages": "~9.0.3",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~9.0.3",
"@codingame/monaco-vscode-standalone-json-language-features": "~9.0.3",
"@codingame/monaco-vscode-textmate-service-override": "~9.0.3",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~9.0.3",
"@codingame/monaco-vscode-theme-service-override": "~9.0.3",
"@codingame/monaco-vscode-typescript-basics-default-extension": "~9.0.3",
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~9.0.3",
"@codingame/monaco-vscode-configuration-service-override": "~10.0.1",
"@codingame/monaco-vscode-files-service-override": "~10.0.1",
"@codingame/monaco-vscode-groovy-default-extension": "~10.0.1",
"@codingame/monaco-vscode-keybindings-service-override": "~10.0.1",
"@codingame/monaco-vscode-lifecycle-service-override": "~10.0.1",
"@codingame/monaco-vscode-localization-service-override": "~10.0.1",
"@codingame/monaco-vscode-java-default-extension": "~10.0.1",
"@codingame/monaco-vscode-javascript-default-extension": "~10.0.1",
"@codingame/monaco-vscode-json-default-extension": "~10.0.1",
"@codingame/monaco-vscode-python-default-extension": "~10.0.1",
"@codingame/monaco-vscode-standalone-languages": "~10.0.1",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~10.0.1",
"@codingame/monaco-vscode-standalone-json-language-features": "~10.0.1",
"@codingame/monaco-vscode-textmate-service-override": "~10.0.1",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~10.0.1",
"@codingame/monaco-vscode-theme-service-override": "~10.0.1",
"@codingame/monaco-vscode-typescript-basics-default-extension": "~10.0.1",
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~10.0.1",
"@typefox/monaco-editor-react": "~6.0.0-next.2",
"express": "~4.21.0",
"express": "~4.21.1",
"langium": "~3.2.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"monaco-editor-wrapper": "~6.0.0-next.2",
"monaco-languageclient": "~9.0.0-next.2",
"pyright": "~1.1.383",
"pyright": "~1.1.384",
"react": "~18.3.1",
"react-dom": "~18.3.1",
"request-light": "~0.8.0",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3",
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1",
"vscode-json-languageservice": "~5.4.1",
"vscode-languageclient": "~9.0.1",
"vscode-languageserver": "~9.0.1",
Expand All @@ -91,7 +91,7 @@
"ws": "~8.18.0"
},
"devDependencies": {
"@types/express": "~4.17.21",
"@types/express": "~5.0.0",
"@types/ws": "~8.5.12",
"langium-cli": "~3.2.0",
"ts-node": "~10.9.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const createLangiumGlobalConfig = async (params: {
text?: string,
worker?: Worker,
messagePort?: MessagePort,
messageTransports?: MessageTransports
messageTransports?: MessageTransports,
htmlContainer: HTMLElement
}): Promise<WrapperConfig> => {
const extensionFilesOrContents = new Map<string, string | URL>();
extensionFilesOrContents.set(`/${params.languageServerId}-statemachine-configuration.json`, statemachineLanguageConfig);
Expand Down Expand Up @@ -97,7 +98,7 @@ export const createLangiumGlobalConfig = async (params: {
filesOrContents: extensionFilesOrContents
}],
monacoWorkerFactory: configureMonacoWorkers,
htmlContainer: document.getElementById('monaco-editor-root')!
htmlContainer: params.htmlContainer
},
languageClientConfigs
};
Expand Down
10 changes: 6 additions & 4 deletions packages/examples/src/langium/statemachine/main-react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const runStatemachineReact = async () => {
languageServerId: 'react',
useLanguageClient: true,
text,
worker: loadStatemachineWorkerRegular()
worker: loadStatemachineWorkerRegular(),
htmlContainer: document.getElementById('monaco-editor-root')!
});
const root = ReactDOM.createRoot(wrapperConfig.editorAppConfig.htmlContainer);

try {
document.querySelector('#button-start')?.addEventListener('click', async () => {
Expand All @@ -43,13 +45,13 @@ export const runStatemachineReact = async () => {
};
const strictMode = (document.getElementById('checkbox-strictmode')! as HTMLInputElement).checked;
if (strictMode) {
ReactDOM.createRoot(wrapperConfig.editorAppConfig.htmlContainer).render(<StrictMode><App /></StrictMode>);
root.render(<StrictMode><App /></StrictMode>);
} else {
ReactDOM.createRoot(wrapperConfig.editorAppConfig.htmlContainer).render(<App />);
root.render(<App />);
}
});
document.querySelector('#button-dispose')?.addEventListener('click', () => {

root.render([]);
});
} catch (e) {
console.error(e);
Expand Down
6 changes: 4 additions & 2 deletions packages/examples/src/langium/statemachine/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const startEditor = async () => {
useLanguageClient: true,
worker: stateMachineWorkerPort,
messagePort: channel.port1,
messageTransports: { reader, writer }
messageTransports: { reader, writer },
htmlContainer: document.getElementById('monaco-editor-root')!
});
await wrapper.initAndStart(langiumGlobalConfig);

Expand All @@ -61,7 +62,8 @@ const startEditor = async () => {
const langiumGlobalConfig2 = await createLangiumGlobalConfig({
languageServerId: 'second',
useLanguageClient: false,
text: textMod
text: textMod,
htmlContainer: document.getElementById('monaco-editor-root2')!
});
await wrapper2.initAndStart(langiumGlobalConfig2);

Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to npm module [@typefox/monaco-editor-react](https://www.npm
- Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756)
- On startup the current containerRef is passed to the interal editor app/monaco-editor
- Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749)
- Updated to `[email protected]` and `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- Updated to `[email protected]` and `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `10.0.1`.
- Enhancements to logging
- monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741)
- Turned react component from class to function [#739](https://github.com/TypeFox/monaco-languageclient/pull/739)
Expand Down
8 changes: 4 additions & 4 deletions packages/wrapper-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@
"npm": "10.8.3"
},
"dependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"monaco-editor-wrapper": "~6.0.0-next.2",
"monaco-languageclient": "~9.0.0-next.2",
"react": "~18.3.1",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3"
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1"
},
"peerDependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"monaco-editor-wrapper": "~6.0.0-next.2",
"monaco-languageclient": "~9.0.0-next.2",
"react": "~18.3.1",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3"
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1"
},
"peerDependenciesMeta": {
"monaco-editor": {
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to npm module [monaco-editor-wrapper](https://www.npmjs.com/
- Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756)
- This also allows to configure editor-, view- or workspace-service. This is a preparation for further enhancements.
- Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749)
- Updated to `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- Updated to `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `10.0.1`.
- Enhancements to logging, worker factory and start order. The worker factory only accepts direct worker loading instructions from now on
- monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741)
- Allows to configure more than one language client
Expand Down
62 changes: 31 additions & 31 deletions packages/wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,45 +85,45 @@
"npm": "10.8.3"
},
"dependencies": {
"@codingame/monaco-vscode-configuration-service-override": "~9.0.3",
"@codingame/monaco-vscode-editor-service-override": "~9.0.3",
"@codingame/monaco-vscode-language-pack-cs": "~9.0.3",
"@codingame/monaco-vscode-language-pack-de": "~9.0.3",
"@codingame/monaco-vscode-language-pack-es": "~9.0.3",
"@codingame/monaco-vscode-language-pack-fr": "~9.0.3",
"@codingame/monaco-vscode-language-pack-it": "~9.0.3",
"@codingame/monaco-vscode-language-pack-ja": "~9.0.3",
"@codingame/monaco-vscode-language-pack-ko": "~9.0.3",
"@codingame/monaco-vscode-language-pack-pl": "~9.0.3",
"@codingame/monaco-vscode-language-pack-pt-br": "~9.0.3",
"@codingame/monaco-vscode-language-pack-qps-ploc": "~9.0.3",
"@codingame/monaco-vscode-language-pack-ru": "~9.0.3",
"@codingame/monaco-vscode-language-pack-tr": "~9.0.3",
"@codingame/monaco-vscode-language-pack-zh-hans": "~9.0.3",
"@codingame/monaco-vscode-language-pack-zh-hant": "~9.0.3",
"@codingame/monaco-vscode-monarch-service-override": "~9.0.3",
"@codingame/monaco-vscode-textmate-service-override": "~9.0.3",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~9.0.3",
"@codingame/monaco-vscode-theme-service-override": "~9.0.3",
"@codingame/monaco-vscode-views-service-override": "~9.0.3",
"@codingame/monaco-vscode-workbench-service-override": "~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3",
"@codingame/monaco-vscode-configuration-service-override": "~10.0.1",
"@codingame/monaco-vscode-editor-service-override": "~10.0.1",
"@codingame/monaco-vscode-language-pack-cs": "~10.0.1",
"@codingame/monaco-vscode-language-pack-de": "~10.0.1",
"@codingame/monaco-vscode-language-pack-es": "~10.0.1",
"@codingame/monaco-vscode-language-pack-fr": "~10.0.1",
"@codingame/monaco-vscode-language-pack-it": "~10.0.1",
"@codingame/monaco-vscode-language-pack-ja": "~10.0.1",
"@codingame/monaco-vscode-language-pack-ko": "~10.0.1",
"@codingame/monaco-vscode-language-pack-pl": "~10.0.1",
"@codingame/monaco-vscode-language-pack-pt-br": "~10.0.1",
"@codingame/monaco-vscode-language-pack-qps-ploc": "~10.0.1",
"@codingame/monaco-vscode-language-pack-ru": "~10.0.1",
"@codingame/monaco-vscode-language-pack-tr": "~10.0.1",
"@codingame/monaco-vscode-language-pack-zh-hans": "~10.0.1",
"@codingame/monaco-vscode-language-pack-zh-hant": "~10.0.1",
"@codingame/monaco-vscode-monarch-service-override": "~10.0.1",
"@codingame/monaco-vscode-textmate-service-override": "~10.0.1",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~10.0.1",
"@codingame/monaco-vscode-theme-service-override": "~10.0.1",
"@codingame/monaco-vscode-views-service-override": "~10.0.1",
"@codingame/monaco-vscode-workbench-service-override": "~10.0.1",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1",
"vscode-languageclient": "~9.0.1",
"vscode-languageserver-protocol": "~3.17.5",
"vscode-ws-jsonrpc": "~3.3.2"
},
"devDependencies": {
"@codingame/monaco-vscode-standalone-languages": "~9.0.3",
"@codingame/monaco-vscode-standalone-css-language-features": "~9.0.3",
"@codingame/monaco-vscode-standalone-html-language-features": "~9.0.3",
"@codingame/monaco-vscode-standalone-json-language-features": "~9.0.3",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~9.0.3"
"@codingame/monaco-vscode-standalone-languages": "~10.0.1",
"@codingame/monaco-vscode-standalone-css-language-features": "~10.0.1",
"@codingame/monaco-vscode-standalone-html-language-features": "~10.0.1",
"@codingame/monaco-vscode-standalone-json-language-features": "~10.0.1",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~10.0.1"
},
"peerDependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.0.1",
"monaco-languageclient": "~9.0.0-next.2",
"vscode": "npm:@codingame/monaco-vscode-api@~9.0.3"
"vscode": "npm:@codingame/monaco-vscode-api@~10.0.1"
},
"peerDependenciesMeta": {
"monaco-editor": {
Expand Down
Loading

0 comments on commit de5e0b2

Please sign in to comment.