Skip to content

Lifecycle adjustments #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Volta
uses: volta-cli/action@v4
with:
node-version: 20

- name: Use pnpm
uses: pnpm/action-setup@v3
Expand Down Expand Up @@ -56,4 +54,4 @@ jobs:
shell: bash
run: |
npm run test:install
npm run test:run
npm run test
17 changes: 3 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3>Langium</h3>

Langium Grammar DSL: <a href="./packages/examples/langium_extended.html">Extended Mode</a> - <a href="./packages/examples/langium_classic.html">Classic Mode</a>
<br>
<a href="./packages/examples/statemachine.html">Langium Statemachine Client & Language Server (Worker)</a>
<a href="./packages/examples/statemachine.html">Langium Statemachine Client & Language Server (Worker)</a> (<a href="./packages/examples/react_statemachine.html">React Version</a>)<br>
<br>
Localizations:
<a href="./packages/examples/statemachine.html?locale=cs">cs</a> -
Expand All @@ -58,7 +58,7 @@ <h3>Langium</h3>
<h3>Python</h3>
Please execute <b><code>npm run start:example:server:python</code></b> beforehand.<br>
Debugger requires docker. Please execute <b><code>docker compose -f ./packages/examples/resources/debugger/docker-compose.yml up -d</code></b> beforehand.<br>
<a href="./packages/examples/python.html">Python Language Client & Pyright Language Server (Web Socket)</a><br>
<a href="./packages/examples/python.html">Python Language Client & Pyright Language Server (Web Socket)</a> (<a href="./packages/examples/react_python.html">React Version</a>)<br>

<h3>Java / Eclipse JDS LS</h3>
Requires docker. Please execute <b><code>docker compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml up -d</code></b> beforehand:<br>
Expand All @@ -80,23 +80,12 @@ <h3>Multiple Languageclients</h3>
<br>

<h3>Application Playground</h3>
<a href="./packages/examples/appPlayground.html">Application Playground</a>
<a href="./packages/examples/appPlayground.html">Application Playground</a> (<a href="./packages/examples/react_appPlayground.html">React Version</a>)

<h3>TypeScript</h3>
<a href="./packages/examples/tsExtHost.html">TypeScript Extension Host Worker</a>
<br>

<h2>Monaco Editor React</h2>
Please execute <b><code>npm run start:example:server:python</code></b> beforehand.<br>
Debugger requires docker. Please execute <b><code>docker compose -f ./packages/examples/resources/debugger/docker-compose.yml up -d</code></b> beforehand.<br>
<a href="./packages/examples/react_appPlayground.html">React: Application Playground</a>
<br>
<a href="./packages/examples/react_statemachine.html">React: Langium Statemachine Language Client & Language Server (Worker)</a>
<br><br>
Please execute <b><code>npm run start:example:server:python</code></b> beforehand:<br>
<a href="./packages/examples/react_python.html">React: Python Language Client & Language Server (Web Socket)</a>
<br>

<h2>Verification</h2>
<h3>Angular</h2>
Please start <b><code>cd verify/angular && npm run verify</code></b> beforehand:<br>
Expand Down
83 changes: 28 additions & 55 deletions package-lock.json

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

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"compile": "npm run compile --workspaces",
"watch:clean": "tsc --build tsconfig.build.json --clean",
"watch": "tsc --build tsconfig.build.json --watch --verbose",
"watch:tsgo": "tsgo -p tsconfig.build.json --watch",
"build:tsc": "tsc -p tsconfig.build.json --verbose",
"build:tsgo": "tsgo -p tsconfig.build.json --verbose",
"watch:tsgo": "tsgo --build tsconfig.build.json --watch --verbose",
"build:tsc": "tsc --build tsconfig.build.json --verbose",
"build:tsgo": "tsgo --build tsconfig.build.json --verbose",
"lint": "eslint",
"production:build": "npm run production:build --workspace packages/examples",
"production:preview:build": "npm run production:preview:build --workspace packages/examples",
Expand All @@ -68,13 +68,13 @@
"build:examples": "npm run build --workspace packages/examples",
"start:example:server:json": "npm run start:server:json --workspace packages/examples",
"start:example:server:python": "npm run start:server:python --workspace packages/examples",
"release:prepare": "npm run reset:repo && npm ci && npm run build && npm run lint && npm run test:run",
"release:prepare": "npm run reset:repo && npm ci && npm run build && npm run lint && npm run test",
"reset:chrome": "shx rm -fr ./.chrome",
"reset:repo": "git clean -f -d -x --exclude=.chrome",
"test": "npm run test:install && npm run test:direct",
"test:direct": "vitest --config vitest.config.ts",
"test:run": "npm run test:install && npm run test:direct:run",
"test:direct:run": "vitest --config vitest.config.ts --run",
"test:direct:watch": "vitest --config vitest.config.ts",
"test:watch": "npm run test:install && npm run test:direct:watch",
"test:direct": "vitest --config vitest.config.ts --run",
"test:debug": "npm run test:playwright -- --inspect-brk=20222 --browser --no-file-parallelism",
"test:install": "playwright install --with-deps chromium"
},
Expand Down
73 changes: 57 additions & 16 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,60 @@
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./tools": {
"types": "./lib/tools/index.d.ts",
"default": "./lib/tools/index.js"
"./common": {
"types": "./lib/common/index.d.ts",
"default": "./lib/common/index.js"
},
"./vscode/services": {
"./vscodeApiWrapper": {
"types": "./lib/vscode/index.d.ts",
"default": "./lib/vscode/index.js"
},
"./vscodeApiLocales": {
"types": "./lib/vscode/locales.d.ts",
"default": "./lib/vscode/locales.js"
},
"./fs": {
"types": "./lib/fs/index.d.ts",
"default": "./lib/fs/index.js"
},
"./workerFactory": {
"types": "./lib/workerFactory.d.ts",
"default": "./lib/workerFactory.js"
"types": "./lib/worker/index.d.ts",
"default": "./lib/worker/index.js"
},
"./lcwrapper": {
"types": "./lib/wrapper/index.d.ts",
"default": "./lib/wrapper/index.js"
},
"./wrapper": {
"types": "./lib/languageClientWrapper.d.ts",
"default": "./lib/languageClientWrapper.js"
"./editorApp": {
"types": "./lib/editorApp/index.d.ts",
"default": "./lib/editorApp/index.js"
}
},
"typesVersions": {
"*": {
".": [
"lib/index.d.ts"
],
"tools": [
"lib/tools/index"
"common": [
"lib/common/index"
],
"vscode/services": [
"vscodeApiWrapper": [
"lib/vscode/index"
],
"vscodeApiLocales": [
"lib/vscode/locales"
],
"fs": [
"lib/fs/index"
],
"workerFactory": [
"lib/workerFactory"
"lib/worker/index"
],
"wrapper": [
"lib/languageClientWrapper"
"lcwrapper": [
"lib/lrapper/index"
],
"editorApp": [
"lib/editorApp/index"
]
}
},
Expand All @@ -90,13 +104,40 @@
"@codingame/monaco-vscode-extensions-service-override": "~18.2.0",
"@codingame/monaco-vscode-extension-api": "~18.2.0",
"@codingame/monaco-vscode-languages-service-override": "~18.2.0",
"@codingame/monaco-vscode-language-pack-cs": "~18.2.0",
"@codingame/monaco-vscode-language-pack-de": "~18.2.0",
"@codingame/monaco-vscode-language-pack-es": "~18.2.0",
"@codingame/monaco-vscode-language-pack-fr": "~18.2.0",
"@codingame/monaco-vscode-language-pack-it": "~18.2.0",
"@codingame/monaco-vscode-language-pack-ja": "~18.2.0",
"@codingame/monaco-vscode-language-pack-ko": "~18.2.0",
"@codingame/monaco-vscode-language-pack-pl": "~18.2.0",
"@codingame/monaco-vscode-language-pack-pt-br": "~18.2.0",
"@codingame/monaco-vscode-language-pack-qps-ploc": "~18.2.0",
"@codingame/monaco-vscode-language-pack-ru": "~18.2.0",
"@codingame/monaco-vscode-language-pack-tr": "~18.2.0",
"@codingame/monaco-vscode-language-pack-zh-hans": "~18.2.0",
"@codingame/monaco-vscode-language-pack-zh-hant": "~18.2.0",
"@codingame/monaco-vscode-localization-service-override": "~18.2.0",
"@codingame/monaco-vscode-log-service-override": "~18.2.0",
"@codingame/monaco-vscode-model-service-override": "~18.2.0",
"vscode": "npm:@codingame/monaco-vscode-extension-api@~18.2.0",
"@codingame/monaco-vscode-monarch-service-override": "~18.2.0",
"@codingame/monaco-vscode-textmate-service-override": "~18.2.0",
"@codingame/monaco-vscode-theme-defaults-default-extension": "~18.2.0",
"@codingame/monaco-vscode-theme-service-override": "~18.2.0",
"@codingame/monaco-vscode-views-service-override": "~18.2.0",
"@codingame/monaco-vscode-workbench-service-override": "~18.2.0",
"vscode-languageclient": "~9.0.1",
"vscode-languageserver-protocol": "~3.17.5",
"vscode-ws-jsonrpc": "~3.4.0"
},
"devDependencies": {
"@codingame/monaco-vscode-standalone-languages": "~18.2.0",
"@codingame/monaco-vscode-standalone-css-language-features": "~18.2.0",
"@codingame/monaco-vscode-standalone-html-language-features": "~18.2.0",
"@codingame/monaco-vscode-standalone-json-language-features": "~18.2.0",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~18.2.0"
},
"scripts": {
"clean": "shx rm -fr ./lib *.tsbuildinfo",
"compile": "tsc --build tsconfig.src.json",
Expand Down
26 changes: 0 additions & 26 deletions packages/client/src/client.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import type { MonacoLanguageClient } from './client.js';
import { BaseLanguageClient } from 'vscode-languageclient/browser.js';

export type ConnectionConfigOptions = WebSocketConfigOptionsDirect | WebSocketConfigOptionsParams | WebSocketConfigOptionsUrl | WorkerConfigOptionsParams | WorkerConfigOptionsDirect;

export interface WebSocketCallOptions {
/** Adds handle on languageClient */
onCall: (languageClient?: MonacoLanguageClient) => void;
onCall: (languageClient?: BaseLanguageClient) => void;
/** Reports Status Of Language Client */
reportStatus?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

export * from './commonTypes.js';
export * from './logging.js';
export * from './utils.js';
Loading