Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
- Update Changelog
- Update to GLSP 1.0
- Update to sprotty-vscode-webview 3.x
- Update security.MD
- Fix base tsconfig
  • Loading branch information
tortmayr committed Jul 4, 2022
1 parent 4484750 commit 3adeac1
Show file tree
Hide file tree
Showing 15 changed files with 716 additions and 652 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Eclipse GLSP VSCode Integration Changelog

## [v1.0.0 - 30/06/2022](https://github.com/eclipse-glsp/glsp-client/releases/tag/v1.0.0)

### Changes

- [example] Improved and modernized styling of the GLSP workflow example [#22](https://github.com/eclipse-glsp/glsp-vscode-integration/pull/22)
- [build] Updated Typescript to version 4.5.5 and enforced `noImplicitOverride` [#26](https://github.com/eclipse-glsp/glsp-vscode-integration/pull/26)

## [v0.9.0- 09/12/2021](https://github.com/eclipse-glsp/glsp-vscode-integration/releases/tag/v0.9.0)

Inception of the Eclipse VScode integration.
Expand Down
20 changes: 4 additions & 16 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# Security Policy
# Eclipse GLSP Vulnerability Reporting Policy

Eclipse GLSP follows the [Eclipse Vulnerability Reporting Policy](https://www.eclipse.org/security/policy.php).
Vulnerabilities are tracked by the Eclipse security team, in cooperation with the GLSP project leads.
Fixing vulnerabilities is taken care of by the GLSP project committers, with assistance and guidance of the security team.
If you think or suspect that you have discovered a new security vulnerability in this project, please do not disclose it on GitHub, e.g. in an issue, a PR, or a discussion. Any such disclosure will be removed/deleted on sight, to promote orderly disclosure, as per the Eclipse Foundation Security Policy (1).

## Supported Versions
Instead, please report any potential vulnerability to the Eclipse Foundation Security Team. Make sure to provide a concise description of the issue, a CWE, and other supporting information.

Eclipse GLSP is still in the incubation phase.
During this phase only the most current release is supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 0.9.0 | :white_check_mark: |
| < 0.9.0 | :x: |

## Reporting a Vulnerability

We recommend that in case of suspected vulnerabilities you do not use the GLSP public issue tracker, but instead contact the Eclipse Security Team directly via [email protected].
(1) Eclipse Foundation Vulnerability Reporting Policy: <https://www.eclipse.org/security/policy.php>
8 changes: 4 additions & 4 deletions example/workflow/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "workflow-vscode-example",
"private": "true",
"version": "0.9.0",
"version": "1.0.0",
"description": "An example graphical language used for modeling workflows",
"displayName": "Workflow GLSP Example",
"publisher": "Eclipse-GLSP",
Expand Down Expand Up @@ -186,13 +186,13 @@
},
"main": "./lib/index",
"devDependencies": {
"@eclipse-glsp/vscode-integration": "0.9.0",
"@eclipse-glsp/vscode-integration": "^1.0.0",
"@types/vscode": "^1.54.0",
"path": "^0.12.7",
"reflect-metadata": "^0.1.13",
"ts-loader": "^6.2.1",
"ts-node": "^9.1.1",
"workflow-glsp-webview": "0.9.0"
"ts-node": "^10.8.2",
"workflow-glsp-webview": "^1.0.0"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint",
Expand Down
2 changes: 1 addition & 1 deletion example/workflow/extension/src/workflow-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
// Start server process using quickstart component
if (process.env.GLSP_SERVER_DEBUG !== 'true') {
const serverProcess = new GlspServerLauncher({
executable: path.join(__dirname, '../server/org.eclipse.glsp.example.workflow-0.10.0-SNAPSHOT-glsp.jar'),
executable: path.join(__dirname, '../server/org.eclipse.glsp.example.workflow-1.0.0-glsp.jar'),
socketConnectionOptions: { port: JSON.parse(process.env.GLSP_SERVER_PORT || DEFAULT_SERVER_PORT) },
additionalArgs: ['--fileLog', 'true', '--logDir', path.join(__dirname, '../server')],
logging: true,
Expand Down
10 changes: 6 additions & 4 deletions example/workflow/scripts/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@ import download from 'mvn-artifact-download';
import { join } from 'path';

const downloadDir = join(__dirname, '../extension/server');
const mavenRepository = 'https://oss.sonatype.org/content/repositories/snapshots/';
const mavenRepository = 'https://repo1.maven.org/maven2/';
const groupId = 'org.eclipse.glsp.example';
const artifactId = 'org.eclipse.glsp.example.workflow';
const version = '0.10.0';
const version = '1.0.0';
const classifier = 'glsp';

const serverExecutable = `${__dirname}/../extension/server/${artifactId}-${version}-${classifier}-SNAPSHOT.jar`;
if (fs.existsSync(serverExecutable)) {
fs.unlinkSync(serverExecutable);
}
const isSnapShot = false;
console.log('Downloading latest version of the Workflow Example Java Server from the maven repository...');
download({ groupId, artifactId, version, classifier, isSnapShot: true }, downloadDir, mavenRepository)
download({ groupId, artifactId, version, classifier, isSnapShot }, downloadDir, mavenRepository)
.then(() =>
console.log(
'Download completed. Start the server using this command: \njava -jar org.eclipse.glsp.example.workflow-' +
version +
'-SNAPSHOT-glsp.jar org.eclipse.glsp.example.workflow.launch.ExampleServerLauncher\n\n'
`${isSnapShot ? '-SNAPSHOT' : ''}` +
'-glsp.jar org.eclipse.glsp.example.workflow.launch.ExampleServerLauncher\n\n'
)
)
.catch(err => console.error(err));
6 changes: 3 additions & 3 deletions example/workflow/webview/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "workflow-glsp-webview",
"private": "true",
"version": "0.9.0",
"version": "1.0.0",
"description": "Example of the Workflow GLSP diagram in a VS Code extensions (WebView part)",
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
"keywords": [
Expand All @@ -28,8 +28,8 @@
}
],
"devDependencies": {
"@eclipse-glsp-examples/workflow-glsp": "next",
"@eclipse-glsp/vscode-integration-webview": "0.9.0",
"@eclipse-glsp-examples/workflow-glsp": "^1.0.0",
"@eclipse-glsp/vscode-integration-webview": "^1.0.0",
"@vscode/codicons": "^0.0.25",
"circular-dependency-plugin": "^5.2.2",
"css-loader": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.0",
"version": "1.0.0",
"useWorkspaces": true,
"npmClient": "yarn",
"command": {
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"build": "yarn install --ignore-scripts && lerna run build",
"test": "lerna run test",
"lint": "lerna run lint --",
"publish:prepare": "lerna version minor --exact --ignore-scripts --yes --no-push",
"publish:latest": "lerna publish from-git --no-git-reset --no-verify-access --no-push",
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push",
"publish:next": "SHA=$(git rev-parse --short HEAD) && lerna publish preminor --exact --canary --preid next.${SHA} --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes --no-verify-access",
"upgrade:next": "yarn upgrade -p \"@eclipse-glsp.*|sprotty\" --next",
"build:ci": "lerna run build:ci"
Expand All @@ -23,9 +23,6 @@
"rimraf": "^2.6.3",
"typescript": "^4.4.5"
},
"resolutions": {
"**/sprotty": "0.12.0-next.00a6590.0"
},
"workspaces": [
"packages/*/",
"example/workflow/*"
Expand Down
6 changes: 3 additions & 3 deletions packages/vscode-integration-webview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eclipse-glsp/vscode-integration-webview",
"version": "0.9.0",
"version": "1.0.0",
"description": "Integration of a GLSP diagram in a VS Code extensions (WebView part)",
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
"keywords": [
Expand Down Expand Up @@ -32,8 +32,8 @@
"css"
],
"dependencies": {
"@eclipse-glsp/client": "next",
"sprotty-vscode-webview": "0.2.0"
"@eclipse-glsp/client": "^1.0.0",
"sprotty-vscode-webview": "~0.3.1"
},
"devDependencies": {
"reflect-metadata": "^0.1.13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
********************************************************************************/
import { Action, ActionHandlerRegistry, IActionHandler, IActionHandlerInitializer, ICommand } from '@eclipse-glsp/client';
import { SprottyDiagramIdentifier } from 'sprotty-vscode-webview';
import { vscodeApi } from 'sprotty-vscode-webview/lib/vscode-api';
import { VsCodeApi } from 'sprotty-vscode-webview/lib/services';

/**
* Delegates actions that should be handled inside of the glsp vscode extension instead
* of the webview. This enables the implementation of action handlers that require access
* to the vscode API and/or node backend.
*/
export class GLSPVscodeExtensionActionHandler implements IActionHandler, IActionHandlerInitializer {
constructor(protected readonly actionKinds: string[], protected readonly diagramIdentifier: SprottyDiagramIdentifier) {}
constructor(
protected readonly actionKinds: string[],
protected readonly diagramIdentifier: SprottyDiagramIdentifier,
protected vscodeApi: VsCodeApi
) {}

initialize(registry: ActionHandlerRegistry): void {
this.actionKinds.forEach(kind => registry.register(kind, this));
Expand All @@ -36,7 +40,7 @@ export class GLSPVscodeExtensionActionHandler implements IActionHandler, IAction
action,
__localDispatch: true
};
vscodeApi.postMessage(message);
this.vscodeApi.postMessage(message);
}
}
}
4 changes: 3 additions & 1 deletion packages/vscode-integration-webview/src/glsp-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
VscodeDiagramWidget,
VscodeDiagramWidgetFactory
} from 'sprotty-vscode-webview';
import { VsCodeApi } from 'sprotty-vscode-webview/lib/services';
import { CopyPasteHandlerProvider } from './copy-paste-handler-provider';
import { GLSPDiagramIdentifier, isDiagramIdentifier } from './diagram-identifer';
import { GLSPVscodeExtensionActionHandler } from './extension-action-handler';
Expand Down Expand Up @@ -67,6 +68,7 @@ export abstract class GLSPStarter extends SprottyStarter {
}

protected override addVscodeBindings(container: Container, diagramIdentifier: GLSPDiagramIdentifier): void {
container.bind(VsCodeApi).toConstantValue(this.vscodeApi);
container.bind(GLSPVscodeDiagramWidget).toSelf().inSingletonScope();
container.bind(VscodeDiagramWidget).toService(GLSPVscodeDiagramWidget);
container
Expand All @@ -89,7 +91,7 @@ export abstract class GLSPStarter extends SprottyStarter {
}

protected configureExtensionActionHandler(container: Container, diagramIdentifier: SprottyDiagramIdentifier): void {
const extensionActionHandler = new GLSPVscodeExtensionActionHandler(this.extensionActionKinds, diagramIdentifier);
const extensionActionHandler = new GLSPVscodeExtensionActionHandler(this.extensionActionKinds, diagramIdentifier, this.vscodeApi);
container.bind(GLSPVscodeExtensionActionHandler).toConstantValue(extensionActionHandler);
container.bind(TYPES.IActionHandlerInitializer).toService(GLSPVscodeExtensionActionHandler);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eclipse-glsp/vscode-integration",
"version": "0.9.0",
"version": "1.0.0",
"description": "Glue code to integrate GLSP diagrams in VSCode extensions (extension part)",
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
"displayName": "GLSP VSCode Integration",
Expand Down Expand Up @@ -34,7 +34,7 @@
"vscode": "^1.54.0"
},
"dependencies": {
"@eclipse-glsp/protocol": "next",
"@eclipse-glsp/protocol": "^1.0.0",
"vscode-jsonrpc": "^4.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ interface JavaSocketServerLauncherOptions {
socketConnectionOptions: net.TcpSocketConnectOpts;
/** Set to `true` if server stdout and stderr should be printed in extension host console. Default: `false` */
readonly logging?: boolean;
/** Additional arguments that should be passed when starting the server process. */
readonly serverType: 'java' | 'node';
/** Additional arguments that should be passed when starting the server process. */
readonly additionalArgs?: string[];
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./configs/base.tsconfig",
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
Expand Down
Loading

0 comments on commit 3adeac1

Please sign in to comment.