Skip to content

Commit 6ac3098

Browse files
authored
Merge pull request #823 from TypeFox/react-views-init
@typefox/monaco-editor-react now works with views service
2 parents 5470343 + db80755 commit 6ac3098

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1645
-641
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ node_modules
55
*.tsbuildinfo
66
.angular
77
__screenshots__
8-
.chrome/profile
8+
.chrome

docs/CHANGELOG.md

Lines changed: 602 additions & 0 deletions
Large diffs are not rendered by default.

docs/versions-and-history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The following table describes which version of **monaco-languageclient** and **@
66

77
| monaco-languageclient | monaco-editor-wrapper | monaco-editor-react | monaco-vscode-api / editor-api | vscode | monaco-editor | release date | comment |
88
| :---- | :---- | :--- | :--- | :--- | :--- | :--- | :--- |
9+
| 9.1.0 | 6.1.0 | 6.1.0 | 11.1.2 | 1.95.3 | 0.52.0 | 2025-01-09 | |
910
| 9.0.0 | 6.0.0 | 6.0.0 | 11.1.2 | 1.95.3 | 0.52.0 | 2024-12-18 | |
1011
| 8.8.3 | 5.5.3 | 4.5.3 | 8.0.4 | 1.92.2 | 0.51.0 | 2024-08-26 | |
1112
| 8.8.2 | 5.5.2 | 4.5.2 | 8.0.2 | 1.92.2 | 0.50.0 | 2024-08-21 | |

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ <h3>TypeScript</h3>
8686
<br>
8787

8888
<h2>Monaco Editor React</h2>
89-
<a href="./packages/examples/react_statemachine.html">React: Langium Statemachine Language Client & Language Server (Worker)</a>
90-
<br>
89+
<a href="./packages/examples/react_appPlayground.html">React: Application Playground</a>
9190
<br>
91+
<a href="./packages/examples/react_statemachine.html">React: Langium Statemachine Language Client & Language Server (Worker)</a>
92+
<br><br>
9293
Please execute <b><code>npm run start:example:server:python</code></b> beforehand:<br>
9394
<a href="./packages/examples/react_python.html">React: Python Language Client & Language Server (Web Socket)</a>
9495
<br>

package-lock.json

Lines changed: 652 additions & 443 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"@stylistic/eslint-plugin": "~2.12.1",
2020
"@testing-library/react": "~16.1.0",
2121
"@types/node": "~22.10.5",
22-
"@types/react": "~18.3.14",
23-
"@types/react-dom": "~18.3.3",
22+
"@types/react": "~19.0.4",
23+
"@types/react-dom": "~19.0.2",
2424
"@types/vscode": "~1.95.0",
2525
"@typescript-eslint/eslint-plugin": "~8.19.1",
2626
"@typescript-eslint/parser": "~8.19.1",
@@ -36,7 +36,7 @@
3636
"http-server": "~14.1.1",
3737
"minimatch": "~10.0.1",
3838
"playwright": "~1.49.1",
39-
"typescript": "~5.7.2",
39+
"typescript": "~5.7.3",
4040
"vite": "~6.0.7",
4141
"vite-node": "~2.1.8",
4242
"vitest": "~2.1.8"

packages/client/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

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

5-
## [9.0.0-next.14] - 2024-12-18
5+
## [9.1.0] - 2025-01-09
6+
7+
- `@typefox/monaco-editor-react` now works with views service `initialize` [#823](https://github.com/TypeFox/monaco-languageclient/pull/823)
8+
- Ensure configuration is init before service init [#820](https://github.com/TypeFox/monaco-languageclient/pull/820)
9+
10+
## [9.0.0] - 2024-12-18
611

712
- Include all `@codingame/monaco-vscode` packages as peerDependencies. Mark only required ones as non-optional.
813
- Updated engine engine requirements for node to (`>=18.19.0`) and for npm to (`>=10.2.3`)

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monaco-languageclient",
3-
"version": "9.0.0",
3+
"version": "9.1.0",
44
"description": "Monaco Language client implementation",
55
"author": {
66
"name": "TypeFox GmbH",

packages/client/src/vscode/services.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export interface UserConfiguration {
3030
export interface ViewsConfig {
3131
viewServiceType: 'EditorService' | 'ViewsService' | 'WorkspaceService';
3232
openEditorFunc?: OpenEditor;
33+
htmlAugmentationInstructions?: (htmlContainer: HTMLElement | null | undefined) => void;
3334
viewsInitFunc?: () => void;
3435
}
3536

@@ -110,6 +111,7 @@ export const initServices = async (vscodeApiConfig: VscodeApiConfig, instruction
110111
}
111112
await importAllServices(vscodeApiConfig, instructions);
112113

114+
vscodeApiConfig.viewsConfig?.htmlAugmentationInstructions?.(instructions?.htmlContainer);
113115
vscodeApiConfig.viewsConfig?.viewsInitFunc?.();
114116
instructions?.logger?.debug('Initialization of vscode services completed successfully.');
115117

packages/examples/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

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

5+
## [2025.1.1] - 2025-01-09
6+
7+
- Updated to `monaco-languageclient@9.1.0`, `monaco-editor-wrapper@6.1.0` and `@typefox/monaco-editor-react@6.1.0`.
8+
- Added a react version of the app playground to verify PR "`@typefox/monaco-editor-react` now works with views service" [#823](https://github.com/TypeFox/monaco-languageclient/pull/823)
9+
510
## [2024.12.6] - 2024-12-18
611

712
- Use final release of `monaco-languageclient@9.0.0`, `vscode-ws-jsonrpc@3.4.0`, `monaco-editor-wrapper@6.0.0` and `@typefox/monaco-editor-react@6.0.0`.

0 commit comments

Comments
 (0)