Skip to content

Commit

Permalink
Merge pull request #618 from TypeFox/mva-32x
Browse files Browse the repository at this point in the history
Update to monaco-vscode-api 3.2.1
  • Loading branch information
kaisalmen authored Mar 22, 2024
2 parents 84c255c + 10185bc commit 93c817f
Show file tree
Hide file tree
Showing 34 changed files with 913 additions and 1,265 deletions.
8 changes: 5 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"recommendations": [
"editorconfig.editorconfig"
]
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"vitest.explorer"
]
}
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.json-language-features"
},
"angular.enable-strict-mode-prompt": false
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,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@~3.1.2"
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1"
```

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

| monaco-languageclient | monaco-vscode-api / editor-api | vscode | monaco-editor | release date | comment |
| :---- | :---- | :--- | :--- | :--- | :--- |
| 8.0.1 | 3.2.1 | 1.87.2 | 0.47.0 | 2024-03-2x | |
| 8.0.0 | 3.1.2 | 1.87.2 | 0.47.0 | 2024-03-18 | `@codingame/monaco-vscode-editor-api` replaces<br>`@codingame/monaco-editor-treemended`<br>`@codingame/monaco-vscode-api` implements its own versioning scheme |
| 7.3.0 | 1.85.0 | 1.85.0 | 0.45.0 | 2024-01-04 | |
| 7.2.0 | 1.83.16 | 1.83.16 | 0.44.0 | 2023-12-07 | |
Expand Down
1,913 changes: 758 additions & 1,155 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"@types/react-dom": "~18.2.22",
"@types/shelljs": "~0.8.15",
"@types/vscode": "~1.87.0",
"@typescript-eslint/eslint-plugin": "~7.2.0",
"@typescript-eslint/parser": "~7.2.0",
"@typescript-eslint/eslint-plugin": "~7.3.1",
"@typescript-eslint/parser": "~7.3.1",
"@vitest/browser": "~1.4.0",
"editorconfig": "~2.0.0",
"eslint": "~8.57.0",
Expand All @@ -20,9 +20,9 @@
"shelljs": "~0.8.5",
"shx": "~0.3.4",
"typescript": "~5.4.2",
"vite": "~5.1.6",
"vite": "~5.2.2",
"vitest": "~1.4.0",
"webdriverio": "~8.33.1"
"webdriverio": "~8.35.1"
},
"volta": {
"node": "20.11.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [8.0.1] - 2024-03-21

- Updated to version `3.2.1` of `@codingame/monaco-vscode` packages

## [8.0.0] - 2024-03-18

- Repository now includes `monaco-editor-wrapper` and `@typefox/monaco-editor-react`
Expand Down
6 changes: 3 additions & 3 deletions packages/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ The bespoke projects not only supplies the api, but it provides 100+ packages wi

Please check the [following link](https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services) for information about all services supplied by [@codingame/monaco-vscode-api](https://github.com/CodinGame/monaco-vscode-api).

Please check our examples [in the examples overview chapter](https://github.com/TypeFox/monaco-languageclient/tree/main?tab=readme-ov-file#examples-overview) as they demonstrate the usage.

#### textmate and monarch

If you use the `textmate` or `theme` services you are able to load textmate based grammars and theme definitions from vscode:
Expand All @@ -45,7 +43,9 @@ import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-servic

Once you those services you can no longer make use of monarch based grammars and themes.

See [here](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md) for a detailed documentation.
## Examples

For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#examples-overview>) in the main repository.

## License

Expand Down
14 changes: 7 additions & 7 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaco-languageclient",
"version": "8.0.0",
"version": "8.0.1",
"description": "Monaco Language client implementation",
"author": {
"name": "TypeFox GmbH",
Expand Down Expand Up @@ -55,15 +55,15 @@
"LICENSE"
],
"dependencies": {
"@codingame/monaco-vscode-languages-service-override": "~3.1.2",
"@codingame/monaco-vscode-model-service-override": "~3.1.2",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.1.2",
"vscode": "npm:@codingame/monaco-vscode-api@~3.1.2",
"@codingame/monaco-vscode-languages-service-override": "~3.2.1",
"@codingame/monaco-vscode-model-service-override": "~3.2.1",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.2.1",
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1",
"vscode-languageclient": "~9.0.1"
},
"peerDependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.1.2",
"vscode": "npm:@codingame/monaco-vscode-api@~3.1.2"
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.2.1",
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1"
},
"peerDependenciesMeta": {
"monaco-editor": {
Expand Down
4 changes: 4 additions & 0 deletions packages/examples/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [8.0.1] - 2024-03-21

- TypeScript based examples now make use of `@codingame/monaco-vscode-standalone` packages

## [8.0.0] - 2024-03-18

- Repository now includes `monaco-editor-wrapper` and `@typefox/monaco-editor-react`
Expand Down
48 changes: 25 additions & 23 deletions packages/examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaco-languageclient-examples",
"version": "8.0.0",
"version": "8.0.1",
"description": "Monaco Language client examples",
"author": {
"name": "TypeFox GmbH",
Expand Down Expand Up @@ -54,33 +54,35 @@
}
},
"dependencies": {
"@codingame/monaco-vscode-configuration-service-override": "~3.1.2",
"@codingame/monaco-vscode-editor-service-override": "~3.1.2",
"@codingame/monaco-vscode-files-service-override": "~3.1.2",
"@codingame/monaco-vscode-groovy-default-extension": "~3.1.2",
"@codingame/monaco-vscode-json-default-extension": "~3.1.2",
"@codingame/monaco-vscode-keybindings-service-override": "~3.1.2",
"@codingame/monaco-vscode-python-default-extension": "~3.1.2",
"@codingame/monaco-vscode-textmate-service-override": "~3.1.2",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~3.1.2",
"@codingame/monaco-vscode-theme-service-override": "~3.1.2",
"@codingame/monaco-vscode-javascript-default-extension": "~3.1.2",
"@codingame/monaco-vscode-typescript-basics-default-extension": "~3.1.2",
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~3.1.2",
"@codingame/monaco-vscode-language-pack-de": "~3.1.2",
"@codingame/monaco-vscode-language-pack-es": "~3.1.2",
"@codingame/monaco-vscode-language-pack-fr": "~3.1.2",
"@typefox/monaco-editor-react": "~3.0.0",
"express": "~4.18.3",
"@codingame/monaco-vscode-configuration-service-override": "~3.2.1",
"@codingame/monaco-vscode-editor-service-override": "~3.2.1",
"@codingame/monaco-vscode-files-service-override": "~3.2.1",
"@codingame/monaco-vscode-groovy-default-extension": "~3.2.1",
"@codingame/monaco-vscode-keybindings-service-override": "~3.2.1",
"@codingame/monaco-vscode-javascript-default-extension": "~3.2.1",
"@codingame/monaco-vscode-json-default-extension": "~3.2.1",
"@codingame/monaco-vscode-python-default-extension": "~3.2.1",
"@codingame/monaco-vscode-standalone-languages": "~3.2.1",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~3.2.1",
"@codingame/monaco-vscode-textmate-service-override": "~3.2.1",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~3.2.1",
"@codingame/monaco-vscode-theme-service-override": "~3.2.1",
"@codingame/monaco-vscode-typescript-basics-default-extension": "~3.2.1",
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~3.2.1",
"@codingame/monaco-vscode-language-pack-de": "~3.2.1",
"@codingame/monaco-vscode-language-pack-es": "~3.2.1",
"@codingame/monaco-vscode-language-pack-fr": "~3.2.1",
"@typefox/monaco-editor-react": "~3.0.1",
"express": "~4.19.1",
"langium": "3.0.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.1.2",
"monaco-editor-wrapper": "~4.0.0",
"monaco-languageclient": "~8.0.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.2.1",
"monaco-editor-wrapper": "~4.0.1",
"monaco-languageclient": "~8.0.1",
"pyright": "~1.1.354",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"request-light": "~0.7.0",
"vscode": "npm:@codingame/monaco-vscode-api@~3.1.2",
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1",
"vscode-json-languageservice": "~5.3.7",
"vscode-languageclient": "~9.0.1",
"vscode-languageserver": "~9.0.1",
Expand Down
23 changes: 11 additions & 12 deletions packages/examples/src/ts/wrapperAdvanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
* ------------------------------------------------------------------------------------------ */

import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override';
import '@codingame/monaco-vscode-javascript-default-extension';
// import '@codingame/monaco-vscode-typescript-basics-default-extension';
// import '@codingame/monaco-vscode-typescript-language-features-default-extension';
import '@codingame/monaco-vscode-standalone-languages';
import '@codingame/monaco-vscode-standalone-typescript-language-features';
import { EditorAppConfigClassic, LanguageClientError, MonacoEditorLanguageClientWrapper, UserConfig } from 'monaco-editor-wrapper';
import { useWorkerFactory } from 'monaco-editor-wrapper/workerFactory';

export const configureMonacoWorkers = () => {
useWorkerFactory({
basePath: '../../../node_modules'
});
};

const wrapper42 = new MonacoEditorLanguageClientWrapper();
const wrapper43 = new MonacoEditorLanguageClientWrapper();
const wrapper44 = new MonacoEditorLanguageClientWrapper();
Expand All @@ -24,7 +29,7 @@ const wrapper42Config: UserConfig = {
debugLogging: true
},
editorAppConfig: {
$type: 'extended',
$type: 'classic',
languageId: 'text/plain',
useDiffEditor: true,
codeOriginal: `This line is equal.
Expand Down Expand Up @@ -59,7 +64,7 @@ const wrapper43Config: UserConfig = {
debugLogging: true
},
editorAppConfig: {
$type: 'extended',
$type: 'classic',
languageId: 'text/plain',
useDiffEditor: true,
codeOriginal: 'This line is equal.\nThis number is different 3022.\nMisspelled!Same again.',
Expand All @@ -84,7 +89,7 @@ const wrapper44Config: UserConfig = {
debugLogging: true
},
editorAppConfig: {
$type: 'extended',
$type: 'classic',
languageId: 'javascript',
useDiffEditor: false,
code: `function logMe() {
Expand All @@ -100,12 +105,6 @@ const wrapper44Config: UserConfig = {
}
};

export const configureMonacoWorkers = () => {
useWorkerFactory({
basePath: '../../../node_modules'
});
};

const startWrapper42 = async () => {
await wrapper42.initAndStart(wrapper42Config, document.getElementById('monaco-editor-root-42'));
console.log('wrapper42 was started.');
Expand Down
11 changes: 7 additions & 4 deletions packages/examples/src/ts/wrapperTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-
// import '@codingame/monaco-vscode-typescript-basics-default-extension';
// import '@codingame/monaco-vscode-typescript-language-features-default-extension';

// basic-languages and language only exists if manually copied there
// import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js';
// import 'monaco-editor/esm/vs/language/typescript/monaco.contribution.js';
import '@codingame/monaco-vscode-standalone-languages';
import '@codingame/monaco-vscode-standalone-typescript-language-features';

import { disposeEditor, getWrapper, startEditor, swapEditors, updateModel } from '../common/example-apps-common.js';
import { UserConfig } from 'monaco-editor-wrapper';
import { useWorkerFactory } from 'monaco-editor-wrapper/workerFactory';

export const configureMonacoWorkers = () => {
useWorkerFactory({
basePath: '../../../node_modules'
ignoreMapping: true,
workerLoaders: {
editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url), { type: 'module' }),
typescript: () => new Worker(new URL('@codingame/monaco-vscode-standalone-typescript-language-features/worker', import.meta.url), { type: 'module' })
}
});
};

Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-ws-jsonrpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ forward(socketConnection, serverConnection, message => {
});
```

### Further examples
## Examples

For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#getting-started>) in the main repository.
For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#examples-overview>) in the main repository.

## License

Expand Down
4 changes: 4 additions & 0 deletions packages/wrapper-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to npm module [@typefox/monaco-editor-react](https://www.npmjs.com/package/@typefox/monaco-editor-react) are documented in this file.

## [3.0.1] - 2024-03-21

- Updated to `[email protected]`

## [3.0.0] - 2024-03-18

- Moved code to [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) repository.
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This will return an instance of `Thenable`, which should contain the returned da

## Examples

For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#getting-started>) in the main repository.
For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#examples-overview>) in the main repository.

## License

Expand Down
22 changes: 17 additions & 5 deletions packages/wrapper-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typefox/monaco-editor-react",
"version": "3.0.0",
"version": "3.0.1",
"license": "MIT",
"description": "React component for Monaco-Editor and Monaco Languageclient",
"keywords": [
Expand Down Expand Up @@ -51,17 +51,29 @@
"npm": "10.2.4"
},
"dependencies": {
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.1.2",
"monaco-editor-wrapper": "~4.0.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.2.1",
"monaco-editor-wrapper": "~4.0.1",
"react": "~18.2.0",
"vscode": "npm:@codingame/monaco-vscode-api@~3.1.2"
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1"
},
"peerDependencies": {
"monaco-editor-wrapper": "~4.0.0"
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~3.2.1",
"monaco-editor-wrapper": "~4.0.1",
"react": "~18.2.0",
"vscode": "npm:@codingame/monaco-vscode-api@~3.2.1"
},
"peerDependenciesMeta": {
"monaco-editor": {
"optional": false
},
"monaco-editor-wrapper": {
"optional": false
},
"react": {
"optional": false
},
"vscode": {
"optional": false
}
},
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions packages/wrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to npm module [monaco-editor-wrapper](https://www.npmjs.com/package/monaco-editor-wrapper) are documented in this file.

## [4.0.1] - 2024-03-21

- `workerFactory` now uses `@codingame/monaco-vscode-standalone` packages available since `3.2.0` to build the workers. Therefore it is now independent of the MS package.

## [4.0.0] - 2024-03-18

- Moved code to [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) repository.
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper/bundle'

## Examples

For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#getting-started>) in the main repository.
For a detailed list of examples please look at [this section](<https://github.com/TypeFox/monaco-languageclient#examples-overview>) in the main repository.

## License

Expand Down
Loading

0 comments on commit 93c817f

Please sign in to comment.