Skip to content

Commit 0eca9cb

Browse files
authored
Merge pull request #904 from TypeFox/issue-898
Update complete uri and model handling in EditorApp
2 parents f886d3c + 3dd6e1c commit 0eca9cb

Some content is hidden

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

45 files changed

+2565
-2130
lines changed

.github/workflows/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
- name: Volta
2424
uses: volta-cli/action@v4
25+
with:
26+
node-version: 20
2527

2628
- name: Use pnpm
2729
uses: pnpm/action-setup@v3

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ Important Project changes and notes about the project's history are found [here]
7979

8080
These are the current versions of packages from this repository and their alignment with **@codingame/monaco-vscode-api** **monaco-editor** and **vscode**:
8181

82-
- **monaco-languageclient**: `9.6.0-next.0` (release date: 2025-04-0x)
83-
- **monaco-editor-wrapper**: `6.7.0-next.0` (release date: 2025-04-0x)
84-
- **@typefox/monaco-editor-react**: `6.7.0-next.0` (release date: 2025-04-0x)
82+
- **monaco-languageclient**: `9.6.0-next.1` (release date: 2025-04-11)
83+
- **monaco-editor-wrapper**: `6.7.0-next.1` (release date: 2025-04-11)
84+
- **@typefox/monaco-editor-react**: `6.7.0-next.1` (release date: 2025-04-11)
8585
- Aligned with:
86-
- **@codingame/monaco-vscode-[editor]-api**: `15.0.3`
87-
- **vscode**: `1.98.2`
86+
- **@codingame/monaco-vscode-[editor]-api**: `16.0.2`
87+
- **vscode**: `1.99.2`
8888
- **monaco-editor**: `0.52.2`
8989
- **vscode-ws-jsonrpc**: `3.4.0` (release date: 2024-12-18)
9090

@@ -256,12 +256,12 @@ Whenever you used `monaco-editor`/`@codingame/monaco-vscode-editor-api` `vscode`
256256
If you use pnpm or yarn, you have to add `vscode` / `@codingame/monaco-vscode-api` as direct dependency, otherwise the installation will fail:
257257

258258
```json
259-
"vscode": "npm:@codingame/monaco-vscode-extension-api@~15.0.3"
259+
"vscode": "npm:@codingame/monaco-vscode-extension-api@~16.0.2"
260260
```
261261

262262
### @codingame/monaco-vscode-editor-api / monaco-editor usage
263263

264-
When you use the libraries from this project you are no longer are required to proxy `monaco-editor` like `"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~15.0.3"` in you `package.json`. You can directly use it like this:
264+
When you use the libraries from this project you are no longer are required to proxy `monaco-editor` like `"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~16.0.2"` in you `package.json`. You can directly use it like this:
265265

266266
```js
267267
import * as monaco from '@codingame/monaco-vscode-editor-api';
@@ -271,7 +271,7 @@ If your dependency stack already contains a reference `monaco-editor` you must e
271271

272272
```json
273273
"overrides": {
274-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~15.0.3"
274+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~16.0.2"
275275
}
276276
```
277277

docs/versions-and-history.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +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.6.0-next.0 | 6.7.0-next.0 | 6.7.0-next.0 | 15.0.3 | 1.98.2 | 0.52.2 | 2025-04-0x | |
9+
| 9.6.0-next.1 | 6.7.0-next.1 | 6.7.0-next.1 | 16.0.2 | 1.99.2 | 0.52.2 | 2025-04-11 | |
1010
| 9.5.0 | 6.6.0 | 6.6.0 | 15.0.2 | 1.97.2 | 0.52.2 | 2025-03-13 | |
1111
| 9.4.0 | 6.4.0 | 6.4.0 | 14.0.4 | 1.97.2 | 0.52.2 | 2025-02-18 | |
1212
| 9.3.0 | 6.3.0 | 6.3.0 | 14.0.2 | 1.97.0 | 0.52.2 | 2025-02-12 | |

package-lock.json

+1,437-1,505
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
},
1414
"devDependencies": {
1515
"@codingame/esbuild-import-meta-url-plugin": "~1.0.3",
16-
"@codingame/monaco-vscode-rollup-vsix-plugin": "~15.0.3",
17-
"@eslint/eslintrc": "~3.3.0",
18-
"@eslint/js": "~9.23.0",
16+
"@codingame/monaco-vscode-rollup-vsix-plugin": "~16.0.2",
17+
"@eslint/eslintrc": "~3.3.1",
18+
"@eslint/js": "~9.24.0",
1919
"@stylistic/eslint-plugin": "~4.2.0",
20-
"@testing-library/react": "~16.2.0",
21-
"@types/node": "~22.13.17",
22-
"@types/react": "~19.1.0",
23-
"@types/react-dom": "~19.1.0",
24-
"@typescript-eslint/eslint-plugin": "~8.29.0",
25-
"@typescript-eslint/parser": "~8.29.0",
20+
"@testing-library/react": "~16.3.0",
21+
"@types/node": "~22.14.0",
22+
"@types/react": "~19.1.1",
23+
"@types/react-dom": "~19.1.2",
24+
"@typescript-eslint/eslint-plugin": "~8.29.1",
25+
"@typescript-eslint/parser": "~8.29.1",
2626
"@vitejs/plugin-react": "~4.3.4",
2727
"@vitest/browser": "~3.1.1",
2828
"editorconfig": "~2.0.1",
2929
"esbuild": "~0.25.2",
30-
"eslint": "~9.23.0",
30+
"eslint": "~9.24.0",
3131
"eslint-plugin-header": "~3.1.1",
3232
"eslint-plugin-import": "~2.31.0",
3333
"eslint-plugin-unused-imports": "~4.1.4",
@@ -36,9 +36,9 @@
3636
"minimatch": "~10.0.1",
3737
"playwright": "~1.51.1",
3838
"shx": "~0.4.0",
39-
"typescript": "~5.8.2",
4039
"tsx": "~4.19.3",
41-
"vite": "~6.2.4",
40+
"typescript": "~5.8.3",
41+
"vite": "~6.2.6",
4242
"vitest": "~3.1.1"
4343
},
4444
"scripts": {

packages/client/CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

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

5-
## [9.6.0-next.0] - 2025-04-0x
5+
## [9.6.0-next.1] - 2025-04-1x
66

7-
- Updated all `@codingame/monaco-vscode` packages to `15.0.3`.
7+
- Updated all `@codingame/monaco-vscode` packages to `16.0.2`.
88

99
## [9.5.0] - 2025-03-13
1010

packages/client/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monaco-languageclient",
3-
"version": "9.6.0-next.0",
3+
"version": "9.6.0-next.1",
44
"description": "Monaco Language client implementation",
55
"author": {
66
"name": "TypeFox GmbH",
@@ -76,17 +76,17 @@
7676
"LICENSE"
7777
],
7878
"dependencies": {
79-
"@codingame/monaco-vscode-api": "~15.0.3",
80-
"@codingame/monaco-vscode-configuration-service-override": "~15.0.3",
81-
"@codingame/monaco-vscode-editor-api": "~15.0.3",
82-
"@codingame/monaco-vscode-editor-service-override": "~15.0.3",
83-
"@codingame/monaco-vscode-extensions-service-override": "~15.0.3",
84-
"@codingame/monaco-vscode-extension-api": "~15.0.3",
85-
"@codingame/monaco-vscode-languages-service-override": "~15.0.3",
86-
"@codingame/monaco-vscode-localization-service-override": "~15.0.3",
87-
"@codingame/monaco-vscode-log-service-override": "~15.0.3",
88-
"@codingame/monaco-vscode-model-service-override": "~15.0.3",
89-
"vscode": "npm:@codingame/monaco-vscode-extension-api@~15.0.3",
79+
"@codingame/monaco-vscode-api": "~16.0.2",
80+
"@codingame/monaco-vscode-configuration-service-override": "~16.0.2",
81+
"@codingame/monaco-vscode-editor-api": "~16.0.2",
82+
"@codingame/monaco-vscode-editor-service-override": "~16.0.2",
83+
"@codingame/monaco-vscode-extensions-service-override": "~16.0.2",
84+
"@codingame/monaco-vscode-extension-api": "~16.0.2",
85+
"@codingame/monaco-vscode-languages-service-override": "~16.0.2",
86+
"@codingame/monaco-vscode-localization-service-override": "~16.0.2",
87+
"@codingame/monaco-vscode-log-service-override": "~16.0.2",
88+
"@codingame/monaco-vscode-model-service-override": "~16.0.2",
89+
"vscode": "npm:@codingame/monaco-vscode-extension-api@~16.0.2",
9090
"vscode-languageclient": "~9.0.1"
9191
},
9292
"scripts": {

packages/client/test/fs/endpoints/emptyEndpoint.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('EmptyFileSystemEndpoint Tests', () => {
2121
test('writeFile', async () => {
2222
const result = await endpoint.writeFile({
2323
resourceUri: '/tmp/test.js',
24-
content: 'console.log("Hello World!");'
24+
content: 'const text = "Hello World!";'
2525
});
2626
expect(result).toEqual({
2727
status: 'denied'
@@ -31,7 +31,7 @@ describe('EmptyFileSystemEndpoint Tests', () => {
3131
test('syncFile', async () => {
3232
const result = await endpoint.syncFile({
3333
resourceUri: '/tmp/test.js',
34-
content: 'console.log("Hello World!");'
34+
content: 'const text = "Hello World!";'
3535
});
3636
expect(result).toEqual({
3737
status: 'denied'

packages/examples/CHANGELOG.md

+6-1
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-
## [2025.4.1] - 2025-04-0x
5+
## [2025.4.2] - 2025-04-11
6+
7+
- Updated to `[email protected]`, `[email protected]` and `@typefox/[email protected]`.
8+
- Export langium worker via package sub exports.
9+
10+
## [2025.4.1] - 2025-04-02
611

712
- Updated to `[email protected]`, `[email protected]` and `@typefox/[email protected]`.
813

packages/examples/package.json

+50-40
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monaco-languageclient-examples",
3-
"version": "2025.4.1",
3+
"version": "2025.4.2",
44
"description": "Monaco Language client examples",
55
"author": {
66
"name": "TypeFox GmbH",
@@ -35,6 +35,14 @@
3535
"./python-client": {
3636
"types": "./dist/python/client/main.d.ts",
3737
"default": "./dist/python/client/main.js"
38+
},
39+
"./worker/langium": {
40+
"types": "./dist/langium/langium-dsl/worker/langium-server.d.ts",
41+
"default": "./dist/langium/langium-dsl/worker/langium-server.js"
42+
},
43+
"./worker/statemachine": {
44+
"types": "./dist/langium/statemachine/worker/statemachine-server.d.ts",
45+
"default": "./dist/langium/statemachine/worker/statemachine-server.js"
3846
}
3947
},
4048
"typesVersions": {
@@ -48,8 +56,11 @@
4856
"json-client": [
4957
"dist/json/client/wrapperWs"
5058
],
51-
"python-client": [
52-
"dist/python/client/main"
59+
"worker/langium": [
60+
"dist/langium/langium-dsl/worker/langium-server"
61+
],
62+
"worker/statemachine": [
63+
"dist/langium/statemachine/worker/statemachine-server"
5364
]
5465
}
5566
},
@@ -71,49 +82,48 @@
7182
"LICENSE"
7283
],
7384
"dependencies": {
74-
"@codingame/monaco-vscode-configuration-service-override": "~15.0.3",
75-
"@codingame/monaco-vscode-cpp-default-extension": "~15.0.3",
76-
"@codingame/monaco-vscode-debug-service-override": "~15.0.3",
77-
"@codingame/monaco-vscode-editor-api": "~15.0.3",
78-
"@codingame/monaco-vscode-environment-service-override": "~15.0.3",
79-
"@codingame/monaco-vscode-explorer-service-override": "~15.0.3",
80-
"@codingame/monaco-vscode-files-service-override": "~15.0.3",
81-
"@codingame/monaco-vscode-groovy-default-extension": "~15.0.3",
82-
"@codingame/monaco-vscode-java-default-extension": "~15.0.3",
83-
"@codingame/monaco-vscode-javascript-default-extension": "~15.0.3",
84-
"@codingame/monaco-vscode-json-default-extension": "~15.0.3",
85-
"@codingame/monaco-vscode-keybindings-service-override": "~15.0.3",
86-
"@codingame/monaco-vscode-lifecycle-service-override": "~15.0.3",
87-
"@codingame/monaco-vscode-localization-service-override": "~15.0.3",
88-
"@codingame/monaco-vscode-preferences-service-override": "~15.0.3",
89-
"@codingame/monaco-vscode-python-default-extension": "~15.0.3",
90-
"@codingame/monaco-vscode-remote-agent-service-override": "~15.0.3",
91-
"@codingame/monaco-vscode-search-result-default-extension": "~15.0.3",
92-
"@codingame/monaco-vscode-search-service-override": "~15.0.3",
93-
"@codingame/monaco-vscode-secret-storage-service-override": "~15.0.3",
94-
"@codingame/monaco-vscode-standalone-json-language-features": "~15.0.3",
95-
"@codingame/monaco-vscode-standalone-languages": "~15.0.3",
96-
"@codingame/monaco-vscode-standalone-typescript-language-features": "~15.0.3",
97-
"@codingame/monaco-vscode-testing-service-override": "~15.0.3",
98-
"@codingame/monaco-vscode-storage-service-override": "~15.0.3",
99-
"@codingame/monaco-vscode-textmate-service-override": "~15.0.3",
100-
"@codingame/monaco-vscode-theme-defaults-default-extension": "~15.0.3",
101-
"@codingame/monaco-vscode-theme-service-override": "~15.0.3",
102-
"@codingame/monaco-vscode-typescript-basics-default-extension": "~15.0.3",
103-
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~15.0.3",
104-
"@codingame/monaco-vscode-views-service-override": "~15.0.3",
105-
"@typefox/monaco-editor-react": "~6.7.0-next.0",
85+
"@codingame/monaco-vscode-configuration-service-override": "~16.0.2",
86+
"@codingame/monaco-vscode-cpp-default-extension": "~16.0.2",
87+
"@codingame/monaco-vscode-debug-service-override": "~16.0.2",
88+
"@codingame/monaco-vscode-editor-api": "~16.0.2",
89+
"@codingame/monaco-vscode-environment-service-override": "~16.0.2",
90+
"@codingame/monaco-vscode-explorer-service-override": "~16.0.2",
91+
"@codingame/monaco-vscode-files-service-override": "~16.0.2",
92+
"@codingame/monaco-vscode-groovy-default-extension": "~16.0.2",
93+
"@codingame/monaco-vscode-java-default-extension": "~16.0.2",
94+
"@codingame/monaco-vscode-javascript-default-extension": "~16.0.2",
95+
"@codingame/monaco-vscode-json-default-extension": "~16.0.2",
96+
"@codingame/monaco-vscode-keybindings-service-override": "~16.0.2",
97+
"@codingame/monaco-vscode-lifecycle-service-override": "~16.0.2",
98+
"@codingame/monaco-vscode-localization-service-override": "~16.0.2",
99+
"@codingame/monaco-vscode-preferences-service-override": "~16.0.2",
100+
"@codingame/monaco-vscode-python-default-extension": "~16.0.2",
101+
"@codingame/monaco-vscode-remote-agent-service-override": "~16.0.2",
102+
"@codingame/monaco-vscode-search-result-default-extension": "~16.0.2",
103+
"@codingame/monaco-vscode-search-service-override": "~16.0.2",
104+
"@codingame/monaco-vscode-secret-storage-service-override": "~16.0.2",
105+
"@codingame/monaco-vscode-standalone-json-language-features": "~16.0.2",
106+
"@codingame/monaco-vscode-standalone-typescript-language-features": "~16.0.2",
107+
"@codingame/monaco-vscode-testing-service-override": "~16.0.2",
108+
"@codingame/monaco-vscode-storage-service-override": "~16.0.2",
109+
"@codingame/monaco-vscode-textmate-service-override": "~16.0.2",
110+
"@codingame/monaco-vscode-theme-defaults-default-extension": "~16.0.2",
111+
"@codingame/monaco-vscode-theme-service-override": "~16.0.2",
112+
"@codingame/monaco-vscode-typescript-basics-default-extension": "~16.0.2",
113+
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~16.0.2",
114+
"@codingame/monaco-vscode-views-service-override": "~16.0.2",
115+
"@typefox/monaco-editor-react": "~6.7.0-next.1",
106116
"cors": "^2.8.5",
107117
"express": "~5.1.0",
108118
"jszip": "~3.10.1",
109119
"langium": "~3.4.0",
110-
"monaco-editor-wrapper": "~6.7.0-next.0",
111-
"monaco-languageclient": "~9.6.0-next.0",
112-
"pyright": "~1.1.398",
120+
"monaco-editor-wrapper": "~6.7.0-next.1",
121+
"monaco-languageclient": "~9.6.0-next.1",
122+
"pyright": "~1.1.399",
113123
"react": "~19.1.0",
114124
"react-dom": "~19.1.0",
115125
"request-light": "~0.8.0",
116-
"vscode": "npm:@codingame/monaco-vscode-extension-api@~15.0.3",
126+
"vscode": "npm:@codingame/monaco-vscode-extension-api@~16.0.2",
117127
"vscode-json-languageservice": "~5.4.4",
118128
"vscode-languageclient": "~9.0.1",
119129
"vscode-languageserver": "~9.0.1",
@@ -130,7 +140,7 @@
130140
"langium-cli": "~3.4.0",
131141
"mini-coi": "~0.4.2",
132142
"ts-node": "~10.9.1",
133-
"vite-plugin-static-copy": "~2.3.0",
143+
"vite-plugin-static-copy": "~2.3.1",
134144
"vscode-languageserver-types": "~3.17.5"
135145
},
136146
"scripts": {

packages/examples/src/langium/langium-dsl/config/extendedConfig.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export const setupLangiumClientExtended = async (params: {
3535
'workbench.colorTheme': 'GitHub Dark High Contrast',
3636
'editor.guides.bracketPairsHorizontal': 'active',
3737
'editor.wordBasedSuggestions': 'off',
38-
'editor.experimental.asyncTokenization': true
38+
'editor.experimental.asyncTokenization': true,
39+
'vitest.disableWorkspaceWarning': true
3940
})
4041
}
4142
},

packages/examples/src/langium/langium-dsl/worker/langium-server.ts

+2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ const context = {
2424
} as unknown as DefaultSharedModuleContext;
2525
const { shared } = createLangiumGrammarServices(context);
2626

27+
console.log('Starting langium-dsl server...');
28+
2729
// Start the language server with the shared services
2830
startLanguageServer(shared);

packages/examples/src/langium/statemachine/main-react.tsx

+18-11
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ export const runStatemachineReact = async () => {
3333
});
3434
const root = ReactDOM.createRoot(document.getElementById('react-root')!);
3535

36-
const onTextChanged = (textChanges: TextContents) => {
37-
console.log(`text: ${textChanges.modified}\ntextOriginal: ${textChanges.original}`);
38-
};
3936
try {
4037
document.querySelector('#button-start')?.addEventListener('click', async () => {
4138
disableElement('button-start', true);
@@ -44,23 +41,33 @@ export const runStatemachineReact = async () => {
4441
const App = () => {
4542

4643
const [ height, setHeight ] = useState('80vh');
44+
const [testState, setTestState] = useState<string>('');
45+
46+
const onTextChanged = (textChanges: TextContents) => {
47+
console.log(`text: ${textChanges.modified}\ntextOriginal: ${textChanges.original}`);
48+
setTestState(textChanges.modified as string);
49+
};
4750

4851
useEffect(() => {
4952
const timer = setTimeout(() => {
5053
console.log('Updating styles');
51-
setHeight('85vh');
52-
}, 2000);
54+
setHeight('50vh');
55+
}, 1000);
5356

5457
return () => clearTimeout(timer);
5558
}, []);
5659

5760
return (
58-
<div style={{ 'height': height }} >
59-
<MonacoEditorReactComp
60-
style={{ 'height': '100%' }}
61-
wrapperConfig={wrapperConfig}
62-
onTextChanged={onTextChanged} />
63-
</div>
61+
<>
62+
<div style={{ 'height': height }} >
63+
<MonacoEditorReactComp
64+
style={{ 'height': '100%' }}
65+
wrapperConfig={wrapperConfig}
66+
onTextChanged={onTextChanged}
67+
/>
68+
<b>Debug:</b><br />{testState}
69+
</div>
70+
</>
6471
);
6572
};
6673
const strictMode = (document.getElementById('checkbox-strictmode')! as HTMLInputElement).checked;

0 commit comments

Comments
 (0)