Skip to content

Commit

Permalink
Updated CHANGELOGs. You can now pass a URL to initLocaleLoader for …
Browse files Browse the repository at this point in the history
…module import
  • Loading branch information
kaisalmen committed Sep 27, 2024
1 parent d49ac46 commit e16dd08
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 16 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ All notable changes to this npm module are documented in this file.

## [9.0.0-next.1] - 2024-09-xy

- Update to monaco-vscode-api 9.0.3 (monaco-editor 0.52.0)
- Pass MessageTransports directly
- 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`.
- Enhancements to logging
- monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741)
- Pass MessageTransports directly
- Allows to configure more than one language client

## [8.8.3] - 2024-08-26

Expand Down
5 changes: 5 additions & 0 deletions packages/examples/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this npm module are documented in this file.
## [2024.9.1] - 2024-09-xy

- Updated to `[email protected]`, `[email protected]` and `@typefox/[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- 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`.
- Updated react examples to wrap the editor in an app component. Strict mode can be set on the page before starting.
- Introduce a new example that makes use of two language clients (json and python). It replaces the multi-editor example.

## [2024.8.4] - 2024-08-26

Expand Down
2 changes: 1 addition & 1 deletion packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~9.0.3",
"monaco-editor-wrapper": "~6.0.0-next.1",
"monaco-languageclient": "~9.0.0-next.1",
"pyright": "~1.1.381",
"pyright": "~1.1.382",
"react": "~18.3.1",
"react-dom": "~18.3.1",
"request-light": "~0.8.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/examples/src/langium/statemachine/launcher.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox and others.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

const { runStatemachineWrapper } = await import('./main.js');

runStatemachineWrapper();
8 changes: 2 additions & 6 deletions packages/examples/statemachine.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ <h2>Langium Statemachine Client & Language Server (Worker)</h2>
<div id="monaco-editor-root2" style="height: 40vh;"></div>
<script type="module" rel="modulepreload">
import { initLocaleLoader } from 'monaco-editor-wrapper/vscode/locale';
await initLocaleLoader();

// production build: ensure local loading is handled before loading the main script
const { runStatemachineWrapper } = await import ('./src/langium/statemachine/main.ts');

runStatemachineWrapper();
const url = new URL('./src/langium/statemachine/launcher.ts', import.meta.url);
await initLocaleLoader(url.href);
</script>
</body>

Expand Down
6 changes: 5 additions & 1 deletion packages/wrapper-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to npm module [@typefox/monaco-editor-react](https://www.npm

## [6.0.0-next.1] - 2024-09-xy

- Updated to `[email protected]` and `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- 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`.
- 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)

## [4.5.3] - 2024-08-26

Expand Down
9 changes: 8 additions & 1 deletion packages/wrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ All notable changes to npm module [monaco-editor-wrapper](https://www.npmjs.com/

## [6.0.0-next.1] - 2024-08-xy

- Updated to `[email protected]`. Updated all `@codingame/monaco-vscode` packages to `9.0.3`.
- 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`.
- 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
- `UserConfig` is renamed to `WrapperConfig` and one level less deep
- Restart options are now intergrated into the configuration
- You can now pass a URL to `initLocaleLoader` for module import

## [5.5.3] - 2024-08-26

Expand Down
5 changes: 4 additions & 1 deletion packages/wrapper/src/vscode/localeLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const localeLoader: Partial<Record<string, () => Promise<void>>> = {

export const locales = Object.keys(localeLoader);

export const initLocaleLoader = async (locale = new URLSearchParams(window.location.search).get('locale')) => {
export const initLocaleLoader = async (urlToImport?: string, locale = new URLSearchParams(window.location.search).get('locale')) => {
if (locale !== null) {
const loader = localeLoader[locale];
if (loader) {
Expand All @@ -59,4 +59,7 @@ export const initLocaleLoader = async (locale = new URLSearchParams(window.locat
console.error(`Unknown locale ${locale}`);
}
}
if (urlToImport !== undefined) {
void import(urlToImport);
}
};

0 comments on commit e16dd08

Please sign in to comment.